*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{--ink:#244b3c;--accent:#537756;--paper:#fff9e9;--wash:#e2edcf;--glow:#e6b76a;font-family:ui-rounded,"Avenir Next",system-ui,sans-serif;color:var(--ink);background:#e5d9be}body[data-game="harbor-drift"]{--ink:#153e50;--accent:#216e7a;--paper:#fff8e8;--wash:#d6e9e5;--glow:#ec9d58;background:#8bc6cc}body[data-game="skyforge-sprint"]{--ink:#eee9f5;--accent:#6ce6dc;--paper:#26324c;--wash:#39425d;--glow:#ffc980;background:#b5b6d6}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;font-size:14px;min-height:44px;min-width:44px;border:0;border-radius:15px;padding:11px 16px;font-weight:750;cursor:pointer;color:var(--ink);background:var(--paper);touch-action:manipulation}button:disabled{cursor:default;opacity:.47}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--glow);outline-offset:4px}button:hover:not(:disabled){filter:brightness(1.04)}a{color:inherit;text-decoration:none}header{position:absolute;top:calc(16px + env(safe-area-inset-top));left:24px;right:24px;display:flex;justify-content:space-between;align-items:center;z-index:3}.brand{display:flex;align-items:center;gap:9px}.brand>b{font-size:38px;line-height:1;position:relative;font-weight:950;letter-spacing:-8px;margin-right:8px}.brand>b span{position:absolute;font-size:16px;top:-8px;right:-10px;color:var(--glow)}.brand>span{font-size:11px;font-weight:850;letter-spacing:2px}.brand small{display:block;font-size:9px;margin-top:3px;letter-spacing:1.4px}nav{display:flex;gap:8px}nav button{border:1px solid currentColor;border-radius:50%;width:44px;height:44px;padding:0;background:transparent;font-size:20px;position:relative}#sound[aria-pressed="false"] i{position:absolute;top:8px;left:21px;width:1px;height:27px;background:currentColor;transform:rotate(40deg)}#hud{position:absolute;z-index:2;top:calc(82px + env(safe-area-inset-top));left:26px;right:26px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.chapter small,.eyebrow,.objective small{display:block;font-size:10px;font-weight:850;letter-spacing:1.6px}.chapter strong{display:block;font-size:19px;margin-top:4px}.stats{display:flex;gap:6px}.stats>div{background:var(--paper);border-radius:16px;min-width:76px;padding:10px 14px;text-align:center;box-shadow:0 6px 16px #183e3510}.stats small{font-size:9px;font-weight:700;letter-spacing:1px;display:block;text-transform:uppercase}.stats b{display:block;font-size:19px;margin-top:2px}#stage{position:absolute;inset:76px 0 150px}#world{width:100%;height:100%;display:block;touch-action:none;outline-offset:-4px}#play-ui{position:absolute;z-index:2;bottom:calc(14px + env(safe-area-inset-bottom));left:24px;right:24px;pointer-events:none}#play-ui button,#joystick{pointer-events:auto}.objective{width:min(420px,65%);margin:0 auto 12px;text-align:center}.objective h1{font-size:21px;letter-spacing:-.6px;margin:4px 0}.objective p{margin:0;font-size:12px;line-height:1.5}.progress{height:4px;background:#52695826;border-radius:5px;margin:9px auto 0;max-width:260px;overflow:hidden}.progress>span{display:block;height:100%;background:var(--glow);transform-origin:left;transition:transform .2s}.actions{display:flex;justify-content:center;gap:8px}.actions button{box-shadow:0 4px 12px #173c3020}.actions button.selected{background:var(--accent);color:var(--paper)}[data-game="skyforge-sprint"] .actions button.selected{color:#26324c}.hint{text-align:center;font-size:10px;margin:9px 0 0;letter-spacing:.2px;opacity:.8}#joystick{position:absolute;left:0;bottom:12px;border:1px solid #fff9;border-radius:50%;width:100px;height:100px;touch-action:none;background:#ffffff16}#joystick span{position:absolute;left:29px;top:29px;width:42px;height:42px;border-radius:50%;background:#fff9;border:2px solid #fff}.beds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-width:560px;margin:8px auto 0;gap:5px}.beds button{min-width:0;font-size:11px;min-height:44px;padding:6px 8px;border:1px solid #526b4422}.beds button.ready{background:#ffe3a6}.beds button.dry{border-color:#83bfc4}.beds button small{display:block;font-size:9px;font-weight:500;margin-top:2px}.beds button.empty{background:#ffffff85}[data-game="bloomstead"] #stage{bottom:265px}[data-game="bloomstead"] .objective{margin-bottom:7px;width:90%}[data-game="bloomstead"] .objective h1{font-size:18px}[data-game="bloomstead"] .objective p{font-size:11px}[data-game="bloomstead"] .actions button{padding:9px 11px;font-size:12px}[data-game="harbor-drift"] .objective{margin-left:auto;margin-right:0;max-width:300px;text-align:right}[data-game="harbor-drift"] .actions{justify-content:flex-end}[data-game="harbor-drift"] .progress{margin-right:0}[data-game="harbor-drift"] .hint{text-align:right}[data-game="skyforge-sprint"] #stage{bottom:150px}.actions button[data-action="jump"]{min-width:120px;background:var(--accent);color:#26324c}#toast{position:absolute;z-index:6;top:calc(148px + env(safe-area-inset-top));left:50%;transform:translateX(-50%) translateY(-8px);background:var(--paper);padding:12px 20px;border-radius:24px;font-size:12px;text-align:center;max-width:calc(100% - 36px);opacity:0;pointer-events:none;transition:opacity .15s,transform .15s;box-shadow:0 8px 25px #23423518}#toast.show{opacity:1;transform:translateX(-50%)}#overlay{position:absolute;z-index:5;inset:0;background:#173f3a3b;backdrop-filter:blur(8px);display:grid;place-items:center;padding:20px;overflow:auto}.intro,.dialog{background:var(--paper);border:1px solid #ffffff80;border-radius:28px;box-shadow:0 24px 90px #15282b33;max-width:880px;overflow:hidden}.intro{display:grid;grid-template-columns:1.15fr 1fr}.intro>img{width:100%;height:100%;object-fit:cover;min-height:340px}.intro>div{padding:36px 32px}.intro h2,.dialog h2{font-size:40px;line-height:1.03;letter-spacing:-1.7px;margin:20px 0 14px}.intro p,.dialog>p{line-height:1.65;font-size:14px}.intro .eyebrow{font-size:9px}.intro a,.dialog>a{font-size:12px;display:block;text-align:center;margin-top:18px}.primary{background:var(--accent);color:var(--paper);display:block;width:100%;font-size:15px;padding:15px 22px;margin-top:24px;border-radius:14px}.secondary{background:transparent;display:block;width:100%;margin-top:6px;font-size:12px}.save-note{font-size:10px!important;opacity:.7;text-align:center;margin:14px 0}.dialog{width:min(510px,100%);padding:30px}.dialog h2{font-size:34px;margin-top:12px}.dialog>p{font-size:13px}.dialog .eyebrow{font-size:9px}.results{display:flex;gap:8px;margin:20px 0}.results>div{flex:1;background:var(--wash);border-radius:16px;padding:14px 8px;text-align:center}.results b{display:block;font-size:22px}.results small{display:block;font-size:10px;margin-top:4px}#instructions ol{padding-left:22px;font-size:13px;line-height:1.8}#instructions p{font-size:11px;line-height:1.6}.dialog .primary{margin-top:16px}[data-game="skyforge-sprint"] .primary{color:#24354b}[hidden]{display:none!important}@media(max-width:600px){header{left:16px;right:16px;top:calc(14px + env(safe-area-inset-top))}.brand>span{font-size:9px;letter-spacing:1px}.brand small{font-size:8px;letter-spacing:.7px}nav{gap:6px}#hud{left:16px;right:16px;top:calc(79px + env(safe-area-inset-top));gap:4px}.chapter small{font-size:8px;letter-spacing:1px}.chapter strong{font-size:14px;max-width:120px}.stats>div{min-width:57px;padding:8px 9px;border-radius:13px}.stats small{font-size:8px}.stats b{font-size:17px}#stage{inset:120px 0 170px}#play-ui{left:16px;right:16px}.objective{width:94%}.objective h1{font-size:19px}.objective p{font-size:11px}.intro{display:block;width:min(420px,100%)}.intro>img{height:180px;min-height:0;object-fit:cover}.intro>div{padding:19px 22px}.intro h2{font-size:30px;margin:10px 0}.intro p{font-size:12px}.primary{margin-top:16px}.intro .save-note{margin-bottom:8px}.intro a{margin-top:10px}#overlay{padding:14px}.dialog{padding:24px}.dialog h2{font-size:30px}#toast{top:calc(142px + env(safe-area-inset-top));font-size:11px;padding:10px 16px;width:max-content;max-width:calc(100% - 32px)}[data-game="bloomstead"] #stage{inset:120px 0 260px}[data-game="bloomstead"] #play-ui{left:10px;right:10px}[data-game="bloomstead"] .actions{gap:4px}[data-game="bloomstead"] .actions button{font-size:10px;min-height:44px;padding:8px 7px}[data-game="bloomstead"] .objective{margin-bottom:6px}[data-game="bloomstead"] .objective h1{font-size:16px;margin:2px 0}[data-game="bloomstead"] .objective p{font-size:10px}[data-game="bloomstead"] .progress{margin-top:6px}.beds button{font-size:10px;min-height:44px}.beds{gap:4px;margin-top:5px}.hint{font-size:9px}[data-game="harbor-drift"] .objective{width:calc(100% - 102px)}#joystick{width:90px;height:90px;bottom:25px}#joystick span{left:24px;top:24px}[data-game="skyforge-sprint"] #stage{inset:118px 0 168px}}@media(max-width:360px){.brand>span{display:none}.brand>b{font-size:35px}.stats>div{min-width:55px;padding:7px 8px}.chapter strong{font-size:12px;max-width:92px}.stats{gap:4px}.actions button{padding:11px 13px}}@media(max-height:480px) and (min-width:600px){header{top:12px;left:18px;right:18px}.brand small{display:none}#hud{top:70px;left:18px;right:18px}.stats>div{padding:6px 12px}.stats b{font-size:16px}.chapter strong{font-size:15px}#stage,[data-game="skyforge-sprint"] #stage{inset:72px 0 98px}#play-ui{bottom:8px}.objective{margin-bottom:5px}.objective h1{font-size:15px;margin:2px 0}.objective p{display:none}.objective .progress{margin-top:5px}.hint{margin-top:5px}.intro{max-width:740px;grid-template-columns:1fr 1fr}.intro>img{min-height:270px}.intro>div{padding:18px 24px}.intro h2{font-size:29px;margin:9px 0}.intro p{font-size:11px}.intro a{margin-top:9px}.primary{margin-top:12px}.dialog{padding:18px 24px}.dialog h2{font-size:25px;margin:5px 0}.dialog>p{font-size:11px;margin:7px 0}.results{margin:10px 0}.results>div{padding:8px}.dialog .primary{margin-top:9px}#overlay{padding:10px}#instructions ol{font-size:11px;line-height:1.6;margin:6px 0}#instructions p{margin:6px 0}.dialog>a{margin-top:7px}[data-game="bloomstead"] #stage{inset:80px 350px 20px 0}[data-game="bloomstead"] #play-ui{left:auto;right:16px;width:320px;bottom:12px}[data-game="bloomstead"] .objective p{display:block}[data-game="bloomstead"] .actions{flex-wrap:wrap;gap:4px}[data-game="bloomstead"] .actions button{min-height:44px;padding:7px 8px;font-size:10px}[data-game="bloomstead"] .beds button{min-height:44px}[data-game="bloomstead"] .hint{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
[data-game="skyforge-sprint"] main:before{content:"";position:absolute;inset:0 0 auto;height:175px;background:linear-gradient(#26324c88,transparent);pointer-events:none;z-index:1}

[data-game="skyforge-sprint"] .objective{background:#26324cf0;padding:12px 20px;border:1px solid #ffffff22;border-radius:22px;box-shadow:0 8px 28px #26324c20}[data-game="skyforge-sprint"] .hint{color:#26324c;font-weight:650}[data-game="skyforge-sprint"] #stage{mask-image:linear-gradient(to bottom,#000 80%,transparent)}@media(max-height:480px) and (min-width:600px){[data-game="skyforge-sprint"] .objective{padding:7px 15px;margin-bottom:5px}[data-game="skyforge-sprint"] .objective .progress{display:none}}

@media(max-width:600px){[data-game="harbor-drift"] .actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:calc(100% - 104px);margin-left:auto}[data-game="harbor-drift"] .actions button{font-size:12px;padding:9px 6px}[data-game="harbor-drift"] .actions button[data-action="assist"]{grid-column:1 / -1}}

.bed-title{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-height:480px) and (min-width:600px){[data-game="bloomstead"] .objective p,[data-game="bloomstead"] .objective small{display:none}[data-game="bloomstead"] .objective h1{font-size:14px;line-height:1.25}[data-game="bloomstead"] .objective{width:100%}}

@media(max-height:480px) and (min-width:600px){[data-game="bloomstead"] #toast{left:calc((100% - 350px)/2);max-width:calc(100% - 380px)}}

.intro-links{display:flex;gap:6px;margin-top:6px}.intro-links button{flex:1;width:auto;min-width:0;font-size:11px;padding:9px 6px;margin:0;background:var(--wash)}

.dialog{display:flex;flex-direction:column;max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto}.dialog>*{flex-shrink:0}#instructions{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.intro{max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto}

/* Keep route information readable over the deeper water and detailed coast. */
[data-game="harbor-drift"] .chapter{background:var(--paper);padding:10px 14px;border-radius:16px;box-shadow:0 6px 16px #183e3510;max-width:calc(100% - 190px)}
@media(max-width:600px){[data-game="harbor-drift"] .chapter{padding:8px 9px;border-radius:13px}[data-game="harbor-drift"] .chapter strong{font-size:13px}}
@media(max-height:480px) and (min-width:600px){[data-game="harbor-drift"] .chapter{padding:6px 12px}}
[data-game="harbor-drift"] .objective{background:var(--paper);padding:10px 14px;border-radius:18px;box-shadow:0 6px 16px #183e3510}
@media(max-width:600px){[data-game="harbor-drift"] .objective{padding:8px 10px}[data-game="harbor-drift"] .objective small{font-size:8px;letter-spacing:1px}}
@media(max-height:480px) and (min-width:600px){[data-game="harbor-drift"] .objective{padding:6px 12px}}
