@font-face{font-family:Adventure;src:local("Trebuchet MS");font-display:swap}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Adventure,"Trebuchet MS",system-ui,sans-serif;color:#283c2d;background:#173d32}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:wait;opacity:.65}button:focus-visible,input:focus-visible{outline:3px solid #218cab;outline-offset:4px}[hidden]{display:none!important}.screen{min-height:100svh}.menu{position:relative;isolation:isolate;background:#a8d5b4 url('/assets/cover.webp') center center/cover no-repeat;overflow:hidden}.menu-shade{position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#0c2a2940,transparent 24%,transparent 55%,#092c27c4)}.menu-top,.menu-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 34px;color:#fff7d7}.little-brand{font-size:12px;letter-spacing:.2em;font-weight:900;text-shadow:0 1px 8px #143326}.quiet{border:1px solid #fff5cd60;border-radius:30px;color:#fffbe2;background:#17433575;padding:9px 17px;font-size:14px;font-weight:700;backdrop-filter:blur(8px)}.menu-content{position:relative;max-width:740px;width:calc(100% - 32px);margin:0 auto;padding:12px 0 20px}.game-title{text-align:center;color:#fff0b5;margin:0 0 22px;filter:none}.game-title p{letter-spacing:.36em;font-size:15px;font-weight:900;margin:0 0 0;text-shadow:0 2px #714231}.game-title h1{font-size:clamp(68px,9vw,112px);line-height:1.03;letter-spacing:-.055em;margin:0;-webkit-text-stroke:2px #764329;font-family:Georgia,serif;font-weight:900;text-shadow:0 5px 0 #714231}.game-title h1 span{font-size:.3em;vertical-align:middle;padding-left:6px;-webkit-text-stroke:0}.parchment{background:linear-gradient(130deg,#fff8dbee,#f8e8bdf5);border:2px solid #fff3cb;border-radius:26px;box-shadow:0 10px 0 #422d2f38,0 24px 60px #082c2c70;padding:26px 30px;backdrop-filter:blur(8px)}.section-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.section-label h2{font-size:21px;letter-spacing:-.03em;margin:0}.section-label>span{font-size:14px;color:#8d593d;font-weight:800}.kitties{display:grid;grid-template-columns:repeat(6,1fr);gap:9px}.kitty{display:flex;flex-direction:column;align-items:center;justify-content:center;border:2px solid #b7945b38;background:#fff6d5a6;border-radius:15px;padding:4px 3px 8px;color:#725b3b;transition:transform .15s,border-color .15s,background .15s;position:relative;min-width:0}.kitty:hover{transform:translateY(-4px);background:#fffbe5}.kitty.selected{border-color:#28684d;background:#e5ebbe;box-shadow:0 3px 0 #28684d}.kitty.selected:after{content:'✓';position:absolute;right:5px;top:5px;background:#28684d;color:white;border-radius:50%;font-size:11px;width:17px;height:17px}.kitty canvas{width:75px;height:72px;max-width:100%}.kitty span{font-size:12px;font-weight:800}.setup-bottom{display:flex;gap:30px;margin:23px 0 22px;align-items:end}.name-field{flex:1;font-weight:800;font-size:14px}.name-field span{font-weight:400;opacity:.6;font-size:12px}.name-field input{display:block;background:#fffbee;border:1px solid #ac9567a6;border-radius:10px;padding:11px 12px;width:100%;margin-top:8px;color:#283c2d;font-size:16px;min-width:0}.party-field>span{display:block;font-weight:800;font-size:14px;margin-bottom:8px}.party-options{display:flex;gap:7px}.party{border:1px solid #ac9567a6;background:#fffbee;width:47px;height:45px;border-radius:10px;font-weight:900;font-size:20px;color:#755839}.party.selected{color:#fff6d4;background:#2a684e;border-color:#2a684e;box-shadow:0 3px 0 #164c36}.menu-actions{display:flex;gap:12px}.primary,.secondary{font-size:17px;font-weight:800;min-height:52px;padding:13px 24px;border-radius:13px}.primary{background:#286747;color:#fff9da;border:1px solid #235339;box-shadow:0 4px 0 #154730;display:flex;align-items:center;justify-content:center;gap:20px;transition:background .15s,transform .15s}.primary:hover{background:#357b51;transform:translateY(-1px)}.primary:active{transform:translateY(2px);box-shadow:0 2px 0 #154730}.secondary{color:#475539;background:#f8edc4;border:1px solid #a5975e;box-shadow:0 4px 0 #baa26945}.menu-actions .primary{flex:1}.menu-note{text-align:center;font-size:13px;color:#7c684a;margin:20px 0 0}.menu-footer{max-width:1440px;margin:auto;padding-top:0;font-size:12px}.menu-footer>span{opacity:.8}.menu-error{background:#fff2df;color:#9b3939;border:1px solid #bd7972;padding:13px 18px;border-radius:12px;font-weight:700;text-align:center;font-size:15px}.join-panel{max-width:490px;margin:auto}.join-panel h2{font:700 30px/1.1 Georgia,serif;margin:14px 0}.join-panel p{font-size:16px;line-height:1.5;color:#76664d}.back,.text-button{border:0;background:transparent;color:#456d53;padding:8px 0;font-weight:800;font-size:14px}.join-panel label{display:block;font-weight:800;font-size:14px}.code-input{display:block;width:100%;font-family:monospace;text-align:center;letter-spacing:.3em;text-transform:lowercase;font-size:38px;padding:16px 8px;margin:10px 0 18px;border:2px solid #b2a778;border-radius:13px;background:#fffcee;color:#2b624a}.join-panel .primary{width:100%}.lobby{max-width:540px;margin:auto;text-align:center}.eyebrow{font-size:12px;font-weight:900;letter-spacing:.17em;color:#85713d;margin:0 0 12px}.room-code{font-family:monospace;font-size:clamp(36px,8vw,54px);letter-spacing:.18em;color:#256046;border:1px dashed #ad9965;background:#fffbe2;padding:12px 18px;border-radius:13px}.lobby p:not(.eyebrow){font-size:14px;color:#78654a}.lobby-players{display:flex;justify-content:center;gap:16px;margin:18px 0}.lobby-kitty{width:105px;display:flex;flex-direction:column;align-items:center;font-size:14px;font-weight:800}.lobby-kitty canvas{width:80px;height:75px}.empty-seat{width:70px;height:70px;margin:5px 0;border-radius:50%;border:2px dashed #b6a981;display:grid;place-items:center;color:#a9976c;font-size:30px}.waiting-line{display:flex;gap:10px;justify-content:center;align-items:center;color:#2d694e;margin:18px 0 5px}.spinner{display:inline-block;width:17px;height:17px;flex:none;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.subtle{font-size:14px;line-height:1.5;color:#786f58}.game{position:fixed;inset:0;overflow:hidden;background:#122c2d;user-select:none;touch-action:none}#world{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}.game-vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 100px #071e2040}.game-top{position:absolute;inset:20px 20px auto;display:flex;align-items:start;justify-content:space-between;gap:10px;pointer-events:none}.quest-card{background:#f9edccf2;border:1px solid #fff9dd;border-radius:16px;padding:14px 20px;box-shadow:0 6px 30px #0a281f42;max-width:420px}.chapter{font-size:10px;letter-spacing:.16em;font-weight:900;color:#627244}.quest-card h2{font:700 25px/1.1 Georgia,serif;margin:6px 0;color:#2c4c35}.quest-card p{font-size:13px;margin:0;color:#6f704f}.top-buttons{display:flex;gap:7px;pointer-events:auto}.icon-button{width:39px;height:39px;background:#173d32ed;color:#fff1c8;border:1px solid #91b59370;border-radius:11px;font-weight:900;font-size:23px}.map-panel{position:absolute;right:20px;top:74px;width:194px;background:#133a30ed;color:#f6eac7;border:1px solid #83a17c85;border-radius:14px;box-shadow:0 5px 25px #10252266;overflow:hidden;transition:width .15s}.map-panel.expanded{width:min(480px,calc(100vw - 40px));z-index:7}.map-heading{display:flex;justify-content:space-between;align-items:center;padding:8px 11px;font-size:10px;letter-spacing:.12em;font-weight:900}.map-heading button{color:#fff2ca;background:none;border:0;font-size:20px;padding:0}.map-panel canvas{display:block;width:100%;aspect-ratio:1;height:auto;image-rendering:pixelated}.map-caption{font-size:11px;padding:8px 10px;display:flex;gap:6px;align-items:center}.map-caption>span:last-child{margin-left:auto;color:#bfd5a4}.map-dot{width:6px;height:6px;background:#eac880;border-radius:50%}.team{position:absolute;left:20px;top:142px;display:flex;flex-direction:column;gap:7px}.teammate{display:flex;align-items:center;gap:8px;max-width:170px;background:#173d32df;color:#ffedc7;border:1px solid #b4c49940;border-radius:11px;padding:4px 11px 4px 4px;font-size:12px}.teammate canvas{width:37px;height:37px}.teammate strong{display:block;font-size:12px}.teammate small{display:block;color:#b7d1ac;font-size:10px;margin-top:3px}.player-dock{position:absolute;bottom:40px;left:50%;transform:translateX(-50%);display:flex;align-items:center;background:#fcf0ceef;border:2px solid #fff9e1;border-radius:20px;box-shadow:0 8px 30px #092b2670;width:390px;max-width:calc(100% - 30px);padding:10px 14px 10px 6px;pointer-events:none}.player-dock>canvas{width:68px;height:68px;flex-shrink:0}.player-vitals{flex:1;min-width:0}.player-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:14px;margin-bottom:8px}.player-heading strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.player-heading>span{font-size:10px;font-weight:900;color:#756c45;background:#e7d9a9;padding:3px 5px;border-radius:4px;white-space:nowrap}.health-track{height:12px;background:#493c3830;border:1px solid #735c4860;border-radius:6px;overflow:hidden}.health-track>div{height:100%;width:100%;background:linear-gradient(#fba68a,#df6e63);border-radius:5px;transition:width .2s}.xp-track{height:3px;background:#babd9433;margin:4px 2px 0;border-radius:2px}.xp-track>div{background:#54a5a0;height:100%;border-radius:2px;transition:width .2s}.gear{display:flex;gap:5px;justify-content:space-between;font-size:10px;font-weight:800;margin-top:7px;color:#827043}.gear #dragon{color:#8861aa}.dash-meter{margin-left:16px;display:flex;flex-direction:column;align-items:center;gap:1px;color:#427253}.dash-meter>span{font-size:29px;font-weight:900}.dash-meter small{font-size:8px;font-weight:900;letter-spacing:.08em}.keyboard-hint{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);color:#e9eacacc;font-size:11px;white-space:nowrap;pointer-events:none}kbd{font:700 9px system-ui;display:inline-block;border:1px solid #a7b8a359;border-radius:4px;padding:2px 4px;color:#f3edcc;margin-left:8px;background:#162f2960}.toast{position:absolute;left:50%;top:23%;transform:translateX(-50%);padding:13px 22px;border-radius:12px;background:#fff4d8f2;color:#385943;border:1px solid #fffcde;box-shadow:0 6px 20px #122d3540;max-width:calc(100% - 32px);font-size:16px;font-weight:800;text-align:center;pointer-events:none}.respawn{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%);text-align:center;padding:25px 35px;background:#173d32eb;color:#fff2cf;border:1px solid #adc59970;border-radius:20px;display:flex;flex-direction:column;gap:12px}.respawn strong{font:700 30px Georgia,serif}.connection{position:fixed;left:50%;top:16px;transform:translateX(-50%);display:flex;align-items:center;gap:12px;z-index:40;background:#fff0c9;padding:14px 20px;border:1px solid #94764d;border-radius:12px;box-shadow:0 5px 30px #10292160;font-size:14px;max-width:95vw}.connection button{background:none;border:0;text-decoration:underline;color:#734438;font-size:12px;white-space:nowrap}dialog{border:2px solid #fff5d6;border-radius:25px;padding:32px;background:#fcf1cf;color:#294c36;max-width:570px;width:calc(100% - 30px);max-height:calc(100svh - 40px);box-shadow:0 24px 70px #09292180}dialog::backdrop{background:#0a2829aa;backdrop-filter:blur(6px)}dialog h2{font:700 34px/1.06 Georgia,serif;margin:6px 0 16px}dialog p{font-size:16px;line-height:1.5}dialog .eyebrow{font-size:11px}.dialog-close{position:absolute;right:15px;top:12px;background:none;border:0;font-size:30px;color:#7b6a42}.instructions>div{display:flex;gap:14px;align-items:start;margin:12px 0}.instructions>div>span{background:#e8dfb4;color:#507444;border-radius:8px;font-size:12px;font-weight:900;padding:6px;margin-top:4px}.instructions p{font-size:14px;margin:2px 0}.instructions strong{display:block}.instructions+ .subtle{font-size:12px}dialog>.primary{width:100%;margin-top:20px}#victory{text-align:center;max-width:520px}.victory-yarn{font-size:64px;color:#da9f3a;text-shadow:0 3px #bc7750;margin:8px 0}.victory-stats{display:flex;justify-content:center;gap:30px;margin:24px 0}.victory-stats strong{display:block;font-size:30px;font-family:Georgia,serif}.victory-stats span{font-size:12px;color:#85724b}.touch-controls{position:absolute;bottom:max(23px,env(safe-area-inset-bottom));left:0;right:0;display:none;justify-content:space-between;align-items:end;padding:0 25px;pointer-events:none}#joystick{width:115px;height:115px;background:#e8efc523;border:2px solid #e4efc753;border-radius:50%;position:relative;touch-action:none;pointer-events:auto}#joystick-knob{width:48px;height:48px;border-radius:50%;background:#f3edbd70;border:2px solid #f8f4d0a6;position:absolute;left:calc(50% - 24px);top:calc(50% - 24px);box-shadow:0 2px 10px #0c2c2b33;pointer-events:none}.touch-actions{display:flex;gap:13px;align-items:end;pointer-events:auto}.touch-actions button{display:flex;flex-direction:column;align-items:center;justify-content:center;width:68px;height:68px;border-radius:50%;border:2px solid #ebebbc99;background:#4e8655b8;color:#fff4ca;font-size:29px;touch-action:none}.touch-actions button small{font-size:10px;font-weight:800}.touch-actions #touch-attack{width:83px;height:83px;background:#dba669bd;font-size:35px}.touch-actions button:active{background:#fff7bca6}@media(min-height:850px) and (min-width:700px){.menu-content{padding-top:35px}.game-title{margin-bottom:34px}.menu-footer{position:absolute;left:0;right:0;bottom:4px}.menu{min-height:100svh}}@media(pointer:coarse){.touch-controls{display:flex}.keyboard-hint{display:none}.player-dock{bottom:25px;width:330px;transform:translateX(-50%) scale(.9)}.game-top{inset:14px 14px auto}.map-panel{right:14px;top:65px;width:154px}.team{left:14px;top:134px}}@media(max-width:700px){.menu-top{padding:17px 18px}.little-brand{font-size:10px}.menu-content{padding-top:8px}.game-title h1{font-size:74px}.game-title p{font-size:11px}.game-title{margin-bottom:20px}.parchment{padding:20px}.section-label h2{font-size:18px}.section-label>span{font-size:12px}.kitties{gap:5px}.kitty{border-radius:10px}.kitty canvas{height:54px;width:56px}.kitty span{font-size:9px}.setup-bottom{gap:17px;margin:20px 0}.party{width:38px;height:44px}.name-field{font-size:12px}.name-field span{font-size:10px}.party-field>span{font-size:12px}.menu-actions{gap:8px}.primary,.secondary{font-size:15px;padding:12px 16px}.menu-note{font-size:11px}.menu-footer{padding:0 17px 18px;gap:10px;font-size:10px}.menu-footer .version{display:none}.menu-footer>span{max-width:170px;text-align:right}.menu{background-position:50% center}.quest-card{padding:10px 13px;max-width:calc(100vw - 160px);border-radius:12px}.chapter{font-size:8px}.quest-card h2{font-size:20px}.quest-card p{font-size:11px;line-height:1.3}.top-buttons{gap:4px}.icon-button{width:33px;height:33px;font-size:20px}.map-panel{width:130px;top:66px;right:14px}.map-heading{font-size:8px;padding:5px 8px}.map-caption{font-size:9px;padding:6px}.player-dock{bottom:23px;width:300px;left:50%}.team{top:134px}.teammate{font-size:10px;max-width:135px}.teammate canvas{width:29px;height:29px}.teammate strong{font-size:10px}.keyboard-hint{font-size:9px}.touch-controls{padding:0 18px;bottom:110px}#joystick{width:95px;height:95px}.touch-actions button{width:57px;height:57px}.touch-actions #touch-attack{width:72px;height:72px}.toast{top:30%;font-size:14px}.connection{font-size:12px;width:calc(100% - 20px);justify-content:center;padding:10px}.connection button{font-size:10px}.lobby-players{gap:5px}.lobby-kitty{width:88px}dialog{padding:26px 23px}dialog h2{font-size:28px}}@media(max-height:540px) and (orientation:landscape){.menu-top{padding:8px 18px}.menu-content{padding-top:0;max-width:620px}.game-title{margin-bottom:8px}.game-title p{display:none}.game-title h1{font-size:52px}.parchment{padding:14px 20px}.section-label{margin-bottom:7px}.kitty canvas{height:45px;width:55px}.setup-bottom{margin:10px 0}.menu-note{display:none}.menu-footer{padding:8px 18px}.menu-footer .quiet{padding:5px 13px}.player-dock{bottom:10px;transform:translateX(-50%) scale(.82)}.touch-controls{bottom:14px;padding:0 20px}.map-panel{width:122px;top:59px}.quest-card{padding:8px 13px}.quest-card h2{font-size:19px}.quest-card p{font-size:11px}.team{top:115px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

