:root { color-scheme: light; font-family: system-ui, sans-serif; color: #243c31; background: #f3efe5; font-size: 18px; }
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100% - 2rem, 54rem); margin: 2rem auto; padding: clamp(1rem, 3vw, 2rem); background: #fffdf7; border: 2px solid #c4d2c0; border-radius: 1rem; }
h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin: .3rem 0; }
h2 { font-size: 1.2rem; margin: 1rem 0 .4rem; }
p { line-height: 1.6; }
.eyebrow { color: #3b6150; font-weight: 700; margin: 0; }
button, select { font: inherit; color: #243e32; background: #fffdf7; border: 2px solid #577568; border-radius: .5rem; min-height: 44px; padding: .5rem .75rem; cursor: pointer; }
button:hover:not(:disabled) { background: #e7f1e6; }
button:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 4px solid #a14917; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .72; }
button[aria-pressed="true"] { border: 4px solid #a14917; background: #ffead1; }
.toolbar, .directions, form { display: flex; flex-wrap: wrap; gap: .5rem; }
form { flex-direction: column; align-items: flex-start; }
label { display: grid; gap: .3rem; }
#status, #summary, #result { padding: .7rem; background: #edf4e9; border-radius: .4rem; }
#result { border: 2px solid #315547; font-weight: 700; }
#exit-confirm, #level-confirm { padding: 1rem; margin: 1rem 0; border: 2px solid #80552e; border-radius: .5rem; background: #fff6e8; }
#board { --c: clamp(44px, calc((100vw - 4.5rem) / (var(--n) * 1.5 - .5)), 48px); max-width: 100%; overflow-x: auto; }
.row { display: flex; gap: 0; margin-left: calc(var(--row) * var(--c) / 2); }
.cell { width: var(--c); min-width: var(--c); height: var(--c); padding: 1px; border-color: transparent; }
.cell svg { width: 100%; height: 100%; display: block; }
.possible { border: 3px dashed #9c4818; background: #ffe5c8; }
@media (max-width: 360px) { main { width: 100%; margin: 0; padding: .6rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
#stop-dialog{max-width:min(92vw,30rem);border:1px solid #84a798;border-radius:16px;background:#fffdf7;color:#243c33;padding:24px}#stop-dialog::backdrop{background:#172c24a8}#stop-dialog button{min-height:48px;padding:10px 16px;border:1px solid #84a798;border-radius:10px;background:#fff;font:inherit;font-weight:700}#stop-dialog #cancel-stop{background:#286650;color:#fff}
