:root{color-scheme:dark;--ink:#153c50;--gold:#f4cc72;--paper:#fff0cd;--red:#a93442}*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden;background:#102d3d;color:var(--paper);font-family:Trebuchet MS,Arial,sans-serif;user-select:none}body::before{content:"";position:fixed;inset:0;pointer-events:none;background:repeating-linear-gradient(100deg,#fff1 0 1px,transparent 1px 6px);opacity:.15}header{height:106px;display:flex;align-items:center;justify-content:space-between;padding:14px 28px 10px 88px;gap:12px}.brand span,.eyebrow{font-size:11px;letter-spacing:.24em;font-weight:800}.brand span{color:var(--gold)}h1{font-family:Georgia,serif;font-size:38px;line-height:1.1;margin:4px 0}.tools{display:flex;gap:8px}button{font:800 14px Trebuchet MS,Arial,sans-serif;color:var(--paper);border:1px solid #f4cc7266;border-radius:7px;padding:12px 16px;background:#23495b;cursor:pointer;touch-action:none}button:hover{background:#376174}button:focus-visible,canvas:focus-visible{outline:3px solid #ffe6a0;outline-offset:3px}#help-button{background:#fff1;font-size:20px;padding:8px 15px}main{height:calc(100dvh - 106px);display:flex;align-items:center;justify-content:center;flex-direction:column;padding:0 16px 10px}#game-shell{position:relative;width:min(calc((100dvh - 154px)*1.833333),100%);aspect-ratio:11/6;overflow:hidden;border:2px solid #e5bc6a;border-radius:12px;box-shadow:0 18px 70px #0005;background:var(--ink)}canvas{display:block;width:100%;height:100%;touch-action:none}#hud{position:absolute;z-index:2;left:3%;right:3%;top:3%;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:clamp(12px,1.3vw,19px);font-weight:bold;text-shadow:0 2px #102d3d;background:#153c50e8;padding:10px 14px;border-radius:6px;border:1px solid #f4cc7255}#hearts{color:#ffe0a1;letter-spacing:3px}#score{font-variant-numeric:tabular-nums}#cue{position:absolute;bottom:4%;left:10%;right:10%;text-align:center;font-size:clamp(11px,1.2vw,17px);font-weight:bold;color:#153c50;pointer-events:none}.desktop-note{font-size:12px;color:#d7d5bf;margin:12px 0 0;display:flex;gap:30px}.desktop-note span{color:#e8bf6e}.overlay{position:fixed;inset:0;z-index:60;background:#0a2332dd;display:grid;place-items:center;padding:12px;overscroll-behavior:contain}.overlay.hidden,#instruction-modal:not(.is-visible){display:none}.paper{width:min(530px,100%);max-height:calc(100dvh - 24px);overflow:auto;background:var(--paper);color:var(--ink);padding:28px 34px;border:5px double #a83e47;border-radius:8px;box-shadow:0 12px 80px #0006;text-align:center}.paper h2{font:700 38px/1.04 Georgia,serif;margin:14px 0 20px}.paper p{font-size:15px;line-height:1.5}.paper .eyebrow{font-size:11px;color:#a13340}.paper button{margin:0 4px 5px}.primary{background:#a93442;color:#fff0cd;border-color:#732938;box-shadow:0 4px 0 #742c38;padding:13px 27px}.primary:hover{background:#c14650}.keyline{border-top:1px solid #a83e4744;padding-top:14px;font-size:13px!important}.touch-line{display:none}.touch-controls{display:none;pointer-events:none}.action{width:112px;height:92px;font-size:20px;box-shadow:0 6px 0 #081c28;pointer-events:auto}.action span{display:block;font-size:11px;font-weight:normal;margin-top:6px}.jump{background:#a93442;border-color:#f2b878}.reins{background:#28596a}.action.is-held{transform:translateY(4px);box-shadow:0 2px 0 #081c28;background:#d1a455;color:#153c50}.small-action{pointer-events:auto;min-height:44px}body.modal-open .touch-controls{visibility:hidden}#result{position:absolute;z-index:10}#result .paper{max-height:95%;padding:20px}#result h2{font-size:34px}#result p{font-size:15px}.touch-device header{height:64px;padding:8px 65px 6px 14px}.touch-device .brand span{font-size:8px}.touch-device h1{font-size:23px}.touch-device .tools{display:none}.touch-device main{height:calc(100dvh - 64px);padding:0}.touch-device .desktop-note{display:none}.touch-device #game-shell{width:min(calc((100dvh - 80px)*1.833333),calc(100vw - 280px));border-radius:7px}.touch-device #touch-controls{display:block!important}.touch-device .left-actions,.touch-device .right-actions{position:absolute;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:12px}.touch-device .left-actions{left:max(10px,env(safe-area-inset-left))}.touch-device .right-actions{right:max(10px,env(safe-area-inset-right))}.touch-device #hud{font-size:12px;left:2%;right:2%;top:3%;padding:6px 7px}.touch-device #hearts{letter-spacing:0}.touch-device #cue{font-size:11px;bottom:3%;left:3%;right:3%}.touch-device .keyline{display:none}.touch-device .touch-line{display:block;font-size:12px}.touch-device .paper{padding:18px 24px}.touch-device .paper h2{font-size:28px;margin:8px 0 14px}.touch-device .paper p{font-size:13px;line-height:1.4}.touch-device .paper .eyebrow{font-size:10px}.touch-device #result h2{font-size:22px}.touch-device #result .paper{padding:10px 14px;border-width:3px}.touch-device #result p{font-size:12px;margin:6px}.touch-device #result button{padding:9px 14px;min-height:44px}.touch-device #result .eyebrow{display:none}@media(max-width:599px),(orientation:portrait) and (max-width:900px){.touch-device header{height:82px;padding-left:18px}.touch-device h1{font-size:28px}.touch-device main{height:calc(100dvh - 82px);justify-content:flex-start;padding-top:11vh}.touch-device #game-shell{width:calc(100vw - 12px)}.touch-device .left-actions,.touch-device .right-actions{top:auto;bottom:max(34px,env(safe-area-inset-bottom));transform:none}.touch-device .left-actions{left:22px}.touch-device .right-actions{right:22px}.touch-device #hud{font-size:11px;padding:5px}.touch-device #cue{font-size:10px}.touch-device #result p{font-size:11px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Direct actions must retain capture when a thumb drifts off the button. */
.touch-device .action{touch-action:none!important;-webkit-touch-callout:none!important}
