:root{color-scheme:dark;--cream:#fff2cf;--ink:#203c35;--gold:#f2bc58}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{background:#203c35;color:var(--cream);font-family:Georgia,serif;display:flex;flex-direction:column;align-items:center;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}header{width:100%;height:78px;flex:none;padding:14px 80px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ffffff21}.brand{font-size:20px;letter-spacing:.13em}.brand b{color:var(--gold)}.brand small{display:block;font:9px system-ui;letter-spacing:.28em;margin-top:6px}.tools{display:flex;gap:8px}button{font:700 13px system-ui;color:var(--cream);border:1px solid #e8d4a975;border-radius:8px;background:#ffffff0d;padding:10px 14px;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid #fff;outline-offset:3px}#help-button{border-radius:50%;opacity:.7;width:38px;padding:0;font-size:22px}main{width:min(100%,calc((100dvh - 190px)*1.8461538));flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center}.hud{display:flex;justify-content:space-between;gap:8px;padding:10px 22px;height:65px;flex:none}.hud small{display:block;font:9px system-ui;letter-spacing:.17em;color:#d5d4b2}.hud strong{display:block;font:700 23px Georgia;margin-top:3px;color:var(--cream)}#field{position:relative;width:100%;aspect-ratio:24/13;min-height:0;border-radius:16px;overflow:hidden;box-shadow:0 16px 38px #10241d66;flex:none}canvas{display:block;width:100%;height:100%}#holes{position:absolute;inset:0}.hole{position:absolute;width:16.6667%;height:23%;background:transparent;border:0;border-radius:40%;padding:0;touch-action:none}.hole:active{background:#fff2cf18}.hole:focus-visible{outline-offset:-4px;outline:3px dashed #fff2cf}.hole span{position:absolute;bottom:3%;left:45%;font:700 12px system-ui;color:#fff2cf88}.instructions-open #holes,.gameover-open #holes{pointer-events:none;visibility:hidden}#banner{position:absolute;top:3%;left:12%;right:12%;text-align:center;pointer-events:none;font:700 clamp(12px,2vw,18px) system-ui;color:#fff2cf;text-shadow:0 2px 2px #203c35}footer{height:42px;padding:9px 8px;display:flex;flex-direction:column;gap:5px;align-items:center;font:11px system-ui;color:#e7e0c7;flex:none}.keys{font-size:10px;opacity:.65}.modal{display:none;position:fixed;inset:0;z-index:100;place-items:center;background:#102b24eb;padding:14px;overflow:auto}.modal.is-visible{display:grid}.modal-card{width:min(590px,100%);max-height:calc(100dvh - 28px);overflow:auto;background:#f7e9c6;color:#233e35;border-radius:10px;padding:28px 34px;border:6px double #aa7547;box-shadow:0 24px 90px #0006}.eyebrow{font:700 10px system-ui;letter-spacing:.21em;color:#765336}h1{font-size:64px;line-height:.89;margin:20px 0}h1 em{color:#a74627}h2{font-size:36px}.modal-card>p{line-height:1.5}.orders{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;font:13px/1.5 system-ui}.orders b{font-size:11px;letter-spacing:.08em;color:#9c482b}.hint{font-size:12px}.modal button{background:#284c3d;color:#fff2cf;min-height:46px;width:100%;margin-top:8px}.result{text-align:center}.result p{font:16px/1.6 system-ui}body.touch-device header{padding:8px 65px 8px 12px;height:55px}body.touch-device .brand{font-size:13px}body.touch-device .brand small{font-size:7px}body.touch-device #help-button,body.touch-device #flyout-nav,body.touch-device #reset,body.touch-device .keys,body.touch-device .hole span{display:none!important}body.touch-device .tools{gap:5px}body.touch-device .tools button{padding:8px;font-size:11px}body.touch-device .hud{height:49px;padding:5px 12px}body.touch-device .hud strong{font-size:19px}body.touch-device .hud small{font-size:8px}body.touch-device footer{height:29px;font-size:10px}body.touch-device main{width:min(100%,calc((100dvh - 138px)*1.8461538))}body.touch-device #field{border-radius:8px}body.instructions-open header,body.gameover-open header{visibility:hidden}body.instructions-open .vibecade-mobile-restart,body.gameover-open .vibecade-mobile-restart{visibility:hidden!important}@media(max-width:599px) and (orientation:portrait){body.touch-device main{width:100%;justify-content:center}body.touch-device .hud{height:60px}.hud strong{font-size:22px}footer{text-align:center}}@media(max-height:440px){header{height:45px!important}.modal-card{padding:12px 20px}h1{font-size:38px;margin:8px 0}h1 br{display:none}.orders{font-size:11px}.orders p{margin:5px 0}.modal-card>p{font-size:11px;margin:7px 0}body.touch-device main{width:min(100%,calc((100dvh - 125px)*1.8461538))}body.touch-device footer{font-size:9px}}

/* Refinement: compact focus markers preserve a clear view of every burrow. */
.hole:focus-visible{outline:0}.hole:focus-visible::after{content:'';position:absolute;left:30%;right:30%;bottom:0;height:4px;background:#fff2cf;border-radius:3px}body.touch-device .hole:focus-visible::after{display:none}

/* Final clarity pass: keep callouts below the burrows and mark dwindling reserves. */
#banner{top:auto;bottom:1.3%;font-size:clamp(9px,1.1vw,16px)}
.hud strong.urgent{color:#ffe4b0;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}

/* Direct-touch landscape board uses all remaining space, with no control rails.
   The renderer redistributes columns and keeps characters at a uniform scale. */
@media (orientation:landscape){
 body.touch-device{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
 body.touch-device > header{height:45px;padding-top:4px;padding-bottom:4px}
 body.touch-device main{width:100%;justify-content:flex-start}
 body.touch-device .hud{height:40px;padding:3px 18px}
 body.touch-device .hud strong{font-size:18px;margin-top:1px}
 body.touch-device #field{flex:1;height:0;aspect-ratio:auto;border-radius:0}
 body.touch-device main > footer{display:none}
}
