@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display:ital@0;1&display=swap');

:root{font-family:'DM Sans',Arial,sans-serif;color:#302e27;background:#e3d6be;font-synthesis:none;--cream:#faf7ed;--ink:#302e27;--muted:#77746a;--orange:#bb512e;--line:#dcd7ca;--teal:#3f6a61}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #305d57;outline-offset:5px}button:disabled{cursor:default;opacity:.5}.hidden{display:none!important}#game{position:fixed;inset:0;z-index:0}#game canvas{display:block;width:100%;height:100%;touch-action:none}.screen-grain{position:fixed;inset:0;pointer-events:none;z-index:1;opacity:.05;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' filter='url(%23n)' opacity='.55' d='M0 0h160v160H0z'/%3E%3C/svg%3E")}
.topbar{position:fixed;z-index:4;top:29px;left:34px;right:34px;display:flex;align-items:center;justify-content:space-between;gap:22px;pointer-events:none}.topbar>*{pointer-events:auto}.brand{display:flex;gap:10px;align-items:center;background:var(--cream);border:1px solid #ffffff73;box-shadow:0 4px 15px #362a1510;color:var(--ink);text-decoration:none;padding:13px 17px 13px 13px;border-radius:12px;font-size:15px;font-weight:700;letter-spacing:.04em;white-space:nowrap}.brand svg{width:29px;height:29px;fill:var(--orange);transform:rotate(-9deg)}.amp{font-family:Georgia,serif;font-style:italic;color:var(--orange);font-weight:400}.brand-dot{font-size:8px;vertical-align:super;margin-left:4px}.chapter{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;font-size:11px;font-weight:700;letter-spacing:.17em;white-space:nowrap;color:#4b4940;background:#faf7ed91;padding:12px 17px;border-radius:99px;backdrop-filter:blur(8px)}.chapter-line{width:20px;height:1px;background:#8c8b77}.chapter-number{border:1px solid #9797846b;border-radius:50%;height:23px;width:23px;display:grid;place-items:center;font-size:10px;letter-spacing:0}.top-actions{display:flex;gap:8px}.icon-button{display:grid;place-items:center;width:45px;height:45px;border:1px solid #fffc;background:var(--cream);border-radius:50%;box-shadow:0 4px 15px #362a1510;color:var(--ink);transition:transform .15s,background .15s}.icon-button:hover{background:#fff;transform:translateY(-2px)}.icon-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.icon-button[aria-pressed=false] .sound-waves{opacity:.25}.scoreboard{position:fixed;z-index:3;top:103px;right:34px;width:239px;display:grid;grid-template-columns:1fr 1px 1fr;gap:0 21px;padding:20px 23px 12px;background:#faf7edf0;border:1px solid #fff8;border-radius:16px;backdrop-filter:blur(12px);box-shadow:0 8px 25px #362a1510}.score-stat,.time-stat{display:flex;flex-direction:column;gap:5px}.stat-label{font-size:9px;font-weight:700;letter-spacing:.11em;color:#878377;white-space:nowrap}.score-stat strong,.time-stat strong{font-family:'DM Serif Display',Georgia,serif;font-size:44px;line-height:1.1;font-weight:400;font-variant-numeric:tabular-nums;letter-spacing:-.035em}.time-stat strong{color:var(--orange)}.seconds-mark{font-size:24px;margin-left:2px}.stat-divider{background:#dfd9cd;height:52px;margin-top:7px}.timer-track{grid-column:1/-1;height:3px;border-radius:5px;background:#dfd9cd;margin-top:14px;overflow:hidden}#timer-fill{width:100%;height:100%;background:var(--orange);transform-origin:left;transition:width .2s linear}.scoreboard-foot{grid-column:1/-1;margin-top:11px;display:flex;justify-content:space-between;gap:8px;font-size:8px;font-weight:600;letter-spacing:.08em;color:#878377}.scoreboard-foot b{color:#4b4940;margin-left:3px}#status{font-size:8px}
.intro-panel{position:fixed;z-index:3;left:34px;top:25%;width:352px;padding:29px 30px 23px;background:#faf7edf5;border:1px solid #ffffffa6;border-radius:18px;box-shadow:0 12px 50px #5b3d1a16;backdrop-filter:blur(16px);animation:panel-in .7s cubic-bezier(.2,.8,.2,1) both}.eyebrow{display:flex;align-items:center;gap:7px;color:var(--orange);font-size:9px;font-weight:700;letter-spacing:.12em;line-height:1.5;white-space:nowrap}.little-star{font-size:17px;line-height:1}h1,h2{font-family:'DM Serif Display',Georgia,serif;font-weight:400;letter-spacing:-.035em}h1{font-size:57px;line-height:1.02;margin:22px 0 18px}h1 em,h2 em{font-weight:400;color:var(--orange)}.intro-copy{font-size:14px;line-height:1.65;letter-spacing:-.005em;color:#777164;margin:0 0 24px}.primary-button{display:flex;justify-content:center;align-items:center;gap:24px;width:100%;min-height:51px;background:var(--orange);border:1px solid #a74727;border-radius:9px;color:#fffaf0;font-size:13px;font-weight:600;padding:14px 18px;box-shadow:inset 0 1px 0 #ffffff18,0 3px 0 #943b2420;transition:background .15s,transform .15s,box-shadow .15s}.primary-button:hover{background:#a94527;transform:translateY(-2px);box-shadow:inset 0 1px 0 #ffffff18,0 5px 12px #943b2426}.primary-button:active{transform:translateY(0)}.primary-button svg{height:14px;width:14px;fill:#fff7e4}.button-caption{font-size:10px;text-align:center;margin:13px 0 0;color:#8b8578;letter-spacing:.015em}.button-caption>span{margin:0 6px}.intro-rule{height:1px;background:var(--line);margin:23px 0 18px}.mini-instructions{display:flex;align-items:center;gap:12px}.mini-paw{width:33px;height:33px;display:grid;place-items:center;border-radius:50%;border:1px solid #d9d8c6;background:#eeeee2;color:var(--teal);font-size:24px}.mini-instructions p{margin:0;font-size:11px;line-height:1.65;color:#8a8377}.mini-instructions b{color:#57564b;font-weight:500}.mouse-note{position:fixed;z-index:2;right:54px;bottom:148px;width:160px;text-align:center;transform:rotate(-8deg);pointer-events:none;color:#554a3a}.mouse-note svg{display:block;width:82px;height:53px;margin:0 auto 6px;fill:none;stroke:#655541;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.mouse-note svg .mouse-body{fill:#e9e3d4}.mouse-note svg .mouse-ear{fill:#e4b6a1}.mouse-note>span:first-of-type{display:block;font-family:'DM Serif Display',Georgia,serif;font-size:17px;letter-spacing:-.015em}.note-scribble{display:block;font-size:8px;letter-spacing:.02em;margin-top:6px;opacity:.7}
.bottombar{position:fixed;z-index:3;bottom:28px;left:34px;right:34px;display:flex;justify-content:space-between;align-items:center;gap:20px;pointer-events:none}.location-label{display:flex;align-items:center;gap:10px;color:#585346;font-size:8px;font-weight:700;letter-spacing:.12em;line-height:1.8;text-shadow:0 1px 6px #faf7ed8f}.location-label b{font-weight:400;letter-spacing:.01em;font-size:9px}.location-star{font-size:28px;color:var(--orange)}.controls-legend{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:17px;padding:13px 19px;background:#faf7edf2;border:1px solid #ffffff80;box-shadow:0 6px 20px #362a1510;border-radius:12px;backdrop-filter:blur(10px);white-space:nowrap}.control-group{display:flex;align-items:center;gap:8px;font-size:10px;color:#766f61}.control-group>span:last-child{font-weight:500}.key-cluster{display:flex;gap:3px}kbd{display:inline-flex;align-items:center;justify-content:center;font:600 9px 'DM Sans',Arial,sans-serif;background:#f2eee3;border:1px solid #d8d3c5;border-bottom-width:2px;border-radius:4px;min-width:20px;height:22px;color:#565246;padding:1px 5px}.wide-key{font-size:8px}.or-key{font-size:9px}.control-divider{height:19px;width:1px;background:#dcd6ca}.footer-note{font-family:'DM Serif Display',Georgia,serif;font-style:italic;font-size:12px;color:#67604e;text-shadow:0 1px 6px #faf7ed80}.toast{position:fixed;z-index:5;left:50%;top:20%;transform:translate(-50%,12px);background:#faf7edec;border:1px solid #ffffffa8;box-shadow:0 8px 30px #302e2715;border-radius:99px;padding:12px 23px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;font-size:14px;font-weight:600;color:var(--orange)}.toast.show,.toast.visible{opacity:1;transform:translate(-50%,0)}
.modal-backdrop{position:fixed;z-index:10;inset:0;background:#35372a3d;backdrop-filter:blur(7px);display:grid;place-items:center;padding:24px}.result-panel{width:360px;max-width:100%;padding:30px 32px 25px;text-align:center;border-radius:21px;background:var(--cream);border:1px solid #fff8;box-shadow:0 25px 90px #29291d40;animation:panel-in .4s ease both}.result-panel .eyebrow{justify-content:center;font-size:9px}.result-paw{font-size:38px;color:var(--orange);margin-top:15px}.result-panel h2{font-size:49px;line-height:1.03;margin:13px 0 22px}.final-score-wrap{display:flex;align-items:center;justify-content:center;gap:13px;padding:14px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:17px}.final-score-wrap strong{font-family:'DM Serif Display',Georgia,serif;font-size:54px;font-weight:400;line-height:1;color:var(--teal)}.final-score-wrap span{font-size:10px;letter-spacing:.11em;font-weight:600}.result-panel>p:not(.button-caption){font-size:13px;line-height:1.65;color:#777164;margin:0 0 23px}.pause-panel{padding-top:36px}.pause-panel h2{margin:25px 0 18px}.text-button{background:none;border:0;color:#797164;font-size:11px;text-decoration:underline;text-underline-offset:4px;margin-top:17px;padding:7px}.loading{position:fixed;z-index:20;inset:0;background:#e9e3d4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;color:#655b49;font-size:14px;transition:opacity .35s}.loading-paw{font-size:56px;color:var(--orange);animation:wake 1.6s infinite}.error-message{position:fixed;z-index:25;left:50%;top:50%;transform:translate(-50%,-50%);padding:28px;background:var(--cream);border-radius:16px;box-shadow:0 20px 100px #0003;width:400px;max-width:90%;line-height:1.7;font-size:16px}.touch-controls{display:none;position:fixed;z-index:6;left:26px;right:26px;bottom:27px;align-items:center;justify-content:space-between;pointer-events:none}.joystick{width:104px;height:104px;background:#faf7ed70;border:1px solid #fff9;box-shadow:0 5px 20px #302e2715;border-radius:50%;position:relative;pointer-events:auto;touch-action:none;backdrop-filter:blur(4px)}.joystick-ring{position:absolute;inset:17px;border:1px solid #726a4e20;border-radius:50%}#joystick-thumb{position:absolute;width:43px;height:43px;left:29px;top:29px;background:#faf7edf2;border:1px solid #fffc;box-shadow:0 2px 8px #302e2730;border-radius:50%;pointer-events:none}.touch-actions{display:flex;gap:12px;align-items:end;pointer-events:auto}.touch-actions button{width:66px;height:66px;border:1px solid #fffb;border-radius:50%;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;background:#faf7eddb;color:var(--ink);touch-action:none;box-shadow:0 4px 15px #302e2710}.touch-actions #swipe-btn{width:79px;height:79px;background:var(--orange);color:var(--cream);border-color:#ffffff70}.touch-actions svg{width:24px;height:24px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}.touch-actions span{font-size:8px;font-weight:700;letter-spacing:.08em}
@keyframes panel-in{from{opacity:0;transform:translateY(15px)}to{opacity:1;transform:translateY(0)}}@keyframes wake{0%,100%{transform:rotate(-10deg) scale(.95);opacity:.6}50%{transform:rotate(10deg) scale(1.05);opacity:1}}
@media(min-width:1600px){.intro-panel{width:385px;top:25%;left:50px;padding:33px}h1{font-size:65px}.intro-copy{font-size:16px}.topbar{left:50px;right:50px;top:36px}.scoreboard{right:50px;top:115px}.bottombar{left:50px;right:50px;bottom:35px}.mouse-note{right:70px}}
@media(max-width:1100px){.chapter{display:none}.footer-note{display:none}.controls-legend{left:auto;right:0;transform:none;gap:12px}.intro-panel{width:320px;padding:25px;top:24%}h1{font-size:51px}.mouse-note{display:none}.scoreboard{width:218px;gap:0 15px;padding:18px 19px 12px}.location-label{font-size:7px}.location-label b{font-size:8px}}
@media(max-width:760px){.topbar{top:18px;left:18px;right:18px}.brand{font-size:11px;padding:10px 12px 10px 10px;border-radius:10px;gap:7px}.brand svg{width:24px;height:24px}.icon-button{width:38px;height:38px}.top-actions{gap:6px}.intro-panel{left:18px;top:auto;bottom:100px;width:290px;padding:23px}.eyebrow{font-size:7px;letter-spacing:.1em}.little-star{font-size:15px}h1{font-size:46px;margin:17px 0 14px}.intro-copy{font-size:12px;margin-bottom:20px}.primary-button{font-size:12px;min-height:47px}.button-caption{font-size:9px}.intro-rule{margin:18px 0 14px}.mini-instructions p{font-size:10px}.mini-paw{width:29px;height:29px;font-size:21px}.bottombar{left:18px;right:18px;bottom:19px}.location-label{display:none}.controls-legend{position:static;justify-content:center;gap:10px;padding:11px 13px;margin:0 auto}.control-group{gap:6px;font-size:8px}kbd{font-size:8px;min-width:17px;height:20px;padding:1px 4px}.wide-key{font-size:7px}.key-cluster{gap:2px}.control-divider{height:16px}.or-key{font-size:8px}.toast{top:24%;font-size:12px;padding:10px 19px}}
@media(pointer:coarse){.controls-legend{display:none}.touch-controls{display:flex}body:has(#start-screen:not(.hidden)) .touch-controls,body:has(#result-screen:not(.hidden)) .touch-controls,body:has(#pause-screen:not(.hidden)) .touch-controls{display:none}.bottombar{bottom:20px}.location-label{display:flex}.footer-note{display:none}.intro-panel{bottom:73px}.toast{top:26%}}
@media(max-height:700px) and (min-width:761px){.intro-panel{top:20%;padding:22px 25px;width:316px}h1{font-size:47px;margin:17px 0 14px}.intro-copy{margin-bottom:17px;font-size:13px}.intro-rule{margin:16px 0 12px}.button-caption{margin-top:10px}.mini-instructions p{font-size:10px}.scoreboard{top:93px}.mouse-note{bottom:122px}}
@media(max-height:550px){.intro-panel{top:auto;bottom:65px;left:18px;width:280px;padding:19px 22px}.intro-panel h1{font-size:40px;margin:12px 0}.intro-copy{font-size:11px;margin-bottom:14px}.intro-rule,.mini-instructions{display:none}.button-caption{font-size:8px;margin-top:9px}.primary-button{min-height:42px;padding:11px 14px}.topbar{top:15px}.scoreboard{top:73px}.result-panel{padding:20px 27px}.result-panel h2{font-size:39px;margin:10px 0 14px}.result-paw{font-size:29px;margin-top:10px}.final-score-wrap{padding:9px}.final-score-wrap strong{font-size:39px}.result-panel>p:not(.button-caption){margin-bottom:15px;font-size:11px}.touch-controls{bottom:20px}.joystick{width:85px;height:85px}#joystick-thumb{left:20px;top:20px}.touch-actions button{width:57px;height:57px}.touch-actions #swipe-btn{width:68px;height:68px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* Keep the game instructions readable over the detailed apartment. */
.chapter{font-size:12px;letter-spacing:.12em}
.chapter-number{font-size:12px;width:26px;height:26px}
.scoreboard{width:280px;column-gap:22px;padding:20px 22px 14px}
.stat-label{font-size:12px;letter-spacing:.055em}
.scoreboard-foot,#status{font-size:12px;letter-spacing:.025em}
.scoreboard-foot{margin-top:12px}
.intro-panel{top:19vh;width:360px;padding:27px 28px 23px}
.eyebrow{font-size:12px;letter-spacing:.055em;white-space:normal;line-height:1.5}
.intro-panel h1{margin:19px 0 16px}
.intro-copy{font-size:16px;line-height:1.6;margin-bottom:22px}
.primary-button{font-size:14px;min-height:51px}
.button-caption{font-size:12px;line-height:1.5;margin-top:12px}
.intro-rule{margin:19px 0 16px}
.mini-instructions p{font-size:12px;line-height:1.55}
.mini-paw{flex:none}
.mouse-note .note-scribble{font-size:12px;line-height:1.4}
.location-label{font-size:12px;letter-spacing:.06em;line-height:1.7}
.location-label b{font-size:12px;letter-spacing:0}
.footer-note{font-size:14px}
.controls-legend{gap:15px;padding:14px 18px}
.control-group{font-size:14px;gap:8px}
kbd,.wide-key{font-size:12px;min-width:24px;height:26px;padding:2px 5px}
.or-key{font-size:12px}
.control-divider{height:23px}
.result-panel .eyebrow{font-size:12px}
.final-score-wrap span{font-size:14px;letter-spacing:.06em}
.result-panel>p:not(.button-caption){font-size:16px}
.text-button{font-size:14px}
.touch-actions span{font-size:12px;letter-spacing:.025em}
.touch-actions button{width:72px;height:72px}
.touch-actions #swipe-btn{width:84px;height:84px}

@media(min-width:1600px){
  .intro-panel{top:22vh;width:395px;padding:31px 32px 26px}
}
@media(max-width:1250px){
  .location-label,.footer-note{display:none}
  .controls-legend{left:50%;right:auto;transform:translateX(-50%)}
}
@media(max-width:1100px){
  .intro-panel{top:20vh;width:340px;padding:25px}
  .scoreboard{width:265px;column-gap:18px;padding:18px 20px 13px}
}
@media(max-width:760px){
  .brand{font-size:14px}
  .intro-panel{top:auto;bottom:94px;width:320px;max-width:calc(100vw - 36px);padding:23px}
  .eyebrow{font-size:12px;letter-spacing:.015em}
  .intro-panel h1{font-size:46px;margin:15px 0}
  .intro-copy{font-size:16px;line-height:1.5;margin-bottom:19px}
  .primary-button{font-size:14px;min-height:48px}
  .button-caption{font-size:12px;margin-top:11px}
  .mini-instructions p{font-size:12px}
  .intro-rule{margin:17px 0 15px}
  .controls-legend{position:relative;left:auto;right:auto;transform:none;max-width:100%;gap:12px;padding:12px;flex-wrap:wrap;row-gap:9px}
  .control-group{font-size:14px;gap:7px}
  kbd,.wide-key{font-size:12px;height:24px;min-width:22px}
  .or-key{font-size:12px}
  .touch-actions span{font-size:12px}
}
@media(max-width:600px){
  .controls-legend .control-divider{display:none}
  .controls-legend{column-gap:20px}
  .intro-panel{bottom:112px}
}
@media(pointer:coarse){
  .location-label{display:none}
  .intro-panel{bottom:28px}
}
@media(max-height:780px){
  .intro-rule,.mini-instructions{display:none}
  .intro-panel{top:20vh}
}
@media(max-height:700px) and (min-width:761px){
  .intro-panel{top:19vh;width:340px;padding:24px 25px}
  .intro-panel h1{font-size:49px;margin:16px 0 14px}
  .intro-copy{font-size:16px;margin-bottom:18px}
  .button-caption{font-size:12px;margin-top:11px}
}
@media(max-height:780px) and (max-width:760px){
  .intro-panel{top:auto;bottom:105px}
}
@media(max-height:780px) and (max-width:760px) and (pointer:coarse){
  .intro-panel{bottom:28px}
}
@media(max-height:550px){
  .intro-panel{top:auto;bottom:64px;width:310px;padding:18px 22px}
  .intro-panel h1{font-size:39px;margin:11px 0}
  .intro-copy{font-size:16px;line-height:1.4;margin-bottom:13px}
  .primary-button{font-size:14px;min-height:44px;padding:10px 14px}
  .button-caption{font-size:12px;margin-top:9px}
  .result-panel>p:not(.button-caption){font-size:16px}
  .result-panel .eyebrow{font-size:12px}
  .touch-actions button{width:68px;height:68px}
  .touch-actions #swipe-btn{width:78px;height:78px}
}
@media(max-height:450px){
  .intro-panel{top:auto;bottom:24px;width:300px;padding:18px 22px}
  .intro-panel h1{font-size:34px;margin:11px 0 16px}
  .intro-copy{display:none}
}

.time-stat.urgent strong{color:#a32c1f}.time-stat.urgent{animation:time-pulse 1s ease-in-out infinite}@keyframes time-pulse{50%{opacity:.65}}
@media(prefers-reduced-motion:reduce){.time-stat.urgent{animation:none}}

/* A small, readable reminder of the stakes beside the chase timer. */
.lives-row{grid-column:1/-1;display:flex;align-items:center;gap:12px;margin-top:15px;color:var(--orange);min-height:22px}
.lives-label{font-size:12px;font-weight:700;letter-spacing:.06em;color:#827b6d;margin-right:auto}
.life-hearts{display:flex;align-items:center;gap:5px}
.life-hearts svg{width:20px;height:20px;fill:currentColor;stroke:currentColor;stroke-width:1.4;stroke-linejoin:round;transition:fill .2s,color .2s,opacity .2s}
.life-hearts svg.lost{fill:none;color:#bdb4a4;opacity:.6}
#life-count{font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;color:#827b6d;min-width:31px;text-align:right}
.lives-row.last-life{color:#b5372b}
.lives-row.last-life #life-count{color:#b5372b}
.grandma-row{grid-column:1/-1;display:flex;align-items:center;gap:8px;min-height:31px;margin-top:9px;padding:7px 9px;border-radius:7px;background:#eaeade;color:#536459}
.grandma-row svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#grandma-status{font-size:14px;font-weight:500;line-height:1.35}
.grandma-row:has(.warning),.grandma-row:has(.danger){background:#f3e1d6;color:#a5442c}
.scoreboard-foot{padding-top:10px;border-top:1px solid #ddd7c9;margin-top:11px}
.mini-instructions{display:flex}
.result-panel #result-reason{font-size:12px;line-height:1.5;color:#8b8374;margin:-10px 0 18px;letter-spacing:.02em}
#damage-flash{position:fixed;z-index:9;inset:0;pointer-events:none;opacity:0;box-shadow:inset 0 0 95px 25px #b83a2d75}
#damage-flash.show,body.hurt #damage-flash{animation:broom-hit .6s ease-out both}
@keyframes broom-hit{0%{opacity:0}15%{opacity:1}100%{opacity:0}}
@media (max-width: 760px), (pointer: coarse) and (max-height: 550px) {
  .topbar {
    top: calc(env(safe-area-inset-top) + 8px);
    left: calc(env(safe-area-inset-left) + 10px);
    right: calc(env(safe-area-inset-right) + 10px);
  }
  .topbar .brand { padding: 6px 9px; }
  .topbar .brand svg { width: 22px; height: 22px; }
  .topbar .icon-button { width: 38px; height: 38px; }

  .scoreboard {
    top: calc(env(safe-area-inset-top) + 52px);
    left: calc(env(safe-area-inset-left) + 10px);
    right: calc(env(safe-area-inset-right) + 10px);
    width: auto;
    max-width: 440px;
    margin-inline: auto;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 4px 8px;
    padding: 5px 9px;
    border-radius: 10px;
    pointer-events: none;
  }
  body:has(#start-screen:not(.hidden)) .scoreboard { display: none; }
  .score-stat, .time-stat {
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
  }
  .stat-label { font-size: 9px; letter-spacing: 0; }
  .score-stat strong, .time-stat strong { font-size: 22px; }
  .seconds-mark { font-size: 12px; margin-left: 1px; }
  .stat-divider, .scoreboard-foot, .lives-label, #life-count { display: none; }
  .timer-track { height: 2px; margin-top: 0; }
  .lives-row { grid-column: 3; grid-row: 1; min-height: 0; margin-top: 0; }
  .life-hearts { gap: 4px; }
  .life-hearts svg { width: 14px; height: 14px; }
  .grandma-row {
    justify-content: center;
    gap: 4px;
    min-height: 0;
    margin-top: 0;
    padding: 1px 5px;
  }
  .grandma-row svg { width: 13px; height: 13px; }
  #grandma-status { font-size: 11px; }
}
@media(max-height:780px){.mini-instructions{margin-top:16px}}
@media(prefers-reduced-motion:reduce){
  #damage-flash.show,body.hurt #damage-flash{animation:broom-hit .25s linear both;box-shadow:inset 0 0 55px 12px #b83a2d50}
}
