.lv-game{--ink:#22231f;--paper:#fffefa;--edge:#cecfc4;--muted:#605f57;--lime:#d3f68a;--peach:#ffc19f;--blue:#b8dbe7;--lilac:#cfbaf4;max-width:34rem;margin:0 auto;color:var(--ink);display:grid;gap:.75rem}
.lv-game *{box-sizing:border-box}
.lv-game a{color:inherit}
.lv-game .settings,.lv-game .controls,.lv-game .stats{display:flex;flex-wrap:wrap;gap:.45rem .7rem;align-items:center}
.lv-game .settings label{display:grid;gap:.2rem;min-width:0}
.lv-game :is(button,select){font:inherit;border:1px solid var(--edge);border-radius:.65rem;min-height:44px;padding:.35rem .65rem;background:var(--paper);color:var(--ink);max-width:100%}
.lv-game button{cursor:pointer;touch-action:manipulation}
.lv-game button[data-start]{background:var(--lime);color:#22231f;font-weight:700}
.lv-game :focus-visible{outline:3px solid #747a4f;outline-offset:2px}
.lv-game .stats{font:600 .85rem/1.4 ui-monospace,monospace}
.lv-game .stats span{padding:.35rem .55rem;background:var(--paper);border:1px solid var(--edge);border-radius:.5rem}
.lv-game :is(.message,.help){margin:0;color:var(--muted);font-size:.9rem}
.lv-game .message{min-height:1.4em}
.lv-game .board{border-radius:.85rem;border:1px solid var(--edge);overflow:hidden;touch-action:none;user-select:none}
.lv-game [hidden]{display:none!important}
@media(prefers-color-scheme:dark){.lv-game{--ink:#f5f3eb;--paper:#232624;--edge:#4d514b;--muted:#c0c3b6}}
.mine-scroll{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;border-radius:.85rem}
.lv-mines .mine-board{--size:8;display:grid;gap:2px;padding:4px;background:#353a36;min-width:calc(var(--size) * 34px + 8px);grid-template-columns:repeat(var(--size),minmax(32px,1fr));touch-action:pan-x pan-y}
.lv-mines .mine-board button{min-height:32px;min-width:0;padding:0;aspect-ratio:1;border:0;border-radius:clamp(3px,.8vw,8px);background:#cfbaf4;color:#22231f;font:800 clamp(.7rem,3.2vw,1.25rem)/1 ui-monospace,monospace;touch-action:manipulation}
.mine-board button[data-state="open"]{background:#fffefa}
.mine-board button[data-state="flag"]{background:#d3f68a}
.mine-board button[data-state="mine"]{background:#ffc19f}
.mine-board button:focus-visible{outline-offset:-3px;outline-color:#22231f;z-index:1}
.mine-board button[data-count="1"]{color:#30556b}.mine-board button[data-count="2"]{color:#38511e}.mine-board button[data-count="3"]{color:#8f3430}.mine-board button[data-count="4"]{color:#593580}
.lv-mines > a:first-child{position:sticky;top:0;z-index:10;background:var(--paper);padding:.2rem 0;display:inline-block}
.mine-board button[data-count="1"]{color:#0078d7}
.mine-board button[data-count="2"]{color:#107c10}
.mine-board button[data-count="3"]{color:#e81123}
.mine-board button[data-count="4"]{color:#5c2d91}
.mine-board button[data-count="5"]{color:#a80000}
.mine-board button[data-count="6"]{color:#008272}
.mine-board button[data-count="7"]{color:#000000}
.mine-board button[data-count="8"]{color:#737373}

.lv-mines .mine-board button[data-state=""] {
  background:linear-gradient(145deg,#e6dbff,#b8a1e0);
  box-shadow:inset 0 2px 0 #fff9,inset 0 -3px 0 #79649388
}
.lv-mines .mine-board button[data-state="open"] {background:#f4f5ef}
.lv-mines .mine-board button[data-state="flag"] {background:#d3f68a;color:#29482f;box-shadow:inset 0 -3px 0 #89a354}
.lv-mines .mine-board button[data-state="mine"] {color:#661c20;background:radial-gradient(circle,#ffe5a3,#ff8e70)}
@media(prefers-reduced-motion:no-preference){
  .mine-board [data-state="flag"]{animation:mine-plant .18s ease-out}
  .mine-board [data-state="mine"]{animation:mine-pop .25s ease-out}
}
@keyframes mine-plant{50%{rotate:-6deg;scale:1.06}}
@keyframes mine-pop{35%{filter:brightness(1.45);scale:1.08}}
[data-cabinet="mines"] .arcade-controller{display:none}
.lv-mines .mine-board{gap:1px;background:#dce6e3;container-type:inline-size}
.lv-mines .mine-board button{position:relative;font-size:calc(50cqw / var(--size))}
.lv-mines .mine-board button[data-state=""]{border-radius:4px;background:linear-gradient(140deg,#8398a7,#66798a 65%,#586a7e);box-shadow:inset 0 -2px #364457,0 1px #171d26}
.mine-board button[data-state=""]::before{content:"";position:absolute;inset:1px 2px auto;height:2px;border-radius:2px;background:#c2d1d9}
.lv-mines .mine-board button[data-state="open"]{background:#dce6e3;border-radius:0}
.lv-mines [data-flag][aria-pressed="true"]::before{content:"⚑ ";color:#bc352d}
.mine-board [data-holding]::after{content:"";position:absolute;inset:1px;border:3px solid #ffcb66;border-radius:inherit}
@media(prefers-reduced-motion:no-preference){.mine-board [data-holding]::after{animation:mine-hold .42s linear}@keyframes mine-hold{from{clip-path:inset(0 99% 0 0)}to{clip-path:inset(0)}}}
@media(max-width:600px){
  .arcade-cabinet .lv-mines:is([data-phase="running"],[data-phase="paused"]) .settings,.lv-mines:is([data-phase="running"],[data-phase="paused"]) #mine-chord{display:none}
  .arcade-cabinet .lv-mines:is([data-phase="running"],[data-phase="paused"]) .message{min-height:1.4em}
}
.lv-mines .controls [aria-pressed="true"]{box-shadow:inset 0 -3px #38636d;background:#d2e9ea;color:#203039}