.icon-button svg{display:block;margin:auto}@media(max-width:480px){.kitties{grid-template-columns:repeat(3,1fr);gap:7px}.kitty canvas{width:65px;height:58px}.kitty span{font-size:12px}.game-title h1{font-size:66px}.parchment{padding:18px}.section-label{margin-bottom:12px}.setup-bottom{margin:16px 0}.menu-top{padding:12px 17px}.menu-content{padding-top:3px}.game-title{margin-bottom:15px}}

/* Adventure controls: touch mode is detected by JS, including desktop-mode iPads. */
.setup-bottom{gap:22px}.name-field{min-width:0}.party-options{gap:5px}.party{width:40px}.lobby-players.large-party{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.large-party .lobby-kitty{width:auto}.large-party .lobby-kitty canvas{width:65px;height:61px}.large-party .empty-seat{width:56px;height:56px;margin:3px 0}.lobby-kitty span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-icon{width:auto;min-width:51px;padding:0 11px;font:800 12px Adventure,"Trebuchet MS",sans-serif}.text-icon[aria-pressed=true]{background:#e4edc9;color:#244f3c}.quit-button{background:#674d46;border-color:#daa792a8}.quest-card{max-width:380px}.game-top{z-index:5;inset:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) auto max(18px,env(safe-area-inset-left))}.top-buttons{gap:6px}.map-panel{top:73px;right:18px;width:180px;z-index:4}.map-panel.expanded{width:min(430px,calc(100vw - 36px))}.raid-status{position:absolute;left:20px;top:129px;display:flex;align-items:center;gap:8px;background:#173d32e8;color:#e1e8c0;border:1px solid #afc79b50;border-radius:20px;padding:7px 12px;font-size:11px;font-weight:800;pointer-events:none;z-index:3}.raid-light{width:7px;height:7px;border-radius:50%;background:#bed597;box-shadow:0 0 8px #adc77970}.raid-status.active{background:#643f39e8;color:#ffe3b8;border-color:#e5b58580}.raid-status.active .raid-light{background:#ffb778;box-shadow:0 0 8px #ffb77899}.team{left:20px;top:172px;gap:5px;pointer-events:none;max-height:300px}.teammate{max-width:158px;padding:3px 10px 3px 3px}.teammate canvas{width:31px;height:31px}.teammate strong{font-size:11px;max-width:108px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.teammate small{font-size:9px;margin-top:2px}.adventure-tools{position:absolute;left:20px;bottom:151px;width:316px;z-index:5}.inventory{display:flex;gap:16px;align-items:center;width:max-content;max-width:100%;padding:8px 13px;background:#173d32ee;border:1px solid #afc69d70;border-radius:11px;color:#fbe9be;font-size:12px;box-shadow:0 4px 18px #072a2733}.inventory>span>span{color:#ddb17a;margin-right:3px}.inventory b{font-size:15px}.tool-buttons{display:flex;gap:6px;margin-top:7px}.tool-button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:8px 11px;color:#f7eac6;border:1px solid #b5c19b9c;background:#244e3fee;border-radius:10px;font-size:12px;font-weight:800;touch-action:none}.tool-button:first-child{flex:1}.tool-button kbd{margin:0;color:#ddecc8;background:#18362d;font-size:9px}.tool-button.pressed,.tool-button:active,.tool-button[aria-expanded=true]{color:#264e3b;background:#e1e8b8}.context-hint{font-size:11px;color:#edf1d0;line-height:1.35;margin:7px 0 0;padding:0 2px;text-shadow:0 1px 3px #12392b,0 1px 5px #12392b;max-width:310px;pointer-events:none}.build-panel{position:absolute;bottom:155px;left:50%;transform:translateX(-50%);z-index:8;width:306px;max-width:calc(100% - 24px);padding:14px;background:#fff2d4f5;color:#314d38;border:2px solid #fff9df;border-radius:16px;box-shadow:0 7px 30px #062d2860}.build-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;margin-bottom:10px}.build-heading>button{width:30px;height:30px;border:0;background:none;font-size:25px;color:#786744;line-height:1;padding:0}.build-choices{display:flex;gap:8px}.build-choice{flex:1;display:grid;grid-template-columns:32px auto;align-items:center;text-align:left;column-gap:7px;padding:9px;color:#756144;border:1px solid #baa778;border-radius:10px;background:#fff9e8;font-size:12px}.build-choice>span{grid-row:span 2;font-size:34px;line-height:1}.build-choice strong{font-size:13px}.build-choice small{font-size:11px}.build-choice.selected{background:#e4eac7;border:2px solid #517c50;padding:8px;color:#365c39}.build-panel p{font-size:11px;line-height:1.4;min-height:31px;margin:10px 0}.build-panel .primary{width:100%;min-height:43px;padding:9px 12px;font-size:13px}.build-panel button:disabled{cursor:not-allowed;opacity:.5}.building .adventure-tools{opacity:.75}.building #chop,.building #interact{pointer-events:none}.interior-heading{position:absolute;left:50%;top:85px;transform:translateX(-50%);text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;padding:14px 20px;border-radius:16px;background:#fff0d4ed;border:1px solid #fff8df;z-index:4;min-width:240px}.interior-heading .eyebrow{font-size:9px;margin:0}.interior-heading strong{font:700 25px Georgia,serif;color:#473f32}.interior-heading>span:last-of-type{font-size:11px;color:#75644d}.interior-heading button{margin-top:7px;min-height:43px;border:1px solid #36644c;background:#346b4f;color:#fff6d5;border-radius:10px;font-size:13px;font-weight:800;padding:8px 20px}.interior-heading button>span{margin-left:8px}.indoors .quest-card,.indoors .map-panel,.indoors .raid-status,.indoors .team{display:none}.indoors #world{cursor:grab}.indoors #world:active{cursor:grabbing}.player-dock{bottom:41px;z-index:4}.keyboard-hint{z-index:4}.touch-controls{z-index:6}.look-control{pointer-events:auto;touch-action:none;position:relative;width:150px;height:100px;border-radius:50px;border:2px solid #e4efc775;background:#e8efc523;display:flex;align-items:center;justify-content:center;color:#fff4ca}.look-control>span{position:absolute;top:13px;font-size:10px;font-weight:900;letter-spacing:.08em}.look-control>div{position:absolute;top:39px;width:42px;height:42px;border:2px solid #f8f4d0a6;border-radius:50%;background:#f3edbd70;pointer-events:none}.touch-actions button.pressed{background:#fff7bca6}.dialog-actions{display:flex;gap:12px;margin-top:24px}.dialog-actions>*{flex:1}.dialog-actions .primary,.dialog-actions .secondary{font-size:15px;padding:12px 15px}.toast{z-index:10;top:26%;max-width:min(500px,calc(100% - 32px))}.respawn{z-index:15;pointer-events:none}.touch-enabled .touch-controls{display:flex}.touch-enabled .keyboard-hint{display:none}.touch-enabled .tool-button kbd{display:none}.touch-enabled .tool-button{min-height:46px}.touch-enabled .player-dock{bottom:max(23px,env(safe-area-inset-bottom));width:304px;transform:translateX(-50%);padding:7px 10px 7px 4px}.touch-enabled .player-dock>canvas{width:56px;height:58px}.touch-enabled .player-heading{font-size:12px;margin-bottom:6px}.touch-enabled .dash-meter{margin-left:11px}.touch-enabled .touch-controls{bottom:max(24px,env(safe-area-inset-bottom));padding:0 max(24px,env(safe-area-inset-right)) 0 max(24px,env(safe-area-inset-left))}.touch-enabled #joystick{width:120px;height:120px}.touch-enabled .adventure-tools{bottom:171px}.touch-enabled .build-panel{bottom:165px}.touch-enabled .touch-actions button{width:66px;height:66px}.touch-enabled .touch-actions #touch-attack{width:84px;height:84px}.touch-enabled .touch-actions{gap:10px}html:not(.touch-enabled) .touch-controls{display:none!important}html:not(.touch-enabled) .keyboard-hint{display:block}.touch-enabled .player-dock .gear{font-size:9px}.touch-enabled #world{-webkit-touch-callout:none}.game button{-webkit-user-select:none;user-select:none}.game .tool-button,.game .touch-actions button,.game #joystick,.game #look-control{-webkit-touch-callout:none}.game.building .touch-actions{visibility:hidden}
@media(max-width:900px){.setup-bottom{gap:15px}.party{width:38px}.map-panel{width:151px}.quest-card{max-width:330px}.team{max-height:220px;overflow:hidden}.teammate{max-width:135px}.teammate strong{max-width:91px}.build-panel{left:auto;right:20px;transform:none}.adventure-tools{width:297px}.touch-enabled .build-panel{right:20px}}
@media(max-width:700px){.setup-bottom{flex-direction:column;align-items:stretch;gap:14px}.party-options{gap:7px}.party{flex:1;width:auto;height:44px}.party-field>span{font-size:13px}.name-field{font-size:13px}.lobby-players.large-party{gap:10px}.game-top{inset:max(11px,env(safe-area-inset-top)) 12px auto}.top-buttons{position:absolute;right:0;top:0;gap:5px}.icon-button{height:35px;width:35px}.text-icon{width:auto;min-width:49px;padding:0 9px;font-size:11px}.quest-card{margin-top:48px;max-width:calc(100vw - 157px);padding:10px 12px;min-height:82px}.quest-card h2{font-size:19px}.quest-card p{font-size:10px}.chapter{font-size:7px}.map-panel{top:62px;right:12px;width:124px}.map-panel.expanded{top:62px;right:12px;width:min(360px,calc(100vw - 24px))}.raid-status{left:12px;top:157px;max-width:calc(100vw - 154px);padding:6px 9px;font-size:10px}.team{left:12px;top:191px;max-height:120px;display:flex;flex-direction:row;flex-wrap:wrap;width:calc(100% - 150px);gap:4px;align-content:start}.teammate{padding:3px 5px 3px 1px;max-width:111px;border-radius:8px}.teammate canvas{width:23px;height:23px}.teammate strong{max-width:73px;font-size:9px}.teammate small{font-size:8px}.adventure-tools,.touch-enabled .adventure-tools{left:12px;right:12px;bottom:234px;width:auto}.inventory{font-size:11px;gap:18px;padding:7px 11px}.inventory b{font-size:14px}.tool-buttons{gap:6px}.tool-button{padding:8px 12px;min-height:42px}.context-hint{font-size:10px;max-width:100%;margin-top:5px}.touch-enabled .tool-button{min-height:43px}.touch-enabled .touch-controls{bottom:max(106px,calc(env(safe-area-inset-bottom) + 90px));padding:0 20px}.touch-enabled #joystick{width:100px;height:100px}.touch-enabled .touch-actions button{width:60px;height:60px}.touch-enabled .touch-actions #touch-attack{width:78px;height:78px}.touch-enabled .player-dock{bottom:max(12px,env(safe-area-inset-bottom));width:302px;max-width:calc(100% - 24px)}.touch-enabled .build-panel,.build-panel{bottom:226px;left:12px;right:12px;width:auto;transform:none;max-width:none}.building .adventure-tools{visibility:hidden}.toast{top:34%;padding:10px 15px;font-size:13px}.interior-heading{top:67px;padding:11px 16px;min-width:225px}.interior-heading strong{font-size:23px}.interior-heading button{min-height:42px}.look-control{width:136px;height:96px}.player-dock{width:310px;bottom:38px}.keyboard-hint{font-size:8px}.keyboard-hint kbd{font-size:8px;margin-left:3px;padding:2px}.dialog-actions{gap:8px}.dialog-actions .primary,.dialog-actions .secondary{font-size:13px;padding:11px 10px}#fullscreen{display:none}}
@media(max-height:560px) and (orientation:landscape){.menu-top{padding:8px 16px}.menu-content{max-width:650px}.game-title{margin-bottom:8px}.setup-bottom{flex-direction:row;align-items:end;margin:10px 0;gap:20px}.name-field{max-width:240px}.party-options{gap:4px}.party{width:34px;flex:none;height:39px}.party-field>span{font-size:12px}.section-label{margin-bottom:6px}.parchment{padding:12px 20px}.menu-footer{position:static}.lobby-players.large-party{grid-template-columns:repeat(6,1fr);gap:8px}.large-party .lobby-kitty canvas{width:49px;height:47px}.large-party .empty-seat{width:44px;height:44px}.large-party .lobby-kitty{font-size:10px}.lobby{max-width:620px}.room-code{font-size:30px;padding:7px 14px}.lobby-players{margin:8px 0}.lobby p{margin:8px 0}.lobby .eyebrow{font-size:9px}.game-top{inset:9px 12px auto}.top-buttons{position:static;gap:5px}.quest-card{margin-top:0;max-width:275px;min-height:0;padding:8px 12px}.quest-card h2{font-size:18px;margin:4px 0}.quest-card p{font-size:10px}.chapter{font-size:7px}.icon-button{width:33px;height:33px}.text-icon{width:auto;min-width:47px;height:33px}.map-panel{width:104px;top:53px;right:12px}.map-caption{font-size:8px;padding:5px}.map-panel.expanded{width:min(290px,calc(100vh - 70px));top:51px}.raid-status{left:12px;top:89px;max-width:235px;font-size:9px;padding:5px 9px}.team{left:12px;top:122px;display:flex;flex-direction:row;flex-wrap:wrap;max-height:60px;width:230px;gap:4px}.teammate{max-width:105px}.teammate canvas{width:20px;height:20px}.teammate strong{font-size:8px;max-width:71px}.teammate small{display:none}.adventure-tools,.touch-enabled .adventure-tools{bottom:130px;left:12px;right:auto;width:290px}.inventory{font-size:10px;padding:5px 9px;gap:14px}.inventory b{font-size:12px}.tool-buttons{margin-top:5px;gap:4px}.tool-button,.touch-enabled .tool-button{min-height:36px;padding:6px 10px;font-size:10px}.context-hint{display:none}.touch-enabled .touch-controls{bottom:12px;padding:0 18px}.touch-enabled #joystick{width:99px;height:99px}.touch-enabled .touch-actions button{width:58px;height:58px}.touch-enabled .touch-actions #touch-attack{width:73px;height:73px}.touch-enabled .player-dock{bottom:10px;width:270px;padding:5px 8px 5px 2px}.touch-enabled .player-dock>canvas{width:44px;height:49px}.touch-enabled .player-heading{font-size:11px;margin-bottom:4px}.touch-enabled .health-track{height:10px}.touch-enabled .gear{margin-top:5px;font-size:8px}.touch-enabled .dash-meter{margin-left:8px}.touch-enabled .dash-meter>span{font-size:24px}.build-panel,.touch-enabled .build-panel{left:50%;right:auto;transform:translateX(-50%);bottom:100px;width:272px;padding:10px;max-width:calc(100% - 30px)}.build-heading{margin-bottom:5px;font-size:12px}.build-heading>button{height:24px}.build-choice{padding:6px;grid-template-columns:25px auto;column-gap:4px}.build-choice.selected{padding:5px}.build-choice>span{font-size:28px}.build-choice strong{font-size:11px}.build-choice small{font-size:9px}.build-panel p{margin:6px 0;min-height:27px;font-size:10px}.build-panel .primary{min-height:34px;padding:6px;font-size:11px}.building .adventure-tools{visibility:hidden}.interior-heading{top:51px;padding:8px 14px;gap:3px;min-width:200px}.interior-heading strong{font-size:21px}.interior-heading>span:last-of-type{font-size:10px}.interior-heading button{min-height:34px;padding:7px 16px;margin-top:4px;font-size:11px}.look-control{width:130px;height:87px}.look-control>div{top:34px;width:39px;height:39px}.look-control>span{top:10px}.toast{top:37%;max-width:350px;font-size:12px;padding:9px 14px}.player-dock{bottom:27px;transform:translateX(-50%) scale(.8)}.keyboard-hint{bottom:5px;font-size:9px}#fullscreen{display:block}}
@media(max-width:370px){.tool-button{font-size:11px;padding:8px 9px}.top-buttons{gap:4px}.icon-button{width:32px;height:33px}.text-icon{width:auto;min-width:45px;padding:0 7px}.quest-card{max-width:calc(100vw - 145px)}.map-panel{width:114px}.raid-status{max-width:calc(100vw - 142px)}.touch-enabled .touch-controls{padding:0 15px}.touch-enabled .touch-actions{gap:8px}.touch-enabled .touch-actions #touch-attack{width:72px;height:72px}.touch-enabled .touch-actions button{width:54px;height:54px}.party-options{gap:5px}}

/* 2.1.1: the game frame follows Safari's visible viewport, not its hidden page. */
:root{--view-width:100vw;--view-height:100dvh;--view-left:0px;--view-top:0px}
html.playing-game,html.playing-game body{overflow:hidden;overscroll-behavior:none;height:100%;width:100%}html.playing-game body{position:fixed;left:0;top:0;margin:0}
#game{inset:auto;left:var(--view-left);top:var(--view-top);width:var(--view-width);height:var(--view-height);min-height:0;max-height:none;overflow:hidden;overscroll-behavior:none;contain:layout paint}
#world{width:100%;height:100%;touch-action:none}.code-input,.room-code{text-transform:uppercase}.touch-help{display:none}.touch-enabled .touch-help{display:block}.touch-enabled .desktop-help{display:none}
dialog{position:fixed;inset:auto;margin:0;left:calc(var(--view-left) + var(--view-width)/2);top:calc(var(--view-top) + var(--view-height)/2);transform:translate(-50%,-50%);width:min(570px,calc(var(--view-width) - 24px));max-height:calc(var(--view-height) - 24px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
dialog .dialog-close{width:44px;height:44px;min-width:44px;min-height:44px;top:5px;right:7px}dialog .text-button{min-height:44px}dialog .primary,dialog .secondary{min-height:46px}.connection{max-width:calc(var(--view-width) - 24px);top:calc(var(--view-top) + 12px);left:calc(var(--view-left) + var(--view-width)/2)}
.touch-enabled .menu{overflow:visible;min-height:100svh}.touch-enabled .menu-footer{position:static}.touch-enabled .quiet,.touch-enabled .party,.touch-enabled .back,.touch-enabled .text-button{min-height:44px}.touch-enabled .party{min-width:44px}.touch-enabled .menu-content{padding-bottom:16px}.touch-enabled .party-options{gap:6px}.touch-enabled .party-field{min-width:294px}.touch-enabled .setup-bottom{flex-wrap:wrap}.touch-enabled .name-field{min-width:180px}.touch-enabled .code-input{font-size:36px;letter-spacing:.24em}
.touch-guide{position:absolute;left:50%;top:27%;transform:translateX(-50%);width:290px;max-width:calc(100% - 24px);padding:17px 18px;background:#fff4dced;color:#31533c;border:2px solid #fffbe7;border-radius:18px;z-index:14;box-shadow:0 8px 30px #0b302b55;text-align:center}.touch-guide>strong{font:700 20px/1.15 Georgia,serif}.touch-guide p{font-size:13px;line-height:1.55;margin:9px 0 12px}.touch-guide button{min-height:44px;min-width:96px;border:1px solid #276544;border-radius:10px;background:#2b6b4a;color:#fff8d8;font-size:14px;font-weight:900;padding:10px 18px}
#build-close{width:auto;min-width:106px;min-height:44px;height:auto;border:1px solid #ae8b62;border-radius:9px;background:#f1ddbc;font-size:11px;font-weight:900;color:#624d37;line-height:1.2;padding:8px}.build-heading{gap:10px}.game.building .touch-actions{visibility:visible}
.move-label{position:absolute;left:0;right:0;top:-25px;text-align:center;font-size:14px;font-weight:900;letter-spacing:.08em;color:#fff5d5;text-shadow:0 1px 5px #143a2b;pointer-events:none}
.touch-enabled #game .game-top{inset:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) auto max(14px,env(safe-area-inset-left));z-index:7;height:100px;display:block}
.touch-enabled #game .top-buttons{position:absolute;right:0;top:0;display:flex;gap:6px}.touch-enabled #game .icon-button{width:44px;height:44px;min-width:44px;min-height:44px;font-size:22px}.touch-enabled #game .text-icon{width:auto;padding:0 12px;font-size:13px}.touch-device #fullscreen{display:none!important}
.touch-enabled #game .quest-card{position:absolute;left:0;top:0;width:310px;max-width:calc(100% - 270px);min-height:0;margin:0;padding:12px 15px;border-radius:14px}.touch-enabled #game .quest-card h2{font-size:23px}.touch-enabled #game .quest-card p{font-size:12px;line-height:1.35}.touch-enabled #game .chapter{font-size:8px}
.touch-enabled #game .map-panel{right:max(14px,env(safe-area-inset-right));top:73px;width:140px;border-radius:13px;z-index:5}.touch-enabled #game .map-heading{padding:0 3px 0 10px;min-height:44px;font-size:9px}.touch-enabled #game #map-toggle{height:44px;width:44px;min-width:44px;padding:0;font-size:24px}.touch-enabled #game .map-caption{font-size:9px;padding:7px}.touch-enabled #game .map-panel.expanded{width:min(370px,calc(100% - 28px));z-index:12}
.touch-enabled #game .raid-status{left:max(14px,env(safe-area-inset-left));top:129px;font-size:11px;max-width:calc(100% - 178px);padding:7px 10px}.touch-enabled #game .team{left:14px;top:170px;max-height:186px;max-width:150px;pointer-events:none}
.touch-enabled #game .player-dock{position:absolute;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);width:294px;max-width:calc(100% - 28px);padding:7px 11px 7px 4px;border-radius:16px;pointer-events:none;z-index:5}.touch-enabled #game .player-dock>canvas{width:54px;height:58px}.touch-enabled #game .player-heading{font-size:12px;margin-bottom:6px}.touch-enabled #game .gear{font-size:9px;margin-top:6px}.touch-enabled #game .dash-meter{margin-left:10px}
.touch-enabled #game .touch-controls{position:absolute;inset:auto 0 max(106px,calc(env(safe-area-inset-bottom) + 92px));display:flex;justify-content:space-between;align-items:end;padding:0 max(23px,env(safe-area-inset-right)) 0 max(23px,env(safe-area-inset-left));height:132px;z-index:10;pointer-events:none}
.touch-enabled #game #joystick{width:124px;height:124px;min-width:124px;background:#dce9b52b;border:3px solid #f0f0c795;box-shadow:0 4px 20px #082a263a;touch-action:none;pointer-events:auto}.touch-enabled #game #joystick-knob{width:52px;height:52px;left:calc(50% - 26px);top:calc(50% - 26px);background:#f8edc08c;border:2px solid #fff7d3}
.touch-enabled #game .touch-actions{gap:14px;align-items:end;pointer-events:auto}.touch-enabled #game .touch-actions button{width:70px;height:70px;min-width:70px;min-height:70px;border:2px solid #fff2cbbc;background:#477e55f0;font-size:29px;box-shadow:0 4px 20px #10352b55;touch-action:none}.touch-enabled #game .touch-actions button small{font-size:11px;font-weight:900}
.touch-enabled #game #touch-attack{width:116px;height:116px;min-width:116px;min-height:116px;background:#cc7245f2;border:3px solid #ffe6a6;color:#fffbea;gap:5px}.touch-enabled #game #touch-attack strong{font-size:20px;line-height:1;font-weight:900;letter-spacing:.025em}.touch-enabled #game #touch-attack small{font-size:12px;line-height:1.3;font-weight:800}.touch-enabled #game #touch-attack.pressed{background:#f4b85c;box-shadow:0 0 0 5px #ffe8ae44,0 4px 20px #10352b55;transform:scale(.96)}
.touch-enabled #game .adventure-tools{left:max(16px,env(safe-area-inset-left));bottom:max(268px,calc(env(safe-area-inset-bottom) + 254px));width:334px;right:auto;z-index:8}.touch-enabled #game .inventory{font-size:12px;padding:7px 12px}.touch-enabled #game .inventory b{font-size:15px}.touch-enabled #game .tool-buttons{gap:7px;margin-top:8px}.touch-enabled #game .tool-button{min-height:48px;min-width:64px;font-size:13px;padding:10px 13px}.touch-enabled #game .tool-button kbd{display:none}.touch-enabled #game .context-hint{display:block;font-size:11px;line-height:1.35;margin-top:6px;max-width:330px}
.touch-enabled #game .look-control{width:164px;height:112px;min-height:112px;border:3px solid #eeeeca9c;background:#dce9b52b;pointer-events:auto;touch-action:none}.touch-enabled #game .look-control>span{top:17px;font-size:13px}.touch-enabled #game .look-control>div{top:47px;width:44px;height:44px;background:#f8edc08c;border-color:#fff7d3}.touch-enabled #game .interior-heading{top:80px;padding:13px 20px;max-width:calc(100% - 28px);min-width:245px}.touch-enabled #game .interior-heading button{min-height:46px;min-width:140px;font-size:14px;padding:11px 20px}
.touch-enabled #game .build-panel{left:50%;right:auto;bottom:max(268px,calc(env(safe-area-inset-bottom) + 254px));transform:translateX(-50%);width:324px;max-width:calc(100% - 28px);max-height:calc(100% - 340px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:12px 14px;z-index:11}.touch-enabled #game .build-heading{font-size:13px;margin-bottom:8px}.touch-enabled #game .build-choice{min-height:57px;padding:7px}.touch-enabled #game .build-choice.selected{padding:6px}.touch-enabled #game .build-panel .primary{min-height:46px;font-size:13px}.touch-enabled #game .build-panel p{min-height:29px;font-size:11px;margin:8px 0}.touch-enabled #game.building .adventure-tools{visibility:hidden}.touch-enabled #game.building .touch-actions{visibility:visible}
.touch-enabled #game .toast{top:24%;font-size:14px;padding:11px 18px;max-width:min(400px,calc(100% - 28px));z-index:13}.touch-enabled #game .keyboard-hint{display:none}.touch-enabled #game .respawn{max-width:calc(100% - 28px);padding:20px 25px}
/* Narrow windows include Safari Split View, regardless of the iPad model. */
.touch-enabled #game.view-narrow .game-top{inset:10px max(12px,env(safe-area-inset-right)) auto max(12px,env(safe-area-inset-left))}.touch-enabled #game.view-narrow .top-buttons{gap:6px}.touch-enabled #game.view-narrow .quest-card{top:55px;width:calc(100% - 130px);max-width:none;padding:9px 12px}.touch-enabled #game.view-narrow .quest-card h2{font-size:19px;margin:4px 0}.touch-enabled #game.view-narrow .quest-card p{font-size:10px}.touch-enabled #game.view-narrow .chapter{font-size:7px}
.touch-enabled #game.view-narrow .map-panel{top:67px;right:12px;width:116px}.touch-enabled #game.view-narrow .map-panel:not(.expanded) canvas,.touch-enabled #game.view-narrow .map-panel:not(.expanded) .map-caption{display:none}.touch-enabled #game.view-narrow .map-heading{font-size:8px;padding-left:8px}.touch-enabled #game.view-narrow .map-panel.expanded{width:min(330px,calc(100% - 24px));top:67px;right:12px}
.touch-enabled #game.view-narrow .raid-status{top:154px;left:12px;max-width:calc(100% - 24px);font-size:10px;padding:6px 9px}.touch-enabled #game.view-narrow .team{top:188px;left:12px;display:flex;flex-direction:row;flex-wrap:nowrap;max-width:calc(100% - 24px);width:auto;max-height:36px;gap:4px;overflow:hidden}.touch-enabled #game.view-narrow .teammate{padding:3px}.touch-enabled #game.view-narrow .teammate canvas{width:26px;height:26px}.touch-enabled #game.view-narrow .teammate>div{display:none}
.touch-enabled #game.view-narrow .adventure-tools{bottom:max(244px,calc(env(safe-area-inset-bottom) + 230px));left:12px;right:12px;width:auto}.touch-enabled #game.view-narrow .inventory{padding:6px 10px;font-size:11px}.touch-enabled #game.view-narrow .inventory b{font-size:13px}.touch-enabled #game.view-narrow .tool-buttons{gap:6px;margin-top:7px}.touch-enabled #game.view-narrow .tool-button{min-height:46px;padding:9px 12px;font-size:12px}.touch-enabled #game.view-narrow .context-hint{font-size:10px;max-width:none;margin-top:5px}
.touch-enabled #game.view-narrow .touch-controls{bottom:max(103px,calc(env(safe-area-inset-bottom) + 89px));height:116px;padding:0 max(17px,env(safe-area-inset-right)) 0 max(17px,env(safe-area-inset-left))}.touch-enabled #game.view-narrow #joystick{width:108px;height:108px;min-width:108px}.touch-enabled #game.view-narrow #touch-attack{width:103px;height:103px;min-width:103px;min-height:103px}.touch-enabled #game.view-narrow #touch-attack strong{font-size:18px}.touch-enabled #game.view-narrow #touch-attack small{font-size:11px}.touch-enabled #game.view-narrow .touch-actions{gap:9px}.touch-enabled #game.view-narrow #touch-dash{width:60px;height:60px;min-width:60px;min-height:60px;font-size:26px}.touch-enabled #game.view-narrow .move-label{font-size:12px;top:-24px}.touch-enabled #game.view-narrow .player-dock{bottom:max(12px,env(safe-area-inset-bottom));width:286px;max-width:calc(100% - 28px)}
.touch-enabled #game.view-narrow .build-panel{bottom:max(245px,calc(env(safe-area-inset-bottom) + 231px));left:12px;right:12px;width:auto;max-width:none;max-height:calc(100% - 307px);transform:none;padding:10px 12px}.touch-enabled #game.view-narrow .build-panel p{font-size:10px;min-height:26px}.touch-enabled #game.view-narrow .look-control{width:154px;height:106px;min-height:106px}.touch-enabled #game.view-narrow .interior-heading{top:73px;min-width:238px}.touch-enabled #game.view-narrow .touch-guide{top:25%;width:274px;padding:13px 15px}.touch-enabled #game.view-narrow .touch-guide>strong{font-size:18px}.touch-enabled #game.view-narrow .touch-guide p{font-size:12px;margin:7px 0 9px}.touch-enabled #game.view-narrow .toast{top:24%;font-size:12px}
/* Short visible viewports use one lower control row and keep every button reachable. */
.touch-enabled #game.view-compact .game-top{inset:8px 12px auto}.touch-enabled #game.view-compact .quest-card{top:0;width:265px;max-width:calc(100% - 255px);padding:8px 11px}.touch-enabled #game.view-compact .quest-card h2{font-size:18px;margin:3px 0}.touch-enabled #game.view-compact .quest-card p{font-size:10px}.touch-enabled #game.view-compact .chapter{font-size:7px}.touch-enabled #game.view-compact .top-buttons{gap:5px}.touch-enabled #game.view-compact .map-panel{top:62px;right:12px;width:116px}.touch-enabled #game.view-compact .map-panel:not(.expanded) canvas,.touch-enabled #game.view-compact .map-panel:not(.expanded) .map-caption{display:none}.touch-enabled #game.view-compact .map-panel.expanded{width:min(280px,calc(100% - 24px));max-height:calc(100% - 170px);overflow:auto}.touch-enabled #game.view-compact .raid-status{top:95px;left:12px;font-size:10px;padding:5px 8px}.touch-enabled #game.view-compact .team{display:none}
.touch-enabled #game.view-compact .touch-controls{bottom:max(12px,env(safe-area-inset-bottom));height:106px;padding:0 17px}.touch-enabled #game.view-compact #joystick{width:98px;height:98px;min-width:98px}.touch-enabled #game.view-compact #touch-attack{width:98px;height:98px;min-width:98px;min-height:98px}.touch-enabled #game.view-compact #touch-attack strong{font-size:17px}.touch-enabled #game.view-compact #touch-attack small{font-size:10px}.touch-enabled #game.view-compact #touch-dash{width:60px;height:60px;min-width:60px;min-height:60px}.touch-enabled #game.view-compact .touch-actions{gap:10px}.touch-enabled #game.view-compact .move-label{font-size:11px;top:-23px}.touch-enabled #game.view-compact .player-dock{bottom:max(12px,env(safe-area-inset-bottom));width:254px;max-width:calc(100% - 400px);padding:5px 8px 5px 2px}.touch-enabled #game.view-compact .player-dock>canvas{width:39px;height:44px}.touch-enabled #game.view-compact .player-heading{font-size:11px;margin-bottom:4px}.touch-enabled #game.view-compact .health-track{height:9px}.touch-enabled #game.view-compact .gear{font-size:8px;margin-top:4px}.touch-enabled #game.view-compact .dash-meter{display:none}
.touch-enabled #game.view-compact .adventure-tools{bottom:max(147px,calc(env(safe-area-inset-bottom) + 135px));left:12px;right:auto;width:312px}.touch-enabled #game.view-compact .inventory{padding:5px 9px;font-size:10px}.touch-enabled #game.view-compact .inventory b{font-size:12px}.touch-enabled #game.view-compact .tool-buttons{gap:5px;margin-top:5px}.touch-enabled #game.view-compact .tool-button{min-height:44px;padding:8px 11px;font-size:11px}.touch-enabled #game.view-compact .context-hint{display:none}.touch-enabled #game.view-compact .build-panel{left:50%;right:auto;transform:translateX(-50%);bottom:max(139px,calc(env(safe-area-inset-bottom) + 127px));width:306px;max-width:calc(100% - 24px);max-height:calc(100% - 194px);padding:8px 11px}.touch-enabled #game.view-compact .build-heading{margin-bottom:5px;font-size:12px}.touch-enabled #game.view-compact .build-choice{min-height:46px;grid-template-columns:25px auto;padding:5px}.touch-enabled #game.view-compact .build-choice.selected{padding:4px}.touch-enabled #game.view-compact .build-choice>span{font-size:26px}.touch-enabled #game.view-compact .build-choice strong{font-size:11px}.touch-enabled #game.view-compact .build-choice small{font-size:10px}.touch-enabled #game.view-compact .build-panel p{margin:5px 0;font-size:10px;min-height:0}.touch-enabled #game.view-compact .build-panel .primary{min-height:44px;padding:7px;font-size:12px}
.touch-enabled #game.view-compact .interior-heading{top:64px;padding:9px 15px;min-width:220px;gap:4px}.touch-enabled #game.view-compact .interior-heading strong{font-size:22px}.touch-enabled #game.view-compact .interior-heading>span:last-of-type{font-size:10px}.touch-enabled #game.view-compact .interior-heading button{min-height:44px;margin-top:4px;padding:8px 17px;font-size:13px}.touch-enabled #game.view-compact .look-control{width:145px;height:95px;min-height:95px}.touch-enabled #game.view-compact .look-control>span{font-size:11px;top:12px}.touch-enabled #game.view-compact .look-control>div{top:38px;width:42px;height:42px}.touch-enabled #game.view-compact .touch-guide{top:64px;width:290px;padding:10px 14px}.touch-enabled #game.view-compact .touch-guide>strong{font-size:17px}.touch-enabled #game.view-compact .touch-guide p{font-size:11px;margin:5px 0}.touch-enabled #game.view-compact .toast{top:28%;font-size:11px;padding:8px 12px;max-width:310px}
.touch-enabled #game.view-narrow.view-compact .quest-card{display:none}.touch-enabled #game.view-narrow.view-compact .player-dock{top:65px;bottom:auto;left:12px;transform:none;width:215px;max-width:calc(100% - 155px)}.touch-enabled #game.view-narrow.view-compact .player-dock>canvas{display:none}.touch-enabled #game.view-narrow.view-compact .player-dock .gear{display:none}.touch-enabled #game.view-narrow.view-compact .raid-status{top:120px;max-width:calc(100% - 145px)}.touch-enabled #game.view-narrow.view-compact .adventure-tools{left:12px;right:12px;width:auto;bottom:142px}.touch-enabled #game.view-narrow.view-compact .build-panel{left:12px;right:12px;transform:none;width:auto;max-width:none;bottom:140px;max-height:calc(100% - 198px)}
.touch-enabled #game.view-short .raid-status{display:none}.touch-enabled #game.view-short .adventure-tools{bottom:117px}.touch-enabled #game.view-short .adventure-tools .inventory{display:none}.touch-enabled #game.view-short .touch-controls{bottom:8px;height:89px}.touch-enabled #game.view-short #joystick{width:84px;height:84px;min-width:84px}.touch-enabled #game.view-short #touch-attack{width:86px;height:86px;min-width:86px;min-height:86px}.touch-enabled #game.view-short #touch-attack strong{font-size:15px}.touch-enabled #game.view-short #touch-dash{width:52px;height:52px;min-width:52px;min-height:52px}.touch-enabled #game.view-short .touch-actions{gap:8px}.touch-enabled #game.view-short .move-label{font-size:10px;top:-22px}.touch-enabled #game.view-short .build-panel{bottom:116px;max-height:calc(100% - 173px)}.touch-enabled #game.view-short .touch-guide{top:59px;padding:8px 12px}.touch-enabled #game.view-short .touch-guide>strong{font-size:15px}.touch-enabled #game.view-short .touch-guide p{font-size:10px;margin:4px 0}.touch-enabled #game.view-short .touch-guide button{padding:8px;min-height:44px}
@media(max-width:500px){.touch-enabled .setup-bottom{flex-direction:column;align-items:stretch}.touch-enabled .party-field{min-width:0}.touch-enabled .party-options{gap:4px}.touch-enabled .party{min-width:0;flex:1}.touch-enabled .name-field{min-width:0}.touch-enabled .menu-footer{gap:10px}.touch-enabled .menu-note{font-size:11px}}

/* Direction hints stay above the supplies, leaving all Safari controls in place. */
.navigation{display:flex;align-items:center;gap:6px;margin-bottom:6px;pointer-events:none;max-width:100%;font-size:10px;font-weight:800;color:#f5edcb}.navigation>span{display:block;padding:6px 8px;border:1px solid #a9c39b85;border-radius:8px;background:#163e32ed;white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}.navigation #home-direction{color:#ffdda0}.navigation #yarn-direction{color:#f5d2df}.navigation #yarn-direction.carrying{color:#d0ecc2;background:#27513bed}.navigation #yarn-direction.stolen{background:#773f36ef;color:#ffebba;border-color:#e3a071}
#game.yarn-stolen .quest-card{background:#fff0d2f5;border-color:#e6a77f;box-shadow:0 0 0 2px #b963453d,0 6px 30px #0a281f42}#game.yarn-stolen #objective{color:#9a4234}#game.yarn-stolen #quest-detail{color:#81543a}.tool-button:disabled{cursor:default}
.touch-enabled #game .navigation{font-size:11px;margin-bottom:7px;gap:6px}.touch-enabled #game .navigation>span{padding:6px 8px}.touch-enabled #game.view-narrow .navigation{font-size:10px;margin-bottom:6px;gap:5px}.touch-enabled #game.view-compact .navigation{font-size:9px;margin-bottom:5px}.touch-enabled #game.view-compact .navigation>span{padding:5px 7px}.touch-enabled #game.view-short .navigation{font-size:9px;margin-bottom:4px}.touch-enabled #game.view-short .navigation>span{padding:4px 6px}.touch-enabled #game.view-narrow.view-compact .navigation{max-width:100%}#game.indoors .navigation{display:none}
/* Wrapped yarn objectives must not cover the raid count. */
.touch-enabled #game:not(.view-narrow) .raid-status{top:148px}
.touch-enabled #game:not(.view-narrow) .team{top:190px}
.touch-enabled #game.view-narrow:not(.view-compact) .raid-status{left:auto;right:12px;top:121px;width:116px;max-width:116px;font-size:9px;line-height:1.25;gap:5px;padding:6px 7px;align-items:start}
.touch-enabled #game.view-narrow:not(.view-compact) .raid-light{flex-shrink:0;margin-top:2px}

/* Phones: small status strips above play, controls along the bottom edge. */
.touch-enabled #game.view-phone.view-phone{--phone-left:max(8px,env(safe-area-inset-left));--phone-right:max(8px,env(safe-area-inset-right));--phone-bottom:max(6px,env(safe-area-inset-bottom))}
.touch-enabled #game.view-phone.view-phone .game-top{inset:8px var(--phone-right) auto var(--phone-left);height:74px;pointer-events:none}
.touch-enabled #game.view-phone.view-phone .top-buttons{pointer-events:auto;gap:4px}
.touch-enabled #game.view-phone.view-phone .text-icon{font-size:11px;min-width:44px;padding:0 8px}
.touch-enabled #game.view-phone.view-phone .quest-card{display:block;top:49px;left:0;width:100%;max-width:none;padding:4px 8px;border-radius:7px;background:#f8efd6e6;min-height:24px;box-shadow:none}
.touch-enabled #game.view-phone.view-phone .quest-card h2{font:700 14px/18px Georgia,serif;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.touch-enabled #game.view-phone.view-phone .chapter,.touch-enabled #game.view-phone.view-phone #quest-detail,.touch-enabled #game.view-phone.view-phone .team{display:none}
.touch-enabled #game.view-phone.view-phone .map-panel{top:8px;left:var(--phone-left);right:auto;width:96px;border-radius:9px}
.touch-enabled #game.view-phone.view-phone .map-heading{min-height:44px;font-size:8px;padding-left:7px;gap:0}
.touch-enabled #game.view-phone.view-phone .map-panel:not(.expanded) canvas,.touch-enabled #game.view-phone.view-phone .map-panel:not(.expanded) .map-caption{display:none}
.touch-enabled #game.view-phone.view-phone .map-panel.expanded{top:8px;left:var(--phone-left);width:min(330px,calc(100% - 16px));max-height:calc(100% - 180px)}
.touch-enabled #game.view-phone.view-phone .raid-status{display:flex;top:85px;left:var(--phone-left);right:auto;width:auto;max-width:calc(100% - 16px);padding:3px 7px;font-size:10px;line-height:14px;white-space:nowrap}
.touch-enabled #game.view-phone.view-phone .adventure-tools{position:static;width:auto;max-width:none}
.touch-enabled #game.view-phone.view-phone .navigation{position:absolute;top:110px;left:var(--phone-left);right:var(--phone-right);font-size:10px;margin:0;gap:5px}
.touch-enabled #game.view-phone.view-phone .navigation>span{padding:3px 6px;line-height:14px}
.touch-enabled #game.view-phone.view-phone .inventory{display:flex;position:absolute;bottom:calc(var(--phone-bottom) + 208px);left:var(--phone-left);padding:3px 7px;font-size:10px;gap:12px;line-height:14px}
.touch-enabled #game.view-phone.view-phone .inventory b{font-size:11px}
.touch-enabled #game.view-phone.view-phone .tool-buttons{position:absolute;bottom:calc(var(--phone-bottom) + 157px);left:var(--phone-left);right:var(--phone-right);display:flex;gap:5px;margin:0}
.touch-enabled #game.view-phone.view-phone .tool-button{min-height:44px;height:44px;min-width:44px;padding:5px 9px;font-size:11px}
.touch-enabled #game.view-phone.view-phone .context-hint{display:none}
.touch-enabled #game.view-phone.view-phone .touch-controls{bottom:calc(var(--phone-bottom) + 48px);height:94px;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))}
.touch-enabled #game.view-phone.view-phone #joystick{width:94px;height:94px;min-width:94px}
.touch-enabled #game.view-phone.view-phone #joystick-knob{width:40px;height:40px}
.touch-enabled #game.view-phone.view-phone .move-label{top:-17px;font-size:10px}
.touch-enabled #game.view-phone.view-phone #touch-attack{width:92px;height:92px;min-width:92px;min-height:92px}
.touch-enabled #game.view-phone.view-phone #touch-attack strong{font-size:16px}
.touch-enabled #game.view-phone.view-phone #touch-attack small{font-size:10px}
.touch-enabled #game.view-phone.view-phone #touch-dash{width:48px;height:48px;min-width:48px;min-height:48px;font-size:23px}
.touch-enabled #game.view-phone.view-phone #touch-dash small{font-size:8px}
.touch-enabled #game.view-phone.view-phone .touch-actions{gap:7px}
.touch-enabled #game.view-phone.view-phone .player-dock{top:auto;bottom:var(--phone-bottom);left:50%;transform:translateX(-50%);width:300px;max-width:calc(100% - 16px);padding:4px 9px;border-radius:10px;gap:0;height:41px}
.touch-enabled #game.view-phone.view-phone .player-dock>canvas,.touch-enabled #game.view-phone.view-phone .dash-meter,.touch-enabled #game.view-phone.view-phone .xp-track{display:none}
.touch-enabled #game.view-phone.view-phone .player-heading{font-size:10px;line-height:11px;margin:0 0 2px}
.touch-enabled #game.view-phone.view-phone .health-track{height:6px}
.touch-enabled #game.view-phone.view-phone .gear{display:flex;font-size:9px;line-height:11px;margin-top:2px}
.touch-enabled #game.view-phone.view-phone .toast{top:136px;font-size:11px;padding:6px 10px;max-width:calc(100% - 24px);pointer-events:none}
.touch-enabled #game.view-phone.view-phone .build-panel{bottom:calc(var(--phone-bottom) + 153px);left:8px;right:8px;width:auto;max-width:none;transform:none;max-height:calc(100% - 218px);padding:8px 10px}
.touch-enabled #game.view-phone.view-phone .interior-heading{top:58px;min-width:220px;padding:6px 10px;gap:2px}
.touch-enabled #game.view-phone.view-phone .interior-heading strong{font-size:19px}
.touch-enabled #game.view-phone.view-phone .interior-heading .eyebrow,.touch-enabled #game.view-phone.view-phone .interior-heading>span:last-of-type{display:none}
.touch-enabled #game.view-phone.view-phone .look-control{width:128px;height:94px;min-height:94px}
.touch-enabled #game.view-phone.view-phone .touch-guide{top:145px;padding:9px 12px;width:270px}
/* A sideways phone keeps status at the top and the thumbs at the corners. */
.touch-enabled #game.view-phone.view-phone.phone-landscape .player-dock{top:8px;bottom:auto;left:var(--phone-left);transform:none;width:175px;max-width:none}
.touch-enabled #game.view-phone.view-phone.phone-landscape .map-panel{left:auto;right:calc(var(--phone-right) + 157px)}
.touch-enabled #game.view-phone.view-phone.phone-landscape .map-panel.expanded{right:var(--phone-right);width:260px;max-height:calc(100% - 24px)}
.touch-enabled #game.view-phone.view-phone.phone-landscape .quest-card{width:280px;max-width:calc(100% - 295px);top:47px}
.touch-enabled #game.view-phone.view-phone.phone-landscape .raid-status{top:105px;max-width:300px}
.touch-enabled #game.view-phone.view-phone.phone-landscape .navigation{top:82px;right:auto;max-width:340px}
.touch-enabled #game.view-phone.view-phone.phone-landscape .inventory{bottom:var(--phone-bottom);left:calc(var(--phone-left) + 108px)}
.touch-enabled #game.view-phone.view-phone.phone-landscape .tool-buttons{top:60px;bottom:auto;left:auto;right:var(--phone-right);width:255px}
.touch-enabled #game.view-phone.view-phone.phone-landscape .touch-controls{bottom:var(--phone-bottom)}
.touch-enabled #game.view-phone.view-phone.phone-landscape .toast{top:133px;max-width:340px}
.touch-enabled #game.view-phone.view-phone.phone-landscape .build-panel{top:57px;bottom:auto;left:auto;right:var(--phone-right);width:300px;max-width:calc(100% - 24px);max-height:calc(100% - 70px)}
.touch-enabled #game.view-phone.view-phone.phone-landscape .interior-heading{top:58px;min-width:220px}
.touch-enabled #game.view-phone.view-phone.phone-landscape .touch-guide{top:58px}
.touch-enabled #game.view-phone.view-phone .inventory{top:136px;bottom:auto}
.touch-enabled #game.view-phone.view-phone.phone-landscape .inventory{top:auto;bottom:var(--phone-bottom)}
