*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Hiragino Sans","Noto Sans JP",sans-serif;background:#241a12;color:#f5ead9}
.wrap{max-width:560px;margin:0 auto;padding:16px 14px 40px}
header{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#c9a86a}header a{color:#c9a86a;text-decoration:none}
.title .eyebrow{color:#e8b64c;letter-spacing:.08em;font-size:13px}.title h1{font-size:40px;margin:6px 0}.title h1 span{color:#e8b64c}.title p{line-height:1.7;color:#e6d7bd}
.game{background:#32241a;border:1px solid #57402a;border-radius:16px;padding:16px;position:relative}
.levels{display:flex;gap:8px;flex-wrap:wrap}.levels button,.controls button,.panel button{border:1px solid #8a6a42;background:#241a12;color:#f5ead9;border-radius:999px;padding:8px 14px;cursor:pointer;font-size:14px}.levels button.on{background:#e8b64c;color:#241a12;font-weight:700}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0;text-align:center}.stats div{background:#241a12;border-radius:10px;padding:8px 2px}.stats span{display:block;font-size:11px;color:#c9a86a}.stats strong{font-size:17px}
.phase{text-align:center;color:#e6d7bd;min-height:1.5em;margin:6px 0 10px}
.board{display:grid;gap:3px;margin:0 auto;width:fit-content;max-width:100%}
.cell{width:34px;height:34px;border:none;border-radius:6px;background:#6b4e2e;color:#f5ead9;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.cell:hover{background:#7d5c36}.cell.open{background:#efe3c8;color:#5b4326;cursor:default}.cell.open.zero{color:#a08b62}.cell.mine{background:#8e2f22;color:#fff}.cell.flag{background:#54401f}
.board.small .cell{width:28px;height:28px;font-size:14px}
.feedback{text-align:center;min-height:1.6em;margin:10px 0;color:#ffd98a}
.controls{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.overlay{position:absolute;inset:0;background:rgba(20,12,6,.82);display:flex;align-items:center;justify-content:center;border-radius:16px}.overlay[hidden]{display:none}
.panel{background:#32241a;border:1px solid #e8b64c;border-radius:14px;padding:24px;text-align:center;max-width:86%}.pill{background:#e8b64c;color:#241a12;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700}.panel h2{margin:12px 0 6px;font-size:30px}
.instructions{line-height:1.8;color:#e6d7bd}.instructions h2{color:#f5ead9}.note{font-size:13px;color:#bfa77f}
footer{text-align:center;color:#8a7554;font-size:12px;margin-top:24px}
@media(max-width:420px){.cell{width:30px;height:30px}.board.small .cell{width:25px;height:25px;font-size:12px}.title h1{font-size:32px}}
