/* Neon Quarry: the board and every marker remain live engine state. */
*{box-sizing:border-box}
:root{color-scheme:dark;--lime:#d5ff00;--chalk:#f6f5ee;--ink:#20221c}
body{margin:0;background:#1c1e1c;color:var(--chalk);font-family:Arial,Helvetica,sans-serif}
main{width:100%;margin:auto}
a{color:#d5ed8b}
.quarry{--u:min(.2564102564vw,.1184834123svh,1.15px);position:relative;width:calc(390 * var(--u));height:calc(844 * var(--u));margin:auto;isolation:isolate;background:#333 url('../assets/play/hammerandstone/backdrop.webp') center/100% 100% no-repeat;box-shadow:0 0 100px #0008}
.quarry:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(transparent 15%,#14161033 32%,transparent 45%,#1114)}
h1{position:absolute;left:calc(30 * var(--u));top:calc(3 * var(--u));width:calc(330 * var(--u));height:calc(132 * var(--u));margin:0}
h1 img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 4px #0009)}
.turn-banner{position:absolute;top:calc(134 * var(--u));left:calc(71 * var(--u));width:calc(248 * var(--u));height:calc(36 * var(--u));display:grid;place-items:center;background:url('../assets/play/hammerandstone/button-lime.webp') center/100% 100% no-repeat;color:#212514;font-weight:900;font-size:calc(19 * var(--u));text-transform:uppercase;letter-spacing:.02em;filter:drop-shadow(0 3px 3px #0007)}
#hs-status{position:absolute;top:calc(230 * var(--u));left:calc(17 * var(--u));width:calc(356 * var(--u));min-height:calc(49 * var(--u));margin:0;color:#fff;font-size:max(11px,calc(12 * var(--u)));line-height:1.35;text-align:center;text-shadow:0 1px 3px #000,0 1px 8px #000;display:flex;align-items:center;justify-content:center;background:linear-gradient(#20231b99,#20231b44);border-radius:calc(6 * var(--u));padding:calc(4 * var(--u)) calc(7 * var(--u))}
.hud{position:absolute;top:calc(177 * var(--u));left:calc(12 * var(--u));width:calc(366 * var(--u));display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:calc(4 * var(--u))}
.stat{position:relative;height:calc(48 * var(--u));padding:calc(4 * var(--u)) calc(7 * var(--u));background:url('../assets/play/hammerandstone/button-charcoal.webp') center/100% 100% no-repeat;text-align:center;font-size:calc(10 * var(--u));font-weight:700;line-height:1.1;white-space:nowrap;text-shadow:0 2px 2px #000}
.stat{text-transform:uppercase}.stat small{text-transform:none}
.stat b{display:block;line-height:1;font-size:calc(21 * var(--u));color:var(--lime);margin-left:0;font-weight:900;font-variant-numeric:tabular-nums}
.stat small{display:block;font-size:calc(8 * var(--u));font-weight:400;margin-top:calc(1 * var(--u));color:#e5e4de}
.stage{position:absolute;top:calc(285 * var(--u));left:0;width:100%;height:calc(485 * var(--u));touch-action:none}
.seat{position:absolute;left:calc(24 * var(--u));right:calc(24 * var(--u));top:0;display:flex;justify-content:space-between;align-items:center;min-height:calc(20 * var(--u));font-size:calc(11 * var(--u));text-shadow:0 2px 3px #000;color:#f0eee8}
.seat strong{font-weight:700}.seat-mark{color:#d5ff00;letter-spacing:calc(3 * var(--u))}
.board-shell{position:absolute;left:calc(3 * var(--u));top:calc(20 * var(--u));width:calc(384 * var(--u));height:calc(360 * var(--u));filter:drop-shadow(0 8px 5px #0009)}
.board-frame{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
#hs-board{position:absolute;left:9.2%;top:5.63218%;width:81.9%;height:85.28736%;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(7,minmax(0,1fr));gap:0;touch-action:none}
button,select{font:inherit;color:inherit;cursor:pointer}
.cell{position:relative;min-height:0;min-width:0;border:0;padding:0;display:flex;align-items:center;justify-content:center;border-radius:calc(5 * var(--u));background:url('../assets/play/hammerandstone/tile-light.webp') center/100% 100% no-repeat;touch-action:none;-webkit-tap-highlight-color:transparent}
.cell.alt{background-image:url('../assets/play/hammerandstone/tile-dark.webp')}
.cell.void{visibility:hidden;pointer-events:none}
.cell:disabled{opacity:1;cursor:default}
.piece{display:block;position:relative;pointer-events:none;width:78%;height:83%;background-position:center;background-size:contain;background-repeat:no-repeat;filter:drop-shadow(0 3px 2px #0007);z-index:1}
.stone .piece{background-image:url('../assets/play/hammerandstone/stone.webp')}
.hammer .piece{background-image:url('../assets/play/hammerandstone/hammer.webp');height:98%;width:80%}
.cell.can:hover{filter:brightness(1.15)}
.cell.selected{outline:calc(3 * var(--u)) solid var(--lime);outline-offset:calc(-3 * var(--u));box-shadow:inset 0 0 14px #d5ff0099}
.cell.target:after{content:'';position:absolute;width:calc(12 * var(--u));height:calc(12 * var(--u));border:calc(2 * var(--u)) solid #edffb6;border-radius:50%;background:#c2f73988;box-shadow:0 0 8px #c6ff37;pointer-events:none}
.cell.capture:after{width:calc(15 * var(--u));height:calc(15 * var(--u));border-radius:1px;transform:rotate(45deg);background:#f3cf7a}
.cell.last{box-shadow:inset 0 0 0 calc(2 * var(--u)) #a8e1cb}
.cell.hint-from,.cell.hint-to{outline:calc(2 * var(--u)) dashed #e5ff8b;outline-offset:calc(-5 * var(--u))}
.cell:focus-visible{z-index:3;outline:calc(3 * var(--u)) solid white;outline-offset:calc(-3 * var(--u))}
.board-shell+.seat{top:calc(384 * var(--u))}
.board-shell+.seat span{font-size:calc(10 * var(--u))}
.legend{position:absolute;top:calc(409 * var(--u));left:0;width:100%;display:flex;justify-content:center;gap:calc(13 * var(--u));font-size:calc(9 * var(--u));color:#fff;text-shadow:0 1px 3px #000}
.legend span:first-child{color:#e3ff8b}.legend span:last-child{color:#b5ecd6}
.primary{border:0;min-height:calc(50 * var(--u));background:transparent url('../assets/play/hammerandstone/button-lime.webp') center/100% 100% no-repeat;color:#22270f;font-size:calc(22 * var(--u));font-weight:900;text-shadow:0 1px #f4ffc2;filter:drop-shadow(0 4px 3px #0008);text-transform:uppercase}
#hs-go{position:absolute;top:calc(431 * var(--u));left:calc(178 * var(--u));width:calc(200 * var(--u));height:calc(53 * var(--u));padding:0 calc(12 * var(--u));font-size:calc(19 * var(--u))}
#hs-go:disabled{filter:saturate(.45) brightness(.85);font-size:calc(16 * var(--u));cursor:wait}
.setup{position:absolute;top:calc(716 * var(--u));left:calc(14 * var(--u));width:calc(156 * var(--u));height:calc(54 * var(--u));display:flex;flex-direction:column;align-items:stretch;gap:calc(3 * var(--u));font-size:calc(12 * var(--u));font-weight:700;text-shadow:0 2px 2px #000}
select{min-width:0;width:100%;flex:1;height:calc(38 * var(--u));border:1px solid #9a9e7d;border-radius:calc(8 * var(--u));background:#242721;padding:0 calc(9 * var(--u));font-size:calc(12 * var(--u));accent-color:var(--lime)}
.toolbar{position:absolute;top:calc(783 * var(--u));left:calc(34 * var(--u));width:calc(322 * var(--u));height:calc(44 * var(--u));display:flex;gap:calc(8 * var(--u))}
.toolbar button{flex:1;min-width:0;border:0;background:transparent url('../assets/play/hammerandstone/button-charcoal.webp') center/100% 100% no-repeat;font-size:calc(13 * var(--u));font-weight:800;text-transform:uppercase;padding:0 calc(10 * var(--u));text-shadow:0 2px 2px #000}
button:focus-visible,select:focus-visible{outline:3px solid white;outline-offset:2px}
.primary:hover:not(:disabled),.toolbar button:hover{filter:brightness(1.15)}
#hs-over{position:absolute;inset:calc(20 * var(--u)) calc(21 * var(--u)) calc(105 * var(--u));z-index:5;background:linear-gradient(#23261bf5,#12150ef7),url('../assets/play/hammerandstone/tile-dark.webp') center/cover;border:calc(3 * var(--u)) solid #a5ad87;border-radius:calc(20 * var(--u));display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:calc(22 * var(--u));box-shadow:0 6px 30px #000c}
#hs-over[hidden]{display:none}
#hs-over[data-result=win]{border-color:var(--lime);box-shadow:0 0 30px #c4ff0033,0 6px 30px #000c}
#hs-over[data-result=loss]{border-color:#bbb9b3;background:linear-gradient(#31312ff7,#161715f8)}
#hs-over h2{margin:0 0 calc(12 * var(--u));font-size:calc(36 * var(--u));line-height:1.1;color:var(--lime);text-shadow:0 3px 0 #000}
#hs-over[data-result=loss] h2{color:#ece8df}
#hs-over[data-result=draw] h2{color:#efe9d1}
#hs-over p{font-size:calc(15 * var(--u));line-height:1.5;margin:0 0 calc(23 * var(--u))}
#hs-again{width:100%;font-size:calc(22 * var(--u))}
.instructions{max-width:660px;margin:0 auto;padding:30px 24px;color:#dbdcd3;line-height:1.6;background:#20231d}
.eyebrow{font-size:11px;letter-spacing:.17em;color:#c8e386}.intro{font-size:16px;color:#f0f0e8}.key,.note{font-size:13px}.instructions h2{color:#e5f5b8;font-size:22px}.instructions ul{padding-left:20px}.instructions li{font-size:14px;margin:12px 0}
header{max-width:660px;margin:auto;padding:20px 24px;font-size:13px;background:#20231d}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
