#adventure-home{border:1px solid #83d5ff55;border-radius:10px;padding:10px 14px;background:#142d40;color:#d5eeff;font-size:14px;font-weight:700;cursor:pointer}
#game-shell .home-panel .home-stage-actions:has(#adventure-home){grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:auto auto auto!important}
#game-shell .home-stage-actions #adventure-home{grid-column:3!important;grid-row:1!important;min-height:44px;padding-inline:5px;font-size:12px;pointer-events:auto}
#game-shell .home-stage-actions:has(#adventure-home) #storefront-button{grid-column:1!important;grid-row:1!important}
#game-shell .home-stage-actions:has(#adventure-home) #titles-button{grid-column:2!important;grid-row:1!important}
#game-shell .home-stage-actions:has(#adventure-home) #stage-select-open{grid-column:1/-1!important;grid-row:2!important}
#game-shell .home-stage-actions:has(#adventure-home) #play-button{grid-column:1/-1!important;grid-row:3!important}
#adventure-journal{box-sizing:border-box;width:min(780px,calc(100vw - 24px));max-height:88dvh;margin:auto;padding:20px;background:#101e2d;color:#edf4fc;border:1px solid #4d647c;border-radius:18px;font:16px/1.5 var(--ui-font,'Segoe UI',sans-serif);overflow:auto;overscroll-behavior:contain;box-shadow:0 24px 80px #0009}
#adventure-journal::backdrop{background:#030b17c9}
#adventure-journal *{box-sizing:border-box}
#adventure-journal header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
#adventure-journal h2{margin:2px 0 14px;font-size:24px;color:#eff7ff}
#adventure-journal h3{font-size:18px;margin:4px 0;color:#e1f2ff;text-transform:capitalize}
#adventure-journal small,#adventure-journal footer{font-size:13px;color:#a9bed0}
#adventure-journal button,#adventure-journal select{font:inherit;font-size:14px;min-height:44px;padding:8px 12px;border:1px solid #55718c;border-radius:9px;color:#edf4fc;background:#20364b;cursor:pointer}
#adventure-journal button:disabled{opacity:.55;cursor:default}
#adventure-journal button:focus-visible,#adventure-journal select:focus-visible,#adventure-controls button:focus-visible,#adventure-hud button:focus-visible{outline:3px solid #91dcff;outline-offset:3px}
#adventure-journal nav{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
#adventure-journal nav button[aria-pressed=true]{color:#10263b;background:#9cdbff;border-color:#b7e6ff}
#adventure-journal .adventure-world{display:flex;flex-wrap:wrap;align-items:center;gap:12px;justify-content:space-between;border-block:1px solid #ffffff20;padding:12px 0;color:#b6ccdf;font-size:14px}
#adventure-journal .adventure-world select{max-width:100%}
#adventure-journal .adventure-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:12px;margin:14px 0}
#adventure-journal article{background:#17293b;border:1px solid #ffffff1f;border-radius:12px;padding:16px}
#adventure-journal p{margin:8px 0 12px;color:#c3d4e3}
#adventure-journal article strong{color:#90e6bd}
#adventure-journal .quest-group{margin-top:24px;padding-top:16px;border-top:1px solid #ffffff24}
#adventure-journal .quest-group>h3{font-size:19px;text-transform:none}
#adventure-journal .quest-group>h3 span{display:inline-block;margin-left:7px;padding:1px 8px;border-radius:12px;background:#2a4258;color:#d5e8f6;font-size:13px}
#adventure-journal .quest-group-done article{background:#142638;border-color:#719d8540}
#adventure-journal .quest-empty{font-size:14px;color:#a9bed0}
#adventure-journal .quest-reward{color:#ffd794;font-weight:600}
#adventure-journal .quest-milestones{list-style:none;padding:0;margin:12px 0 0;color:#ffd794;font-size:14px;line-height:1.8}
#adventure-journal footer{margin-top:18px;border-top:1px solid #ffffff20;padding-top:12px}
#adventure-hud{position:absolute;z-index:12;top:175px;left:14px;max-width:min(330px,calc(100% - 82px));padding:9px 12px;border:1px solid #ffffff29;border-radius:12px;background:#0b192bdb;color:#eef6ff;pointer-events:none;line-height:1.4}
#adventure-hud strong,#adventure-hud span,#adventure-hud small{display:block}
#adventure-hud strong{font-size:14px;padding-right:68px}
#adventure-hud span{font-size:13px;color:#badef1;margin:3px 0}
#adventure-hud small{font-size:12px;color:#9fb8cb}
#adventure-hud progress{display:block;width:100%;height:5px;border:0;accent-color:#83dbb1;margin:6px 0}
#adventure-hud button{position:absolute;right:6px;top:6px;min-height:38px;border:1px solid #739bbb60;background:#244057;border-radius:8px;padding:6px 8px;color:#ddf0ff;font-size:12px;pointer-events:auto;cursor:pointer}
#adventure-controls{position:absolute;top:50%;bottom:auto;transform:translateY(-50%);right:16px;z-index:18;display:flex;flex-direction:column;align-items:flex-end;gap:8px;pointer-events:none}
#adventure-controls button{min-height:48px;max-width:180px;padding:10px 15px;border:1px solid #9bd6ff80;background:#16324aee;color:#e9f5ff;border-radius:12px;font-size:15px;font-weight:650;pointer-events:auto;touch-action:manipulation;cursor:pointer}
#adventure-controls button small{display:block;font-size:12px;font-weight:400;color:#c3def0}
#adventure-controls button:disabled{background:#152537dc;border-color:#627588;color:#9bb0c0;cursor:default}
#adventure-controls [data-fly][aria-pressed=true]{background:#21566e;border-color:#91e6ff;color:#effcff;box-shadow:0 0 18px #83d5ff25}
#adventure-controls [data-stop]{font-size:13px;min-height:40px;border-color:#ffcd8660;background:#3a3025ed}
#adventure-hud[hidden],#adventure-controls[hidden],#adventure-controls button[hidden]{display:none!important}
@media(max-width:480px){#adventure-journal{padding:14px}#adventure-journal h2{font-size:21px}#adventure-hud{top:166px;left:10px;padding:8px;max-width:calc(100% - 82px)}#adventure-controls{right:12px}}
@media(max-height:500px){#adventure-hud{top:145px;max-width:270px}#adventure-hud small{display:none}#adventure-controls{right:16px}#adventure-journal{max-height:95dvh}}
#flight-store-offer{margin:16px 0;padding:18px;border:1px solid #7bbde15c;border-radius:14px;background:#142d40;color:#e4f4ff}
#flight-store-offer h3{margin:0 0 8px;font-size:20px}#flight-store-offer p{font-size:14px;line-height:1.5}
#flight-store-offer button{min-height:44px;margin:4px;padding:10px 14px;border:1px solid #82bbd9;border-radius:9px;background:#214b63;color:#edf8ff;font:inherit}
#flight-store-offer button:disabled{opacity:.55}
#game-modes{box-sizing:border-box;width:min(860px,calc(100vw - 24px));max-height:94dvh;overflow:auto;padding:20px;border:1px solid #536e89;border-radius:18px;background:#101e2d;color:#edf4fc;font:16px/1.5 var(--ui-font,'Segoe UI',sans-serif)}
#game-modes::backdrop{background:#020914d9}
#game-modes header{display:flex;align-items:center;justify-content:space-between;gap:16px}
#game-modes h2{font-size:26px;margin:4px 0 16px}
#game-modes article{background:#1a2d43;border:1px solid #405973;border-radius:12px;padding:16px;margin:14px 0}
#game-modes button,#game-modes input{box-sizing:border-box;min-height:44px;max-width:100%;padding:10px 14px;border:1px solid #6585a2;border-radius:8px;background:#233e59;color:#fff;font:inherit}
#game-modes label{display:block;margin:16px 0 8px}#game-modes input{display:block;width:100%;margin-top:8px;text-transform:uppercase}
#game-modes canvas{width:100%;height:auto;display:block;border:1px solid #526e89;border-radius:10px}
#game-modes .duel-controls{display:flex;gap:12px;margin-top:12px}#game-modes .duel-controls button{flex:1;touch-action:none}
#game-modes [hidden]{display:none!important}#game-modes [data-room-code]{letter-spacing:.1em;overflow-wrap:anywhere}
#game-modes :focus-visible{outline:3px solid #87ddff;outline-offset:3px}
#game-shell .home-panel .home-stage-actions:has(#home-activities){display:flex!important;flex-direction:column;gap:10px!important;bottom:max(16px,env(safe-area-inset-bottom))!important;max-height:calc(100dvh - 245px);overflow-y:auto;overscroll-behavior:contain;padding:4px!important;scrollbar-width:thin}
#home-activities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;flex-shrink:0}
#game-shell .home-stage-actions #home-activities>button{position:static!important;grid-column:auto!important;grid-row:auto!important;display:flex!important;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;min-width:0;min-height:66px!important;width:100%;margin:0!important;padding:10px!important;border:1px solid #627e9859!important;border-radius:12px!important;background:#172b3ef5!important;color:#eef6ff!important;box-shadow:none!important;cursor:pointer;white-space:normal;text-align:left}
#home-activities>button>strong{font:650 15px/1.25 var(--ui-font,'Segoe UI',sans-serif)}
#game-shell .home-stage-actions #home-activities>button>small{display:block!important;font:400 12px/1.3 var(--ui-font,'Segoe UI',sans-serif);color:#b4c9db!important}
#game-shell .home-stage-actions #home-activities>#home-dungeons{border-color:#e7bf6966!important;background:#302e26f5!important}
#game-shell .home-stage-actions #home-activities>#home-pvp{border-color:#bd97ed66!important;background:#2a2540f5!important}
#game-shell .home-stage-actions #home-activities>#adventure-home{border-color:#7bd5c166!important;background:#17362ff5!important}
#game-shell .home-stage-actions:has(#home-activities)>button{flex-shrink:0}
#home-activities>button:focus-visible{outline:3px solid #94dcff;outline-offset:2px}
#adventure-journal [hidden]{display:none!important}
@media(max-width:380px){#game-shell .home-panel .home-stage-actions:has(#home-activities){left:12px!important;right:12px!important}#home-activities{gap:6px}#game-shell .home-stage-actions #home-activities>button{padding:8px!important}#home-activities>button>strong{font-size:14px}}
@media(max-height:620px){#game-shell .home-panel .home-stage-actions:has(#home-activities){max-height:calc(100dvh - 210px)}}
#player-classes{box-sizing:border-box;width:min(700px,calc(100vw - 24px));max-height:90dvh;overflow:auto;padding:22px;border:1px solid #6c8099;border-radius:18px;background:#111e30;color:#eef6ff;font:16px/1.5 var(--ui-font,'Segoe UI',sans-serif)}
#player-classes::backdrop{background:#020a16cc}#player-classes header{display:flex;justify-content:space-between;gap:16px;align-items:center}#player-classes h2{margin:4px 0}#player-classes [data-classes]{display:grid;gap:12px}#player-classes article{border:1px solid #415873;border-left:4px solid var(--class-color);border-radius:12px;padding:16px;background:#1b2d44}#player-classes article h3{color:var(--class-color);margin:4px 0}#player-classes article small{color:#bed0e4;font-size:14px}#player-classes button{min-height:44px;padding:10px 16px;border:1px solid #7f9ab6;border-radius:9px;background:#2a425e;color:#fff;font:inherit;cursor:pointer}#player-classes button:disabled{opacity:.6;cursor:default}#player-classes :focus-visible{outline:3px solid #9cddff;outline-offset:3px}
#player-classes [hidden],#class-skill-button[hidden]{display:none!important}
#player-classes [data-confirm]{position:sticky;bottom:0;padding:16px;background:#142c43;border:2px solid #a5dcff;border-radius:12px;box-shadow:0 -8px 20px #0008}
#player-classes [data-lock]{background:#205f8a;font-weight:700;margin:0 8px 8px 0}
#class-skill-button{position:fixed;z-index:65;right:max(16px,calc((100vw - 540px)/2 + 16px));bottom:calc(116px + env(safe-area-inset-bottom));max-width:210px;min-height:52px;padding:12px 16px;border:2px solid #b3ddff;border-radius:14px;background:#16385bea;color:white;font:700 14px/1.3 'Segoe UI',sans-serif;box-shadow:0 3px 15px #001a;touch-action:manipulation;cursor:pointer;pointer-events:auto}
#class-skill-button:disabled{background:#273443e8;color:#bed0dd;border-color:#607287;cursor:default}
#class-skill-button:focus-visible{outline:3px solid white;outline-offset:3px}
/* Keep touch targets on the persistent button, including its changing hint. */
#adventure-controls button>*,#class-skill-button>*{pointer-events:none}
