*{box-sizing:border-box}html,body{margin:0;background:#000;color:#fff}body{min-height:100vh;display:grid;place-items:center;font-family:'Courier New',monospace;font-weight:bold}#screen{position:relative;width:600px;height:480px;background:#000;overflow:hidden}button{font:inherit;color:inherit;background:#000;border:0;cursor:pointer;letter-spacing:2px}button:hover,button:focus-visible{color:#ffff00;outline:1px solid #ffff00}button:active{color:#00ff00}.game-top{height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;font-size:12px;letter-spacing:1px}.game-top button{font-size:10px;color:#808080}.menu{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:30px}.menu button{font-size:24px;padding:12px 20px;min-width:320px}.menu button:first-child{color:#00ff00}.menu button:before{content:' ';display:inline-block;width:30px}.menu button:hover:before,.menu button:focus-visible:before{content:'>'}.hud{height:54px;display:flex;justify-content:space-between;text-align:center;padding:0 70px}.hud label{display:block;font-size:12px;margin-bottom:4px;letter-spacing:1px}.hud strong{font-size:22px;color:#fff}.grid{display:grid;grid-template-columns:repeat(5,40px);grid-auto-rows:38px;gap:5px;justify-content:center}.tile{border:2px solid #808080;display:grid;place-items:center;font-size:25px;line-height:1;background:#000;color:#fff}.tile.active{border-color:#fff}.green{background:#00ff00!important;color:#000!important;border-color:#00ff00!important}.yellow{background:#ffff00!important;color:#000!important;border-color:#ffff00!important}.gray{background:#808080!important;color:#fff!important;border-color:#808080!important}.status{text-align:center;height:25px;line-height:25px;font-size:12px;letter-spacing:1px;color:#ffff00}.keyboard{position:absolute;bottom:12px;left:0;right:0}.keyrow{display:flex;justify-content:center;gap:5px;margin-top:5px}.key{height:25px;min-width:31px;font-size:13px;border:1px solid #808080;padding:0 8px;letter-spacing:0}.panel{text-align:center;padding:55px 65px}.panel h2{font-size:24px;letter-spacing:2px;color:#00ff00;margin:0 0 32px}.panel p{font-size:14px;line-height:1.8;margin:18px 0}.panel button{display:block;margin:24px auto 0;padding:10px;font-size:16px;color:#ffff00}.secret{font-size:28px;letter-spacing:10px;height:38px;margin:25px 0}.scoreboard{padding:12px 78px;text-align:center}.scoreboard h2{font-size:19px;letter-spacing:2px;margin:8px 0 13px}.scoreboard .result{font-size:12px;color:#00ff00;margin-bottom:16px}.scoreboard table{width:100%;border-collapse:collapse;font-size:17px;letter-spacing:1px;line-height:23px;text-align:center}.scoreboard th{color:#ffff00;font-size:15px;padding-bottom:7px}.scoreboard td{height:24px}.scoreboard tbody tr:nth-child(3n+1){color:#00ff00}.scoreboard tbody tr:nth-child(3n+2){color:#fff}.scoreboard tbody tr:nth-child(3n){color:#ffff00}.scoreboard tr.current td:before{content:''}.scoreboard .initials{font-size:13px;color:#ffff00;height:30px;margin-top:12px}.scoreboard .initials span{color:#fff;letter-spacing:6px}.scoreboard button{font-size:12px;margin:6px 12px;padding:6px}.flash .grid{animation:flash .25s steps(2)}@keyframes flash{50%{opacity:.5}}
/* Every visible character uses an unscaled 8 × 16 bitmap cell. */
#screen,#screen *{font-size:16px;line-height:16px;letter-spacing:0;font-weight:normal;text-shadow:none}
#screen .glyph{display:inline-block;position:relative;width:8px;height:16px;min-width:8px;font-size:0;line-height:0;vertical-align:top;white-space:pre}
.glyph:after{content:'';position:absolute;inset:0;background:currentColor;mask-image:url('glyphs.png');mask-position:var(--glyph-x) 0;mask-repeat:no-repeat;-webkit-mask-image:url('glyphs.png');-webkit-mask-position:var(--glyph-x) 0;-webkit-mask-repeat:no-repeat;image-rendering:pixelated}
.menu{gap:32px}.menu button{padding:16px;min-width:240px}.menu button:before{display:none}
.game-top{height:32px;padding:8px 24px}.hud{height:64px;padding:8px 72px}.hud label{margin-bottom:8px}
.grid{grid-auto-rows:40px;gap:4px}.tile{border-width:1px}.status{height:32px;padding:8px 0}
.keyboard{bottom:8px}.keyrow{gap:8px;margin-top:4px}.key{height:28px;min-width:32px;padding:5px 8px}
.panel{padding:48px 64px}.panel h2{margin:0 0 32px}.panel p{line-height:32px;margin:16px 0}.panel button{margin:24px auto 0;padding:8px}
.secret{height:32px;margin:24px 0;padding:8px 0}.secret .glyph{margin:0 4px}
.scoreboard{padding:8px 80px}.scoreboard h2{margin:8px 0 16px}.scoreboard .result{margin-bottom:16px}.scoreboard th{padding-bottom:8px}.scoreboard td{height:24px}.scoreboard .initials{height:32px;margin-top:8px;padding-top:8px}.scoreboard button{margin:0 8px;padding:8px}

/* Keyboard-only controls: selection is text color, never a block. */
body,#screen,#screen *{cursor:none}
#screen button,#screen button:hover,#screen button:focus-visible,#screen button:active{color:#fff;background:#000;outline:none;box-shadow:none;pointer-events:none}
#screen button.selected{color:#00ff00}
.controls{position:absolute;bottom:24px;left:0;right:0;text-align:center;color:#808080;line-height:32px!important}
.keyboard-only #screen .grid:not(.input-selected) .tile.active{border-color:#808080}
