@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Barlow+Condensed:wght@600;700;800;900&family=UnifrakturCook:wght@700&family=DM+Sans:wght@400;500;600;700&display=swap');
:root{--ink:#111111;--paper:#fffdf9;--coral:#ff72b0;--muted:#666666}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #ff438f;outline-offset:4px}button:disabled{cursor:wait;opacity:.65}button{touch-action:none}button:active{transform:translateY(2px)}[hidden]{display:none!important}.site-header{height:92px;max-width:1380px;margin:auto;padding:0 54px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #111111}.wordmark{font:700 26px 'Barlow Condensed',sans-serif;letter-spacing:-1.6px;color:var(--ink);text-decoration:none;display:flex;align-items:center;gap:6px}.wordmark span{font-weight:400}.wordmark i{font:normal 27px sans-serif;background:var(--coral);border-radius:50%;width:33px;height:33px;text-align:center;margin-left:5px}.edition,.eyebrow,.tiny,.label,.version,.chapter-foot,.site-footer{font-size:10px;font-weight:700;letter-spacing:1.6px}.edition{color:#555555}.quiet{border:0;background:transparent;font-size:12px}.quiet span{font-size:18px;margin-left:10px}.layout{max-width:1220px;margin:36px auto;display:grid;grid-template-columns:1fr 390px 1fr;gap:58px;align-items:center;padding:0 32px}.chapter h1{font:600 clamp(32px,3.3vw,46px)/1.08 'Barlow Condensed',sans-serif;letter-spacing:-2px;margin:23px 0 20px}.chapter>p{font-size:14px;line-height:1.9;color:#555555}.eyebrow{font-size:9px;color:#555555;line-height:1.8}.chapter-card{margin-top:47px}.tiny{font-size:9px;color:#666666}.chapter-card h2{font:500 21px 'Barlow Condensed';letter-spacing:-.8px;margin:10px 0 26px}.route-item{display:flex;gap:14px;align-items:center;margin:0 0 26px;opacity:.4}.route-item b{display:grid;place-items:center;width:31px;height:31px;border:1px solid #111111;border-radius:50%;font-size:10px}.route-item span{font-size:12px;font-weight:700}.route-item small{display:block;font-size:10px;font-weight:400;margin-top:6px}.route-item.active{opacity:1}.route-item.active b{background:var(--coral);border-color:var(--ink)}.chapter-foot{font-size:8px;color:#666666;margin-top:44px;letter-spacing:1px}.game-shell{width:100%;height:688px;position:relative;overflow:hidden;border:3px solid var(--ink);border-radius:23px;background:#f7daa0;box-shadow:7px 9px 0 #111111;isolation:isolate;touch-action:none;user-select:none}canvas#game{width:100%;height:100%;display:block}.hud{position:absolute;top:20px;left:18px;right:18px;display:flex;align-items:center;gap:12px;z-index:2}.height{display:flex;flex-direction:column;width:67px}.height>span{font:700 29px/.9 'Barlow Condensed';letter-spacing:-1px}.height small{font-size:8px;font-weight:700;letter-spacing:1.4px;margin-top:7px}.level-pill{display:flex;align-items:center;gap:5px;background:#fffdf9f2;border:1.5px solid #111111;border-radius:22px;padding:9px 10px;font-size:10px;margin-left:auto}.level-pill b{font-weight:700}.level-pill>span{color:#e83183;padding-left:8px;letter-spacing:2px;font-size:10px}.round{border:1.5px solid var(--ink);border-radius:50%;height:34px;width:34px;background:#fffdf9;font-weight:700;font-size:16px}.progress-track{position:absolute;top:79px;left:19px;right:19px;height:4px;background:#11111126;border-radius:3px;overflow:hidden}.progress-track div{height:100%;background:#ff72b0;width:0;transition:width .2s}.coffee-counter{position:absolute;top:96px;left:19px;display:flex;gap:7px;align-items:center;font-size:13px}.coffee-counter span{font-size:18px}.overlay{position:absolute;z-index:3;left:20px;right:20px;text-align:center}.start-screen{top:145px;pointer-events:none}.start-screen .label{font-size:8px;background:#fffdf9;border:1px solid #111111;border-radius:20px;padding:7px 13px}.start-screen h2{font:900 75px/.84 'Barlow Condensed',sans-serif;letter-spacing:-6px;transform:rotate(-5deg);margin:30px 0 18px;text-shadow:2px 3px #fffdf9}.start-screen h2 span{color:#ff72b0;-webkit-text-stroke:2px var(--ink);text-shadow:3px 4px var(--ink)}.start-screen p{font-size:13px;font-weight:600;margin:16px 0 22px}.primary{border:2px solid var(--ink);border-radius:13px;background:var(--coral);padding:14px 26px;font-weight:700;box-shadow:0 4px var(--ink);pointer-events:auto;min-width:205px}.start-screen small{display:block;font-size:9px;margin:14px 0;color:#444444}.controls{position:absolute;bottom:31px;left:19px;right:19px;display:flex;justify-content:space-between;align-items:center;z-index:4}.steering{display:flex;gap:9px}.control{width:59px;height:52px;background:#fffdf9;border:2px solid var(--ink);border-radius:13px;box-shadow:0 3px var(--ink);font-size:27px;position:relative;overflow:hidden}.control.pressed{background:#ff9bc7;transform:translateY(3px);box-shadow:none}.dash{width:102px;display:flex;justify-content:center;align-items:center;gap:5px;font-size:25px;background:#ff72b0}.dash b{font-size:11px;letter-spacing:1px}.dash i{position:absolute;height:4px;left:0;bottom:0;background:#111111;width:100%}.bottom-caption{position:absolute;bottom:12px;left:23px;right:23px;display:flex;justify-content:space-between;font-size:7px;font-weight:700;letter-spacing:1.4px;color:#111111}.record{border-bottom:1px solid #111111;padding-bottom:26px}.record>div{display:flex;align-items:baseline;gap:6px;margin-top:8px}.record b{font:500 57px 'Barlow Condensed';letter-spacing:-3px}.record span:not(.eyebrow){font-size:20px;color:#555555}.record i{font:normal 31px sans-serif;margin-left:auto;color:#ff72b0}.record p{font-size:12px;color:#555555;margin:3px 0}.how{margin-top:31px}.how>div{display:flex;gap:13px;margin-top:17px}.how>div>b{font-size:9px;color:#e83183;line-height:2.5}.how p{font-size:11px;color:#555555;line-height:1.85;margin:0}.how strong{font-size:12px;font-weight:600;color:var(--ink)}.platform-key{display:grid;grid-template-columns:1fr 1fr;gap:17px 12px;border-top:1px solid #111111;padding-top:24px;margin-top:30px}.platform-key span{font-size:9px;display:flex;align-items:center;gap:7px}.platform-key i{width:22px;height:7px;border:1px solid #473b2e;border-radius:3px}.normal{background:#ce9564}.moving{background:#82aaab}.breaking{background:#e8a187;border-style:dashed!important}.spring{background:#a6b78a}.version{display:block;font-size:8px;color:#666666;margin-top:45px}.site-footer{max-width:1270px;margin:0 auto;padding:0 35px 25px;display:flex;justify-content:space-between;color:#555555;font-size:8px}.site-footer b{font-size:20px;margin-left:9px}.dialog{top:50%;transform:translateY(-50%);background:#fffdf9;border:2px solid var(--ink);border-radius:20px;padding:28px 19px;box-shadow:0 0 0 600px #1111115e,4px 6px 0 #111111}.dialog h2{font:700 30px/1.06 'Barlow Condensed';letter-spacing:-1.3px;margin:14px 0}.dialog p{font-size:12px;line-height:1.6;color:#555555}.dialog .label{font-size:9px;color:#111111}.choice{width:100%;text-align:left;border:1.5px solid #111111;background:#ffffff;border-radius:12px;padding:14px 13px;margin-top:9px;display:flex;gap:13px;align-items:center}.choice:hover{background:#ffe2ef;border-color:var(--ink)}.choice .icon{font-size:25px}.choice strong{font-size:13px;display:block}.choice small{display:block;color:#555555;font-size:10px;line-height:1.5;margin-top:4px}.dialog .primary{margin-top:13px}.dialog .secondary{border:0;background:none;margin-top:19px;text-decoration:underline;font-size:11px}.game-shell:has(.dialog:not([hidden])) .controls{visibility:hidden}
@media(min-width:1400px){.layout{margin-top:48px;margin-bottom:38px}.game-shell{height:740px;width:420px}.layout{grid-template-columns:1fr 420px 1fr}}
@media(max-width:1050px){.layout{gap:28px;grid-template-columns:1fr 360px 1fr;padding:0 24px}.game-shell{height:650px}.chapter h1{font-size:32px}.chapter .eyebrow{font-size:8px}.notes .how p{font-size:10px}.site-header{padding:0 28px}.edition{font-size:8px}}
@media(max-width:820px){.layout{display:flex;justify-content:center;margin:20px auto}.chapter,.notes{display:none}.game-shell{width:390px;height:min(740px,calc(100dvh - 130px))}.site-header{height:65px}.site-footer{display:none}.edition{display:none}}
@media(max-width:520px){html,body{height:100%;overflow:hidden;overscroll-behavior:none}.site-header{position:absolute;z-index:5;top:0;right:0;width:auto;height:auto;border:0;padding:0}.site-header .wordmark,.site-header .edition{display:none}.quiet{font-size:0;position:absolute;top:calc(env(safe-area-inset-top) + 92px);right:17px;width:31px;height:31px;border:1px solid #11111177;border-radius:50%;background:#fffdf9ee}.quiet span{font-size:17px;margin:0}.layout{display:block;margin:0;padding:0}.game-shell{width:100%;height:100dvh;border:0;border-radius:0;box-shadow:none}.hud{top:calc(env(safe-area-inset-top) + 19px)}.progress-track{top:calc(env(safe-area-inset-top) + 77px)}.coffee-counter{top:calc(env(safe-area-inset-top) + 92px)}.controls{bottom:calc(env(safe-area-inset-bottom) + 32px)}.bottom-caption{bottom:calc(env(safe-area-inset-bottom) + 11px)}.control{height:57px;width:66px}.dash{width:112px}.start-screen{top:22%}.start-screen h2{font-size:85px}.start-screen small{font-size:10px}}
@media(max-height:650px){.start-screen{top:19%}.start-screen h2{font-size:60px;margin:24px 0 12px}.start-screen p{margin:12px 0}.start-screen small{display:none}.dialog{padding:18px}.choice{padding:10px}.dialog h2{font-size:25px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}.progress-track div{transition:none}}

.touch-hint{display:none}@media(pointer:coarse){.desktop-hint{display:none}.touch-hint{display:inline}}

/* Shared brand language from the Bary landing page. */
.wordmark{font-family:'UnifrakturCook',Georgia,serif;font-size:38px;letter-spacing:-1px;gap:9px}.wordmark span{font:800 23px 'Barlow Condensed',Impact,sans-serif;letter-spacing:0}
.edition,.eyebrow,.tiny,.label,.version,.chapter-foot,.site-footer,.level-pill,.height small,.bottom-caption,.route-item b{font-family:'Barlow Condensed',Impact,sans-serif;font-weight:700;letter-spacing:1px}
.edition{font-size:13px}.eyebrow{font-size:12px}.tiny{font-size:12px}.chapter-foot,.version,.site-footer{font-size:11px}
.chapter h1{font-weight:900;font-size:54px;line-height:.96;text-transform:uppercase;letter-spacing:-1px}.chapter-card h2{font-weight:800;font-size:27px;text-transform:uppercase}
.game-shell{border-radius:0;box-shadow:6px 6px 0 #111}.site-header{border-bottom-width:3px}.route-item b{border-radius:0;border-width:2px;font-size:14px}.route-item.active b{box-shadow:2px 2px #111}
.level-pill,.round,.control,.primary,.choice,.dialog,.start-screen .label{border-radius:0;border:2px solid #111}.level-pill{font-size:13px}.height>span{font-size:36px;font-weight:900}.round{font-family:Arial,sans-serif}
.start-screen .label{font-size:12px;box-shadow:3px 3px #111;padding:5px 11px}.start-screen h2{font-family:'Barlow Condensed',Impact,sans-serif;font-weight:900;font-size:100px;line-height:.8;letter-spacing:-2px;transform:none;margin:26px 0 18px;text-shadow:none}.start-screen h2 span{-webkit-text-stroke:2px #111;text-shadow:3px 3px #111}.start-screen p{color:#111;background:#fffdf9e6;width:fit-content;padding:3px 8px;margin:16px auto}
.primary{font:800 23px/1.1 'Barlow Condensed',Impact,sans-serif;letter-spacing:.4px;min-width:180px;padding:12px 25px;border-width:3px;box-shadow:4px 4px #111}.primary:hover{background:#ff9bc7}.start-screen small{background:#fffdf9e6;width:fit-content;margin:14px auto;padding:3px 7px}.control{box-shadow:3px 3px #111}.dash b{font:800 23px 'Barlow Condensed',Impact,sans-serif}.dash{gap:0}
.dialog{padding:28px 22px;border-width:3px;box-shadow:0 0 0 600px #11111170,6px 6px #111}.dialog .label{font-size:13px;background:#ff72b0;display:inline-block;padding:4px 8px}.dialog h2{font-family:'Barlow Condensed',Impact,sans-serif;font-size:44px;font-weight:900;text-transform:uppercase;letter-spacing:-.8px;line-height:.98}.dialog p{font-size:13px}.dialog .primary{margin-top:16px}.choice strong{font:800 20px 'Barlow Condensed',Impact,sans-serif;text-transform:uppercase}.choice small{font-size:11px}.choice:hover{box-shadow:3px 3px #111}.record b{font-weight:800;font-size:70px}.record>div{gap:9px}.quiet{color:#111}
@media(max-width:1050px){.chapter h1{font-size:43px}.chapter .eyebrow{font-size:10px}}
@media(max-width:520px){.game-shell{border:0;box-shadow:none}.start-screen h2{font-size:106px}.quiet{border-radius:0;border:2px solid #111;background:#fffdf9}.bottom-caption{font-size:9px;letter-spacing:.6px}}
@media(max-height:700px){.start-screen{top:20%}.start-screen h2{font-size:76px;margin:22px 0 12px}.start-screen small{display:none}.dialog h2{font-size:36px}.dialog{padding:20px}}

@font-face{font-family:'Bary Gothic';src:url('./assets/unifrakturcook.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap}.wordmark{font-family:'Bary Gothic',Georgia,serif}.start-screen h2 .brand-name{font:700 .86em/.95 'Bary Gothic',Georgia,serif;letter-spacing:-2px;display:inline-block;margin-bottom:8px;color:#111;-webkit-text-stroke:0;text-shadow:none}
/* Upgrade choices use a quiet monochrome keyboard focus indicator. */
.choice:focus-visible{outline:none;border-color:#111;box-shadow:inset 0 0 0 2px #111}

/* Stack end-of-run actions with a clear primary and secondary hierarchy. */
.dialog #choices:has(.secondary){display:flex;flex-direction:column;align-items:stretch;gap:14px;margin-top:22px}
.dialog #choices:has(.secondary) .primary{margin:0;width:100%;min-width:0}
.dialog .secondary{display:block;width:100%;min-height:46px;margin:0;padding:11px 20px;border:2px solid #111;background:#fffdf9;color:#111;text-decoration:none;font:700 20px/1.1 'Barlow Condensed',Impact,sans-serif;letter-spacing:.5px;box-shadow:3px 3px #111}
.dialog .secondary:hover{background:#f0efeb}
.dialog .secondary:focus-visible{outline:2px solid #111;outline-offset:4px}

/* A dedicated title screen: brand, character, one action. */
.game-shell:has(#start:not([hidden])) :is(.hud,.progress-track,.coffee-counter,.controls,.bottom-caption){display:none}
.start-screen{inset:0;pointer-events:none;text-align:center}
.start-screen .start-heading{position:absolute;top:12%;left:20px;right:20px}
.start-screen h2{display:flex;flex-direction:column;align-items:center;gap:12px;margin:0;font-size:inherit;line-height:1;transform:none;letter-spacing:0;text-shadow:none}
.start-screen h2 .brand-name{font:700 clamp(62px,10vh,82px)/1 'Bary Gothic',Georgia,serif;letter-spacing:-2px;margin:0}
.start-screen h2 span{font:800 24px/1 'Barlow Condensed',Impact,sans-serif;letter-spacing:8px;padding-left:8px;color:#111;-webkit-text-stroke:0;text-shadow:none}
.start-screen .start-heading p{font:600 11px/1.3 'DM Sans',sans-serif;letter-spacing:1.6px;background:none;padding:0;margin:22px auto 0;color:#666}
.start-screen .start-actions{position:absolute;top:76%;left:12%;right:12%;display:flex;flex-direction:column;align-items:stretch;gap:18px}
.start-screen .primary{width:100%;min-width:0;min-height:54px;margin:0;padding:14px 20px;font-size:23px;box-shadow:4px 4px #111}
.start-screen .start-actions small{display:block;margin:0;padding:0;background:none;color:#332d28;font:500 11px/1.5 'DM Sans',sans-serif}
@media(max-width:520px){body:has(#start:not([hidden])) .quiet{top:calc(env(safe-area-inset-top) + 20px);background:#fffdf9;border:0}}
@media(max-height:650px){.start-screen .start-heading{top:10%}.start-screen h2 .brand-name{font-size:60px}.start-screen h2{gap:8px}.start-screen .start-heading p{margin-top:14px}.start-screen .start-actions{top:76%;gap:13px}.start-screen .primary{min-height:48px;padding:10px 18px}}

/* The title screen is a comic cover from the same Bary Says No identity. */
.start-screen{background:#fffdf9;pointer-events:none;display:flex;flex-direction:column;align-items:stretch;padding:22px 22px 26px;gap:0}
.start-brand{font:700 31px/1.15 'Bary Gothic',Georgia,serif;text-align:left;padding:0 0 17px;border-bottom:2px solid #111}
.start-screen .start-heading{position:static;text-align:left;padding:23px 0 17px}
.start-screen .start-heading p{display:inline-block;font:700 12px/1 'Barlow Condensed',Impact,sans-serif;letter-spacing:.8px;margin:0 0 11px;padding:5px 8px;color:#111;background:#ff72b0;transform:rotate(-2deg)}
.start-screen .start-heading h2{display:block;font:900 clamp(46px,8vh,64px)/.95 'Barlow Condensed',Impact,sans-serif;letter-spacing:-1.6px;margin:0;color:#111;text-align:left}
.start-comic{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;border:2px solid #111;background:#fff6fa;box-shadow:4px 4px #111}
.comic-caption{font:700 11px/1 'Barlow Condensed',Impact,sans-serif;letter-spacing:.5px;padding:8px 10px;align-self:flex-start;border-right:2px solid #111;border-bottom:2px solid #111;background:#fffdf9}
.menu-art{position:relative;flex:1;min-height:0;container-type:size;display:flex;align-items:center;justify-content:center;overflow:hidden}
.menu-art>img{position:absolute;width:min(100cqw,133.333cqh);height:min(75cqw,100cqh);object-fit:contain}
.menu-cat{position:absolute;width:min(45cqw,60cqh);height:min(49.09cqw,65.45cqh);left:50%;top:50%;background:url('./assets/menu-bary.png') 50% 0 / 300% 100% no-repeat;transform:translate(-48%,-69%)}
.comic-footer{text-align:left;font:700 11px/1.1 'Barlow Condensed',Impact,sans-serif;letter-spacing:.3px;padding:9px 10px}
.start-screen .start-actions{position:static;display:flex;flex-direction:column;align-items:stretch;gap:15px;padding-top:26px}
.start-screen .primary{min-height:51px;font-size:23px;padding:11px 18px}
.start-screen .start-actions small{font-size:10px;color:#555;text-align:left;line-height:1.4}
@media(max-width:520px){body:has(#start:not([hidden])) .quiet{top:calc(env(safe-area-inset-top) + 23px);right:23px;width:27px;height:27px}.start-screen{padding-top:calc(env(safe-area-inset-top) + 22px);padding-bottom:calc(env(safe-area-inset-bottom) + 26px)}}
@media(max-height:650px){.start-screen{padding:17px 18px 19px}.start-brand{font-size:27px;padding-bottom:12px}.start-screen .start-heading{padding:16px 0 13px}.start-screen .start-heading h2{font-size:45px}.start-screen .start-heading p{font-size:10px;margin-bottom:8px}.start-screen .start-actions{padding-top:20px;gap:12px}.comic-caption,.comic-footer{font-size:10px}}

/* Opening a dialog focuses its container, never preselects an action. */
.dialog:focus{outline:none}
.dialog button:focus-visible{outline:2px solid #111;outline-offset:4px}
/* Pink score counters with a crisp black outline. */
.height>span,.coffee-counter>b{color:#ff72b0;-webkit-text-stroke:1px #111;paint-order:stroke fill}
.coffee-counter>b{-webkit-text-stroke:.8px #111;font-weight:800}

/* Game-specific cover art replaces the mystery-package teaser. */
.menu-art>img{position:static;width:100%;height:100%;object-fit:contain;min-height:0}.menu-art{background:#fff9f6}
/* Hard offset score shadows, matching the button treatment. */
.height>span,.coffee-counter>b{text-shadow:3px 3px 0 #111}
/* Dark counters stay legible over the apartment; pink remains the accent. */
.height>span,.coffee-counter>b{color:#111;-webkit-text-stroke:0;text-shadow:3px 3px 0 #ff72b0}
/* White score digits with the existing pink offset shadow. */
.height>span,.coffee-counter>b{color:#fff}
/* White counters with a hard black offset shadow. */
.height>span,.coffee-counter>b{color:#fff;text-shadow:3px 3px 0 #111}

/* Keep each readable hint centered beneath the controls it describes. */
.controls{bottom:12px;align-items:flex-start}
.control-group{display:flex;flex-direction:column;align-items:center;gap:11px}
.control-caption{display:block;width:100%;text-align:center;font:700 13px/1.2 'Barlow Condensed',Impact,sans-serif;letter-spacing:.6px;color:#111;white-space:nowrap;pointer-events:none}
@media(max-width:520px){.controls{bottom:calc(env(safe-area-inset-bottom) + 12px)}}

/* Desktop stays focused on the game, without editorial side panels. */
.chapter,.notes{display:none}
.layout{display:flex;justify-content:center;gap:0}
@media(min-width:821px){.game-shell{width:420px;max-width:100%;height:min(740px,calc(100dvh - 135px));min-height:540px}.layout{margin:20px auto;padding:0 24px}.site-footer{display:none}}
/* Minimal desktop header: one centered brand and a quiet sound toggle. */
@media(min-width:821px){
.site-header{position:relative;border:0;justify-content:center;height:82px}
.site-header .wordmark{margin:0;text-align:center}
.site-header .edition{display:none}
.site-header .quiet{position:absolute;right:32px;top:50%;transform:translateY(-50%)}
.start-brand{display:none}
}
/* Solid score panels keep counters readable over every part of the scenery. */
.height{width:auto;min-width:70px;align-items:center;background:#fffdf9;border:2px solid #111;padding:7px 10px 6px;box-shadow:3px 3px 0 #111}
.height>span{color:#111;-webkit-text-stroke:0;text-shadow:none;font-size:32px;line-height:.8;letter-spacing:0;font-variant-numeric:tabular-nums}
.height small{color:#111;font-size:10px;line-height:1;margin-top:0;letter-spacing:.8px}
.coffee-counter{background:#fffdf9;border:2px solid #111;padding:5px 9px;gap:7px;box-shadow:3px 3px 0 #111}
.coffee-counter>b{color:#111;-webkit-text-stroke:0;text-shadow:none;font:800 20px/1 'Barlow Condensed',Impact,sans-serif;letter-spacing:0;font-variant-numeric:tabular-nums}
.coffee-counter>span{font-size:18px;line-height:1}
.progress-track{top:91px}
.coffee-counter{top:105px}
@media(max-width:520px){.progress-track{top:calc(env(safe-area-inset-top) + 91px)}.coffee-counter{top:calc(env(safe-area-inset-top) + 105px)}}
/* Readable labels and centered start-button guidance. */
.start-screen .start-actions small{font-size:13px;line-height:1.5;text-align:center}
.start-screen .start-heading p{font-size:14px}
.comic-caption,.comic-footer{font-size:13px;line-height:1.2}
.control-caption{font-size:14px}
.height small{font-size:12px}
.level-pill{font-size:14px}
.dialog .label{font-size:14px}
.choice small{font-size:13px;line-height:1.45}
.dialog p{font-size:14px}
@media(max-height:650px){.start-screen .start-actions small{font-size:12px}.comic-caption,.comic-footer{font-size:12px}.start-screen .start-heading p{font-size:13px}}
.start-screen .start-actions small{width:100%;text-align:center}

.choice .icon{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:27px;line-height:1;flex:0 0 34px;text-align:center}

/* A wide stage for mouse-and-keyboard screens; touch keeps its original layout. */
.desktop-gamebar{display:none}
body.desktop-game{min-height:100dvh}
.desktop-game{--game-frame-width:min(1180px,calc(100vw - 48px),calc((100dvh - 156px)*1.324324))}
.desktop-game .site-header{height:72px;width:var(--game-frame-width);max-width:none;padding:0}
.desktop-game .layout{margin:4px auto 22px;padding:0 24px;max-width:1240px}
.desktop-game .game-shell{width:var(--game-frame-width);height:auto;min-height:0;aspect-ratio:980/740;flex:none;max-width:100%;border:2px solid #111}
.desktop-game .controls{display:none}
.desktop-game .desktop-gamebar{position:absolute;display:flex;justify-content:space-between;align-items:center;bottom:16px;left:20px;right:20px;gap:16px;pointer-events:none;font:700 14px 'Barlow Condensed',Impact,sans-serif;text-transform:uppercase;letter-spacing:.5px}
.desktop-gamebar>span,.keyboard-help{padding:9px 12px;background:#fffdf9;border:2px solid #111;box-shadow:3px 3px #111}
.keyboard-help{display:flex;gap:20px;align-items:center}
kbd{font:700 12px 'DM Sans',sans-serif;border:1px solid #111;padding:2px 5px;background:#fff;box-shadow:0 2px #111;margin-right:3px}
.keyboard-dash{position:relative;padding-bottom:5px}.keyboard-dash i{position:absolute;bottom:0;left:0;height:3px;background:#ff72b0;width:100%}
.desktop-game .game-shell:has(#start:not([hidden])) .desktop-gamebar,.desktop-game .game-shell:has(.dialog:not([hidden])) .desktop-gamebar{display:none}
.desktop-game .start-screen{display:grid;grid-template-columns:1.08fr 1fr;grid-template-rows:1fr auto;gap:0 38px;padding:36px;align-items:center;text-align:left}
.desktop-game .start-brand{display:none}
.desktop-game .start-comic{grid-column:1;grid-row:1/3;height:100%;width:100%;min-height:0}
.desktop-game .start-heading{grid-column:2;grid-row:1;align-self:end;padding:0 0 30px}
.desktop-game .start-heading h2{font-size:clamp(48px,6.5vw,90px);line-height:.88;max-width:320px}
.desktop-game .start-heading p{font-size:16px;margin-bottom:22px}
.desktop-game .start-actions{grid-column:2;grid-row:2;align-self:start;padding:0 0 45px;gap:20px}
.desktop-game .start-actions .primary{font-size:28px;min-height:62px}
.desktop-game .start-actions small{font-size:14px}
.desktop-game .dialog{left:50%;right:auto;width:min(500px,80%);transform:translate(-50%,-50%);padding:28px}
.desktop-game .dialog h2{font-size:48px}.desktop-game .choice{padding:14px 16px}.desktop-game .choice strong{font-size:23px}
.desktop-game .hud{top:20px;left:20px;right:20px}.desktop-game .progress-track{left:20px;right:20px;top:97px}.desktop-game .coffee-counter{top:112px;left:20px}
.desktop-game .level-pill{font-size:16px;padding:10px 14px}.desktop-game .round{width:40px;height:40px}
@media(min-width:900px) and (max-height:760px){.desktop-game .start-screen{padding:24px;gap:0 24px}.desktop-game .start-actions{padding-bottom:15px}.desktop-game .start-heading{padding-bottom:20px}.desktop-game .start-heading h2{font-size:58px}.desktop-game .dialog{padding:20px}.desktop-game .dialog h2{font-size:36px}.desktop-game .choice{padding:9px 12px}.desktop-game .comic-footer,.desktop-game .comic-caption{font-size:12px}}

.desktop-game .start-screen{grid-template-rows:1fr 1fr}
.desktop-game .start-actions{padding-bottom:0}

/* Keep the desktop game title together at every stage size. */
.desktop-game .start-heading{container-type:inline-size}
.desktop-game .start-heading h2{max-width:none;white-space:nowrap;font-size:clamp(32px,18cqw,90px)}

/* Thumb controls: steer at the edges, dash in the center. */
body:not(.desktop-game) .controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
body:not(.desktop-game) .control-group{min-width:0;width:100%}
body:not(.desktop-game) .control{width:100%;height:60px}
body:not(.desktop-game) .control-caption{font-size:13px;letter-spacing:.2px}

/* Paint the whole mobile page with the current room, including browser safe areas. */
html.mobile-game{background-color:var(--scene-edge-color,#fffdf9);background-image:var(--scene-edge-image,none);background-size:auto 100lvh;background-position:center;background-repeat:no-repeat}
html.mobile-game body{background:transparent;min-height:100dvh}
html.mobile-game,html.mobile-game *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
html.mobile-game img{-webkit-user-drag:none}
html.mobile-game button,html.mobile-game a{touch-action:manipulation}
html.mobile-game .game-shell,html.mobile-game .control{touch-action:none}
@media(max-width:520px){html.mobile-game .game-shell{height:100dvh}.controls{left:max(19px,env(safe-area-inset-left));right:max(19px,env(safe-area-inset-right))}}

/* Readable end-of-run results, each with a clear number and label. */
.dialog .result-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:22px 0 24px;color:#111;line-height:1.2}
.result-stats>span{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0}
.result-stats>span+span{border-left:2px solid #111}
.result-stats strong{font:800 38px/1 'Barlow Condensed',Impact,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:0}
.result-stats>span>span{font:700 14px/1.2 'Barlow Condensed',Impact,sans-serif;letter-spacing:.4px}
.desktop-game .result-stats strong{font-size:46px}
.desktop-game .result-stats>span>span{font-size:16px}
@media(max-width:350px){.result-stats strong{font-size:32px}.result-stats>span>span{font-size:12px}}

/* Shared scoreboard: large results, optional nickname, no account flow. */
.board-link{border:0;background:none;color:#111;text-decoration:underline;text-underline-offset:4px;font:800 18px 'Barlow Condensed',sans-serif;cursor:pointer;pointer-events:auto;padding:8px}
.start-screen .start-actions{gap:10px}
#leaderboard{width:min(560px,calc(100% - 28px));max-height:85dvh;overflow:auto;border:3px solid #111;background:#fffdf9;color:#111;padding:22px;box-shadow:6px 6px #111}
#leaderboard::backdrop{background:#1119}
.board-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.board-header .label{background:#ff72b0;padding:6px 9px}
.board-close{border:2px solid #111;background:#fffdf9;font-size:26px;width:40px;height:40px;line-height:1}
#leaderboard h2{font:800 clamp(30px,7vw,48px)/1 'Barlow Condensed',Impact,sans-serif;margin:20px 0}
#leaderboard p{font-size:14px;line-height:1.45;min-height:20px;color:#444}
.board-table table{border-collapse:collapse;width:100%;font-size:15px;text-align:left}.board-table th,.board-table td{padding:12px 5px;border-bottom:1px solid #ccc}
.board-table thead th{font:700 13px 'Barlow Condensed',sans-serif;letter-spacing:.4px}.board-table .rank{font-weight:800;color:#a51451}.board-table .player-name{max-width:140px;overflow-wrap:anywhere}.board-table .score-meters{font-weight:800;white-space:nowrap}
.board-table tbody tr:first-child{background:#ffe2ef}.board-retry{margin-top:18px;padding:10px 18px;border:2px solid #111;background:#ff72b0;font:800 18px 'Barlow Condensed',sans-serif;box-shadow:3px 3px #111}
.dialog{max-height:calc(100dvh - 32px);overflow:auto}.score-form{text-align:left;border-top:2px solid #111;padding-top:16px;margin-top:20px}.score-form label{display:block;font:700 14px 'Barlow Condensed',sans-serif;margin-bottom:7px}.score-fields{display:flex;gap:8px}.score-fields input{width:100%;min-width:0;border:2px solid #111;background:#fff;padding:10px;font:16px 'DM Sans',sans-serif;border-radius:0}.score-save{flex:none;background:#ff72b0;border:2px solid #111;padding:8px 12px;font:800 18px 'Barlow Condensed',sans-serif}.score-status{display:block;font-size:12px;line-height:1.4;margin-top:9px}.score-form .board-link{display:block;margin:auto}
html.mobile-game input,html.mobile-game textarea{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;touch-action:manipulation}
@media(max-width:360px){#leaderboard{padding:14px}.board-table table{font-size:13px}.board-table th,.board-table td{padding:10px 3px}.score-save{font-size:16px;padding:8px}}

/* One bold condensed type family across every game popup. */
.dialog,#leaderboard{font-family:'Barlow Condensed',Impact,sans-serif}
.dialog #dialog-copy:not(.result-stats),#leaderboard p{font:700 20px/1.3 'Barlow Condensed',Impact,sans-serif;color:#111;letter-spacing:.1px}
.dialog .choice small{font:700 18px/1.3 'Barlow Condensed',Impact,sans-serif;color:#222;margin-top:5px}
.dialog .choice strong{font-size:23px;line-height:1.1}
.dialog .score-status{font:700 16px/1.3 'Barlow Condensed',Impact,sans-serif;color:#222}
.dialog .score-form label{font-size:16px}
.dialog .score-fields input{font:700 20px/1.2 'Barlow Condensed',Impact,sans-serif}
.dialog .score-fields input::placeholder{color:#555;opacity:1}
#leaderboard .board-table table{font:700 18px/1.2 'Barlow Condensed',Impact,sans-serif}
#leaderboard .board-table thead th{font-size:16px}
#leaderboard .label{font-size:15px}
@media(max-width:350px){.dialog #dialog-copy:not(.result-stats),#leaderboard p{font-size:18px}.dialog .choice small{font-size:17px}#leaderboard .board-table table{font-size:16px}}

.monster-icon{display:inline-block;width:24px;height:36px;object-fit:contain;vertical-align:middle}
.coffee-counter .monster-icon{width:18px;height:27px}
.choice .monster-icon{width:30px;height:45px}
#leaderboard .monster-icon{width:18px;height:27px}
.board-table .rank-medal{display:inline-block;font-size:26px;line-height:1;vertical-align:middle}

/* Clean welcome with an independently animated character and can. */
.start-screen{background:#fffdf9!important;display:flex;flex-direction:column;align-items:stretch;padding:24px 26px 24px;gap:0}
.start-screen .start-brand{border:0;text-align:center;padding:0;font-size:30px}
.start-screen .start-heading{text-align:center;padding:18px 0 0}
.start-screen .start-heading h2{text-align:center;white-space:nowrap;font-size:clamp(48px,14vw,68px);color:#fffdf9;text-shadow:3px 4px 0 #111;-webkit-text-stroke:1px #111;paint-order:stroke fill}
.start-screen .start-heading p{margin-bottom:12px}
.start-screen .start-comic{flex:1;min-height:0;border:0;box-shadow:none;background:transparent;margin:0}
.start-screen .comic-caption,.start-screen .comic-footer{display:none}
.start-screen .menu-art{background:transparent;overflow:visible}
.start-screen .menu-art>img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 7px 0 #1112)}
.start-screen .start-actions{padding-top:8px;gap:7px}
.start-screen .start-actions .board-link{background:#fffdf9;border:2px solid #111;text-decoration:none;box-shadow:3px 3px #111}
.start-screen .start-actions small{margin:6px 0 0;padding:5px;background:#fffdf9ed;color:#111;font:700 15px/1.25 'Barlow Condensed',sans-serif}
.desktop-game .start-screen{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;padding:40px;gap:0 38px}
.desktop-game .start-screen .start-comic{grid-column:1;grid-row:1/3;height:100%}
.desktop-game .start-screen .start-heading{grid-column:2;grid-row:1;align-self:end;padding:0 0 25px}
.desktop-game .start-screen .start-heading h2{font-size:clamp(32px,18cqw,90px)}
.desktop-game .start-screen .start-actions{grid-column:2;grid-row:2;align-self:start;padding:0;gap:12px}
@media(max-width:520px){.start-screen{padding-top:calc(env(safe-area-inset-top) + 24px);padding-bottom:calc(env(safe-area-inset-bottom) + 20px)}}
@media(max-height:650px){.start-screen .start-brand{font-size:24px}.start-screen .start-heading{padding-top:10px}.start-screen .start-heading h2{font-size:46px}.start-screen .start-heading p{margin-bottom:6px}.start-screen .start-actions small{display:block;font-size:13px}.start-screen .start-actions .board-link{padding:5px}}

/* Character animation uses the single game loop. */
#menu-scene{display:block;width:100%;height:100%;position:absolute;inset:0}
#intro-flight{position:absolute;inset:0;width:100%;height:100%;z-index:7;pointer-events:none}
.start-screen .start-heading p{font-size:clamp(12px,3.4vw,17px);line-height:1.15;letter-spacing:.4px}
.start-screen .start-heading h2{font-size:clamp(44px,13vw,68px)}
#menu-best{font:700 15px/1.1 'Barlow Condensed',sans-serif;background:#fffdf9;padding:4px 8px;align-self:center;border:0}
.start-screen.is-starting{pointer-events:none}
.start-screen.is-starting .start-actions{pointer-events:none}
.start-screen.is-starting #menu-scene{visibility:visible}
#play:focus-visible,.board-link:focus-visible{outline:3px solid #111;outline-offset:6px}

.desktop-game .start-screen .start-heading h2{font-size:clamp(32px,18cqw,90px)}
@media(max-height:650px){.start-screen .start-heading{padding-top:7px}.start-screen .start-heading p{font-size:11px;margin-bottom:5px}.start-screen .start-heading h2{font-size:42px}.start-screen .start-actions{gap:5px}.start-screen .start-actions small{font-size:12px}.start-screen .primary{min-height:42px;padding:8px}#menu-best{font-size:12px}}

.start-screen .start-heading h2{color:#111;text-shadow:none;-webkit-text-stroke:0}

/* Size the title against the same column as the full-width buttons. */
.start-screen .start-heading{container-type:inline-size}
.start-screen .start-heading h2,
.desktop-game .start-screen .start-heading h2{font-size:24cqw;line-height:.95;letter-spacing:-.025em;white-space:nowrap}

/* Give the saved score equal breathing room between the button and help text. */
.start-screen .start-actions:has(#menu-best:not([hidden])) #menu-best{margin-top:10px;margin-bottom:10px}
.start-screen .start-actions:has(#menu-best:not([hidden])) small{margin-top:0}

/* Luckiest Guy display-font trial. */
.chapter h1,.chapter-card h2,.start-screen h2,.start-screen .start-heading h2,.dialog h2,#leaderboard h2,.primary,.dialog .secondary,.dash,.score-save,.board-retry,.choice strong,.height>span,.coffee-counter>b,.result-stats strong,.record b{font-family:'Luckiest Guy','Barlow Condensed',Impact,sans-serif;font-weight:400;font-synthesis:none;letter-spacing:0}

.start-screen .start-heading h2,.desktop-game .start-screen .start-heading h2{font-size:19.5cqw;line-height:1.1}

/* Shared optical alignment for Luckiest Guy action labels. */
.primary,.dialog .secondary,.score-save,.board-retry,.dash{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.2;white-space:normal;overflow-wrap:normal;min-width:0;max-width:100%;padding-block:calc(var(--action-pad,12px) + .14em) calc(var(--action-pad,12px) - .14em)}
.start-screen .primary,.start-screen #play{--action-pad:11px;padding-block:calc(var(--action-pad) + .14em) calc(var(--action-pad) - .14em)}
.dialog .secondary{--action-pad:11px}
.score-save{--action-pad:8px;font-size:16px;white-space:nowrap}
.board-retry{--action-pad:10px}
.dash{--action-pad:0px;padding-block:.28em 0}
.dash b{font:inherit;letter-spacing:inherit}
.choice strong{display:block;line-height:1.25;padding-top:.14em}
@media(max-height:650px){.start-screen #play{--action-pad:8px}}

/* Keep related copy close and separate action groups consistently. */
.start-screen .start-heading{padding-top:20px}
.start-screen .start-heading p{margin-bottom:16px}
.start-screen .start-heading h2,.desktop-game .start-screen .start-heading h2{line-height:1}
.start-screen .start-actions{gap:12px;padding-top:12px}
.start-screen .start-actions:has(#menu-best:not([hidden])) #menu-best{margin-block:4px;padding-block:4px;line-height:1.3}
.start-screen .start-actions small,.start-screen .start-actions:has(#menu-best:not([hidden])) small{margin:0;padding:4px 0 0;text-align:center;line-height:1.4}
.desktop-game .start-screen .start-heading{padding-block:0 28px}
.desktop-game .start-screen .start-actions{gap:12px;padding:0}
.dialog,.desktop-game .dialog{padding:24px}
.dialog h2,.desktop-game .dialog h2{line-height:1.1;margin-block:20px 12px;text-wrap:balance}
.dialog #dialog-copy:not(.result-stats){line-height:1.4;margin-block:0 24px}
.dialog #choices{display:flex;flex-direction:column;gap:12px}
.dialog #choices .primary,.dialog #choices .secondary,.dialog #choices .choice{margin:0}
.dialog #choices:has(.secondary){gap:12px;margin-top:24px}
.dialog .choice,.desktop-game .choice{padding:12px 14px;gap:12px}
.dialog .choice strong{line-height:1.08}
.dialog .choice small{line-height:1.4;margin-top:6px}
.dialog .result-stats{margin-block:20px 24px;gap:12px}
.dialog .result-stats>span{gap:8px}
.dialog .score-form{margin-top:24px;padding-top:20px}
.dialog .score-form label{margin-bottom:8px;line-height:1.3}
.score-fields{gap:12px}
.dialog .score-status{margin-top:12px;line-height:1.4}
.score-form .board-link{margin-top:12px}
#leaderboard h2{line-height:1.1;margin-block:8px 6px;text-wrap:balance}
#leaderboard p{line-height:1.5;margin-block:0 12px}
#leaderboard .board-retry{margin-top:16px}
#leaderboard .board-table th,#leaderboard .board-table td{padding-block:10px}
@media(max-height:700px){.start-screen .start-heading{padding-top:12px}.start-screen .start-heading p{margin-bottom:10px}.start-screen .start-actions{gap:8px;padding-top:8px}.start-screen .start-actions:has(#menu-best:not([hidden])) #menu-best{margin-block:0}.dialog,.desktop-game .dialog{padding:20px}.dialog h2,.desktop-game .dialog h2{margin-block:16px 12px}.dialog #dialog-copy:not(.result-stats){margin-bottom:20px}.desktop-game .start-screen .start-heading{padding-bottom:20px}}

/* Bary's world: brand introduction and optional post-round signup. */
.about-link{border:0;background:none;font:700 14px/1.4 'Barlow Condensed',sans-serif;text-decoration:underline;text-underline-offset:4px;padding:8px;touch-action:manipulation}.menu-about{font-size:13px;color:#444}.start-screen .start-actions{gap:8px}
#about-bary{width:min(520px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:3px solid #111;border-radius:0;padding:32px;background:#fffdf9;color:#111;box-shadow:7px 7px #111}#about-bary::backdrop{background:#1119}#about-bary .about-close{position:absolute;right:12px;top:10px;width:40px;height:40px;background:none;border:0;font-size:32px}#about-bary h2{font:400 48px/1.1 'Luckiest Guy',Impact,sans-serif;margin:24px 0 16px}#about-bary>img{float:right;width:120px;height:auto;margin:0 0 12px 12px}#about-bary p{font-size:16px;line-height:1.6}#about-bary>a{display:block;color:#111;font-weight:700;margin-top:16px}#about-bary .label{display:block;padding-right:30px;font-size:11px}
.bary-signup{text-align:left;border-top:2px solid #111;margin-top:24px;padding-top:20px}.bary-signup h3{font:400 24px/1.15 'Luckiest Guy',Impact,sans-serif;margin:0 0 8px}.bary-signup>p{margin:0 0 16px;line-height:1.5}.bary-signup label{display:block;font:700 14px 'Barlow Condensed',sans-serif;margin-bottom:8px}.signup-fields{display:flex;gap:8px}.signup-fields input{min-width:0;width:100%;border:2px solid #111;background:#fff;border-radius:0;padding:11px;font:16px 'DM Sans',sans-serif}.signup-submit{flex:none;border:2px solid #111;background:#ff72b0;padding:12px 14px 9px;font:400 18px/1.2 'Luckiest Guy',Impact,sans-serif;touch-action:manipulation}.bary-signup .signup-privacy{font-size:11px;line-height:1.5;margin:12px 0 0}.bary-signup .signup-message{font-size:13px;font-weight:700;margin:8px 0 0}.signup-trap{position:absolute;left:-9999px;width:1px;height:1px}.signup-confirmed{display:grid;grid-template-columns:72px 1fr;gap:8px 12px;align-items:center;background:#fff0f7;border:2px solid #111;padding:12px}.signup-confirmed img{grid-row:span 2;max-height:90px;object-fit:contain}.signup-confirmed strong{font:400 20px/1.2 'Luckiest Guy',Impact,sans-serif}.signup-confirmed p{margin:0!important}
#bary-welcome{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:24px;border:0;background:#fffdf9;color:#111;overflow:hidden;transition:opacity 220ms cubic-bezier(.23,1,.32,1),transform 220ms cubic-bezier(.23,1,.32,1)}#bary-welcome::backdrop{background:#fffdf9}#skip-welcome{position:absolute;z-index:2;right:24px;top:max(24px,env(safe-area-inset-top));padding:12px;border:2px solid #111;background:#fffdf9;font:700 14px 'Barlow Condensed',sans-serif;touch-action:manipulation}#bary-welcome.leaving{opacity:0;transform:translateY(-12px);pointer-events:none}@keyframes bary-reveal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@keyframes bary-arrive{from{opacity:0;transform:translateY(28px) rotate(-6deg) scale(.95)}to{opacity:1;transform:none}}
@media(max-width:520px){.site-header>.about-link{display:none}.signup-fields{flex-direction:column}.signup-submit{min-height:46px}.menu-about{font-size:12px;padding:4px}.start-screen .start-actions{gap:6px}#about-bary{padding:24px}.dialog{max-height:calc(100dvh - 24px)}}
@media(prefers-reduced-motion:reduce){.welcome-scene>*{animation:none!important}#bary-welcome{transition:opacity 150ms linear}#bary-welcome.leaving{transform:none}}
/* Keep the three header anchors separate, with the brand truly centered. */
@media(min-width:521px){.site-header,.desktop-game .site-header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px}.site-header>.about-link{grid-column:1;grid-row:1;justify-self:start;margin:0;padding:8px 0}.site-header>.wordmark{grid-column:2;grid-row:1;justify-self:center}.site-header>.quiet{position:static;grid-column:3;grid-row:1;justify-self:end;transform:none;width:auto;font-size:12px}}
/* Original Bary poses, alone on paper. Click or Escape skips to the menu. */
#bary-welcome{display:none;align-items:center;justify-content:center;padding:0}#bary-welcome[open]{display:flex}#skip-welcome{position:relative;inset:auto;width:min(320px,70vw);height:auto;aspect-ratio:693/756;padding:0;border:0;background:transparent;transform:none;opacity:0;transition:opacity 200ms cubic-bezier(.23,1,.32,1)}.art-ready #skip-welcome{opacity:1}.intro-pose{position:absolute;inset:0;background:url('./assets/bary-original-poses.png') no-repeat;background-size:300% 100%;pointer-events:none}.pose-one{background-position:0 0;opacity:1}.pose-two{background-position:50% 0;transform:translate(2.38%,-.132%);opacity:0}.pose-three{background-position:100% 0;transform:translate(4.76%,-.264%);opacity:0}@media(prefers-reduced-motion:reduce){.intro-pose{animation:none!important}.pose-one,.pose-two{opacity:0}.pose-three{opacity:1}}
/* The end of a round stays short; newsletter is an optional disclosure. */
.dialog.is-game-over,.desktop-game .dialog.is-game-over{width:min(460px,calc(100% - 28px));padding:20px;max-height:calc(100dvh - 24px)}.dialog.is-game-over .label{font-size:10px;padding:4px 6px}.dialog.is-game-over h2{font-size:32px;margin:16px 0 12px;line-height:1.1}.dialog.is-game-over .result-stats{margin:12px 0 18px;gap:8px}.dialog.is-game-over .result-stats strong{font-size:32px;line-height:1.1}.dialog.is-game-over .result-stats>span{gap:5px}.dialog.is-game-over .result-stats>span>span{font:700 12px/1.3 'Barlow Condensed',sans-serif}.dialog.is-game-over #choices{display:grid;grid-template-columns:1.2fr 1fr;gap:10px;margin:0}.dialog.is-game-over #choices button{min-height:44px;padding:12px 8px 8px;font-size:18px}.dialog.is-game-over .score-form{margin-top:20px;padding-top:16px}.dialog.is-game-over .score-fields input{min-height:44px;padding:8px;font:16px 'DM Sans',sans-serif}.dialog.is-game-over .score-status{margin-top:8px;font:11px/1.4 'DM Sans',sans-serif}.dialog.is-game-over .score-save{font-size:15px;padding:10px 8px 6px}.bary-signup{margin-top:16px;padding-top:14px}.bary-signup summary{cursor:pointer;font:700 15px/1.4 'DM Sans',sans-serif;text-decoration:none;display:flex;align-items:center;justify-content:space-between;gap:16px;list-style:none}.bary-signup[open] summary{margin-bottom:14px}.bary-signup .signup-privacy{font:11px/1.4 'DM Sans',sans-serif}.bary-signup .signup-message{font:600 12px/1.4 'DM Sans',sans-serif}.dialog.is-game-over .signup-fields{flex-direction:row}.dialog.is-game-over .signup-submit{font-size:16px;padding:10px 10px 7px}.dialog.is-game-over .signup-fields input{padding:8px;font-size:16px}.bary-signup summary:focus-visible{outline:3px solid #ff438f;outline-offset:4px}

/* Final interface rhythm: readable supporting copy and quiet secondary actions. */
.dialog,.start-screen,#about-bary,#leaderboard{touch-action:pan-y;user-select:text;overscroll-behavior:contain}
.dialog button,.start-screen button,dialog button{touch-action:manipulation}
.dialog :is(input,button,summary):focus-visible,dialog :is(button,a,input):focus-visible{outline:3px solid var(--ink);outline-offset:4px}
.dialog.is-game-over .label{font-size:12px;letter-spacing:.7px}
.dialog.is-game-over .score-status,.bary-signup .signup-privacy{font:12px/1.5 'DM Sans',sans-serif}
.dialog.is-game-over .score-save{background:var(--paper)}
.dialog.is-game-over .result-stats strong{font-variant-numeric:tabular-nums}
.bary-signup summary{min-height:44px;align-content:center}
.bary-signup .signup-message:empty{display:none}
#about-bary .label{font-size:12px;line-height:1.4}
#about-bary .about-close,.board-close{min-width:44px;min-height:44px;cursor:pointer}
#about-bary h2{font-size:clamp(32px,7vw,44px)}
#leaderboard h2{font-size:clamp(28px,6vw,40px)}
#leaderboard p{font:14px/1.5 'DM Sans',sans-serif}
.menu-about{min-height:40px;font:500 13px/1.5 'DM Sans',sans-serif}
@media(max-width:360px){.dialog.is-game-over,.desktop-game .dialog.is-game-over{padding:16px}.dialog.is-game-over h2{font-size:28px}.dialog.is-game-over #choices button{font-size:16px}.dialog.is-game-over .score-fields,.dialog.is-game-over .signup-fields{gap:8px}.dialog.is-game-over .score-save,.dialog.is-game-over .signup-submit{font-size:14px}#about-bary>img{width:88px}#about-bary{padding:20px}}
@media(forced-colors:active){button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid Highlight!important}}

.dialog.is-game-over{left:50%;right:auto;transform:translate(-50%,-50%)}

.about-link{pointer-events:auto}

/* Header controls share the exact outer edges of the game frame. */
.desktop-game .site-header>.quiet{padding-inline:0}

/* Brand footer follows the same frame alignment as the header and game. */
.site-footer{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;width:min(420px,calc(100% - 48px));max-width:none;margin:0 auto;padding:12px 0 16px;border-top:2px solid var(--ink);color:var(--ink);font:700 12px/1.4 'Barlow Condensed',sans-serif;letter-spacing:.6px}
.site-footer .footer-tagline{font:400 12px/1.5 'DM Sans',sans-serif;letter-spacing:0;text-align:center}
.site-footer a{justify-self:end;color:inherit;text-decoration:none;padding-block:8px}
.site-footer a:hover{text-decoration:underline;text-underline-offset:4px}
.desktop-game .site-footer{width:var(--game-frame-width)}
.desktop-game .layout{margin-bottom:16px}
@media(max-width:899px){.site-footer{grid-template-columns:1fr 1fr}.site-footer .footer-tagline{grid-column:1/-1;grid-row:2}.site-footer a{grid-column:2;grid-row:1}}
@media(max-width:520px){html.mobile-game,html.mobile-game body{height:auto;overflow-y:auto;overflow-x:hidden}.site-footer{width:calc(100% - 40px);padding-bottom:max(16px,env(safe-area-inset-bottom));margin-top:16px}body:has(#start[hidden])>.site-footer{display:none}}
/* The menu entry is only needed when the mobile header entry is hidden. */
@media(min-width:521px){.start-screen .menu-about{display:none}}

/* Show focus rings only after deliberate keyboard navigation, not modal autofocus or taps. */
html:not([data-keyboard-nav]) :focus{outline:none!important}
#skip-welcome{user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}

/* The caption lands with Bary's final gesture. */
#bary-welcome[open]{flex-direction:column;gap:24px}
.intro-caption{margin:0;padding-inline:16px;text-align:center;font:400 clamp(38px,8vw,56px)/1.2 'Luckiest Guy','Barlow Condensed',sans-serif;color:var(--ink);opacity:0;pointer-events:none}
.intro-word{display:inline-block;white-space:pre}
@media(prefers-reduced-motion:reduce){.intro-caption{animation:none!important;opacity:1}}

/* GSAP owns the welcome sequence; CSS provides only its static composition. */
:root{--bary-ease-out:cubic-bezier(.23,1,.32,1)}
#bary-welcome{transition:none;transform:none}
#skip-welcome{transition:none}
.art-ready #skip-welcome{will-change:transform,opacity}
#bary-welcome::backdrop{background:transparent}
#bary-welcome.leaving{transform:none;opacity:0}
#skip-welcome{isolation:isolate;transform-origin:50% 94%}
.intro-shadow{position:absolute;z-index:0;left:0;bottom:1%;width:100%;height:auto;pointer-events:none}
.intro-pose{z-index:1}
.intro-head{position:absolute;inset:0;z-index:2;pointer-events:none;background:var(--paper,#fffdf9);mask-image:linear-gradient(to bottom,black 50%,transparent 50%)}
.intro-head-art{opacity:1}
.intro-pose.pose-three{z-index:3}
.dialog:not([hidden]),#about-bary[open],#leaderboard[open]{animation:bary-screen-fade 180ms var(--bary-ease-out) both}
@keyframes bary-screen-fade{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.intro-pose{animation:none!important}.dialog:not([hidden]),#about-bary[open],#leaderboard[open]{animation:none}}
html[data-keyboard-nav] .dialog,html[data-keyboard-nav] #about-bary,html[data-keyboard-nav] #leaderboard{animation:none}

/* Meet Bary — centered Figma composition, with a reachable close control. */
#about-bary{width:min(510px,calc(100% - 32px));padding:56px 32px 28px}
#about-bary .about-content{display:flex;flex-direction:column;align-items:center;gap:32px;text-align:center}
#about-bary .label{display:block;width:201px;max-width:100%;padding:4px 0;margin:0 0 -12px;background:#fe7eb7;font:700 16px/21px 'Barlow Condensed',sans-serif;letter-spacing:1px}
#about-bary .about-portrait{width:100%;display:flex;flex-direction:column;align-items:center}
#about-bary h2{font:400 clamp(48px,10vw,71.541px)/.9 'Luckiest Guy',Impact,sans-serif;letter-spacing:-.4px;text-transform:uppercase;margin:0;width:100%}
#about-bary .about-portrait img{display:block;width:203.818px;height:auto;max-width:100%;margin:12px 0 0;float:none}
#about-bary .about-copy{width:325.98px;max-width:100%;display:flex;flex-direction:column;gap:24px}
#about-bary .about-copy p{font:400 16px/21px 'DM Sans',sans-serif;margin:0}
#about-bary .about-links{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%}
#about-bary .about-links a{display:flex;align-items:center;min-height:44px;font:700 24px/1.1 'Barlow Condensed',sans-serif;color:#111;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
@media(max-width:520px){#about-bary{padding:52px 20px 20px}#about-bary .about-links{gap:12px}#about-bary .about-links a{font-size:clamp(18px,5.2vw,24px)}}
@media(max-height:700px){#about-bary .about-content{gap:24px}#about-bary .about-copy{gap:16px}#about-bary .about-portrait img{width:170px}}

.bary-signup summary::-webkit-details-marker{display:none}
.bary-signup summary::marker{content:""}
.signup-toggle-icon{position:relative;display:block;flex:0 0 16px;width:16px;height:16px}
.signup-toggle-icon::before,.signup-toggle-icon::after{content:"";position:absolute;background:currentColor;left:1px;right:1px;top:7px;height:2px}
.signup-toggle-icon::after{transform:rotate(90deg)}
.bary-signup[open] .signup-toggle-icon::after{display:none}

/* Optical centering for the high-sitting Luckiest Guy numerals. */
.coffee-counter>b{transform:translateY(.12em)}

.dialog.is-game-over .result-close{position:absolute;right:4px;top:4px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;box-shadow:none;background:transparent;font:400 28px/1 Arial,sans-serif;cursor:pointer}
.dialog.is-game-over #dialog-kicker{max-width:calc(100% - 56px)}

.site-header>.header-instagram{grid-column:3;grid-row:1;justify-self:end;color:var(--ink);font:700 16px/1.2 'Barlow Condensed',sans-serif;text-decoration:none;padding:12px 0}
.hud .round,.desktop-game .hud .round{flex:0 0 44px;width:44px;height:44px;display:grid;place-items:center;padding:0}
.game-sound[aria-pressed="false"] .sound-waves,.game-sound[aria-pressed="true"] .sound-muted{display:none}
@media(max-width:520px){.site-header>.header-instagram{position:absolute;top:calc(env(safe-area-inset-top) + 16px);right:18px;font-size:14px}.site-header:has(~.layout #start[hidden]){display:none}.hud{gap:8px}.level-pill{padding:9px 7px;gap:4px}.level-pill>span{padding-left:3px;letter-spacing:1px}}
@media(max-width:360px){.hud{left:12px;right:12px;gap:6px}.level-pill{font-size:12px;padding:9px 5px}}

/* Mobile menu: brand and social share a single aligned, in-flow row. */
.mobile-instagram{display:none}
@media(max-width:520px){
 .site-header{display:none}
 .start-screen .start-brand{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:start;font-size:clamp(20px,6vw,28px);line-height:1.2;min-height:44px}
 .start-brand>span{white-space:nowrap}
 .start-brand .mobile-instagram{display:flex;align-items:center;justify-content:flex-end;min-height:44px;color:var(--ink);font:700 14px/1.2 'Barlow Condensed',sans-serif;letter-spacing:0;text-decoration:none;pointer-events:auto;white-space:nowrap}
 .start-screen .start-heading{padding-top:20px}
 .start-screen .start-actions{gap:10px}
 .start-screen .menu-about{align-self:center;min-height:44px;padding:10px 16px;color:var(--ink);font:700 18px/1.25 'Barlow Condensed',sans-serif;text-transform:uppercase;letter-spacing:.4px;text-decoration:underline;text-underline-offset:4px}
 .start-screen .start-actions:has(#menu-best:not([hidden])) #menu-best{margin:2px 0 6px}
 .start-screen .start-actions small{line-height:1.4}
}
@media(max-width:520px) and (max-height:700px){.start-screen .start-heading{padding-top:12px}.start-screen .start-actions{gap:6px}}

/* Local poster-style desktop menu: title, artwork, then primary actions. */
.desktop-game .start-screen{
 display:grid;grid-template-columns:minmax(0,480px);grid-template-rows:auto minmax(0,1fr) auto;
 justify-content:center;align-items:stretch;gap:8px;padding:20px 28px;text-align:center;
}
.desktop-game .start-screen .start-heading{grid-column:1;grid-row:1;align-self:auto;padding:0;text-align:center}
.desktop-game .start-screen .start-heading p{margin:0 0 10px;font-size:14px}
.desktop-game .start-screen .start-heading h2{max-width:none;font-size:clamp(42px,7vh,64px);text-align:center}
.desktop-game .start-screen .start-comic{grid-column:1;grid-row:2;width:100%;height:100%;min-height:0}
.desktop-game .start-screen .start-actions{grid-column:1;grid-row:3;align-self:auto;position:static;inset:auto;width:100%;padding:0;gap:8px}
.desktop-game .start-screen #play{min-height:46px;--action-pad:8px;font-size:25px}
.desktop-game .start-screen .board-link{min-height:36px;padding:6px 12px;font-size:18px}
.desktop-game .start-screen .start-actions small{font-size:13px;padding:2px 0 0}
.desktop-game .start-screen .start-actions:has(#menu-best:not([hidden])) #menu-best{margin:0;padding:2px 0;font-size:13px}
@media(min-width:900px) and (max-height:760px){
 .desktop-game .start-screen{padding:14px 24px;gap:6px;grid-template-columns:minmax(0,420px)}
 .desktop-game .start-screen .start-heading p{font-size:12px;margin-bottom:8px}
 .desktop-game .start-screen .start-heading h2{font-size:44px}
}

/* Mobile poster: keep the painted sky close to the heading and controls. */
@media(max-width:520px){
 .start-screen{padding-inline:22px}
 .start-screen .start-heading{padding-top:16px;padding-bottom:0}
 .start-screen .start-heading p{margin-bottom:12px}
 .start-screen .start-actions{padding-top:8px;gap:8px}
 .start-screen .start-comic{margin-block:0}
}

/* Figma menu composition: sky behind the title, cat above the actions. */
.start-screen{isolation:isolate;overflow:hidden}
.start-screen::before{content:"";position:absolute;z-index:-1;pointer-events:none;left:-5.8%;top:-94.8%;width:111.6%;height:155.9%;background:url('./assets/menu-figma-sky.svg') center/100% 100% no-repeat}
.desktop-game .start-screen{padding:28px 28px 22px;gap:8px}
.desktop-game .start-screen .start-heading h2{font-size:clamp(48px,8.9vh,80px)}
.desktop-game .start-screen .start-heading p{transform:none;font-size:16px;margin-bottom:14px}
.desktop-game .start-screen .start-actions small{font-size:16px;line-height:1.3}
.desktop-game .start-screen .start-actions:has(#menu-best:not([hidden])) #menu-best{font-size:18px;line-height:1.3}
.desktop-game .start-screen .board-link{font-size:20px;min-height:40px}
@media(max-width:520px){
 .start-screen::before{top:0;left:0;width:100%;height:62%;background-position:center bottom;background-size:auto 115%}
 .start-screen .start-brand{background:transparent;margin-inline:-22px;padding-inline:22px;width:calc(100% + 44px)}
 .start-screen .start-heading p{transform:none}
 .start-screen .start-actions{gap:8px;padding-top:4px}
 .start-screen .start-actions small{font-size:14px;line-height:1.3}
 .start-screen .start-actions:has(#menu-best:not([hidden])) #menu-best{font-size:16px}
}
@media(min-width:900px) and (max-height:760px){
 .desktop-game .start-screen{padding:18px 24px;gap:6px}
 .desktop-game .start-screen .start-heading h2{font-size:54px}
 .desktop-game .start-screen .start-heading p{font-size:14px;margin-bottom:10px}
}

/* Supplied white title with its original crisp black shadow. */
.start-screen .start-heading h2{display:flex;justify-content:center;line-height:0}
.start-screen .menu-title-art{display:block;width:100%;height:auto;max-width:400px}
.desktop-game .start-screen .menu-title-art{width:83.333%}

/* Keep the white title legible where clouds cross behind its edges. */
.start-screen .menu-title-art{filter:drop-shadow(1.5px 0 0 #111) drop-shadow(-1.5px 0 0 #111) drop-shadow(0 1.5px 0 #111) drop-shadow(0 -1.5px 0 #111)}
@media(max-width:520px){
 .start-screen .start-heading{transform:translateY(2px)}
}

/* Reference-drawn S, optically aligned to the original blackletter capitals. */
.wordmark .brand-label,.brand-label .logo-s{font:inherit;letter-spacing:inherit}
.brand-label .logo-s{position:relative;display:inline-block;width:.64em;color:transparent}
.brand-label .logo-s::after{content:"";position:absolute;inset-inline:0;top:50%;height:.76em;transform:translateY(-50%);background:var(--ink);mask:url('./assets/bary-logo-s.svg') center/100% 100% no-repeat}

/* Match mobile browser edges to the menu sky. */
@media(max-width:520px){
 .start-screen{background:#fffdf9!important}
 .site-footer{display:none}
}

/* A single sky sweep bridges the welcome pose and the loaded menu. */
.intro-sky-wipe{position:absolute;z-index:4;inset:-14% -2% -14%;pointer-events:none;background:#73d8f8;clip-path:polygon(0 8%,8% 6%,16% 7%,25% 3%,34% 5%,43% 2%,54% 4%,65% 1%,76% 3%,88% 0,100% 2%,100% 94%,88% 92%,76% 95%,65% 93%,54% 96%,43% 94%,34% 97%,25% 95%,16% 99%,8% 98%,0 100%)}
.intro-sky-wipe::after{content:"";position:absolute;inset:0;background:url('./assets/menu-figma-sky.svg') center/cover no-repeat;opacity:.24}
#bary-welcome.bridging .intro-sky-wipe{will-change:transform}
#bary-welcome.revealing{will-change:opacity;pointer-events:none}
@media(prefers-reduced-motion:reduce){.intro-sky-wipe{display:none}}

/* Safari samples fixed elements at each viewport edge for toolbar tint. */
.browser-edge{display:none}
@media(max-width:899px){
 html.mobile-game .browser-edge{display:block;position:fixed;left:0;right:0;height:6px;z-index:30;pointer-events:none}
 html.mobile-game .browser-edge-top{top:0;background-color:var(--scene-top-color,#fffdf9)}
 html.mobile-game .browser-edge-bottom{bottom:0;background-color:var(--scene-edge-color,#fffdf9)}
}

/* Match the coming-soon frame on the desktop menu. */
.desktop-game .game-shell:has(#start:not([hidden])){border-width:3px}

/* Keep the supporting about copy centered with balanced line lengths. */
#about-bary .about-copy p:nth-child(n+2){width:290px;max-width:100%;margin-inline:auto;text-wrap:balance}

/* Group the floor-complete heading, explanation and boost choices. */
.dialog.is-upgrade h2,.desktop-game .dialog.is-upgrade h2{margin-block:16px 6px;line-height:1.05}
.dialog.is-upgrade #dialog-copy{margin-block:0 16px;line-height:1.25}
.dialog.is-upgrade #choices{gap:10px}
.dialog.is-upgrade .choice{padding:10px 12px;gap:12px}
.dialog.is-upgrade .choice strong{line-height:1.05}
.dialog.is-upgrade .choice small{margin-top:2px;line-height:1.25}

/* Fit every boost inside the game stage and the visible in-app browser area. */
.dialog.is-upgrade,.desktop-game .dialog.is-upgrade{
 top:min(50%,calc(var(--bary-visible-height,100dvh)/2));
 max-height:min(calc(100% - 32px),calc(var(--bary-visible-height,100dvh) - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
 overflow-y:auto;overflow-x:hidden;
}
.dialog.is-upgrade .choice>span:last-child{min-width:0;flex:1}
@media(max-width:899px){
 .dialog.is-upgrade{left:14px;right:14px;padding:18px}
 .dialog.is-upgrade h2{font-size:clamp(28px,8vw,38px);margin-block:12px 6px}
 .dialog.is-upgrade #dialog-copy{font-size:18px;line-height:1.25;margin-bottom:14px}
 .dialog.is-upgrade #choices{gap:8px}
 .dialog.is-upgrade .choice{min-height:76px;padding:10px;gap:10px}
 .dialog.is-upgrade .choice .icon{flex-basis:28px;font-size:25px}
 .dialog.is-upgrade .choice strong{font-size:clamp(18px,5vw,22px);line-height:1.15}
 .dialog.is-upgrade .choice small{font-size:16px;line-height:1.25;margin-top:4px}
}
@media(max-width:899px) and (max-height:600px){
 .dialog.is-upgrade{padding:12px}
 .dialog.is-upgrade h2{font-size:28px;margin-top:8px}
 .dialog.is-upgrade #dialog-copy{font-size:16px;margin-bottom:10px}
 .dialog.is-upgrade .choice{min-height:64px;padding:8px}
 .dialog.is-upgrade .choice small{font-size:15px}
}
