/* Holsha: спільний вигляд нових міні-ігор (основа: Сапер; 19.10.2026 для логічних ігор кнопки не менше 44 px). Поле вписується у вільне місце й зберігає пропорції. */
*,*::before,*::after{box-sizing:border-box}
html,body{height:100%;margin:0;background:#fff;color:#111;overflow:hidden}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit}
[hidden]{display:none!important}

.game{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:10px;padding:14px;max-width:1100px;margin:0 auto;outline:none}

.game-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:10px;border-bottom:1px solid #ccc;min-width:0}
.game-head h1{margin:0;font-size:23px;line-height:1.1;letter-spacing:-.02em}
.game-stats{display:flex;align-items:flex-end;gap:16px;margin:0;font:700 10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;color:#777}
.game-stats span{display:flex;flex-direction:column;gap:4px;white-space:nowrap}
.game-stats b{color:#111;font-size:20px;letter-spacing:0}
.sound-btn{flex:none;border:1px solid #111;background:#fff;min-width:48px;height:44px;padding:0 10px;cursor:pointer;font:700 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.06em}
.sound-btn[aria-pressed="false"]{color:#999;border-color:#bbb}

.stage{position:relative;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center}
.field{position:relative;width:var(--fw,300px);height:var(--fh,400px);border:1px solid #111;background:#fff;touch-action:none;user-select:none;-webkit-user-select:none}
.field canvas{display:block;width:100%;height:100%}

.overlay{position:absolute;inset:0;display:none;align-items:center;justify-content:center;padding:12px;background:rgba(255,255,255,.88);z-index:5}
.overlay.is-show{display:flex}
.card{width:min(100%,340px);border:1px solid #111;background:#fff;padding:20px 18px;box-shadow:5px 6px 0 #111;text-align:center}
.card small{display:block;color:#777;font:700 10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.12em;margin-bottom:8px}
.card strong{display:block;font-size:26px;line-height:1.1;letter-spacing:-.02em}
.card p{margin:10px 0 16px;color:#555;font-size:14px;line-height:1.45}
.card button{width:100%;min-height:46px;border:1px solid #111;background:#111;color:#fff;font-weight:800;cursor:pointer;letter-spacing:.04em}
.card button:active{transform:translateY(2px)}

.pad{display:none;gap:6px;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
.pad button{min-height:48px;padding:0 4px;gap:6px;border:1px solid #111;background:#fff;cursor:pointer;font:800 14px/1 ui-monospace,SFMono-Regular,Menlo,monospace;touch-action:none;user-select:none;-webkit-user-select:none;display:flex;align-items:center;justify-content:center}
.pad button.is-down,.pad button:active{background:#111;color:#fff}
.pad svg{width:24px;height:24px}
.game.show-pad .pad,.pad.always{display:grid}
.pad button.is-on{background:var(--acc,#111)!important;border-color:var(--acc,#111)!important;color:#fff!important}
.pad span{font-size:12px;letter-spacing:.02em}
.pad.big button{font-size:20px}
.pad.rows2{grid-auto-flow:row;grid-template-columns:repeat(5,minmax(0,1fr))}
.pad .dot{display:inline-block;width:24px;height:24px;border-radius:50%;box-shadow:inset 0 -3px 0 rgba(0,0,0,.18)}

.game-foot{border-top:1px solid #ccc;padding-top:8px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.game-foot p{margin:0;font-size:13px;line-height:1.45;color:#555}
.game-foot .foot-btns{flex:none;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:4px 8px}
.game-foot button{flex:none;border:0;background:transparent;min-height:44px;padding:0 6px;text-decoration:underline;cursor:pointer;font-size:13px}

@media (max-width:560px){
  .game{padding:10px;gap:8px}
  .game-head{gap:8px;padding-bottom:8px}
  .game-head h1{font-size:17px}
  .game-stats{gap:10px;font-size:8px}
  .game-stats b{font-size:16px}
  .sound-btn{min-width:44px;height:44px;padding:0 6px;font-size:9px}
  .game-foot{flex-direction:column;gap:2px}
  .game-foot .foot-btns{align-self:stretch;justify-content:space-between}
  .pad{gap:4px}
  .pad button{min-height:46px;font-size:13px}
  .game-foot p{font-size:12px}
  .game-foot button{font-size:12px}
}
@media (max-width:380px){.game-stats .opt{display:none}}
