@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=VT323&display=swap');

:root{font-family:'Tahoma',Arial,sans-serif;color:#222;--silver:#c6c6c6;--light:#fff;--shade:#808080;--orange:#ff6929;--dark:#202323;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:300px;min-height:100dvh;background:radial-gradient(ellipse at 50% 100%,#482a1f55 0,transparent 55%),radial-gradient(#5d64642c .8px,transparent .8px),#202323;background-size:auto,8px 8px,auto}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border-radius:0}button:disabled{cursor:default}button:not(.cell):focus-visible,a:focus-visible{outline:2px dashed #1249a1;outline-offset:-5px}.cell:focus{outline:none}button:active:not(:disabled){transform:translateY(1px)}svg{height:20px;width:20px;display:block;flex-shrink:0;shape-rendering:crispEdges}.svg-library{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}.bevel{border:2px solid;border-color:#fff #686868 #686868 #fff;box-shadow:1px 1px 0 #262626;background:var(--silver)}.bevel:active:not(:disabled){border-color:#686868 #fff #fff #686868;box-shadow:none}.inset{border:2px solid;border-color:#7c7c7c #f2f2f2 #f2f2f2 #7c7c7c}.desktop-bar{height:64px;border-bottom:1px solid #ffffff0b;display:flex;align-items:center;justify-content:space-between;padding:0 36px;color:#ddd}.desktop-brand{display:flex;gap:10px;align-items:center;color:inherit;text-decoration:none;font-family:'IBM Plex Mono',monospace;font-size:13px;font-weight:600}.desktop-brand svg{color:#a9aeae;width:18px;height:18px}.brand-x{color:#ff8a54}.build-label{font-family:'IBM Plex Mono',monospace;font-size:9px;letter-spacing:1.1px;color:#9ba09d;display:flex;align-items:center;gap:9px}.status-dot{height:5px;width:5px;background:#ff793c;box-shadow:0 0 8px #f7612940}.version{border:1px solid #555a57;padding:3px 5px;margin-left:7px;letter-spacing:0;color:#a2a7a3}.desktop{display:flex;flex-direction:column;align-items:center;padding:24px 12px 20px}.eyebrow{font-family:'IBM Plex Mono',monospace;font-size:8px;letter-spacing:1.5px;color:#bebfba;margin:0 0 16px}.eyebrow span{color:#777d79}.game-window{position:relative;width:min(414px,100%);background:var(--silver);border:3px solid;border-color:#ededed #6a6a6a #6a6a6a #ededed;box-shadow:1px 1px 0 #070909,0 18px 50px #0004;isolation:isolate}.titlebar{height:27px;background:linear-gradient(90deg,#020878,#1964a3);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:3px 3px 3px 6px;font-size:12px;font-weight:bold}.titlebar>div{display:flex;align-items:center;gap:6px}.titlebar svg{width:16px;height:16px;color:#c5c5c5}.window-controls{gap:2px!important}.window-controls button{display:flex;align-items:center;justify-content:center;height:19px;width:20px;line-height:12px;border:2px solid;border-color:#fff #666 #666 #fff;background:#c6c6c6;color:#101010;font-weight:700;font-family:Arial;font-size:15px;padding:0}.window-controls button:first-child{padding-bottom:5px}.menubar{display:flex;align-items:center;height:27px;gap:1px;border-bottom:1px solid #888;padding:0 5px}.menubar>button{border:1px solid transparent;padding:3px 8px;background:none;font-size:11px}.menubar>button:hover,.menubar>button[aria-expanded=true]{border-color:#fff #888 #888 #fff}.menu-mode{margin-left:auto;font-family:'IBM Plex Mono',monospace;font-size:8px;letter-spacing:.5px;color:#5f5f5f;display:flex;gap:5px;align-items:center;margin-right:3px}.menu-mode>span{background:#f5692e;height:5px;width:5px}.dropdown{position:absolute;left:5px;top:53px;z-index:20;background:#c6c6c6;border:2px solid;border-color:white #555 #555 white;box-shadow:3px 3px #0004;min-width:200px;padding:3px}.dropdown button{display:flex;justify-content:space-between;align-items:center;text-align:left;background:transparent;border:0;width:100%;padding:9px 12px;font-size:12px}.dropdown button:hover{background:#000080;color:white}.dropdown kbd{background:none;border:0;font-size:10px;margin-left:18px;box-shadow:none}.dropdown hr{border:0;border-top:1px solid #888;border-bottom:1px solid #eee;margin:3px 1px}.options-dropdown{left:55px}.game-inner{padding:0 12px 9px}.game-heading{display:flex;align-items:center;justify-content:space-between;height:40px}.game-heading h1{display:flex;align-items:center;gap:7px;font-size:10px;letter-spacing:.3px;margin:0;font-weight:900}.game-heading h1>span{font-family:'IBM Plex Mono',monospace;background:#292929;color:#ff8a4b;font-size:8px;padding:3px 4px;letter-spacing:.6px;transform:skew(-6deg)}.no-guess{font-family:'IBM Plex Mono',monospace;color:#565b50;font-size:7px;letter-spacing:.2px;white-space:nowrap}.no-guess i{font-style:normal;color:#457443;margin-right:3px;font-size:10px}.hud{height:69px;display:flex;align-items:center;justify-content:space-between;padding:6px 9px;background:#bdbdbd}.hud-stat{display:flex;flex-direction:column;gap:5px}.hud-label{font-family:'IBM Plex Mono',monospace;font-size:8px;letter-spacing:1.3px;color:#535353;padding-left:1px}.hud-stat.right{align-items:flex-end}.led{font-family:'VT323','Courier New',monospace;font-size:36px;letter-spacing:1px;line-height:32px;color:#ff3025;background:#220b09;box-shadow:inset 1px 1px #6d6d6d,1px 1px #e7e7e7;padding:0 4px 2px;min-width:84px;text-shadow:0 0 5px #ff272530;white-space:nowrap}.led>span{font-size:21px;margin-left:2px}.right .led{font-size:33px;letter-spacing:0}.face{width:43px;height:43px;display:grid;place-items:center;padding:0;margin:10px 0 0}.pixel-face{height:25px;width:25px;background:#ffe445;border:2px solid #171717;border-radius:50%;position:relative;box-shadow:inset -2px -2px #d5ac12}.pixel-face i::before,.pixel-face i::after{content:'';position:absolute;width:3px;height:4px;background:#222;top:5px}.pixel-face i::before{left:5px}.pixel-face i::after{right:5px}.pixel-face b{position:absolute;bottom:4px;left:5px;right:5px;height:6px;border:2px solid #222;border-top:0;border-radius:0 0 7px 7px}.face.dead .pixel-face i::before,.face.dead .pixel-face i::after{height:5px;background:linear-gradient(45deg,transparent 35%,#222 35%,#222 65%,transparent 65%),linear-gradient(-45deg,transparent 35%,#222 35%,#222 65%,transparent 65%);width:5px}.face.dead .pixel-face b{border-top:2px solid #222;border-bottom:0;border-radius:7px 7px 0 0;height:5px}.shaft-heading{height:32px;display:flex;align-items:center;justify-content:space-between;font-family:'IBM Plex Mono',monospace;font-size:8px;letter-spacing:.4px;color:#5a5a5a}.shaft-heading>span{display:flex;gap:5px;align-items:center}.shaft-heading svg{width:11px;height:11px;color:#4a4a4a}.shaft-heading b{font-size:10px;color:#333;font-weight:500;margin-left:1px}.shaft{position:relative;height:clamp(350px,calc(100dvh - 365px),470px);overflow:hidden;background:#929292;container-type:inline-size;user-select:none;touch-action:manipulation}.board{position:absolute;left:0;right:0;top:0;display:grid;grid-template-columns:repeat(9,1fr);align-content:start}.cell{position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:1;border:3px solid;border-color:#eeeeee #818181 #818181 #eeeeee;background:#bfbfbf;padding:0;font-size:22px;font-weight:900;font-family:'Arial Black',Arial,sans-serif;line-height:1;touch-action:manipulation;min-width:0}.cell.locked{cursor:default;background:#b3b3b3;border-color:#d0d0d0 #8b8b8b #8b8b8b #d0d0d0;color:transparent}.cell.revealed{border:1px solid;border-color:#909090 #bdbdbd #bdbdbd #909090;background:#c9c9c9;cursor:default}.cell.revealed.zero{background:#c5c5c5}.cell.active-row{background:#d3d3c9;border-color:#fffef0 #858570 #858570 #fffef0}.cell.active-row:not(.revealed):hover{background:#e5e5d9}.cell.active-row.revealed{border:1px solid;border-color:#969687 #d5d5c9 #d5d5c9 #969687;background:#d3d3c9}.cell[data-number='1']{color:#0000ed}.cell[data-number='2']{color:#007b00}.cell[data-number='3']{color:#f00000}.cell[data-number='4']{color:#00007c}.cell[data-number='5']{color:#7a0000}.cell[data-number='6']{color:#008080}.cell[data-number='7']{color:#111}.cell[data-number='8']{color:#777}.cell svg{width:23px;height:23px;color:#141414}.cell.exploded{background:#ef3e27}.cell.virtual{border:1px solid #b0b0b0;background:#bfbfbf}.cell.hinted{z-index:3;outline:3px solid #ff6c29;outline-offset:-4px;animation:hint-pulse 1s steps(2,end) infinite}.row-guide{position:absolute;height:calc(100cqw / 9);left:0;right:0;z-index:4;pointer-events:none;border-top:2px solid #ff783f;border-bottom:2px solid #ff783f;display:flex;align-items:center;justify-content:space-between;box-shadow:0 0 12px #ff6e2420}.row-guide span{font-size:7px;color:#ff5d1a;background:#f2eddd;padding:4px 0}.lava{position:absolute;bottom:0;left:0;right:0;height:15%;z-index:5;pointer-events:none;background:linear-gradient(#ff8a21 0,#ff5a16 9%,#e94515 45%,#a92711 100%);box-shadow:0 -5px 30px #ff6c2530;min-height:0;overflow:visible}.lava-edge{position:absolute;left:0;right:0;top:-8px;height:14px;background:repeating-linear-gradient(90deg,transparent 0 8px,#ffad29 8px 21px,transparent 21px 34px,#ffad29 34px 50px);clip-path:polygon(0 100%,0 65%,5% 65%,5% 25%,11% 25%,11% 65%,18% 65%,18% 0,24% 0,24% 70%,32% 70%,32% 30%,40% 30%,40% 70%,49% 70%,49% 0,57% 0,57% 50%,64% 50%,64% 25%,73% 25%,73% 60%,82% 60%,82% 0,89% 0,89% 65%,95% 65%,95% 35%,100% 35%,100% 100%);animation:lava-flicker 1s steps(2,end) infinite}.lava-pixels{position:absolute;inset:0;opacity:.4;background-image:linear-gradient(90deg,transparent 75%,#ffbb3040 75%),linear-gradient(transparent 70%,#8e1e162f 70%);background-size:31px 17px,23px 13px;mask-image:linear-gradient(#000,transparent)}.lava-caption{display:flex;align-items:center;justify-content:center;gap:12px;position:absolute;top:28px;left:0;right:0;font-family:'IBM Plex Mono',monospace;letter-spacing:1px;font-size:8px;color:#ffe0a3;text-shadow:1px 1px #9f3116}.lava-caption svg{height:13px;width:13px}.screen-overlay{position:absolute;inset:0;z-index:7;display:flex;align-items:center;justify-content:center}.menu-screen{background:linear-gradient(#272c2c21,#272c2c42 68%,transparent);align-items:flex-start;padding:25px 22px 0}.menu-content{width:100%;text-align:center;display:flex;align-items:center;flex-direction:column}.hero-mine{position:relative;width:63px;height:63px;display:grid;place-items:center;border-width:4px;box-shadow:2px 2px #3b3b3b,0 9px 0 #22222212;transform:rotate(-7deg);margin-bottom:18px}.hero-mine svg{height:38px;width:38px;color:#191b1b}.hero-mine svg path:last-child{fill:#ff7c35}.spark{position:absolute;background:#ffa252;width:5px;height:5px;box-shadow:0 0 10px #ff792a55}.spark-one{top:-10px;right:-10px}.spark-two{bottom:3px;left:-16px;width:3px;height:3px}.menu-kicker{font-family:'IBM Plex Mono',monospace;font-size:7px;letter-spacing:1.6px;font-weight:500;margin:0 0 10px;color:#333a35}.menu-content h2{font-family:'Arial Black',Tahoma,Arial,sans-serif;font-size:27px;font-weight:900;letter-spacing:-1px;line-height:1;margin:0 0 21px;color:#242626;text-shadow:1px 1px #e3e3e3}.menu-content h2>span{display:block;font-family:'IBM Plex Mono',monospace;font-size:36px;font-weight:700;letter-spacing:6px;color:#f56a29;text-shadow:2px 2px #612912,3px 3px #aaaaaa;transform:skew(-8deg);margin-top:5px;padding-left:6px}.mode-card{display:flex;align-items:center;gap:14px;width:100%;padding:14px;background:#bcbcb9eF;text-align:left;box-shadow:0 2px 8px #55555510}.mode-icon{height:42px;width:40px;background:#3e352d;border:1px solid #292929;box-shadow:1px 1px #dfdfdc;display:grid;place-items:center}.mode-icon svg{width:27px;height:27px;color:#ff732b}.mode-title{font-family:'IBM Plex Mono',monospace;font-weight:700;font-size:15px;letter-spacing:1px;display:flex;align-items:center;gap:11px}.mode-title>span{font-weight:500;font-size:7px;letter-spacing:.6px;color:#666;border:1px solid #93938f;padding:3px 5px}.mode-card p{font-size:11px;line-height:1.6;margin:5px 0 0;color:#50534e}.play-button{margin:15px 0 12px;width:100%;height:44px;background:#d1d1c9;display:flex;align-items:center;justify-content:center;gap:12px;font-weight:700;font-size:17px;position:relative}.play-button:hover{background:#e1e1d8}.play-button svg{height:16px;width:16px;transform:rotate(90deg);position:absolute;right:17px}.play-button:focus-visible{outline-color:#333}.how-button{border:0;background:transparent;padding:3px;font-size:10px;display:flex;align-items:center;gap:7px;color:#313731}.how-button>span{border:1px solid #626961;font-family:'IBM Plex Mono',monospace;font-size:8px;width:12px;height:12px;display:grid;place-items:center}.how-button:hover{text-decoration:underline}.menu-note{font-family:'IBM Plex Mono',monospace;font-size:8px;letter-spacing:-.2px;color:#414c3e;margin:14px 0 0}.menu-note>span{color:#305c2a;margin-right:3px}.game-toolbar{display:flex;align-items:center;gap:7px;padding:11px 0 10px}.tool-group{display:flex;flex:1;background:#aaa;height:35px;padding:2px;gap:2px}.tool{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;background:transparent;border:1px solid transparent;padding:3px;font-size:11px}.tool svg{height:15px;width:15px}.tool.active{border-color:#777 #eee #eee #777;background:#bfbfbf}.tool kbd{font-size:8px;background:none;border:0;box-shadow:none;color:#6f6f6f;padding:0;margin-left:3px}.small-tool{height:34px;width:34px;display:grid;place-items:center;padding:5px;font-family:'IBM Plex Mono',monospace;font-size:17px;font-weight:600}.small-tool svg{height:16px;width:16px}.small-tool.muted{color:#777;position:relative}.small-tool.muted:after{content:'';position:absolute;height:2px;width:22px;background:#bd3f24;transform:rotate(-45deg)}.small-tool:disabled{color:#909090}.statusbar{height:24px;display:flex;align-items:center;padding:0 6px;justify-content:space-between;gap:6px;font-size:9px;color:#444;white-space:nowrap}.statusbar>span:first-child{overflow:hidden;text-overflow:ellipsis;flex:1}.statusbar>span:last-child{font-family:'IBM Plex Mono',monospace;font-size:7px;color:#656565;letter-spacing:.2px;border-left:1px solid #999;padding-left:7px;flex-shrink:0}.desktop-help{display:flex;align-items:center;gap:11px;margin:17px 0 0;font-family:'IBM Plex Mono',monospace;font-size:9px;color:#8a908c}.desktop-help span{display:flex;align-items:center;gap:5px}.desktop-help i{color:#555b55;font-style:normal}kbd{font-family:'IBM Plex Mono',monospace;font-size:7px;letter-spacing:.2px;border:1px solid #5d635f;color:#a0a7a0;box-shadow:0 1px #0f1510;padding:3px 4px;background:#292d29}.desktop-footer{font-size:10px;color:#8c938d;margin-top:27px;text-align:center;line-height:1.8}.desktop-footer span{font-family:'IBM Plex Mono',monospace;font-size:7px;letter-spacing:1.4px;display:block;color:#5c675d;margin-top:4px}.pause-screen,.result-screen{background:#32353580;backdrop-filter:blur(2px)}.dialog-card{width:calc(100% - 40px);padding:25px 22px 15px;text-align:center;box-shadow:4px 4px #25252540}.dialog-icon{font-family:'IBM Plex Mono',monospace;color:#4c4d43;font-size:34px;font-weight:700;display:block;margin-bottom:15px}.dialog-kicker{font-family:'IBM Plex Mono',monospace;font-size:8px;letter-spacing:1.4px;color:#666;margin:0 0 10px}.dialog-card h2{font-size:24px;letter-spacing:-.8px;margin:0 0 12px;line-height:1.1}.dialog-card>p:not(.dialog-kicker){font-size:12px;color:#5d5d5a;line-height:1.5}.primary{width:100%;height:41px;display:flex;align-items:center;justify-content:center;gap:14px;font-weight:700;font-size:12px;margin-top:18px}.primary:hover{background:#d6d6ce}.text-button{border:0;background:transparent;font-size:11px;color:#595954;margin-top:15px;padding:5px}.text-button:hover{text-decoration:underline}.result-icon{height:38px;width:38px;color:#e75d22;margin:0 auto 19px}.result-stats{display:flex;justify-content:space-around;background:#b9b9b9;padding:12px;margin-top:19px}.result-stats>div{display:flex;flex-direction:column;gap:6px}.result-stats span{font-size:8px;font-family:'IBM Plex Mono',monospace;letter-spacing:1px;color:#666}.result-stats b{font-family:'VT323','Courier New',monospace;font-size:30px;font-weight:400;line-height:1;color:#404038}.help-dialog{width:min(420px,calc(100% - 26px));padding:3px;position:fixed;max-height:calc(100dvh - 40px);color:#222;box-shadow:6px 6px #1118}.help-dialog::backdrop{background:#111a;backdrop-filter:blur(2px)}.help-title{background:linear-gradient(90deg,#020878,#1964a3);color:#fff;padding:4px 5px 4px 8px;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:space-between}.help-title button{border:2px solid;border-color:#fff #666 #666 #fff;color:#222;background:var(--silver);font-weight:bold;font-size:17px;line-height:13px;height:20px;width:21px;padding:0}.help-body{padding:24px 20px 20px}.help-body h2{font-size:23px;letter-spacing:-.6px;margin:0 0 24px}.help-body ol{padding-left:19px;font-size:12px;line-height:1.65}.help-body li{padding-left:5px;margin-bottom:16px}.help-body li::marker{font-family:'IBM Plex Mono',monospace;font-weight:700;color:#91502e}.help-controls{padding:6px 10px;margin-top:20px;font-size:10px;line-height:1.6;background:#bbb}.help-controls p{margin:7px 0}.help-controls b{display:inline-block;min-width:55px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.danger .shaft{box-shadow:0 0 12px #ff6b2650}.danger .shaft-heading>span:first-child{color:#ac3815}.danger .face .pixel-face b{height:7px;width:7px;left:7px;border:2px solid #222;border-radius:50%;bottom:3px}.reduced-motion *{animation:none!important;transition:none!important}.climbing .row-guide{animation:climb-flash .4s steps(2,end)}
@keyframes lava-flicker{50%{transform:translateX(8px);filter:brightness(1.12)}}@keyframes hint-pulse{50%{outline-color:#ffcf75}}@keyframes climb-flash{50%{border-color:#ffffd5;box-shadow:0 0 20px #ffed77}}
@media(min-height:900px){.desktop{padding-top:25px}.eyebrow{margin-bottom:16px}.menu-screen{padding-top:24px}.hero-mine{margin-bottom:17px}.menu-content h2{margin-bottom:20px}.play-button{margin-top:15px}}
@media(max-height:760px) and (min-width:501px){.desktop-bar{height:45px}.desktop{padding-top:15px}.eyebrow{margin-bottom:10px}.shaft{height:350px}.menu-screen{padding-top:15px}.hero-mine{width:48px;height:48px;margin-bottom:12px}.hero-mine svg{height:29px;width:29px}.menu-content h2{font-size:23px;margin-bottom:15px}.menu-content h2>span{font-size:29px}.mode-card{padding:10px}.play-button{margin:10px 0 7px;height:38px}.menu-note{margin-top:9px}.desktop-footer{display:none}.desktop-help{margin-top:12px}.game-heading{height:32px}.hud{height:62px}.shaft-heading{height:27px}.game-toolbar{padding:8px 0}.desktop{padding-bottom:15px}}
@media(max-width:500px){.desktop-bar{height:48px;padding:0 15px}.desktop-brand{font-size:11px;gap:7px}.build-label{font-size:7px;gap:6px}.build-label .version{display:none}.desktop{padding:15px 10px 20px}.eyebrow{font-size:6px;letter-spacing:1.1px;margin-bottom:12px}.game-window{width:min(414px,100%)}.game-inner{padding-left:9px;padding-right:9px}.game-heading h1{font-size:9px;gap:5px}.game-heading h1>span{font-size:7px}.no-guess{font-size:6px}.shaft{height:clamp(380px,calc(100dvh - 320px),490px)}.menu-screen{padding:27px 19px 0}.menu-content h2{font-size:25px}.menu-content h2>span{font-size:33px}.hero-mine{height:58px;width:58px;margin-bottom:18px}.menu-kicker{font-size:6px}.mode-card{padding:12px;gap:12px}.menu-note{font-size:7px}.desktop-help{gap:7px;font-size:8px}.desktop-help kbd{font-size:6px}.desktop-footer{margin-top:23px}.cell{font-size:21px}.cell svg{width:22px;height:22px}.statusbar{font-size:8px}.statusbar>span:last-child{font-size:6px}.small-tool{width:33px}.game-toolbar{gap:6px}.lava-caption{font-size:7px;gap:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Keep the complete menu above the lava on short and phone-sized screens. */
.shaft{container-type:size}.menu-note{margin-top:9px}
@container(max-height:430px){.menu-screen{padding:17px 20px 0}.hero-mine{width:48px;height:48px;margin-bottom:12px}.hero-mine svg{width:29px;height:29px}.menu-kicker{font-size:6px;margin-bottom:8px}.menu-content h2{font-size:23px;margin-bottom:15px}.menu-content h2>span{font-size:29px;margin-top:5px}.mode-card{padding:10px;gap:12px}.mode-icon{width:34px;height:36px}.mode-icon svg{width:24px;height:24px}.mode-title{font-size:13px}.mode-card p{font-size:10px;line-height:1.5}.play-button{height:40px;margin:12px 0 8px}.menu-note{display:none}}
@container(max-height:380px){.menu-screen{padding-top:14px}.hero-mine{width:40px;height:40px;margin-bottom:8px}.hero-mine svg{width:24px;height:24px}.menu-kicker{display:none}.menu-content h2{font-size:22px;margin-bottom:14px}.menu-content h2>span{font-size:27px}.mode-card{padding:9px}.mode-icon{height:32px;width:32px}.play-button{height:38px}}

/* Keep board sweeps in the game instead of panning or dragging page content. */
html,body{overscroll-behavior-x:none}
.board,.cell{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

/* The real surface can leave the viewport; only occasional embers remain. */
.lava{will-change:height;border-top:2px solid #ffdc67}
.lava-edge{filter:drop-shadow(0 -2px 3px #ff9b2840)}
.fireball-layer{position:absolute;inset:0;overflow:hidden;z-index:6;pointer-events:none;user-select:none;contain:strict}
.fireball{position:absolute;top:0;left:0;pointer-events:none;will-change:transform,opacity}
/* Two-pixel sprites use the lava surface's exact yellow, orange and red. */
.fireball-core{position:absolute;top:0;left:calc(50% - 5px);width:2px;height:2px;background:transparent;box-shadow:4px 0 #ffad29,2px 2px #ffad29,4px 2px #ffdc67,6px 2px #ffad29,0 4px #ff8a21,2px 4px #ffad29,4px 4px #ffdc67,6px 4px #ffad29,8px 4px #ff5a16,0 6px #ff8a21,2px 6px #ffad29,4px 6px #ffad29,6px 6px #ff5a16,8px 6px #e94515,2px 8px #ff5a16,4px 8px #e94515,6px 8px #e94515,4px 10px #e94515}
.fireball-tail{position:absolute;top:12px;left:calc(50% - 5px);width:2px;height:2px;background:transparent;box-shadow:2px 0 #ff8a21,6px 2px #e94515,4px 6px #ff5a16}
.fireball[data-frame='1'] .fireball-tail{box-shadow:6px 0 #ff5a16,2px 4px #ffad29,4px 8px #e94515}
.reduced-motion .fireball-layer{display:none}
@media(prefers-reduced-motion:reduce){.fireball-layer{display:none}}

/* Optional double-width containers keep the original nine-column shaft. */
.cell{width:100%;height:100%;min-height:0;aspect-ratio:auto}
.cell.wide{border-top-width:3px;border-bottom-width:3px}
.cell.wide.revealed{border-width:1px}
.cell.high-number{font-size:19px;color:#95245b}
.cell-flags{display:flex;align-items:center;justify-content:center;gap:2px;pointer-events:none}
.cell-flags svg{width:22px;height:22px}
.modifier-option{width:100%;display:flex;align-items:center;gap:10px;text-align:left;padding:9px 11px;margin-top:9px;background:#c5c5becf;cursor:pointer}
.modifier-option input{width:16px;height:16px;margin:0;accent-color:#000080;flex-shrink:0;cursor:pointer}
.modifier-option>span{flex:1;display:flex;flex-direction:column;gap:4px}
.modifier-option strong{font-size:11px;display:flex;align-items:center;justify-content:space-between;gap:7px}
.modifier-option small{font-family:'IBM Plex Mono',monospace;font-size:6px;letter-spacing:.5px;color:#62645b;font-weight:500;border:1px solid #96998b;padding:2px 3px}
.modifier-option>span>span{font-size:9px;color:#55594f}
.modifier-option:has(input:checked){background:#d5d7c3;border-top-color:#69745a;border-left-color:#69745a}
.menu-screen{padding-top:18px}
.hero-mine{width:48px;height:48px;margin-bottom:11px}
.hero-mine svg{width:29px;height:29px}
.menu-kicker{display:none}
.menu-content h2{font-size:25px;margin-bottom:16px}
.menu-content h2>span{font-size:33px}
.mode-card{padding:10px 12px}
.menu-note{display:none}
.flag-count-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px;height:29px}
.flag-count-bar>span{font-family:'IBM Plex Mono',monospace;font-size:8px;letter-spacing:.7px;color:#5d5d52}
.flag-count-tools{height:29px;display:flex;gap:2px;padding:2px;background:#aaa}
.flag-count-tools button{border:1px solid transparent;min-width:90px;background:transparent;font-size:10px;padding:3px 6px;display:flex;align-items:center;justify-content:center;gap:9px}
.flag-count-tools button.active{border-color:#777 #eee #eee #777;background:#c5c5b9}
.flag-count-tools kbd{font-size:7px;padding:0;border:0;background:none;color:#717163;box-shadow:none}
.wide-rules{padding:10px 12px;margin-top:19px;background:#bcbeb3;font-size:11px;line-height:1.6}
.wide-rules>b{font-size:12px}
.wide-rules p{margin:7px 0 0}
.wide-game .shaft{height:clamp(350px,calc(100dvh - 402px),433px)}
@media(max-width:500px){.wide-game .shaft{height:clamp(345px,calc(100dvh - 357px),453px)}.flag-count-tools button{min-width:85px}.menu-screen{padding-left:16px;padding-right:16px}}
@container(max-height:430px){.menu-screen{padding-top:15px}.hero-mine{width:40px;height:40px;margin-bottom:8px}.hero-mine svg{width:24px;height:24px}.menu-content h2{font-size:23px;margin-bottom:12px}.menu-content h2>span{font-size:28px}.mode-card{padding:8px 10px}.modifier-option{padding:7px 9px;margin-top:7px}.modifier-option>span{gap:3px}.play-button{height:38px;margin:10px 0 5px}.how-button{font-size:9px}}
@container(max-height:365px){.menu-screen{padding-top:10px}.hero-mine{display:none}.menu-content h2{font-size:22px;margin-bottom:10px}.menu-content h2>span{font-size:26px}.modifier-option{padding:6px 9px}.mode-card p{font-size:9px}}

.touch-control-hint,.touch-help{display:none}
@media(hover:none) and (pointer:coarse){.game-toolbar .tool-group,.flag-count-bar,.desktop-help{display:none!important}.touch-control-hint{display:block;flex:1;min-width:0;font-family:'IBM Plex Mono',monospace;font-size:9px;line-height:1.6;color:#55584b}.touch-help{display:flex;gap:9px;align-items:center;margin:17px 0 0;color:#939b94;font-family:'IBM Plex Mono',monospace;font-size:9px}.touch-help>span{color:#626c63}}

/* The desktop is a single screen; the mine shaft gets all remaining space. */
html{height:100%;overflow:hidden}
body{height:100dvh;min-height:0;display:grid;grid-template-rows:52px minmax(0,1fr) 28px;overflow:hidden}
.desktop-bar{height:auto;min-height:0;padding:0 28px;border-bottom-color:#ffffff0b}
.site-brand{display:inline-flex;align-items:center;flex-shrink:0;text-decoration:none}
.site-logo{display:block;width:153px;height:42px;object-fit:contain;image-rendering:pixelated}
.build-label{gap:0}
.build-label .version{display:block;margin:0;font-size:9px;line-height:1;padding:5px 6px}
.desktop{min-height:0;padding:8px 12px 0;justify-content:flex-start}
.game-window{display:grid;grid-template-rows:27px 27px minmax(0,1fr);flex:1 1 0;min-height:0;width:min(414px,100%)}
.titlebar,.menubar{height:auto;min-height:0}
.game-inner{display:flex;flex-direction:column;min-height:0;padding:0 12px 8px}
.game-inner>div{flex-shrink:0}
.game-heading{height:32px}
.hud{height:62px}
.shaft-heading{height:28px}
.game-inner>.shaft,.wide-game .game-inner>.shaft{flex:1 1 0;height:auto;min-height:0}
.game-toolbar{padding:8px 0;min-height:50px}
.statusbar{height:24px}
.desktop-help,.touch-help{flex:0 0 25px;height:25px;min-height:0;margin:0;justify-content:center;padding:5px 0 0}
.desktop-footer{display:flex;align-items:center;padding:0 28px;margin:0;text-align:left;line-height:1;min-height:0}
.desktop-footer .desktop-brand{display:inline-flex;gap:7px;font-size:10px;color:#a6aaa6;line-height:1}
.desktop-footer .desktop-brand svg{width:13px;height:13px;color:#88938c}
.desktop-footer .desktop-brand span{display:inline;font:inherit;letter-spacing:0;margin:0;color:inherit}
.desktop-footer .desktop-brand .brand-x{color:#e59a6b}
.lava-caption{top:18px;font-size:18px;line-height:1;letter-spacing:0;text-shadow:none}
.menu-screen{align-items:center;padding:14px 18px 40px;overflow:auto;overscroll-behavior:contain}
.menu-content{flex-shrink:0}
.menu-content h2{margin-bottom:14px}
.hero-mine{flex-shrink:0}
.mode-card{flex-shrink:0}
.modifier-option{flex-shrink:0}
.play-button{flex-shrink:0;min-height:38px}
.how-button{flex-shrink:0;min-height:22px}
.pause-screen,.result-screen{padding:10px 0;overflow:auto;overscroll-behavior:contain}
.dialog-card{max-height:100%;overflow:auto;padding:20px 20px 14px}

/* A nearby surface trembles by a single pixel; the board stays still. */
.lava-restless .lava-edge{animation:lava-grumble calc(.62s - var(--lava-pressure,0)*.3s) steps(2,end) infinite}
.lava-restless .lava-pixels{animation:lava-churn .48s steps(2,end) infinite;opacity:calc(.4 + var(--lava-pressure,0)*.18)}
.lava-restless{box-shadow:0 -5px 30px #ff6c2530,0 -2px calc(10px + var(--lava-pressure,0)*14px) #ff8a2130}
@keyframes lava-grumble{0%,100%{transform:translate(0,0)}25%{transform:translate(2px,-1px)}50%{transform:translate(4px,0);filter:brightness(1.12)}75%{transform:translate(2px,-1px)}}
@keyframes lava-churn{50%{background-position:2px -1px,-2px 1px}}

/* The title bar and bevels stay, while the window fills a phone's viewport. */
@media(max-width:500px){
  body{grid-template-rows:42px minmax(0,1fr) 22px}
  .desktop-bar{padding:0 12px}
  .site-logo{width:120px;height:33px}
  .build-label .version{display:block;font-size:8px;padding:4px 5px}
  .desktop{padding:0}
  .game-window{width:100%;border-width:3px;box-shadow:1px 1px #070909}
  .game-inner{padding:0 8px 6px}
  .game-heading{height:28px}
  .hud{height:58px;padding:5px 8px}
  .shaft-heading{height:26px;font-size:7px;letter-spacing:.2px}
  .game-toolbar{padding:6px 0;min-height:46px}
  .statusbar{height:22px}
  .desktop-help,.touch-help{display:none!important}
  .desktop-footer{display:flex;padding:0 11px}
  .desktop-footer .desktop-brand{font-size:9px;gap:6px}
  .desktop-footer .desktop-brand svg{width:11px;height:11px}
  .menu-screen{padding-left:16px;padding-right:16px}
  .touch-control-hint{font-size:8px;line-height:1.55}
  .flag-count-bar{height:27px;margin-bottom:6px}
  .flag-count-tools{height:27px}
  .flag-count-tools button{min-width:80px}
}

@container(max-height:430px){
  .menu-screen{padding-top:12px;padding-bottom:32px}
  .hero-mine{width:40px;height:40px;margin-bottom:8px}
  .hero-mine svg{width:24px;height:24px}
  .menu-content h2{font-size:23px;margin-bottom:11px}
  .menu-content h2>span{font-size:28px;margin-top:4px}
  .mode-card{padding:8px 10px;gap:10px}
  .mode-icon{height:32px;width:32px;flex-shrink:0}
  .mode-icon svg{height:24px;width:24px}
  .mode-card p{font-size:10px;line-height:1.5}
  .modifier-option{padding:7px 9px;margin-top:7px}
  .modifier-option>span{gap:3px}
  .play-button{height:38px;margin:10px 0 4px}
  .how-button{font-size:9px}
}
@container(max-height:365px){
  .menu-screen{padding-top:10px;padding-bottom:27px}
  .hero-mine{display:none}
  .menu-content h2{font-size:22px;margin-bottom:10px}
  .menu-content h2>span{font-size:26px}
  .mode-card p{font-size:9px}
  .modifier-option{padding:6px 9px}
  .dialog-card{padding:14px 16px 10px}
  .dialog-icon{font-size:26px;margin-bottom:8px}
  .dialog-kicker{margin-bottom:7px}
  .dialog-card h2{font-size:22px;margin-bottom:8px}
  .dialog-card>p:not(.dialog-kicker){margin:8px 0;font-size:11px}
  .primary{height:38px;margin-top:12px}
  .text-button{margin-top:8px}
  .result-icon{height:28px;width:28px;margin-bottom:10px}
  .result-stats{padding:8px;margin-top:10px}
}
@container(max-height:290px){
  .menu-screen{align-items:flex-start;padding:6px 14px 12px}
  .menu-content h2{font-size:18px;margin-bottom:8px}
  .menu-content h2>span{font-size:22px;letter-spacing:4px;margin-top:2px}
  .mode-card{padding:6px 8px;gap:8px}
  .mode-title{font-size:11px}
  .mode-card p{font-size:9px;line-height:1.35;margin-top:3px}
  .mode-icon{height:28px;width:28px}
  .modifier-option{margin-top:6px;padding:6px 8px}
  .modifier-option strong{font-size:10px}
  .modifier-option>span>span{font-size:8px}
  .modifier-option small{display:none}
  .play-button{height:36px;min-height:36px;margin:8px 0 2px;font-size:16px}
  .how-button{min-height:20px}
}
@container(max-height:250px){
  .menu-screen{padding:6px 12px 12px}
  .menu-content h2{font-size:16px;margin-bottom:6px}
  .menu-content h2>span{font-size:20px;margin-top:2px}
  .mode-card{padding:4px 8px}
  .mode-card p{display:none}
  .mode-icon{height:22px;width:22px}
  .mode-icon svg{height:18px;width:18px}
  .modifier-option{padding:5px 8px;margin-top:5px}
  .play-button{margin-top:6px}
}

/* Short landscape windows trade a little width for three readable board rows. */
@media(max-height:540px){
  body{grid-template-rows:36px minmax(0,1fr) 18px}
  .desktop-bar{padding:0 12px}
  .site-logo{width:113px;height:31px}
  .desktop{padding:4px 8px 0}
  .game-window{width:min(414px,100%,calc((100dvh - 276px)*3));grid-template-rows:24px 24px minmax(0,1fr)}
  .titlebar{font-size:11px}
  .menubar>button{padding-top:2px;padding-bottom:2px}
  .game-inner{padding:0 8px 6px}
  .game-heading{height:24px}
  .hud{height:48px;padding:4px 7px}
  .hud-label{font-size:7px;letter-spacing:1px}
  .hud-stat{gap:2px}
  .led{font-size:30px;line-height:26px;min-width:74px}
  .right .led{font-size:28px}
  .face{width:36px;height:36px;margin-top:1px}
  .shaft-heading{height:24px}
  .game-toolbar{padding:4px 0;min-height:42px}
  .statusbar{height:20px}
  .desktop-help,.touch-help{display:none!important}
  .desktop-footer{display:flex;padding:0 12px}
  .desktop-footer .desktop-brand{font-size:8px}
  .dropdown{top:47px}
  :is(.on-menu,.showing-result) .game-heading,:is(.on-menu,.showing-result) .hud,:is(.on-menu,.showing-result) .shaft-heading,
  :is(.on-menu,.showing-result) .game-toolbar,:is(.on-menu,.showing-result) .statusbar,:is(.on-menu,.showing-result) .flag-count-bar{display:none}
  :is(.on-menu,.showing-result) .game-inner{padding-top:6px}
}
@media(prefers-reduced-motion:reduce){.lava-restless .lava-edge,.lava-restless .lava-pixels{animation:none}}
.reduced-motion .lava-restless .lava-edge,.reduced-motion .lava-restless .lava-pixels{animation:none}

/* Native range input, styled like the window's classic recessed controls. */
.options-dropdown{width:230px;min-width:0;max-width:calc(100vw - 70px)}
.lava-speed-control{padding:8px 10px 7px}
.lava-speed-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}
.lava-speed-label label{cursor:pointer}
.lava-speed-label output{min-width:38px;padding:2px 5px;text-align:right;background:#bbb;border:1px solid;border-color:#808080 #eee #eee #808080;font-family:'IBM Plex Mono',monospace;font-size:10px}
#lava-speed{display:block;width:100%;height:44px;padding:0;margin:0;appearance:none;-webkit-appearance:none;background:transparent;accent-color:#000080;cursor:ew-resize}
#lava-speed:focus-visible{outline:1px dotted #303030;outline-offset:-3px}
#lava-speed::-webkit-slider-runnable-track{height:6px;border:2px solid;border-color:#777 #eee #eee #777;background:#aaa}
#lava-speed::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:15px;height:22px;margin-top:-10px;border:2px solid;border-color:#fff #555 #555 #fff;background:#c6c6c6;box-shadow:1px 1px #333}
#lava-speed::-moz-range-track{height:2px;border:2px solid;border-color:#777 #eee #eee #777;background:#aaa}
#lava-speed::-moz-range-thumb{width:11px;height:18px;border:2px solid;border-color:#fff #555 #555 #fff;border-radius:0;background:#c6c6c6;box-shadow:1px 1px #333}
.lava-speed-scale{display:flex;justify-content:space-between;font-family:'IBM Plex Mono',monospace;font-size:8px;color:#626262;margin-top:-4px;pointer-events:none}

/* Keep the two completed clue rows readable as the playable row submerges. */
.cell.clue-row{z-index:6}
/* Known numbers and exact flag counts remain legible during partial immersion. */
.cell-content{position:relative;z-index:6;display:flex;align-items:center;justify-content:center;pointer-events:none}
.cell.hinted{z-index:auto}
.cell:active:not(:disabled){transform:none}

/* Result cards keep the classic bevels, with a small trophy for a new record. */
.pause-card{padding:22px 20px 14px}
.pause-card .dialog-icon{margin-bottom:12px}
.pause-card h2{margin-bottom:0}
.result-card{width:calc(100% - 24px);padding:12px 12px 10px}
.result-outcome{display:flex;align-items:center;justify-content:center;gap:12px;text-align:left}
.result-outcome>div{min-width:0}
.result-outcome .result-icon{width:32px;height:32px;margin:0;flex-shrink:0}
.result-outcome .dialog-kicker{font-size:8px;letter-spacing:1px;color:#4d514b;margin:0 0 4px}
.result-outcome h2{font-size:24px;letter-spacing:-.5px;margin:0 0 5px;line-height:1.1}
.result-outcome #result-description{font-size:11px;color:#474d47;line-height:1.4;margin:0}
.result-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;background:transparent;padding:0;margin:10px 0 0}
.result-stats>.result-stat-card{display:flex;flex-direction:column;gap:0;min-width:0;padding:7px 5px 6px;background:#d2d8c9}
.result-stats>.time-card{background:#cdd5dd}
.result-stat-card dt{display:flex;align-items:center;justify-content:center;gap:5px;font-size:11px;font-weight:bold;line-height:1.2;color:#35443a}
.result-stat-card dt svg{width:18px;height:18px}
.result-stat-card dd{margin:0}
.result-stats .result-stat-value{display:flex;align-items:baseline;justify-content:center;gap:3px;margin-top:4px;font-family:'VT323','Courier New',monospace;font-size:36px;line-height:1;letter-spacing:0;color:#23342b;white-space:nowrap}
.result-stats .result-stat-value>span:not(.sr-only),.result-stats .result-stat-value>time{font:inherit;letter-spacing:inherit;color:inherit}
.result-stats .result-stat-value .result-stat-unit{font-size:17px;color:#42564a}
.result-stats .result-stat-detail{margin-top:4px;font-family:'IBM Plex Mono',monospace;font-size:8px;line-height:1.3;letter-spacing:0;color:#465449}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.result-actions .primary,.result-actions .result-menu-button{width:100%;height:38px;min-width:0;padding:0 5px;margin:0;font-size:11px}
.result-actions .primary{gap:8px}
.result-actions .result-menu-button:hover{background:#d6d6ce}
.personal-best-banner{display:flex;align-items:center;justify-content:center;gap:9px;padding:7px 8px;margin-bottom:10px;border:2px solid;border-color:#fff6c8 #9a752d #9a752d #fff6c8;background:#f2d786;box-shadow:inset 0 0 0 1px #e4bb57;text-align:left}
.personal-best-trophy{width:32px;height:32px;flex-shrink:0}
.personal-best-banner .personal-best-title{font-family:'Tahoma',Arial,sans-serif;font-size:16px;line-height:1.1;letter-spacing:-.2px;color:#513609;margin:0}
.personal-best-banner #personal-best-improvement{font-size:9px;line-height:1.35;color:#614514;margin:3px 0 0}
.new-best .result-card{border-color:#fff6cf #9a7e3d #9a7e3d #fff6cf}
.new-best .result-outcome{text-align:center}
.new-best .result-icon,.new-best .result-outcome .dialog-kicker{display:none}
.new-best .result-outcome h2{font-size:22px;margin-bottom:4px}
@container(max-height:300px){
  .result-card{padding:9px 9px 7px}
  .result-outcome{gap:9px}
  .result-outcome .result-icon{width:26px;height:26px}
  .result-outcome h2,.new-best .result-outcome h2{font-size:20px;margin-bottom:3px}
  .result-outcome #result-description{font-size:10px;line-height:1.3}
  .result-stats{gap:6px;margin-top:7px}
  .result-stats>.result-stat-card{padding:6px 4px 5px}
  .result-stat-card dt{font-size:10px;gap:4px}
  .result-stat-card dt svg{width:16px;height:16px}
  .result-stats .result-stat-value{font-size:30px;margin-top:4px}
  .result-stats .result-stat-value .result-stat-unit{font-size:15px}
  .result-stats .result-stat-detail{margin-top:3px;font-size:7px}
  .result-actions{gap:6px;margin-top:8px}
  .result-actions .primary,.result-actions .result-menu-button{height:36px;font-size:10px}
  .personal-best-banner{padding:4px 6px;margin-bottom:7px;gap:7px}
  .personal-best-trophy{width:28px;height:28px}
  .personal-best-banner .personal-best-title{font-size:15px}
  .personal-best-banner #personal-best-improvement{font-size:8px;margin-top:2px}
}
@container(max-height:200px){
  .pan-board .pause-screen{padding:6px 0}
  .pause-card{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px}
  .pause-card .dialog-icon{display:none}
  .pause-card h2{grid-column:1/-1;font-size:20px;line-height:1;margin:0}
  .pause-card .primary,.pause-card .text-button{height:38px;min-height:38px;min-width:0;margin:0;padding:0 4px;font-size:10px}
  .pause-card .primary{gap:7px}
}

/* Board setup keeps native number controls and scrolls inside the menu. */
.options-dropdown{max-height:min(calc(100dvh - 100px),calc(100% - 58px));overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8d8d8d #c6c6c6}
.board-settings{border:0;min-width:0;margin:0;padding:8px 10px 7px}
.board-settings legend{padding:0;font-size:12px;font-weight:bold;line-height:1.3;color:#32382f}
.board-setting-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px}
.board-setting-row label{font-size:11px;line-height:1.35;cursor:pointer}
.board-setting-row label span{color:#565b53}
.board-setting-row input{width:68px;height:36px;min-width:0;padding:4px 5px;border:2px solid;border-color:#707070 #eee #eee #707070;border-radius:0;background:#fff;color:#242a23;font-family:'IBM Plex Mono',monospace;font-size:12px;font-weight:600;line-height:1;text-align:right;color-scheme:light}
.board-setting-row input:focus-visible{outline:2px solid #000080;outline-offset:1px}
.board-setting-limit,.board-settings-note{font-size:9px;line-height:1.45;letter-spacing:0;color:#4b5346;margin:3px 0 0}
.board-setting-limit{text-align:right;margin-top:-1px;margin-bottom:2px}
.board-settings-note{margin-top:7px}
.mode-card .board-summary{display:block;font-family:'IBM Plex Mono',monospace;font-size:8px;line-height:1.4;letter-spacing:-.2px;color:#384734;margin:5px 0 0;white-space:nowrap}
.board-setup-help{font-size:11px;line-height:1.6;color:#424b3c;margin:17px 0}
@container(max-height:300px){.mode-card .board-summary{font-size:7px;line-height:1.35;margin-top:3px}}

/* Wide minefields keep readable cells and pan independently of dig gestures. */
.game-window{width:min(var(--game-width,414px),100%);grid-template-columns:minmax(0,1fr)}
.game-inner,.titlebar,.menubar{min-width:0}
.row-guide{height:var(--cell-size,calc(100cqw / 9))}
.menu-content{max-width:338px}
.dialog-card{max-width:354px}
.board-pan-controls{display:grid;grid-template-columns:auto minmax(40px,1fr) auto;align-items:center;gap:7px;min-height:36px;height:36px;padding:0 1px}
.board-pan-controls label,.board-pan-controls output{font-family:'IBM Plex Mono',monospace;font-size:8px;line-height:1.25;color:#434e40;white-space:nowrap}
.board-pan-controls label{cursor:pointer}
.board-pan-controls output{text-align:right;font-size:7px}
#board-pan{display:block;width:100%;min-width:0;height:34px;margin:0;padding:0;appearance:none;-webkit-appearance:none;background:transparent;accent-color:#000080;cursor:ew-resize}
#board-pan:focus-visible{outline:1px dotted #303030;outline-offset:-2px}
#board-pan::-webkit-slider-runnable-track{height:6px;border:2px solid;border-color:#777 #eee #eee #777;background:#aaa}
#board-pan::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:20px;height:22px;margin-top:-10px;border:2px solid;border-color:#fff #555 #555 #fff;background:#c6c6c6;box-shadow:1px 1px #333}
#board-pan::-moz-range-track{height:2px;border:2px solid;border-color:#777 #eee #eee #777;background:#aaa}
#board-pan::-moz-range-thumb{width:16px;height:18px;border:2px solid;border-color:#fff #555 #555 #fff;border-radius:0;background:#c6c6c6;box-shadow:1px 1px #333}
@media(max-width:500px){.game-window{width:100%}}
@media(max-height:540px){
  .game-window{width:min(var(--game-width,414px),414px,100%,calc((100dvh - 276px)*3))}
  .pan-board .game-heading{display:none}
}

/* One large switch changes the tool, including taps on the selected side. */
.game-toolbar{display:flex;align-items:flex-start;gap:9px;min-height:0;padding:8px 0 6px}
.tool-switch-wrap{flex:1;min-width:0}
.tool-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;width:100%;height:88px;margin:0;padding:4px;background:#b6b7b0;touch-action:manipulation}
.tool-switch .tool-option{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;height:100%;border:2px solid transparent;color:#414a3e;pointer-events:none}
.tool-option svg{width:25px;height:25px;color:inherit}
.tool-option .tool-label{font-size:14px;font-weight:bold;line-height:1}
.tool-option kbd{position:absolute;top:3px;right:4px;padding:0;border:0;background:none;box-shadow:none;font-size:8px;color:#686d62}
.tool-switch .tool-option.active{border-color:#7b8270 #f4f5e9 #f4f5e9 #7b8270;background:#dbe0ce;color:#273d27}
.tool-switch #flag-tool.active{border-color:#947356 #f9ead9 #f9ead9 #947356;background:#ead3b6;color:#673e20}
.tool-switch:disabled{cursor:default;opacity:.6}
.tool-switch:hover:not(:disabled){background:#c1c3b8}
.tool-switch:active:not(:disabled){transform:none}
.tool-hint{margin:5px 0 0;text-align:center;font-family:'IBM Plex Mono',monospace;font-size:8px;line-height:1.4;color:#48523f;white-space:nowrap}
.toolbar-actions{display:flex;flex:0 0 44px;flex-direction:column;gap:6px}
.toolbar-actions .small-tool{width:44px;height:40px;min-height:40px;font-size:20px}
.toolbar-actions .small-tool svg{width:18px;height:18px}
:is(.on-menu,.showing-result) .game-toolbar{display:none}
@media(max-width:500px){
  .game-toolbar{padding:6px 0;gap:7px}
  .tool-hint{font-size:7px}
  .tool-option kbd{display:none}
}
@media(max-height:540px){
  .game-heading,.statusbar{display:none}
  .hud{height:34px;padding:3px 7px}
  .hud-label{display:none}
  .hud-stat{gap:0}
  .led{font-size:28px;line-height:24px;min-width:70px;padding-bottom:0}
  .right .led{font-size:26px}
  .face{width:28px;height:28px;margin:0}
  .pixel-face{width:23px;height:23px}
  .shaft-heading{height:20px}
  .game-toolbar{padding:4px 0;gap:7px}
  .tool-switch{height:64px;padding:3px}
  .tool-switch .tool-option{gap:3px}
  .tool-option svg{width:20px;height:20px}
  .tool-option .tool-label{font-size:12px}
  .tool-option kbd{display:none}
  .tool-hint{font-size:7px;line-height:1;margin-top:4px}
  .toolbar-actions{gap:4px}
  .toolbar-actions .small-tool{height:36px;min-height:36px}
  .board-pan-controls{height:30px;min-height:30px}
  #board-pan{height:28px}
}

/* A steady, thin row boundary warms as the real lava surface approaches. */
.row-guide{
  --row-color:rgb(calc(201 + var(--row-danger,0)*54) calc(128 + var(--row-danger,0)*113) calc(76 + var(--row-danger,0)*94));
  border:2px solid var(--row-color);
  box-shadow:0 0 calc(3px + var(--row-danger,0)*5px) rgb(255 151 67 / calc(.12 + var(--row-danger,0)*.13)),inset 0 0 calc(2px + var(--row-danger,0)*3px) rgb(255 229 149 / calc(.07 + var(--row-danger,0)*.1));
}
.row-guide,.climbing .row-guide{animation:row-warmth 2.6s ease-in-out infinite}
@keyframes row-warmth{0%,100%{filter:brightness(.9);opacity:.84}50%{filter:brightness(1.08);opacity:1}}
.reduced-motion .row-guide{animation:none}
@media(prefers-reduced-motion:reduce){.row-guide,.climbing .row-guide{animation:none}}
