.rogue-badge{max-width:460px;margin:0 auto 9px;text-align:center;color:#a8e4d6;font:11px monospace}
.rogue-badge a{color:#ffe179}
.rogue-overlay[data-screen=reward],.rogue-overlay[data-screen=bossIntro],.rogue-overlay[data-screen=over]{background:#08182af5;gap:5px;padding:10px}
.rogue-overlay[data-screen=reward] .menu-scroll,.rogue-overlay[data-screen=bossIntro] .menu-scroll,.rogue-overlay[data-screen=over] .menu-scroll{width:100%;padding:3px;gap:6px;max-height:none!important}
.rogue-overlay .menu-title{font-size:15px}
.rogue-choice{flex:none;width:100%;min-height:0!important;border:2px solid #548c94;background:#153245;color:#edf4dc;padding:8px 7px;box-shadow:2px 2px #020e18;cursor:pointer;text-align:left;position:relative}
.rogue-choice.selected{border-color:#b8efde;outline:0;background:#234754}
.rogue-choice .choice-name{font-size:13px;display:block;text-align:center}
.rogue-choice .choice-description{font:11px/1.3 monospace;display:block;color:#c9e3dc;text-align:center;margin-top:4px}
.rogue-choice .choice-count{font:10px monospace;color:#a0cbbb;display:block;text-align:center;margin-top:3px}
.rogue-brief{color:#cfe7dd;font:12px/1.5 monospace;padding:4px 5px;text-align:center}
.rogue-inventory{font:10px monospace;text-align:center;color:#bedacb;margin:7px 0;line-height:1.6;min-height:16px}
.rogue-skip{display:block;width:100%;margin:5px auto;background:#593b75;color:#ffe697;border:3px solid #1c1734;font:900 13px monospace;padding:9px;cursor:pointer}
.rogue-skip[hidden]{display:none}
.rogue-debug{width:100%;margin:14px 0;background:#101f30;border:2px solid #365c68;padding:10px;color:#d8ece5;font:12px/1.5 monospace}
.rogue-debug summary{cursor:pointer;color:#ffe583;font-weight:bold}
.rogue-stats{display:grid;grid-template-columns:1fr 1fr;gap:3px 12px;margin:8px 0;font-variant-numeric:tabular-nums}
.rogue-stats dt{color:#93b7ba}.rogue-stats dd{margin:0;color:#f4e8a8;text-align:right}
.rogue-debug h3{font:900 13px monospace;color:#8fdfbc;margin:14px 0 7px}
.debug-row{display:flex;flex-wrap:wrap;gap:6px;margin:7px 0;align-items:center}
.rogue-debug select,.rogue-debug input,.rogue-debug button{font:12px monospace;border:1px solid #58818b;border-radius:0;background:#193546;color:#e6f1e5;padding:7px;min-width:0;max-width:100%}
.rogue-debug select{flex:1;min-width:120px}.rogue-debug input[type=number]{width:85px}.rogue-debug button{cursor:pointer;background:#265347}.rogue-debug button:active{background:#397b62}
.rogue-tuning{display:grid;grid-template-columns:1fr 85px;gap:6px;align-items:center;margin-top:8px}
.debug-warning{font-size:10px;line-height:1.4;color:#b0c5c5;margin:8px 0}
.debug-stack{display:flex;justify-content:space-between;align-items:center;gap:6px;border-bottom:1px solid #274454;padding:3px 0}
.debug-stack button{padding:2px 7px}
.rogue-overlay #menuFoot{font-size:8px}
@media(max-width:390px){.rogue-choice{padding:5px}.rogue-choice .choice-name{font-size:11px}.rogue-choice .choice-description{font-size:9px}.rogue-choice .choice-count{font-size:9px;margin-top:1px}.rogue-brief{font-size:10px}.rogue-overlay .menu-title{font-size:12px}.rogue-stats{font-size:11px;gap:2px 7px}.rogue-debug{padding:7px}}

.rogue-art-choice{display:grid;grid-template-columns:42% minmax(0,1fr);gap:6px;align-items:center;padding:4px;overflow:hidden}
.rogue-art-choice>img{width:100%;height:auto;max-height:91px;object-fit:contain;image-rendering:pixelated}
.rogue-art-choice .choice-name{font-size:11px}
.rogue-art-choice .choice-description{font-size:10px;line-height:1.2;margin-top:3px}
.rogue-art-choice .choice-count{font-size:9px}
.has-boss{padding:3px!important;background:#142d4c!important}
.has-boss>#hudWord,.has-boss>#hudLevel{display:none}
.boss-live{display:flex;align-items:center;gap:4px;width:100%;height:64px}
.boss-live[hidden]{display:none}
.boss-live img{width:43%;height:62px;object-fit:contain;image-rendering:pixelated;flex:none}
.boss-live span{flex:1;font:900 9px/1.25 monospace;text-transform:uppercase;color:#ffe27c;min-width:0}
.boss-portrait{width:58px;height:68px;object-fit:contain;image-rendering:pixelated;float:left;margin:0 7px 0 0}
.rogue-overlay[data-screen=bossIntro] .rogue-choice:first-child{min-height:105px!important}
.rogue-overlay .main-menu-art{grid-template-rows:repeat(3,minmax(0,1fr)) 24px}
.main-menu-art .collection-entry{grid-column:1/-1;grid-row:4;width:80%;font-size:11px;min-height:24px!important;height:24px;padding:3px;border:1px solid #6aa3a5;background:#173c52;box-shadow:none}
.rogue-overlay[data-screen=collection] .logo{display:none}
.rogue-overlay[data-screen=collection] .menu-scroll{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:5px;overflow:hidden!important;padding:2px;align-items:stretch}
.medal-choice{min-height:0!important;width:100%;height:100%;padding:2px;background:#193a4d;border:1px solid #5f8c92;box-shadow:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.medal-choice img{max-height:65%;max-width:90%;object-fit:contain;image-rendering:pixelated}
.medal-choice span{font:8px/1.15 monospace;color:#ffdf86;text-align:center}
.medal-choice.locked img{filter:grayscale(1);opacity:.28}
.medal-choice.locked span{color:#8ba4ac}
.collection-back{grid-column:2/4;min-height:0!important;height:100%;width:100%;font-size:12px;padding:5px}
.player-companion{position:absolute;right:12px;bottom:14px;z-index:7;width:59px;pointer-events:none;display:flex;flex-direction:column;align-items:center}
.player-companion[hidden]{display:none}
.companion-sprite{display:block;width:58px;height:58px!important;aspect-ratio:1;border:0;border-radius:0;background:transparent;clip-path:none;image-rendering:pixelated;filter:drop-shadow(0 1px 0 #c8e3bc80)}
.companion-name{font:900 8px monospace;color:var(--player-color,#8ce895);text-shadow:1px 1px #000;text-transform:uppercase}
.companion-dialog{position:absolute;bottom:100%;right:2px;width:124px;border:2px solid var(--player-color,#8ce895);background:#071625f2;color:#fff0b3;font:900 10px/1.25 monospace;padding:6px;text-align:center;box-shadow:2px 2px #020a14}
.companion-dialog[hidden]{display:none}
.companion-dialog:after{content:'';position:absolute;right:14px;top:100%;border:5px solid transparent;border-top-color:var(--player-color,#8ce895)}
.shell{box-shadow:inset 7px 7px color-mix(in srgb,var(--shell,#4dba72),white 35%),inset -7px -7px color-mix(in srgb,var(--shell,#4dba72),black 42%)}
.groove{border-top-color:color-mix(in srgb,var(--shell,#4dba72),black 40%)}
@media(max-width:390px){.rogue-art-choice{grid-template-columns:39% minmax(0,1fr);gap:4px;padding:3px}.rogue-art-choice .choice-name{font-size:9px}.rogue-art-choice .choice-description{font-size:8px}.rogue-art-choice .choice-count{font-size:8px}.boss-live{height:53px;gap:2px}.boss-live img{height:51px;width:39%}.boss-live span{font-size:7px}.boss-portrait{width:43px;height:59px}.rogue-overlay[data-screen=bossIntro] .rogue-choice:first-child{min-height:101px!important}.main-menu-art .collection-entry{font-size:9px}.player-companion{width:44px;right:10px;bottom:13px}.companion-sprite{width:44px;height:44px!important}.companion-name{font-size:7px}.companion-dialog{width:108px;font-size:9px;padding:4px}.medal-choice span{font-size:7px}}

/* Dedicated left lane: the companion never sits on the game or console controls. */
.wrap{width:min(100%,620px)}
.console-stage{display:grid;grid-template-columns:clamp(54px,16vw,100px) minmax(0,480px);gap:10px;justify-content:center;align-items:start;width:100%}
.console-stage>#shell{grid-column:2;grid-row:1;min-width:0}
.console-stage>.player-companion{position:relative;grid-column:1;grid-row:1;align-self:end;width:100%;right:auto;bottom:auto;margin:0 0 170px;z-index:1}
.console-stage .companion-sprite{width:100%;height:auto!important;max-width:92px;aspect-ratio:1}
.console-stage .companion-dialog{left:0;right:auto;width:100%;padding:5px;font-size:10px;overflow-wrap:anywhere;box-sizing:border-box}
.console-stage .companion-dialog:after{right:calc(50% - 5px)}
.console-stage .companion-name{font-size:10px;text-align:center}
@media(max-width:520px){
 .console-stage{gap:6px}
 .console-stage>.player-companion{margin-bottom:133px}
 .console-stage .companion-dialog{font-size:8px;padding:4px 3px;line-height:1.35}
 .console-stage .companion-name{font-size:8px}
 .console-stage .arcade-hud{gap:4px;margin-bottom:10px}
 .console-stage #hudWord{font-size:12px}
 .console-stage .hud-level{padding:7px 3px}
 .console-stage .hud-level .hud-digits img{height:30px;max-width:calc(21px / var(--digit-count,1))}
 .console-stage .hud-counter{gap:2px}
 .console-stage .hud-counter .hud-digits img{height:18px;max-width:13px}
 .console-stage .hud-slash{font-size:20px}
 .console-stage .hud-progress{padding:6px 4px;gap:4px}
 .console-stage .hud-meta{font-size:6px}
 .console-stage .hud-life{font-size:11px}
 .console-stage .hud-heart{width:19px;height:19px}
 .console-stage .pause-game{width:30px;height:30px}
 .console-stage .console-controls{height:126px!important}
 .console-stage .dpad{width:90px!important;height:90px!important;left:3%!important}
 .console-stage .dpad button{width:28px!important;height:28px!important}
 .console-stage .ab{width:43%!important;right:3%!important}
 .console-stage .boss-live{height:46px}
 .console-stage .boss-live img{height:44px;width:37%}
 .console-stage .boss-live span{font-size:6px}
 .console-stage .overlay{padding:6px 7px;gap:3px}
 .console-stage .overlay .logo{max-height:65px}
 .console-stage .rogue-art-choice .choice-name{font-size:8px}
 .console-stage .rogue-art-choice .choice-description{font-size:7px;line-height:1.15}
 .console-stage .rogue-art-choice .choice-count{font-size:7px}
 .console-stage .rogue-overlay[data-screen=reward] .choice-copy .choice-name{display:none}
 .console-stage .rogue-overlay[data-screen=reward] .menu-scroll{gap:4px;padding:1px}
 .console-stage .rogue-overlay .menu-title{font-size:11px}
 .console-stage .rogue-overlay #menuFoot{font-size:6px}
 .console-stage .medal-choice span{font-size:6px}
}
/* Instructions, results and the opening fade. */
.start-fade{animation:menu-out .7s ease-in forwards;pointer-events:none}
.level-reveal{animation:level-in .5s ease-out}
@keyframes menu-out{to{opacity:0;filter:brightness(0)}}
@keyframes level-in{from{opacity:0}to{opacity:1}}
.rogue-overlay[data-screen=instructions] .logo{display:none}
.rogue-overlay[data-screen=instructions] .menu-scroll{display:flex;flex-flow:row wrap;flex-shrink:0;overflow:visible;gap:3px;max-height:none}
.rogue-overlay[data-screen=instructions] .menuitem{font:9px monospace!important;width:auto;min-height:25px;padding:4px;flex:1}
.instruction-content{min-height:0;overflow:auto;flex:1;text-align:left;font:12px/1.4 monospace;color:#fff1bd;padding:6px;overscroll-behavior:contain}
.help-row{display:flex;gap:9px;padding:8px 0;border-bottom:2px solid #344764}
.help-row img{width:72px;height:64px;object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.help-row p{margin:4px 0}.help-row strong{color:#ffdf58}
.control-line{display:flex;align-items:center;gap:5px;font-weight:bold;color:#ffe45e}
.mouse-icon{width:20px;height:26px;vertical-align:middle;flex-shrink:0}
.score-form{display:flex;flex-wrap:wrap;gap:5px;align-items:center;padding:5px;font:10px monospace;color:#fff1bd;flex-shrink:0}
.score-form label{flex:1}.score-form input{display:block;width:100%;box-sizing:border-box;background:#10213a;color:#fff;border:2px solid #68dba0;padding:6px;font:14px monospace}
.score-form button,.score-preview button,.score-preview a{background:#183958;color:#fff2a6;border:2px solid #6ce4a1;padding:8px;cursor:pointer;font:12px monospace}
.score-form span{width:100%}
.score-preview{position:fixed;inset:0;z-index:999;background:#07101af5;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;align-content:center;gap:12px;padding:16px}
.score-preview img{width:min(800px,100%);max-height:70vh;object-fit:contain}
.rogue-overlay[data-screen=over] .menu-scroll,.rogue-overlay[data-screen=acquired] .menu-scroll{min-height:0;overflow:auto;flex:1}
.rogue-overlay[data-screen=reward] .menuitem:last-child{min-height:25px;padding:4px}
.rogue-overlay[data-screen=reward] .menuitem:last-child .choice-description{display:none}
.menuitem[aria-label="? INSTRUCCIONES"]{background:#a7b2c3!important;border:3px solid #1b2438!important;box-shadow:inset 0 0 0 2px #e1e7ed!important;color:#10192d!important;font:bold 10px monospace!important;min-height:38px!important}
.menuitem[aria-label="? INSTRUCCIONES"] img{display:none}
@media(max-width:480px){.instruction-content{font-size:9px;padding:3px}.help-row img{width:45px;height:48px}.help-row{gap:5px}.score-form{font-size:8px}.score-form input{font-size:11px;padding:3px}.rogue-overlay[data-screen=instructions] .menuitem{font-size:7px!important}}
.rogue-overlay .inventory-access{flex-shrink:0;width:100%;padding:3px;min-height:22px!important;font-size:9px!important;background:#183958;color:#fff1bd;border:2px solid #69a793}
.rogue-overlay .inventory-access .choice-description{display:none}
.rogue-overlay[data-screen=reward] .menu-scroll{min-height:0;overflow:auto!important;flex:1}
/* Bevelled 16-bit instruction button, matching the silver menu family. */
.menuitem.instructions-art[aria-label="? INSTRUCCIONES"]{background:transparent!important;border:0!important;box-shadow:none!important;padding:3px!important;min-height:0!important}
.instructions-face{width:100%;height:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:5px;padding:6px;background:linear-gradient(#edf1f8 0 8%,#aeb7c8 8% 17%,#cbd0da 17% 75%,#959eaf 75% 88%,#677184 88%);border:3px solid #101a30;outline:2px solid #6f829d;box-shadow:inset 3px 3px #fff,inset -3px -3px #505b72,0 3px #030b1b;clip-path:polygon(7px 0,calc(100% - 7px) 0,calc(100% - 7px) 3px,100% 3px,100% calc(100% - 6px),calc(100% - 6px) calc(100% - 6px),calc(100% - 6px) 100%,6px 100%,6px calc(100% - 3px),0 calc(100% - 3px),0 6px,7px 6px)}
.instructions-face>.pad-icon{width:29%;max-width:43px;flex-shrink:0;image-rendering:pixelated;shape-rendering:crispEdges}
.instructions-face>span{font-size:8px!important;min-width:0;white-space:nowrap}
.instructions-face .bitmap-text{filter:drop-shadow(1px 1px #233047)}
.instructions-art:active .instructions-face{transform:translateY(2px)}
.instructions-art.selected .instructions-face,.instructions-art:focus-visible .instructions-face{outline-color:#c0efff}
.control-diagrams{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.control-diagrams figure{margin:0;border:2px solid #5e839b;background:#10253b;box-shadow:2px 2px #030d20}
.control-diagrams canvas{display:block;width:100%;height:auto;image-rendering:pixelated}
.control-diagrams figcaption{padding:4px;font:bold 9px monospace;color:#ffe45e;text-align:center;background:#1c3b51;border-top:2px solid #536e85}
.instruction-content{direction:rtl;scrollbar-color:#65c4c1 #142e44;scrollbar-width:auto;border-left:2px solid #476a83;padding-left:9px}
.instruction-content>*{direction:ltr}
.instruction-content::-webkit-scrollbar{width:16px;background:#0a172b}
.instruction-content::-webkit-scrollbar-track{background:repeating-linear-gradient(0deg,#12283d 0 4px,#19334b 4px 8px);border:2px solid #060f21;box-shadow:inset 2px 0 #34516a}
.instruction-content::-webkit-scrollbar-thumb{background:repeating-linear-gradient(0deg,#69c9c4 0 4px,#3a929f 4px 7px);border:3px solid #14263b;box-shadow:inset 2px 2px #b1f1db,inset -2px -2px #215a72;min-height:30px;border-radius:0}
.instruction-content::-webkit-scrollbar-button:single-button{display:block;height:14px;background:#518e9b;border:2px solid #0b1d32;box-shadow:inset 2px 2px #8cdbc6}
.help-row{background:#11283ad6;padding:9px 6px;border-bottom:2px solid #3d667b}
.help-row img{width:88px;height:76px}
@media(max-width:480px){.instructions-face{gap:2px;padding:3px;border-width:2px}.instructions-face>span{font-size:5px!important}.control-diagrams{gap:4px}.control-diagrams figcaption{font-size:6px;padding:3px}.instruction-content{padding-left:6px}.help-row img{width:58px;height:55px}.help-row{padding:6px 3px}}
.menuitem.instructions-art .instructions-face .bitmap-text img{display:inline-block!important;filter:none;max-width:none}
.instructions-face>span{flex:1}
.help-scroll-layout{display:flex;gap:7px;min-height:0;flex:1;width:100%;overflow:hidden}
.help-scroll-layout .instruction-content{direction:ltr;border:0;padding:3px;scrollbar-width:none;flex:1;max-height:none!important}
.help-scroll-layout .instruction-content::-webkit-scrollbar{display:none}
.pixel-scroll-rail{display:flex;flex-direction:column;width:17px;flex-shrink:0;background:#0c1e34;border:2px solid #050e20;box-shadow:inset 2px 0 #46617d}
.pixel-scroll-rail button{width:100%;height:17px;min-height:17px;padding:0;border:0;background:#5ca4ac;color:#e5ffe8;font-size:10px;box-shadow:inset 2px 2px #9be0ce,inset -2px -2px #21485e;cursor:pointer}
.pixel-scroll-slider{writing-mode:vertical-lr;direction:rtl;appearance:none;-webkit-appearance:none;flex:1;min-height:0;width:13px;margin:3px 0;background:repeating-linear-gradient(#142c43 0 4px,#1d3a51 4px 8px);cursor:pointer;border-radius:0}
.pixel-scroll-slider::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:13px;height:28px;border:2px solid #09243b;background:repeating-linear-gradient(#7cdbc9 0 3px,#4896a2 3px 6px);box-shadow:inset 2px 2px #c3ffe6,inset -2px -2px #286079;border-radius:0}
.pixel-scroll-slider::-moz-range-thumb{width:11px;height:26px;background:#6ac9be;border:2px solid #143047;border-radius:0}
.control-diagrams canvas{height:92px;object-fit:contain}
.rogue-overlay[data-screen=instructions] .menu-scroll{flex:0 0 auto!important;height:auto!important;margin-top:5px}
.rogue-overlay[data-screen=instructions] #menuFoot{flex-shrink:0}
@media(max-width:480px){.control-diagrams canvas{height:65px}.help-scroll-layout{gap:3px}.pixel-scroll-rail{width:13px}.pixel-scroll-slider{width:9px}.pixel-scroll-slider::-webkit-slider-thumb{width:9px}}
.instructions-face>span{font-size:13px!important}
@media(max-width:480px){.instructions-face>span{font-size:8px!important}.instructions-face>.pad-icon{width:22%}}
/* Main menu: one shared pixel bezel, spacing and typography system. */
.rogue-overlay[data-screen=menu] .home-grid{display:grid!important;grid-template-columns:.82fr 1.45fr;grid-template-rows:repeat(3,minmax(0,1fr)) .78fr;gap:8px;width:96%;height:auto;flex:1;min-height:0;padding:5px 3px;max-height:none;overflow:visible;container-type:inline-size}
.home-grid .home-tile{--face:#168acb;--light:#7de7ff;--dark:#12528d;position:relative;display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:100%;min-height:0!important;padding:5px 9px!important;box-sizing:border-box;background:linear-gradient(var(--light) 0 8%,var(--face) 8% 82%,var(--dark) 82% 100%)!important;border:3px solid #071427!important;box-shadow:inset 3px 3px var(--light),inset -3px -3px var(--dark),0 3px #030b18!important;color:#fff1a3;clip-path:polygon(8px 0,calc(100% - 8px) 0,calc(100% - 8px) 4px,100% 4px,100% calc(100% - 8px),calc(100% - 4px) calc(100% - 8px),calc(100% - 4px) calc(100% - 4px),calc(100% - 8px) calc(100% - 4px),calc(100% - 8px) 100%,8px 100%,8px calc(100% - 4px),4px calc(100% - 4px),4px calc(100% - 8px),0 calc(100% - 8px),0 8px,4px 8px,4px 4px,8px 4px);cursor:pointer}
.home-grid .home-play{grid-column:1;grid-row:1/4;--face:#20c74b;--light:#abff95;--dark:#168542;flex-direction:column;gap:7px;padding:10px!important}
.home-grid .home-infinite{grid-column:2;grid-row:1;flex-direction:row-reverse}
.home-grid .home-scores{grid-column:2;grid-row:2;--face:#f6c42e;--light:#fff591;--dark:#ca7a27}
.home-grid .home-controls{grid-column:2;grid-row:3;--face:#a8b6ce;--light:#eff5ff;--dark:#657992}
.home-grid .home-collection{grid-column:1/-1;grid-row:4;--face:#6275af;--light:#b2c7ff;--dark:#354871}
.home-icon{width:28px;height:30px;display:flex;flex-shrink:0;filter:drop-shadow(2px 2px #192b43)}
.home-icon svg{width:100%;height:100%}
.home-play .home-icon{width:74%;height:auto;aspect-ratio:1}
.home-label{font-size:clamp(7px,3.5cqw,14px);line-height:1.15;min-width:0;text-align:center}
.home-controls .home-label{font-size:clamp(6px,2.9cqw,12px)}
.home-infinite .home-label{max-width:65%}
.home-play .home-label{font-size:clamp(8px,3.6cqw,15px)}
.home-tile .bitmap-char{filter:drop-shadow(1px 1px #1b293f)!important}
.home-grid .home-tile.selected,.home-grid .home-tile:focus-visible{outline:none!important;box-shadow:inset 3px 3px #f1ffdd,inset -3px -3px var(--dark),inset 0 0 0 5px #ccf7ee,0 3px #030b18!important}
.home-grid .home-tile:active{transform:translateY(2px)}
@media(max-width:480px){.rogue-overlay[data-screen=menu] .home-grid{gap:5px;width:100%;padding:2px 0}.home-grid .home-tile{gap:3px;padding:3px 5px!important;border-width:2px!important}.home-icon{width:20px;height:23px}.home-grid .home-play{padding:7px!important}}
.home-grid .home-controls .home-label .bitmap-text img{display:inline-block!important}
.mystery-seal{display:grid;place-items:center;width:40px;height:40px;background:#23384d;border:3px solid #4c6177;box-shadow:inset 2px 2px #6b7c8e,inset -2px -2px #0d1c2e;color:#8b9bae;font:bold 26px monospace}
.mystery-medal{cursor:default!important;background:#102438!important}
/* The companion lives in the viewport corner; the console has its own centred lane. */
.wrap{width:min(100%,580px)}
.console-stage{display:block;width:100%;max-width:540px;margin-inline:auto}
.console-stage>#shell{width:100%;box-sizing:border-box;margin-inline:auto}
.console-stage>.player-companion{position:fixed;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:auto;bottom:auto;width:88px;margin:0;z-index:20;align-self:auto}
.console-stage .companion-sprite{width:88px;max-width:88px;height:88px!important}
.console-stage .companion-name{font-size:10px}
.console-stage .companion-dialog{position:absolute;left:100%;top:8px;bottom:auto;width:145px;margin-left:9px;font-size:10px}
.console-stage .companion-dialog:after{top:12px;left:-12px;right:auto;border-color:transparent;border-right-color:var(--player-color,#8ce895)}
@media(max-width:700px){.wrap{padding-top:94px}.console-stage>.player-companion{top:max(8px,env(safe-area-inset-top));left:10px;width:64px}.console-stage .companion-sprite{width:64px;max-width:64px;height:64px!important}.console-stage .companion-dialog{width:min(190px,calc(100vw - 100px));font-size:10px}.console-stage .companion-name{font-size:9px}}
/* Companion anchored inside the console's upper-left corner. */
.console-stage>#shell{position:relative;padding-top:90px!important}
.console-stage #shell>.player-companion{position:absolute;left:14px;top:8px;right:auto;bottom:auto;width:64px;margin:0;z-index:8}
.console-stage #shell .companion-sprite{width:64px;max-width:64px;height:64px!important}
.console-stage #shell .companion-name{font-size:8px}
.console-stage #shell .companion-dialog{top:7px;left:100%;bottom:auto;width:min(220px,50vw);font-size:10px;margin-left:8px}
@media(max-width:700px){.wrap{padding-top:0}.console-stage>#shell{padding-top:80px!important}.console-stage #shell>.player-companion{left:12px;top:7px;width:54px}.console-stage #shell .companion-sprite{width:54px;max-width:54px;height:54px!important}.console-stage #shell .companion-dialog{font-size:9px}}
/* Companion belongs to the game screen corner indicated in the reference. */
.console-stage>#shell{padding-top:20px!important}
.console-stage .screenframe{position:relative}
.console-stage #shell .screenframe>.player-companion{position:absolute;top:15px;left:15px;right:auto;bottom:auto;width:54px;margin:0;z-index:8;pointer-events:none}
.console-stage #shell .screenframe .companion-sprite{width:54px;max-width:54px;height:54px!important;filter:drop-shadow(1px 0 #eefce8) drop-shadow(-1px 0 #08172b) drop-shadow(0 1px #08172b)}
.console-stage #shell .screenframe .companion-name{font-size:7px;color:var(--player-color);text-shadow:1px 1px #061326,-1px -1px #061326}
.console-stage #shell .screenframe .companion-dialog{left:100%;top:5px;width:min(175px,44vw);font-size:9px}
@media(max-width:480px){.console-stage>#shell{padding-top:17px!important}.console-stage #shell .screenframe>.player-companion{top:12px;left:12px;width:43px}.console-stage #shell .screenframe .companion-sprite{width:43px;max-width:43px;height:43px!important}.console-stage #shell .screenframe .companion-name{font-size:6px}.console-stage #shell .screenframe .companion-dialog{font-size:8px}}
.rogue-overlay[data-screen=scores] .menu-scroll{flex:0 0 auto!important;height:auto!important;max-height:none!important;margin:0}
.ranking-board{display:flex;flex-direction:column;min-height:0;flex:1;width:100%;color:#fff1b8;font:11px/1.25 monospace;gap:5px;text-align:left}
.ranking-board h3{margin:0;text-align:center;font-size:13px;flex-shrink:0}
.ranking-top{background:#19344c;border:2px solid #a8c9d7;padding:4px;flex-shrink:0}
.ranking-row{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:6px 4px;border-bottom:1px solid #44657a;min-width:0}
.ranking-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.ranking-row span{white-space:nowrap;font-size:10px}
.ranking-mine{background:#295551;color:#fff5a6;box-shadow:inset 0 0 0 2px #9df4d6;border:0}
.ranking-position{margin:0;font-weight:bold;text-align:center;color:#ffe46e;font-size:10px;flex-shrink:0}
.ranking-nearby{min-height:0;overflow:auto;scrollbar-color:#6ac9be #142e44}
@media(max-width:480px){.ranking-board{font-size:9px;gap:3px}.ranking-row{padding:4px 3px}.ranking-row strong,.ranking-row span{font-size:8px}.ranking-position{font-size:8px}.ranking-board h3{font-size:10px}}
.rogue-overlay[data-screen=stageTransition]{background:#0b1d33f5;justify-content:center;gap:14px}
.level-road{display:flex;gap:18px;align-items:center;justify-content:center;padding:15px 0}
.level-road>span{display:grid;place-items:center;background:#23415e;border:3px solid #57758a;box-shadow:3px 3px #061225;width:48px;height:52px;font-size:20px;opacity:.5}
.level-road>span.current{width:72px;height:76px;opacity:1;border-color:#c1fff1;background:#28666a;animation:level-pulse .8s ease-out both}
@keyframes level-pulse{from{transform:scale(.65);filter:brightness(1.8)}to{transform:scale(1);filter:brightness(1)}}
@media(max-width:480px){.level-road{gap:9px;padding:4px 0}.level-road>span{width:34px;height:38px;font-size:15px}.level-road>span.current{width:48px;height:52px}.rogue-overlay[data-screen=stageTransition]{gap:6px}}
.rogue-overlay .menuitem:disabled{opacity:.45;cursor:default;outline:none!important}
.rogue-overlay[data-screen=reward] [aria-label="GUSTOS FINOS"]{flex-shrink:0;padding:4px;min-height:28px!important;border-color:#76c6db;background:#1b3f61}
.rogue-overlay[data-screen=reward] [aria-label="GUSTOS FINOS"] .choice-name{font-size:10px}
.rogue-overlay[data-screen=reward] [aria-label="GUSTOS FINOS"] .choice-description{display:none}
.rogue-overlay[data-screen=reward] [aria-label="GUSTOS FINOS"] .choice-count{font-size:9px;margin:1px 0 0}
@media(max-width:480px){.rogue-overlay[data-screen=reward] [aria-label="GUSTOS FINOS"] .choice-name{font-size:8px}.rogue-overlay[data-screen=reward] [aria-label="GUSTOS FINOS"] .choice-count{font-size:7px}}
.rogue-overlay .reward-reroll{width:100%;flex:none!important;margin:0!important;box-sizing:border-box}
.rogue-overlay .end-result{width:100%;box-sizing:border-box;border:2px solid #80adbb;background:#153148;padding:9px;text-align:center;flex:none}
.end-result .end-score{font-size:22px;line-height:1.2}
.end-result p{margin:5px 0 0;font:bold 10px/1.35 monospace;color:#cce7df}
.end-result .end-standing{color:#ffe67f}
.rogue-overlay.record-win{background:radial-gradient(ellipse at center,#25465c 0,#101e3c 65%,#081527 100%)}
.record-win .end-result{border:4px solid #ffe779;box-shadow:inset 0 0 0 3px #577ea2,0 0 0 2px #ad713e;background:repeating-linear-gradient(0deg,#17304b 0 3px,#1a3652 3px 6px);position:relative}
.record-win .end-result:before,.record-win .end-result:after{content:'✦ ◆ ✦ ◆ ✦';display:block;color:#ffdc59;font-size:13px;letter-spacing:9px;line-height:1}
.record-win .end-result:after{color:var(--player-color);margin-top:7px}
.record-win .end-score{font-size:28px;animation:record-score-in .6s ease-out}
.record-win .score-form{border:2px solid #72c5bb;background:#142d43;padding:6px}
.rogue-overlay[data-screen=over] #menuItems{gap:5px}
.rogue-overlay[data-screen=over] #menuItems .menuitem{min-height:32px!important;padding:7px}
.record-win #menuItems .menuitem:first-child{background:#12668c;border:2px solid #80dbe7}
.record-win #menuItems .menuitem:nth-child(2){background:#237447;border:2px solid #9be8a9}
@keyframes record-score-in{from{transform:scale(.8);filter:brightness(1.8)}to{transform:scale(1);filter:brightness(1)}}
@media(max-width:480px){.rogue-overlay .end-result{padding:5px}.end-result .end-score{font-size:16px}.record-win .end-score{font-size:19px}.end-result p{font-size:8px;margin-top:3px}.record-win .end-result:before,.record-win .end-result:after{font-size:9px;letter-spacing:5px}.rogue-overlay[data-screen=over] #menuItems .menuitem{min-height:25px!important;padding:4px}.record-win .score-form{padding:3px}}
.rogue-overlay[data-screen=over] #menuItems{flex:0 0 auto!important;overflow:visible!important;max-height:none!important}
.rogue-overlay[data-screen=over] #menuItems .menuitem{font-size:12px;line-height:1.1}
@media(max-width:480px){
 .record-win .end-result:before,.record-win .end-result:after{display:none}
 .rogue-overlay[data-screen=over]{gap:4px;padding:6px}
 .rogue-overlay[data-screen=over] #menuItems{gap:3px}
 .rogue-overlay[data-screen=over] #menuItems .menuitem{font-size:8px;min-height:22px!important;padding:4px!important}
 .rogue-overlay[data-screen=over] .end-result{padding:4px;flex-shrink:1;min-height:0}
 .end-result p{font-size:7px;line-height:1.2;margin-top:2px}
 .record-win .score-form{padding:3px;gap:3px;font-size:7px}
 .record-win .score-form input{font-size:10px;padding:2px;height:21px}
 .record-win .score-form button{font-size:8px;padding:5px}
 .record-win .end-score{font-size:18px}
}
body.invalid-access{margin:0;min-height:100dvh;background:#07121f;display:grid;place-items:center;padding:24px;box-sizing:border-box}
.invalid-link-screen{width:min(100%,480px);box-sizing:border-box;text-align:center;border:4px solid #526d86;box-shadow:inset 0 0 0 3px #24394f,5px 5px #020812;background:repeating-linear-gradient(0deg,#102236 0 3px,#12273b 3px 6px);padding:32px 22px;color:#c4d7df}
.sad-pixel{width:100px;height:112px;margin:0 auto 24px;filter:drop-shadow(4px 4px #06111e)}
.sad-pixel svg{width:100%;height:100%;image-rendering:pixelated}
.invalid-link-screen h1{font-size:21px;margin:0 0 24px;line-height:1.4}
.invalid-link-screen p{font:14px/1.6 monospace;margin:12px 0}
.invalid-link-foot{margin-top:28px;font-size:10px;line-height:1.5;opacity:.65}
@media(max-width:390px){body.invalid-access{padding:16px}.invalid-link-screen{padding:25px 16px}.invalid-link-screen h1{font-size:17px}.invalid-link-screen p{font-size:12px}}
.invalid-link-screen h1{display:block!important;visibility:visible!important;opacity:1!important;height:auto!important;color:#ffdc68;font-family:monospace}
.guest-mode-label{text-align:center;font:bold 10px monospace;color:#b9cfdb;letter-spacing:2px;margin:5px 0 10px}
.rogue-overlay[data-screen=over] [aria-label="COMPRAR EN TIKTOK SHOP"]{background:#1a263c;border:2px solid #51d8d0;color:#fff;box-shadow:3px 3px #f24e80}
.rogue-overlay[data-screen=guestWelcome]{justify-content:center;background:#0d2035f5;gap:18px}
.rogue-overlay[data-screen=guestWelcome] .menu-scroll{flex:0 0 auto!important;max-height:none!important;height:auto!important;overflow:visible!important}
.rogue-overlay[data-screen=guestWelcome] .choice-description{font:12px/1.65 monospace;margin-top:12px;color:#d8e6e8}
.rogue-overlay[data-screen=guestWelcome] .rogue-choice{padding:16px}
@media(max-width:480px){.rogue-overlay[data-screen=guestWelcome]{gap:8px}.rogue-overlay[data-screen=guestWelcome] .choice-description{font-size:9px;line-height:1.5;margin-top:7px}.rogue-overlay[data-screen=guestWelcome] .rogue-choice{padding:9px}}
/* Static CRT glass over gameplay, menus and pause. Never intercepts input. */
.console-stage .screenframe>.crt-glass{position:absolute;inset:9px;z-index:30;pointer-events:none;user-select:none;overflow:hidden;clip-path:polygon(5% 0,95% 0,100% 5%,100% 95%,95% 100%,5% 100%,0 95%,0 5%);background:repeating-linear-gradient(0deg,transparent 0 2px,rgba(0,9,20,.12) 2px 3px),repeating-linear-gradient(90deg,rgba(255,80,80,.018) 0 1px,rgba(70,255,140,.012) 1px 2px,rgba(80,130,255,.018) 2px 3px),radial-gradient(ellipse at 50% 46%,transparent 45%,rgba(0,8,18,.08) 76%,rgba(0,5,15,.32) 100%);box-shadow:inset 0 0 18px #020b1740}
.console-stage .crt-glass:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(125deg,rgba(211,243,255,.055),transparent 34%,transparent 75%,rgba(177,220,255,.025));border-radius:12%/5%}
.console-stage .hud-meta{font-size:11px;line-height:1.3;padding-top:3px;letter-spacing:.45px}
@media(max-width:480px){.console-stage .hud-meta{font-size:8px;letter-spacing:.2px;padding-top:2px}.console-stage .screenframe>.crt-glass{inset:7px;background-size:auto;box-shadow:inset 0 0 12px #020b1730}}
#pauseScreen{gap:12px;display:flex;flex-direction:column;justify-content:center;align-items:center}
#pauseScreen[hidden]{display:none!important}
#pauseHome{background:#17455d;border:3px solid #6cbec6;box-shadow:3px 3px #061527;color:#fff0a1;padding:9px 13px;font:bold 12px monospace;cursor:pointer}
.pause-selected{outline:2px solid #b5ffdf!important;outline-offset:3px}
.screenframe.mistake-feedback{animation:mistake-hit .4s ease-out}
@keyframes mistake-hit{0%{box-shadow:inset 0 0 0 7px #ef5d66,inset 0 0 50px #e53b5b99;transform:translateX(-3px)}30%{transform:translateX(3px)}65%{transform:translateX(-1px)}100%{transform:none}}
.rogue-overlay[data-screen=samReport] .menu-scroll{overflow:auto!important;min-height:0}
.rogue-overlay[data-screen=collection] .menu-scroll{grid-template-rows:repeat(4,minmax(0,1fr))!important}
@media(prefers-reduced-motion:reduce){.screenframe.mistake-feedback{animation:none;box-shadow:inset 0 0 0 5px #ef5d66}}
@media(max-width:480px){#pauseHome{font-size:9px;padding:6px 9px}.rogue-overlay[data-screen=collection] .medal-choice img{max-height:60%}}
/* Two-thumb gameplay mode: hide the D-pad, center companion below player name, and center A/B below companion. */
#shell:not([data-screen=game])>.player-companion,#shell.is-paused>.player-companion{display:none!important}
.console-stage #shell>.player-companion{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;width:108px!important;height:108px!important;margin:-76px auto -10px!important;z-index:35!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;user-select:none}
.console-stage #shell>.player-companion .companion-sprite{width:100%!important;max-width:none!important;height:100%!important;filter:drop-shadow(0 3px 6px rgba(0,0,0,.6))!important}
.console-stage #shell>.player-companion .companion-name{display:none!important}
.console-stage #shell>.player-companion .companion-power-badge{position:absolute;bottom:0;left:50%;transform:translateX(-50%);background:#071525f5;border:2px solid var(--player-color,#8ce895);color:#fff6a8;font:900 9px/1 monospace;padding:2px 6px;white-space:nowrap;box-shadow:0 2px 0 #020812;z-index:2}
.console-stage #shell>.player-companion .companion-power-badge[hidden]{display:none!important}
.console-stage #shell>.player-companion.is-ready{pointer-events:auto!important;cursor:pointer!important;animation:companion-ready-pulse .85s ease-in-out infinite alternate}
.console-stage #shell>.player-companion.is-ready:active{transform:scale(.93)}
.console-stage #shell>.player-companion.is-ready .companion-power-badge{background:var(--player-color,#8ce895);color:#061322;border-color:#ffffff}
@keyframes companion-ready-pulse{from{filter:drop-shadow(0 0 3px var(--player-color,#8ce895))}to{filter:drop-shadow(0 0 11px var(--player-color,#8ce895))}}
.console-stage #shell>.player-companion .companion-dialog{position:absolute!important;right:calc(100% + 8px)!important;left:auto!important;top:50%!important;bottom:auto!important;transform:translateY(-50%);width:clamp(94px,26vw,132px)!important;margin:0!important;font-size:9px!important;padding:5px!important;z-index:4}
.console-stage #shell>.player-companion .companion-dialog:after{top:calc(50% - 5px)!important;right:-10px!important;left:auto!important;border:5px solid transparent!important;border-left-color:var(--player-color,#8ce895)!important}
#shell[data-screen=game]:not(.is-paused) .dpad{display:none!important}
#shell[data-screen=game]:not(.is-paused) .ab{left:0!important;right:0!important;width:min(78%,260px)!important;margin-inline:auto!important;justify-content:center!important;align-items:center!important;gap:28px!important;top:26px!important}
#shell[data-screen=game]:not(.is-paused) .ab #a,#shell[data-screen=game]:not(.is-paused) .ab #b{align-self:center!important;margin:0!important}
@media(max-width:520px){
 .console-stage #shell>.player-companion{width:92px!important;height:92px!important;margin:-60px auto -8px!important}
 .console-stage #shell>.player-companion .companion-power-badge{font-size:8px;padding:2px 4px}
 .console-stage #shell>.player-companion .companion-dialog{width:clamp(82px,25vw,112px)!important;font-size:8px!important;padding:4px 3px!important;right:calc(100% + 6px)!important}
 #shell[data-screen=game]:not(.is-paused) .ab{width:min(82%,230px)!important;gap:22px!important;top:20px!important}
}
@media(max-width:380px){
 .console-stage #shell>.player-companion{width:80px!important;height:80px!important;margin:-50px auto -6px!important}
}
/* Corcholatas de Poder: 3 Passive Slots + Consumable Pocket + Rarity Borders */
.rogue-rule-writer{background:#3e236e;color:#e6ccff;border-color:#170a2e}
.rogue-choice.rarity-common{border-color:#5eb583;background:#132e3d}
.rogue-choice.rarity-rare{border-color:#4cd4e8;background:#15314d;box-shadow:inset 0 0 8px #2994d933,2px 2px #020e18}
.rogue-choice.rarity-ultra{border-color:#ffd54f;background:linear-gradient(135deg,#2a1842 0%,#162e47 100%);box-shadow:inset 0 0 10px #ffd54f40,2px 2px #020e18}
.rogue-choice.rarity-ultra .choice-count{color:#ffe57f;font-weight:bold}
.rogue-choice.rarity-rare .choice-count{color:#8ceeff}
.rogue-inventory{display:flex;flex-direction:column;gap:6px;background:#0b1929e6;border:2px solid #2e5366;padding:7px;margin:8px 0;box-shadow:2px 2px #030b14}
.cap-status-line{color:#ffe46e;font:bold 10px monospace;text-align:center;padding-bottom:3px;border-bottom:1px solid #244354}
.cap-tray-group{display:flex;flex-direction:column;gap:4px}
.cap-tray-title{font:bold 9px monospace;color:#8fd6c9;text-align:left;letter-spacing:.5px}
.cap-tray-row{display:flex;flex-wrap:wrap;gap:5px;align-items:stretch}
.cap-chip{display:flex;align-items:center;gap:5px;flex:1 1 calc(33.33% - 5px);min-width:96px;background:#132a3d;border:2px solid #456e7d;padding:3px 5px;box-sizing:border-box;color:#e9f5ed;text-align:left;font:9px/1.2 monospace}
.cap-chip.is-empty{justify-content:center;text-align:center;border-style:dashed;border-color:#2b4959;color:#6c8d9c;background:#0c1d2b;min-height:34px}
.cap-chip.is-consumable{flex:0 1 auto;min-width:86px;cursor:pointer}
.cap-chip.is-consumable[data-use-consumable=""]:not([data-use-consumable]){cursor:default}
.cap-chip.rarity-common{border-color:#4fa878}
.cap-chip.rarity-rare{border-color:#49cde3;background:#152e47}
.cap-chip.rarity-ultra{border-color:#ffcf40;background:#26193d}
.cap-chip.is-suspended{opacity:.5;filter:grayscale(.7)}
.cap-chip img{width:30px;height:26px;object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.cap-chip span{display:flex;flex-direction:column;min-width:0}
.cap-chip strong{font-size:9px;color:#fff4b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cap-chip small{font-size:8px;color:#a5d6c8}
.cap-empty-note{font:9px monospace;color:#6c8d9c;padding:2px 0}
@media(max-width:480px){
 .rogue-inventory{padding:5px;gap:4px}
 .cap-chip{min-width:82px;padding:2px 4px;gap:3px}
 .cap-chip img{width:24px;height:21px}
 .cap-chip strong{font-size:8px}
 .cap-chip small{font-size:7px}
}
