@font-face{font-family:Arcade;src:local("Avenir Next"),local("Avenir"),local("Trebuchet MS");font-display:swap}
:root{color-scheme:light;--page:#f9f3e5;--surface:#fffdf5;--ink:#432e2b;--muted:#786d60;--accent:#ba4c3e;--accent-ink:#fff9eb;--border:#ded7c6;--sky:#b5dada;--hud:#fffaf0;--hud-ink:#493d31;--shadow:#674a3126}
*{box-sizing:border-box}body{margin:0;background:var(--page);color:var(--ink);font-family:Arcade,"Trebuchet MS",Arial,sans-serif;transition:background .45s,color .45s}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:wait;opacity:.6}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--accent);outline-offset:5px}button{touch-action:manipulation}button svg{width:20px;height:20px;flex:none}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.shell{width:min(1180px,calc(100% - 72px));margin:0 auto}.masthead{height:102px;display:flex;justify-content:space-between;align-items:center;gap:24px}.brand{display:flex;align-items:center;gap:13px;font-family:Georgia,"Times New Roman",serif;font-size:24px;font-weight:700;letter-spacing:-.6px}.brand-mark{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:var(--surface);border:1px solid var(--border);border-radius:50%}.brand-mark img{width:41px;height:36px;object-fit:contain;transform:rotate(-9deg)}.brand-small{display:block;margin-top:4px;font-family:Arcade,"Trebuchet MS",sans-serif;font-size:12px;letter-spacing:.5px;font-weight:400;color:var(--muted)}.header-actions{display:flex;align-items:center;gap:24px}.edition{font-size:12px;letter-spacing:2px;font-weight:700}.icon-button{width:44px;height:44px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--border);border-radius:50%;transition:transform .15s,background .2s}.icon-button:hover{transform:translateY(-2px)}.icon-button svg{width:21px;height:21px}
.game-stage{position:relative;width:100%;height:clamp(460px,57vw,600px);max-height:calc(100svh - 122px);min-height:430px;overflow:hidden;border:1px solid var(--border);border-radius:24px;background:var(--sky);isolation:isolate;box-shadow:0 15px 45px -25px var(--shadow)}canvas{position:absolute;inset:0;width:100%;height:100%;outline:none;touch-action:none}.scene-wash{position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,#fff9e3a1 0%,#fff9e339 39%,transparent 63%);opacity:1;transition:opacity .3s}.game-stage[data-mode="running"] .scene-wash,.game-stage[data-mode="paused"] .scene-wash,.game-stage[data-mode="over"] .scene-wash{opacity:0}.stage-hud{position:absolute;top:25px;left:28px;right:28px;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;pointer-events:none;gap:16px}.world-tag,.best-tag{display:flex;align-items:center;gap:10px;min-height:36px;padding:0 12px;background:var(--hud);color:var(--hud-ink);border-radius:7px;box-shadow:0 2px 10px #19211f05;font-size:12px;letter-spacing:1.1px;font-weight:700}.world-number{border-right:1px solid #66564938;padding-right:10px;opacity:.7}.hud-right{display:flex;align-items:center;gap:10px}.best-tag{gap:8px}.best-tag svg{width:19px;height:19px}.best-tag strong{font-size:16px;font-variant-numeric:tabular-nums;letter-spacing:0}.pause-button{pointer-events:auto;width:36px;height:36px;background:var(--hud);color:var(--hud-ink);border:0;border-radius:7px}.flight-score{position:absolute;left:50%;top:11px;transform:translateX(-50%);text-align:center;color:#fffef6;filter:drop-shadow(0 2px 1px #263d4788)}.flight-score>span:first-child{display:block;font-size:58px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums}.score-label{font-size:12px;font-weight:700;letter-spacing:2px}.start-panel{position:absolute;left:6%;top:50%;transform:translateY(-47%);z-index:4;width:340px;max-width:44%;color:var(--hud-ink)}.eyebrow{font-size:12px;font-weight:800;letter-spacing:2px;color:var(--accent)}h1{font-family:Georgia,"Times New Roman",serif;font-size:76px;line-height:.97;font-weight:700;letter-spacing:-4px;margin:16px 0 21px}h1 em{font-weight:400}p{font-size:16px;line-height:1.6}.start-panel p{margin:0 0 26px}.primary-button{display:flex;align-items:center;justify-content:space-between;gap:34px;min-height:53px;padding:14px 23px;border:1px solid transparent;border-radius:10px;background:var(--accent);color:var(--accent-ink);font-weight:700;font-size:16px;box-shadow:0 4px 0 #00000017;transition:transform .15s,filter .15s}.primary-button:hover{filter:brightness(1.08);transform:translateY(-2px)}.primary-button:active{transform:translateY(2px);box-shadow:0 1px 0 #00000017}.start-hint{font-size:13px;display:block;margin-top:19px;opacity:.8}kbd{font-family:inherit;font-size:12px;display:inline-block;padding:3px 7px;border:1px solid currentColor;border-radius:4px;line-height:1.1;white-space:nowrap}.stage-bottom{position:absolute;bottom:19px;left:28px;right:28px;display:flex;justify-content:space-between;color:#fffcf0e6;text-shadow:0 1px 5px #121b2a77;font-size:12px;font-weight:700;letter-spacing:1.7px;pointer-events:none;z-index:3}.flight-instruction{position:absolute;left:50%;bottom:66px;transform:translateX(-50%);font-size:14px;font-weight:700;white-space:nowrap;background:var(--hud);color:var(--hud-ink);border-radius:99px;padding:10px 18px;pointer-events:none;z-index:3}.loading-note{position:absolute;inset:auto 0 20px;text-align:center;color:var(--hud-ink);font-size:14px;z-index:7}.game-stage[data-loading="true"] .stage-bottom{visibility:hidden}.asset-error{position:absolute;inset:0;z-index:9;background:var(--surface);display:flex;flex-direction:column;gap:16px;align-items:center;justify-content:center;padding:32px;text-align:center}
.modal-layer{position:absolute;inset:0;display:grid;place-items:center;z-index:8;padding:20px;background:#0f142751;backdrop-filter:blur(5px)}.result-panel{width:min(350px,100%);text-align:center;background:var(--surface);color:var(--ink);padding:30px;border:1px solid var(--border);border-radius:20px;box-shadow:0 22px 60px #15192430;animation:arrive .25s ease-out}.result-panel h2{font-family:Georgia,"Times New Roman",serif;font-size:33px;letter-spacing:-1.5px;line-height:1.1;margin:14px 0 12px}.result-panel p{color:var(--muted);font-size:14px;line-height:1.6;margin:0 0 24px}.result-scores{display:grid;grid-template-columns:1fr 1fr;padding:17px 0 21px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin-bottom:24px}.result-scores>div+div{border-left:1px solid var(--border)}.result-scores span{font-size:12px;letter-spacing:1.2px;font-weight:700;color:var(--muted)}.result-scores strong{display:block;font-size:38px;line-height:1.3;font-variant-numeric:tabular-nums}.result-panel .primary-button{width:100%;justify-content:center;gap:18px}.text-button{background:transparent;border:0;font-size:14px;text-decoration:underline;text-underline-offset:4px;padding:16px 9px 9px;color:var(--muted)}.restart-hint{display:block;font-size:12px;color:var(--muted);margin-top:7px}.pause-panel{padding-top:39px;padding-bottom:27px}
.worlds{margin-top:30px}.worlds-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:14px}.worlds h2{font-family:Georgia,"Times New Roman",serif;font-size:21px;letter-spacing:-.5px;margin:0}.worlds-heading>span{font-size:13px;color:var(--muted)}.world-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.world-card{position:relative;display:flex;align-items:center;text-align:left;gap:17px;min-height:97px;padding:17px 20px;border-radius:13px;border:1px solid var(--border);background:var(--surface);transition:transform .16s,border .2s,box-shadow .2s}.world-card:hover{transform:translateY(-3px)}.world-card[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.world-card:disabled{cursor:default;opacity:.7}.world-thumb{position:relative;display:flex;align-items:center;justify-content:center;flex:none;width:68px;height:62px;overflow:hidden;border-radius:8px;background-position:center;background-size:cover}.world-thumb img{height:54px;width:58px;object-fit:contain;filter:drop-shadow(0 3px 2px #1c1d2344);transform:rotate(-7deg)}.world-card-copy{display:block;min-width:0}.world-card-title{display:block;font-size:17px;font-weight:700;letter-spacing:-.3px;margin-bottom:5px}.world-card-detail{display:block;font-size:13px;color:var(--muted)}.world-card-state{margin-left:auto;border:1px solid var(--border);border-radius:50%;width:24px;height:24px;flex:none;display:grid;place-items:center}.world-card-state svg{width:14px;height:14px;visibility:hidden}.world-card[aria-pressed="true"] .world-card-state{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.world-card[aria-pressed="true"] .world-card-state svg{visibility:visible}footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:22px 0 27px;font-size:12px;color:var(--muted)}footer kbd{font-size:12px}.footer-dot{margin:0 9px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.noscript{background:#fff0e8;padding:20px;color:#631a13}.game-stage[data-mode="running"] .stage-bottom{opacity:.65}body[data-theme="emberwing"] .scene-wash{background:linear-gradient(90deg,#15192ec7,#15192e42 46%,transparent 70%)}body[data-theme="emberwing"] .start-panel{color:#fff6e8}body[data-theme="emberwing"] h1{font-size:67px;letter-spacing:-3px}body[data-theme="emberwing"] .start-hint{color:#e6dbf5}
@keyframes arrive{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(min-width:1500px){.masthead{height:116px}.game-stage{height:620px;max-height:none}}
@media(max-width:760px){.shell{width:calc(100% - 32px)}.masthead{height:85px}.brand{font-size:21px}.brand-mark{width:42px;height:42px}.brand-mark img{width:35px;height:31px}.brand-small{font-size:12px}.edition{display:none}.game-stage{border-radius:19px;height:580px;min-height:430px;max-height:calc(100svh - 104px)}.stage-hud{top:18px;left:18px;right:18px;gap:8px}.world-tag,.best-tag{font-size:12px;letter-spacing:.6px;padding:0 10px}.world-number{padding-right:8px}.stage-bottom{left:18px;right:18px;font-size:12px;letter-spacing:1px}.stage-bottom span:last-child{display:none}.start-panel{left:8%;top:45%;max-width:72%;width:300px}h1{font-size:66px;letter-spacing:-3px;margin:14px 0 19px}.start-panel p{font-size:15px;margin-bottom:22px}.start-hint{font-size:12px;margin-top:16px}.worlds{margin-top:24px}.worlds-heading{margin-bottom:13px}.worlds h2{font-size:20px}.worlds-heading>span{display:none}.world-grid{gap:11px}.world-card{display:grid;grid-template-columns:1fr auto;gap:10px;padding:13px;min-height:154px;align-content:start}.world-thumb{grid-column:1/3;width:100%;height:66px;background-position:center 70%}.world-thumb img{width:65px;height:61px}.world-card-title{font-size:15px;margin-bottom:4px}.world-card-detail{font-size:12px;line-height:1.4}.world-card-state{width:19px;height:19px;align-self:center}.world-card-state svg{width:12px;height:12px}footer{margin-top:20px;font-size:12px;flex-wrap:wrap;gap:12px}footer>span:last-child{font-size:12px}.flight-score{top:47px}.flight-score>span:first-child{font-size:51px}.flight-instruction{bottom:48px;font-size:12px}body[data-theme="emberwing"] h1{font-size:57px}.scene-wash{background:linear-gradient(90deg,#fff9e3a6,#fff9e357 67%,transparent)}body[data-theme="emberwing"] .scene-wash{background:linear-gradient(90deg,#15192ed1,#15192e88 70%,#15192e33)}}
@media(max-width:380px){.shell{width:calc(100% - 20px)}.brand{font-size:19px}.brand-small{font-size:12px}.masthead{height:78px}.game-stage{min-height:430px}.stage-hud{left:14px;right:14px}.world-tag{font-size:12px;gap:6px}.hud-right{gap:6px}.best-tag{font-size:12px;gap:5px}.best-tag svg{width:15px}h1{font-size:59px}.start-panel{top:47%;max-width:78%}.start-panel p{font-size:14px}.world-card{padding:10px}.world-card-detail{font-size:12px}body[data-theme="emberwing"] h1{font-size:51px}}
@media(max-height:560px) and (min-width:761px){.masthead{height:72px}.game-stage{min-height:330px;height:calc(100svh - 90px);max-height:none}.start-panel{top:52%;max-width:55%}h1{font-size:48px;line-height:.93;margin:9px 0 10px}.start-panel p{font-size:14px;margin-bottom:12px}.start-hint{margin-top:11px}.primary-button{min-height:44px;padding:10px 19px}.stage-hud{top:16px}.stage-bottom{bottom:13px}body[data-theme="emberwing"] h1{font-size:45px}.eyebrow{font-size:12px}.result-panel{padding:17px 24px}.result-panel h2{font-size:28px;margin:10px 0}.result-panel p{margin-bottom:13px}.result-scores{padding:9px 0;margin-bottom:14px}.result-scores strong{font-size:28px}.restart-hint{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

.world-tag{min-width:0}#world-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hud-right{flex-shrink:0}
/* Home and immersive play are separate screens. Safe areas belong to chrome. */
body[data-screen="game"]{overflow:hidden;overscroll-behavior:none}
.home-screen{min-height:100svh;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
.home-screen .worlds{max-width:920px;margin:7vh auto 0}.home-screen .worlds-heading{display:block;margin-bottom:28px}.home-screen .worlds-heading h2{font-size:clamp(30px,5vw,46px);letter-spacing:-1.7px;margin-bottom:12px}.home-screen .worlds-heading>span{display:block;font-size:16px}.home-screen .world-card{display:grid;grid-template-columns:1fr auto;gap:16px;padding:18px;align-content:start}.home-screen .world-thumb{grid-column:1/3;width:100%;height:220px}.home-screen .world-thumb img{width:160px;height:160px}.home-screen .world-card-title{font-size:23px}.home-screen .world-card-detail{font-size:14px;line-height:1.5}.home-screen .world-card-state{width:28px;height:28px}.home-hint{max-width:920px;margin:22px auto;color:var(--muted);font-size:14px}.home-screen footer{max-width:920px;margin:40px auto 24px}
.game-screen{position:fixed;inset:0;display:flex;flex-direction:column;width:100%;height:100dvh;background:var(--page);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px);overflow:hidden}
.game-topbar{flex:none;background:var(--page);border-bottom:1px solid var(--border);padding:calc(env(safe-area-inset-top,0px) + 10px) 18px 10px;position:relative;z-index:10;min-height:64px}
.game-topbar .stage-hud{position:static;display:flex;align-items:center;gap:12px;min-height:38px;pointer-events:auto}
.game-topbar .world-tag{flex:1;background:none;box-shadow:none;padding-left:0;color:var(--ink)}
.game-topbar .flight-score{position:static;transform:none;filter:none;color:var(--ink);display:flex;align-items:center;gap:7px;margin-right:auto}
.game-topbar .flight-score>span:first-child{font-size:28px}.game-topbar .score-label{font-size:12px;letter-spacing:.5px}.game-topbar .best-tag{background:var(--surface);color:var(--ink);box-shadow:none}
.game-screen .game-stage{flex:1 1 0%;height:auto!important;min-height:0!important;max-height:none!important;width:100%;border:0;border-radius:0;box-shadow:none}
.game-controls{flex:none;display:grid;grid-template-columns:58px 48px minmax(100px,300px) 48px;justify-content:center;align-items:center;gap:14px;background:var(--page);border-top:1px solid var(--border);padding:12px 18px calc(12px + env(safe-area-inset-bottom,0px));min-height:82px;position:relative;z-index:10}
.control-button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;border:0;background:none;min-height:48px;font-size:12px;color:var(--ink)}.control-button svg{width:23px;height:23px}.game-controls .icon-button{width:46px;height:46px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--ink)}.game-controls .pause-button{grid-column:4}.flap-button{justify-content:center;min-height:50px;touch-action:none}
.game-screen .modal-layer{overflow:auto}.game-screen .result-panel{margin:auto}.game-screen .stage-bottom{display:none}.game-screen .flight-instruction{bottom:20px}
@media(max-width:760px){.home-screen .worlds{margin-top:28px}.home-screen .world-grid{grid-template-columns:1fr;gap:20px}.home-screen .world-thumb{height:170px}.home-screen .world-thumb img{height:135px;width:135px}.home-screen .world-card-title{font-size:21px}.home-screen .world-card-detail{font-size:14px}.home-screen .world-card{padding:14px;min-height:0}.home-screen .worlds-heading>span{font-size:15px}.game-controls{grid-template-columns:46px 44px minmax(90px,1fr) 44px;gap:10px;padding-left:12px;padding-right:12px}.game-controls .icon-button{width:44px;height:44px}.game-topbar{padding-left:14px;padding-right:14px}.game-topbar .world-number{display:none}.game-topbar .world-tag{font-size:12px}.game-topbar .flight-score{gap:4px}.game-topbar .score-label{display:none}.game-screen .start-panel{top:46%}.game-screen .start-panel h1{font-size:clamp(44px,13vw,66px)}body[data-theme="emberwing"] .game-screen h1{font-size:clamp(44px,12vw,60px)}}
@media(max-height:500px){.game-topbar{padding-top:calc(env(safe-area-inset-top,0px) + 4px);padding-bottom:4px;min-height:46px}.game-controls{padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom,0px));min-height:60px}.game-screen .start-panel{top:50%;width:70%;max-width:70%;display:grid;grid-template-columns:1fr auto;column-gap:20px;align-items:center}.game-screen .start-panel .eyebrow{grid-column:1/3}.game-screen .start-panel h1{font-size:36px!important;margin:8px 0;grid-column:1}.game-screen .start-panel p,.game-screen .start-hint{display:none}.game-screen .start-panel .primary-button{grid-column:2;grid-row:2}.game-screen .result-panel{padding:16px 24px}.game-screen .result-panel h2{font-size:25px;margin:8px 0}.game-screen .result-panel p{margin-bottom:10px}.game-screen .result-scores{padding:8px 0;margin-bottom:10px}.game-screen .result-scores strong{font-size:25px}.game-screen .restart-hint{display:none}}

.flight-share{border-top:1px solid var(--border);padding-top:12px;margin-top:14px}.flight-share img{display:block;width:112px;max-width:100%;height:auto;margin:0 auto 8px;border-radius:8px}.flight-share img[hidden]{display:none}.flight-share a{display:inline-block}.flight-share p,#record-note{font-size:12px;line-height:1.45;margin:6px 0!important}#record-note{color:var(--accent);font-weight:bold}.record-celebration{animation:record-arrival .8s ease-out}.record-celebration #result-title{color:var(--accent)}@keyframes record-arrival{0%{transform:scale(.94);box-shadow:0 0 0 0 var(--accent)}60%{transform:scale(1.015);box-shadow:0 0 0 12px transparent}100%{transform:scale(1)}}@media(prefers-reduced-motion:reduce){.record-celebration{animation:none}}
/* Desktop arcade: three equal columns fill the available play area. */
.arcade-deck{display:flex;flex:1 1 0%;min-height:0;position:relative}.arcade-panel{display:none}
@media(min-width:1000px){
 .arcade-deck{container-type:size;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);align-items:stretch;gap:20px;padding:20px 24px}
 .game-screen .game-stage{width:100%;height:100%!important;min-width:0;justify-self:stretch;flex:none;border:1px solid var(--border);border-radius:18px;box-shadow:0 10px 35px var(--shadow)}
 .arcade-panel{display:block;align-self:stretch;height:100%;min-height:0;min-width:0;max-height:100%;overflow:auto;padding:clamp(20px,2vw,36px);background:var(--surface);border:1px solid var(--border);border-radius:18px}
 .arcade-panel h2{font:700 30px Georgia,serif;letter-spacing:-1px;margin:10px 0 18px}.arcade-panel h3{font:700 19px Georgia,serif;margin:12px 0 8px}.arcade-panel p{font-size:14px;line-height:1.5}.arcade-panel .eyebrow{font-size:12px;letter-spacing:1.4px}.arcade-panel a{font-size:14px;text-decoration:underline;text-underline-offset:4px}.panel-note{color:var(--muted);font-size:14px}
 #log-portrait{display:block;width:100px;height:100px;object-fit:contain;margin:0 auto}#log-world{text-align:center;font-weight:700}.log-stats{margin:20px 0 0}.log-stats div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}.log-stats dt{font-size:14px}.log-stats dd{margin:0;font-size:24px;font-weight:bold;font-variant-numeric:tabular-nums}.next-badge{padding:20px 0}.next-badge progress{width:100%;accent-color:var(--accent);height:10px}.board-entries{list-style:none;padding:0;margin:20px 0}.board-entries li{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;padding:15px 0;border-bottom:1px solid var(--border);font-size:14px}.board-entries li span:nth-child(2){overflow-wrap:anywhere}.board-entries li span:first-child{color:var(--muted)}.board-entries .is-you{color:var(--accent);font-weight:bold}.my-ranking{padding:14px 0;border-top:1px solid var(--border)}
 .game-screen .start-panel{left:8%;width:84%;max-width:84%;top:43%}.game-screen .start-panel h1,body[data-theme="emberwing"] .game-screen h1{font-size:clamp(36px,7cqh,60px);letter-spacing:-2px}.game-screen .start-panel p{font-size:15px}.game-screen .start-hint{font-size:13px}.game-screen .scene-wash{background:linear-gradient(90deg,#fff9e3b0,#fff9e355)}
}
