:root{--paper:#f1e2cd;--open:#f4e7d4;--covered:#ada699;--line:#625744;--ink:#322a20;--slate:#e8dbc5;--accent:#dbc89c;--deep-accent:#912318}
body{background:#f1e2cd url(notebook-paper.jpg);color:var(--ink)}
.spread{max-width:1370px;margin:auto;display:grid;grid-template-columns:50% 50%;align-items:start}
.cover img{display:block;width:100%;height:auto;mask-image:linear-gradient(to right,#000 96%,transparent),linear-gradient(to bottom,#000 96%,transparent);mask-composite:intersect}
.accessible{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.stage{display:block;padding:clamp(9px,1.65vw,26px) clamp(9px,1.4vw,22px) 8px 0}.stage::before{display:none}
.game{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;background:none;border:0;padding:0;width:100%;font-family:Arial,sans-serif}
.scorebar{order:-3;display:grid;grid-template-columns:1fr 1.5fr 1.05fr;gap:3%;margin:0 0 3px}
.scorebar>div,.scorebar #new{border:4px ridge #dbcbb4;border-radius:9px;padding:5px 6px;min-height:44px;box-shadow:0 2px 4px #55483477}
.scorebar>div:nth-child(n){background:#2f251b;color:#f7442e;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px}
.scorebar>div:nth-child(2){order:-1}
.scorebar span{font-size:0}.scorebar span:before{content:'⚑';font-size:clamp(16px,2vw,32px);color:#ec4732}.scorebar div:last-child span:before{content:'◴';color:#fff1d5}
.scorebar strong{font:italic bold clamp(16px,2.4vw,38px)/1 monospace;margin:0}
#new,#flag[aria-pressed=true]{color:#fff5da;background:linear-gradient(#686735,#454521)}#new{font-weight:bold;font-size:clamp(14px,2vw,28px)}
.board-scroll{order:-2;min-width:0;container-type:inline-size;max-height:min(70vh,680px);border:7px ridge #cfbfa9;border-radius:8px;background:#675d50;box-shadow:0 3px 7px #5d4d3980}
.board{--cell-width:calc((100cqw - 11px)/9);padding:0;border:0;gap:1px;background:#695e51}.board-row{gap:1px}
.board[data-level=easy] .cell,.board[data-level=daily] .cell{aspect-ratio:1.1}
.cell[data-state=covered]{border:clamp(2px,.32vw,5px) outset #d6cfc0;background:linear-gradient(125deg,#c1b9aa,#a59c8c)}.cell[data-state=covered]:hover{background:#d9d1c2}.cell{font-size:clamp(18px,2.6vw,40px)}
.cell[data-state=flagged]{background:#e6d8c2;color:#ac2515}
.game-controls{order:-1;display:flex;justify-content:center;margin:0}.game-controls button,.game select,.daily-pill{border-color:#9e917e;border-radius:5px;background:#f5ecdb}
.game-top{justify-content:center}.daily-pill{margin:0}.game-voice{text-align:center;margin:0}
.logic{max-width:1080px;width:92%;margin:8px auto 20px;padding:clamp(16px,3vw,38px);background:#f8ecda url(notebook-paper.jpg);border:1px solid #d2bc9b;box-shadow:2px 4px 10px #69563d40;transform:rotate(-.4deg)}.logic h3{font:italic bold clamp(23px,3vw,46px)/1 Georgia,serif}.logic p{color:#382c20}.wrap{max-width:1150px}.manual{padding-block:40px}.faq{padding-block:35px}
@media (max-width: 760px) {
  body { background: #f6ecdd; }
  .spread { display: block; max-width: 480px; padding: 0 14px; }
  .cover {
    height: 106px; display: flex; align-items: center; position: relative;
    overflow: hidden; isolation: isolate; border-bottom: 1px solid #cbbca5;
  }
  .cover h1 {
    position: static; width: auto; height: auto; clip-path: none; overflow: visible;
    margin: 0; max-width: 52%; color: #3f4029;
    font: 900 clamp(28px, 8vw, 40px)/.94 Arial,sans-serif;
    letter-spacing: -.065em; text-transform: uppercase;
  }
  .cover img {
    position: absolute; width: 245px; max-width: none; height: auto; right: -76px; top: -131px;
    z-index: -1; mask-image: linear-gradient(to right, transparent, #000 12%);
  }
  .stage { padding: 10px 0 14px; }
  .game { gap: 8px; }
  .scorebar { width: 100%; margin: 0; gap: 6px; grid-template-columns: 1fr 1.5fr 1fr; }
  .scorebar > div, .scorebar #new { min-height: 44px; border-width: 1px; border-style: solid; border-radius: 7px; box-shadow: none; }
  .scorebar strong { font: bold 21px/1 monospace; }
  .board-scroll { width: 100%; margin: 0; border-width: 4px; max-height: 65svh; }
  .board { --cell-width: calc((100cqw - 9px)/9); }
  .board[data-level=easy] .cell, .board[data-level=daily] .cell { aspect-ratio: 1; }
  .game-controls, .game-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .game-controls button, .daily-pill, .game select { width: 100%; min-height: 44px; border-radius: 7px; background: #fff9ee; }
  .daily-pill { justify-content: center; }
  .game button[aria-pressed=true] { color: #fff9e6; background: #555831; }
  .game-voice { padding: 3px 2px; text-align: left; }
  .keys { font-size: 13px; line-height: 1.4; }
  .logic { width: min( calc(100% - 28px), 452px); transform: none; margin: 4px auto 20px; background: #f0e4d0; }
}
