/* Faithful Win9x geometry; originals are pixel-drawn, not emoji. */
.sr-only,.visually-hidden-counter{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.shell{border:2px solid;border-color:#fff #404040 #404040 #fff;background:#c0c0c0}
.titlebar{min-height:30px;height:30px;align-items:center;padding:3px 3px 3px 7px;background:linear-gradient(90deg,#000080,#1066bd)}
.titlebar:after{content:none}
.titlebar h1{font-size:15px;line-height:20px;letter-spacing:0;font-weight:700;color:#fff}
.window-controls{display:flex;align-items:center;gap:2px;height:100%}
.window-controls span{display:grid;place-items:center;width:18px;height:18px;background:#c0c0c0;border:2px solid;border-color:#fff #808080 #808080 #fff;box-shadow:1px 1px #404040;color:#000;font:bold 13px/1 Arial,sans-serif}
.window-controls .window-min{align-items:end;padding-bottom:3px;font-size:14px}
.window-controls .window-max{font-size:15px}
.window-controls .window-close{font-size:17px}
.difficulties{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;align-items:stretch;padding:5px 6px 6px;background:#c0c0c0;border:0;border-bottom:1px solid #8a8a8a}
.difficulties button{flex:initial;min-width:0;min-height:28px;padding:5px 2px;border:2px solid;border-color:#fff #808080 #808080 #fff;border-radius:0;background:#c0c0c0;color:#000!important;box-shadow:1px 1px #404040;font:normal 11px/1.2 Tahoma,Arial,sans-serif;white-space:nowrap;text-align:center}
.difficulties button[aria-pressed="true"],:root[data-theme="light"] .difficulties button[aria-pressed="true"]{background:#d3d3d3;color:#000!important;border-color:#808080 #fff #fff #808080;box-shadow:inset 1px 1px #777}
.difficulties button:focus-visible{outline:2px dotted #000080;outline-offset:-5px}
.dashboard{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);padding:7px 9px;border:3px solid;border-color:#808080 #fff #fff #808080}
.counter{height:36px;min-width:58px;width:58px;padding:2px 1px;overflow:hidden;background:#050505;border:2px solid;border-color:#808080 #fff #fff #808080;display:grid;place-items:center}
.digits{width:52px;height:30px;display:grid;place-items:center;line-height:1;letter-spacing:0;text-shadow:none}
.led-art{display:block;width:52px;height:30px}
.face{width:32px;height:32px;padding:1px;border:2px solid;border-color:#fff #808080 #808080 #fff;box-shadow:1px 1px #404040;background:#c0c0c0;display:grid;place-items:center}
.face-art{width:24px;height:24px;display:block;image-rendering:pixelated}
.tile-art{width:min(88%,20px);height:min(88%,20px);display:block;image-rendering:pixelated}
.wrong-art{position:absolute;inset:12%;width:76%;height:76%;pointer-events:none}
.cell{font-family:Arial,sans-serif;font-size:18px;font-weight:900;text-shadow:none}
.cell.open{font-size:18px}
.cell.flagged,.cell.mine{display:grid;place-items:center}
@media(max-width:680px){
 .shell{border:0}
 .titlebar{height:32px;min-height:32px}
 .difficulties{padding:6px 6px 7px}
 .difficulties button{font-size:12px;min-height:34px}
 .dashboard{padding:7px}
 .counter{width:58px;min-width:58px}
 .face{width:34px;height:34px}
 .face-art{width:24px;height:24px}
 .tile-art{width:min(70%,22px);height:min(70%,22px)}
}
@media(max-width:360px){.difficulties button{font-size:11px}.dashboard{padding:5px}}

/* Optional Updraft dark treatment: original game rules and icon/LED hues stay intact. */
.display-toggle{font:11px Tahoma,Arial,sans-serif;min-height:24px;border:2px solid;border-color:#fff #808080 #808080 #fff;background:#c0c0c0;color:#000;padding:3px 6px;cursor:pointer;white-space:nowrap}
.display-toggle:active{border-color:#808080 #fff #fff #808080}
.foot{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:3px 8px}
.foot>span:first-child{grid-column:1;grid-row:1}
.foot #hint{grid-column:1/-1;grid-row:2;text-align:center}
.foot .display-toggle{grid-column:2;grid-row:1;justify-self:end}
.foot .help{grid-column:3;grid-row:1}
:root[data-theme="dark"]{color-scheme:dark;--bg:#0d1717;--panel:#20362e;--card:#20362e;--tile:#294536;--tile-hi:#294536;--edge:#52755c;--ink:#d2dfc3;--sub:#a8bcaa;--line:#344c43;--safe:#14271f;--focus:#c4ebac}
:root[data-theme="dark"] html,:root[data-theme="dark"] body{background:#0d1717;color:#d2dfc3}
:root[data-theme="dark"] .shell,:root[data-theme="dark"] .game,:root[data-theme="dark"] .difficulties,:root[data-theme="dark"] .foot{background:#20362e;color:#d2dfc3}
:root[data-theme="dark"] .shell{border-color:#48634c #07100b #07100b #48634c}
:root[data-theme="dark"] .titlebar{background:linear-gradient(90deg,#0d1717,#315a3c)}
:root[data-theme="dark"] .window-controls span{background:#294536;color:#d2dfc3;border-color:#52755c #101d15 #101d15 #52755c}
:root[data-theme="dark"] .difficulties{border-bottom-color:#49634d}
:root[data-theme="dark"] .difficulties button,
:root[data-theme="dark"] .display-toggle{background:#294536;color:#d2dfc3!important;border-color:#52755c #101d15 #101d15 #52755c;box-shadow:1px 1px #0d1717}
:root[data-theme="dark"] .difficulties button[aria-pressed="true"]{background:#3a5b44;color:#c4ebac!important;border-color:#101d15 #52755c #52755c #101d15;box-shadow:inset 1px 1px #0d1717}
:root[data-theme="dark"] .dashboard,:root[data-theme="dark"] .board{background:#20362e;border-color:#102117 #52755c #52755c #102117}
:root[data-theme="dark"] .counter{border-color:#102117 #52755c #52755c #102117;background:#050505}
:root[data-theme="dark"] .face,:root[data-theme="dark"] .mode,:root[data-theme="dark"] .secondary{background:#294536;color:#d2dfc3;border-color:#52755c #101d15 #101d15 #52755c}
:root[data-theme="dark"] .cell{background:#294536;border-color:#52755c #11271b #11271b #52755c;color:#d2dfc3}
:root[data-theme="dark"] .cell.open{background:#14271f;border:1px solid #344c43}
:root[data-theme="dark"] .cell.exploded{background:#a42f31}
:root[data-theme="dark"] .cell[data-n="1"]{color:#81b5ff}
:root[data-theme="dark"] .cell[data-n="2"]{color:#80e5a0}
:root[data-theme="dark"] .cell[data-n="3"]{color:#ff8273}
:root[data-theme="dark"] .cell[data-n="4"]{color:#b5a0ef}
:root[data-theme="dark"] .cell[data-n="5"]{color:#e7a48c}
:root[data-theme="dark"] .cell[data-n="6"]{color:#6ed5d3}
:root[data-theme="dark"] .cell[data-n="7"]{color:#f3f3ef}
:root[data-theme="dark"] .cell[data-n="8"]{color:#adb9b3}
:root[data-theme="dark"] .foot .record,:root[data-theme="dark"] .help{color:#c4ebac}
:root[data-theme="dark"] .modal{background:#20362e;color:#d2dfc3;border-color:#52755c #102117 #102117 #52755c}
:root[data-theme="dark"] .modal p{color:#d2dfc3}
:root[data-theme="dark"] .modal button{background:#294536;color:#d2dfc3;border-color:#52755c #102117 #102117 #52755c}
:root[data-theme="dark"] .overlay{background:#14271fe8;color:#d2dfc3}
:root[data-theme="dark"] .overlay button{background:#c4ebac;color:#0d1717}
@media(max-width:680px){:root[data-theme="dark"] html,:root[data-theme="dark"] body{background:#0d1717}}
