:root{color-scheme:light;--silver:#c0c0c0;--dark:#808080;--light:#fff;--tile:32px;font-family:Tahoma,Verdana,sans-serif;color:#161616;background:#2b6e70}*{box-sizing:border-box}body{margin:0}button,select{font:inherit;color:inherit}button{cursor:pointer}button:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #000080;outline-offset:2px}.desktop{min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 16px;gap:24px}.preview-note{font-size:12px;line-height:16px;letter-spacing:2px;color:#d2e6e4;display:flex;gap:12px}.preview-note span{opacity:.5}.window{max-width:100%;background:var(--silver);padding:4px;border:2px solid;border-color:#fff #383838 #383838 #fff;box-shadow:8px 8px 0 #154d4e55}.titlebar{height:32px;background:#000080;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 8px;font-weight:bold;font-size:14px}.title{display:flex;align-items:center;gap:8px}.title svg{width:16px;height:16px;fill:#050505;background:var(--silver)}.window-mark{font-size:20px;color:#b5b5df}.menubar{display:flex;gap:8px;align-items:center;padding:8px;font-size:14px;line-height:20px}.menubar select{border:0;background:transparent;max-width:175px;cursor:pointer;font-size:14px}.menubar>label{font-size:14px}.menubar button{margin-left:auto;background:none;border:0;padding:0 4px;font-size:14px}.game-body{padding:4px 8px 0}.recessed{border:2px solid;border-color:var(--dark) var(--light) var(--light) var(--dark)}.raised{background:var(--silver);border:2px solid;border-color:var(--light) var(--dark) var(--dark) var(--light);border-radius:0}.raised:active,.raised[aria-pressed=true]{border-color:var(--dark) var(--light) var(--light) var(--dark);background:#aeaeae}.dashboard{display:flex;align-items:center;justify-content:space-between;padding:8px;gap:16px;margin-bottom:12px}.counter{display:flex;background:#140000;padding:4px;gap:2px;border:1px solid;border-color:#727272 #eee #eee #727272}.digit{width:16px;height:28px;position:relative}.segment{position:absolute;background:#351010}.segment.on{background:#ff2424}.segment.a,.segment.d,.segment.g{width:12px;height:3px;left:2px;clip-path:polygon(15% 0,85% 0,100% 50%,85% 100%,15% 100%,0 50%)}.segment.a{top:0}.segment.g{top:12px}.segment.d{bottom:0}.segment.b,.segment.c,.segment.e,.segment.f{width:3px;height:12px;clip-path:polygon(50% 0,100% 15%,100% 85%,50% 100%,0 85%,0 15%)}.segment.b{right:0;top:1px}.segment.c{right:0;bottom:1px}.segment.e{left:0;bottom:1px}.segment.f{left:0;top:1px}.face{width:40px;height:40px;display:grid;place-items:center;padding:4px}.face svg{width:28px;height:28px;shape-rendering:crispEdges}.board-scroll{overflow:auto;max-width:calc(100vw - 64px)}#board{display:grid;grid-template-columns:repeat(var(--columns,9),var(--tile));width:max-content;background:var(--dark)}.cell{width:var(--tile);height:var(--tile);padding:0;background:var(--silver);border:3px solid;border-color:#fff #808080 #808080 #fff;border-radius:0;display:grid;place-items:center;font:bold 24px/1 Tahoma,Verdana,sans-serif;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-touch-callout:none}.cell:active:not(.open):not(.flagged){border:1px solid #808080}.cell.open{border:0;border-right:1px solid #8f8f8f;border-bottom:1px solid #8f8f8f;background:#c0c0c0}.cell.hit{background:#f00000}.cell svg{width:24px;height:24px;shape-rendering:crispEdges}.cell.wrong{position:relative}.cell.wrong:after{content:'×';position:absolute;color:#e00000;font-size:30px}.cell[data-number='1']{color:#0000ff}.cell[data-number='2']{color:#008000}.cell[data-number='3']{color:#f00}.cell[data-number='4']{color:#000080}.cell[data-number='5']{color:#800000}.cell[data-number='6']{color:#008080}.cell[data-number='7']{color:#000}.cell[data-number='8']{color:#808080}.cell:focus-visible{outline:2px solid #000080;outline-offset:-4px;z-index:1}.statusbar{display:flex;align-items:center;gap:8px;min-height:48px;font-size:12px;line-height:16px}.status-dot{width:6px;height:6px;background:#616161;flex-shrink:0}.statusbar button{margin-left:auto;padding:4px 8px;font-size:12px;line-height:16px}.hint{margin:0;font-size:14px;line-height:20px;color:#d2e6e4}.original{font-size:12px;line-height:16px;color:#b4d0ce;text-underline-offset:4px}#help{max-width:420px;border-top:1px solid #808080;font-size:12px;line-height:20px;padding:8px 0}#help p{margin:0 0 8px}@media(max-width:600px){.desktop{padding:24px 8px;gap:16px;justify-content:flex-start;padding-top:max(32px,env(safe-area-inset-top))}.board-scroll{max-width:calc(100vw - 48px)}.window{box-shadow:4px 4px 0 #154d4e55}.preview-note{letter-spacing:1px}.hint{font-size:12px}.statusbar{min-height:48px}.statusbar button{min-height:32px}}@media(max-width:360px){:root{--tile:28px}.menubar{gap:4px;font-size:12px}.menubar select{max-width:140px;font-size:12px}.menubar button{font-size:12px}.cell{font-size:20px}}
/* Mobile greeting variant. All styles are isolated to this independent page. */
[hidden]{display:none!important}
:root{background:#2b6e70}
.desktop{justify-content:flex-start;gap:16px;padding:24px 12px max(24px,env(safe-area-inset-bottom));min-height:100svh}
.greeting{width:100%;max-width:420px;padding:8px 4px;text-align:center}
.greeting h1{font-size:36px;line-height:40px;font-weight:700;color:#fff;margin:0;text-wrap:balance;overflow-wrap:anywhere}
.window{width:100%;max-width:420px;box-shadow:4px 4px 0 #154d4e55}
.menubar{justify-content:space-between;padding:8px;font-size:14px;line-height:20px}
.menubar>span{font-weight:bold;color:#424242}.menubar select{min-height:32px;padding:4px 8px;max-width:160px}
.game-body{padding:0 8px 8px}.dashboard{padding:8px;margin-bottom:12px}.face{width:44px;height:44px}
.board-scroll{width:100%;max-width:100%;overflow:hidden}#board{width:max-content;max-width:100%}
.cell{font-size:clamp(12px,calc(var(--tile)*.72),24px);border-width:2px}.cell svg{width:72%;height:72%}
.mobile-controls{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;justify-items:center;gap:16px;padding:16px 8px 4px}
.round-control{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:2px solid;border-color:#fff #808080 #808080 #fff;background:#c0c0c0;cursor:pointer;color:#424242}
.round-control svg{width:24px;height:24px;shape-rendering:crispEdges}
.flag-control{width:56px;height:56px;background:#e8e8e8;border-width:3px}.flag-control svg{width:28px;height:28px}
.flag-control[aria-pressed=true]{background:#fff0a8;border-color:#808080 #fff #fff #808080;box-shadow:0 0 0 3px #7e7029}
.round-control:active{border-color:#808080 #fff #fff #808080}.game-status{margin:4px 0 0;text-align:center;font-size:12px;line-height:16px;min-height:16px;color:#444}
.preview-tools{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;align-items:center;max-width:420px;font-size:12px;line-height:16px;color:#d2e6e4}.preview-tools button{background:none;border:0;padding:8px 0;color:inherit;text-decoration:underline;text-underline-offset:4px;font-size:12px}
dialog{padding:0;border:2px solid;border-color:#fff #626262 #626262 #fff;background:#c0c0c0;max-width:calc(100vw - 32px);width:380px;max-height:calc(100svh - 32px);color:#161616;box-shadow:8px 8px 0 #0003}
dialog::backdrop{background:#000a}.result-content{position:relative;padding:32px 24px 24px;text-align:center}.close-result{position:absolute;right:8px;top:4px;font-size:24px;line-height:32px;min-width:36px;background:transparent;border:0;color:#424242}
.result-label{font-size:12px;line-height:16px;letter-spacing:2px;margin:0 0 16px;color:#555}#result-photo{display:block;width:100%;max-height:280px;object-fit:contain;margin:0 auto 16px;background:#b0b0b0}
#result-title{font-size:30px;line-height:36px;margin:0 0 16px;text-wrap:balance;overflow-wrap:anywhere}#result-message{font-size:16px;line-height:24px;margin:0 0 16px;white-space:pre-wrap}
.result-actions{display:flex;flex-direction:column;gap:12px}.result-actions>a,.result-actions>button{font-size:16px;line-height:24px;font-weight:600;padding:12px;text-decoration:none;text-align:center;min-height:48px}.gift-button{background:#000080;color:#fff;border:2px solid #000080}.result-actions .raised{margin-top:4px}
@media(min-width:700px){.desktop{padding-top:32px}.greeting{padding:8px 0 16px}.greeting h1{font-size:48px;line-height:1}.window{max-width:396px}}
@media(max-width:360px){.greeting h1{font-size:30px;line-height:36px}.desktop{padding:16px 8px;gap:12px}.game-body{padding:0 4px 8px}.mobile-controls{padding-top:12px}.result-content{padding:32px 16px 16px}#result-title{font-size:24px;line-height:32px}}
.board-scroll{width:max-content;margin-inline:auto}.cell{flex-shrink:0}

/* Compact top controls leave the full lower area to the playing field. */
.greeting{max-width:none;padding:8px 0 16px}.greeting h1{color:#000;font-size:36px;line-height:40px}
.dashboard{display:grid;grid-template-columns:1fr auto auto auto 1fr;gap:16px;padding:8px;margin-bottom:12px}
#mine-count{justify-self:start}#timer{justify-self:end}.dashboard .face{width:40px;height:40px}
.dashboard .round-control{width:28px;height:28px;border-width:2px;padding:4px;box-shadow:none}
.dashboard .round-control svg{width:16px;height:16px}.dashboard .flag-control{background:#e8e8e8}
.dashboard .flag-control[aria-pressed=true]{background:#fff0a8;border-color:#808080 #fff #fff #808080;box-shadow:0 0 0 2px #7e7029}
.game-status{margin:8px 0 0}.desktop{padding-top:max(16px,env(safe-area-inset-top))}
@media(min-width:700px){.window{max-width:420px}.greeting{padding:8px 0 16px}.greeting h1{font-size:36px;line-height:40px}}
@media(max-width:360px){.greeting{padding:4px 0 12px}.greeting h1{font-size:30px;line-height:36px}.dashboard{gap:12px;padding:4px}.dashboard .round-control{width:24px;height:24px;padding:2px}.dashboard .face{width:36px;height:36px}}

/* Windows Minesweeper: square tools, raised tiles and a sunken board frame. */
.dashboard .round-control{border-radius:0;background:var(--silver);border-color:#fff #808080 #808080 #fff;box-shadow:inset 1px 1px #dfdfdf}
.dashboard .round-control:active,.dashboard .flag-control[aria-pressed=true]{background:var(--silver);border-color:#808080 #fff #fff #808080;box-shadow:inset 1px 1px #a0a0a0}
.dashboard .flag-control[aria-pressed=true]{background:#d4d4d4;outline:1px dotted #000;outline-offset:-5px}
.recessed{border-width:3px;border-color:#808080 #fff #fff #808080}
#board{gap:0;background:#c0c0c0}
.cell{border-width:var(--bevel,3px);border-color:#fff #808080 #808080 #fff;background:#c0c0c0;box-shadow:inset 1px 1px #dfdfdf}
.cell.open{border:0;border-top:1px solid #808080;border-left:1px solid #808080;background:#c0c0c0;box-shadow:none}
.cell:active:not(.open):not(.flagged){border:1px solid #808080;box-shadow:none}
.cell.hit{background:#f00}
.counter{border-radius:0;background:#000}.segment.on{background:#f00}.segment{background:#310000}

/* Match all three tools to the restart button. */
.dashboard .round-control{width:40px;height:40px;padding:4px}
.dashboard .round-control svg{width:24px;height:24px}
@media(max-width:360px){.dashboard .round-control{width:36px;height:36px;padding:4px}.counter .digit{width:12px}.counter .segment.a,.counter .segment.d,.counter .segment.g{width:8px}}

.window{position:relative}.win-corner{position:absolute;top:0;left:0;width:48px;height:48px;z-index:1;background:transparent;border:0;padding:0;opacity:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent}

/* Classic Windows title bar and window controls. */
.windows-bar{display:flex;align-items:center;gap:8px;height:32px;padding:4px 4px 4px 48px;background:#000080;position:relative}
.windows-app-icon{position:absolute;left:8px;top:8px;width:16px;height:16px;fill:#000;background:#c0c0c0;shape-rendering:crispEdges}
.windows-bar select{width:88px;min-height:24px;border:1px solid;border-color:#fff #808080 #808080 #fff;border-radius:0;background:#c0c0c0;padding:0 4px;font-size:12px;line-height:16px}
.windows-actions{display:flex;gap:4px;margin-left:auto}.windows-action{display:grid;place-items:center;width:20px;height:20px;background:#c0c0c0;border:2px solid;border-color:#fff #808080 #808080 #fff}.windows-action svg{width:12px;height:12px;shape-rendering:crispEdges}

.windows-actions button{padding:0;cursor:pointer;border-radius:0}.windows-actions button:active{border-color:#808080 #fff #fff #808080}.windows-actions button:focus-visible{outline:1px dotted #000;outline-offset:-4px}
.desktop.window-maximized{padding:0;gap:0}.window.is-maximized{max-width:none;width:100%;min-height:100svh;box-shadow:none;display:flex;flex-direction:column}.window.is-maximized .game-body{flex:1;min-height:0}
.window.is-minimized{position:fixed;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(420px,calc(100% - 24px));max-width:420px;min-height:0;z-index:10;display:block}
