:root {
  --l1: #ffe14a; --l1d: #ffc400;
  --l2: #ff5ad1; --l2d: #ff2eb8;
  --l3: #fff; --l3d: #ffe9f6;
  --empty: #4a1578;
  --good: #fff;
  --ink: #2a0840;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #ffe14a; color: var(--ink); }
body { font: 16px/1.2 system-ui, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 16px 14px 24px; display: flex; flex-direction: column; gap: 8px; }
header { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.brand { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
header b, .quota b { font-size: 32px; font-variant-numeric: tabular-nums; }
.clock { text-align: center; min-width: 72px; }
.clock b { font-size: 40px; display: block; }
.clock i { display: block; height: 8px; border-radius: 99px; background: #2a0840; transform-origin: left center; }
.clock.hot b { color: #e10600; }
.quota { text-align: right; }
.quota small { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.popword {
  margin: 0; min-height: 1.2em; text-align: center; font-weight: 800; letter-spacing: .04em;
  font-size: 22px;
}
.popword.big { font-size: 40px; color: #e10600; }
.board { background: #6d22b8; border-radius: 18px; }
.bgcell::before { background: var(--empty); }
.bgcell.open::before { background: #ff4fd8; animation: hole 1.5s linear forwards; }
@keyframes hole { from { transform: scale(.35); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.tile .face { background: #fff; color: #2a0840; border-radius: 22%; box-shadow: 0 4px 0 #3a0a62; }
.tile.nudge .face { box-shadow: 0 0 0 4px #ffe14a, 0 4px 0 #3a0a62; }
.tile.hint .face { box-shadow: 0 0 0 4px #ff4fd8, 0 4px 0 #3a0a62; }
.tile.bomb .face { box-shadow: 0 0 0 4px #e10600; }
.trail .ribbon { stroke: #ffe14a; }
.trail .edge { stroke: #fff; }
footer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
button {
  font: 700 13px/1.1 system-ui, sans-serif; border: 0; border-radius: 12px;
  background: #2a0840; color: #ffe14a; padding: 12px 4px; cursor: pointer;
}
button b { display: block; font-size: 16px; }
button:disabled { opacity: .35; }
button.on { background: #e10600; color: white; }
.sheet {
  position: fixed; inset: 0; background: #ffe14acc; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px;
}
.sheet[hidden] { display: none; }
.sheet h2 { font-size: 48px; margin: 0; }
.row { display: flex; gap: 10px; }
.row button { padding: 16px 20px; font-size: 16px; }
