:root { --ink:#28251f; --paper:#e8dfca; --paper2:#d8caa9; --red:#a63f32; --blue:#355b70; --gold:#c79238; }
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { width:100%; height:100%; margin:0; overflow:hidden; background:var(--paper); color:var(--ink); font-family: Georgia, 'Times New Roman', serif; touch-action:none; user-select:none; }
#stage { display:block; width:100%; height:100%; touch-action:none; }
#hud { position:fixed; inset:0; pointer-events:none; padding:max(13px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
#act { position:absolute; left:50%; top:max(14px, env(safe-area-inset-top)); transform:translateX(-50%); text-align:center; font-size:12px; letter-spacing:.2em; text-transform:uppercase; white-space:nowrap; }
#note { position:absolute; bottom:max(17px, env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); text-align:center; font-size:13px; font-style:italic; color:#665d4e; white-space:nowrap; transition:opacity .45s; }
#reset, #again { font:inherit; border:1px solid #625945; background:#eee4cf; color:var(--ink); padding:10px 14px; cursor:pointer; box-shadow:2px 2px 0 rgba(40,37,31,.18); }
#reset { pointer-events:auto; position:absolute; right:max(14px, env(safe-area-inset-right)); top:max(13px, env(safe-area-inset-top)); font-size:20px; line-height:18px; width:42px; height:42px; }
#reset:active,#again:active { transform:translate(1px,1px); box-shadow:none; }
#ending { position:fixed; inset:0; display:grid; place-items:center; background:rgba(45,38,25,.36); padding:24px; }
#ending[hidden] { display:none; }
.end-card { max-width:370px; text-align:center; padding:35px 28px; background:#e8dfca; border:1px solid #625945; box-shadow:8px 9px 0 rgba(40,37,31,.18); }
.eyebrow { font-size:11px; letter-spacing:.18em; margin:0 0 10px; color:var(--red); } h1 { font-size:54px; font-weight:normal; margin:0 0 12px; } .end-card p:not(.eyebrow) { line-height:1.45; margin:0 0 24px; } #again { font-size:16px; }
@media (max-width:520px) { #note { max-width:86vw; white-space:normal; line-height:1.25; } }
@media (orientation:landscape) and (max-height:500px) { #note { bottom:9px; font-size:12px; } #act { top:9px; } #reset { top:8px; } }
@media (prefers-reduced-motion:reduce) { #note { transition:none; } }
