/* Controles e áreas seguras da edição mobile. */
.rotate-notice{position:absolute;inset:0;z-index:20;background:#06191ef5;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;backdrop-filter:blur(14px)}
.rotate-notice>svg{width:60px;height:60px;color:#bae1bc;margin-bottom:16px;transform:rotate(-12deg)}
.rotate-notice h2{font:30px Georgia,serif;margin:10px 0;color:#e7f0d6}
.rotate-notice p{max-width:300px;line-height:1.6;color:#afc5b7;font-size:16px}
.rotate-notice button{margin-top:20px;min-height:44px}
.save-slot{display:flex;gap:12px;align-items:center;justify-content:space-between;border:1px solid var(--line);padding:14px;border-radius:10px;margin:12px 0;background:#12302c55}
.save-slot strong,.save-slot small{display:block}.save-slot strong{font-size:16px;color:#e3ecd4}.save-slot small{font-size:13px;color:#a6bcb0;margin-top:6px;line-height:1.4}
.save-slot button,.save-actions button{min-height:44px;padding:10px 14px;border:1px solid #afcfaa55;border-radius:7px;background:#244a3f;font-size:14px;flex-shrink:0}
.save-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.save-actions button{flex:1}.save-warning{padding:12px;border:1px solid #ebc18a55;border-radius:7px;color:#ead8ae!important;font-size:14px!important;line-height:1.5}
.option-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 0;border-bottom:1px solid var(--line)}
.option-row span{font-size:16px;line-height:1.4}.option-row small{display:block;font-size:13px;color:#9fb7a9;margin-top:5px}.option-row button{font-size:14px;min-height:44px;min-width:86px;background:#264d42;border:1px solid #a6d6b644;border-radius:7px;padding:10px 12px}
.install-app-icon{width:64px;height:64px;border-radius:16px;float:right;margin:0 0 15px 16px;border:1px solid #afcfaa55}.offline-badge{display:inline-block;padding:9px 12px;border-radius:6px;background:#9abf9915;border:1px solid #9abf992a;font-size:14px;color:#cbe2c2;margin:12px 0;line-height:1.5}.offline-badge.pending{color:#ead8ae}
.controller-mode .joystick,.controller-mode .combat-controls,.controller-mode .keyboard-hint{display:none!important}
@media(pointer:coarse){.stage,.controls,.joystick,.ability{touch-action:none}.keyboard-hint,.ability kbd,.interact kbd{display:none}.app-footer{font-size:12px}.install-note{font-size:14px!important;line-height:1.6}.item-copy small{font-size:14px}.icon-button{min-width:44px;min-height:44px}.control-list{display:none}}
body.mobile-landscape .app-shell{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);height:100dvh}body.mobile-landscape .app-bar{height:44px;padding:3px 12px;padding-top:max(3px,env(safe-area-inset-top))}body.mobile-landscape .wordmark{font-size:19px;letter-spacing:3px}body.mobile-landscape .wordmark>span{display:none}body.mobile-landscape .app-actions{gap:10px}body.mobile-landscape .connection{display:none}body.mobile-landscape .install-link{min-height:40px;padding:7px 10px;font-size:14px}body.mobile-landscape .app-bar .icon-button{min-width:40px;min-height:40px;width:40px;height:40px}body.mobile-landscape .stage{border-radius:0;border:0}body.mobile-landscape .app-footer{height:calc(21px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);font-size:12px;justify-content:center}body.mobile-landscape .app-footer>span:first-child{display:none}body.mobile-landscape .player-card{left:12px;top:8px;transform:none;width:200px;padding:7px;gap:7px}body.mobile-landscape .avatar{width:38px;height:38px}body.mobile-landscape .avatar canvas{width:38px;height:38px}body.mobile-landscape .avatar b{font-size:12px;height:20px;left:9px}body.mobile-landscape .player-name{font-size:17px;margin-bottom:4px}body.mobile-landscape .player-name span, body.mobile-landscape .xp-row{display:none}body.mobile-landscape .hp{height:13px}body.mobile-landscape .hp span{font-size:10px;line-height:11px}body.mobile-landscape .energy{height:4px}body.mobile-landscape .hud-right{top:8px;right:12px;gap:6px}body.mobile-landscape .currency{padding:8px 10px;font-size:14px}body.mobile-landscape .hud-right .icon-button{width:44px;height:44px}body.mobile-landscape .quest{top:82px;left:12px;padding:8px 11px;max-width:205px;border-width:1px}body.mobile-landscape .quest .eyebrow, body.mobile-landscape .quest-description, body.mobile-landscape #quest-description{display:none}body.mobile-landscape .quest strong{font-size:17px;margin:2px 0 5px}body.mobile-landscape .quest-progress{font-size:12px;margin-top:0}body.mobile-landscape .quest-progress b{font-size:12px}body.mobile-landscape .joystick{left:24px;bottom:22px;width:112px;height:112px;transform:none}body.mobile-landscape .stick{width:42px;height:42px;left:calc(50% - 21px);top:calc(50% - 21px)}body.mobile-landscape .combat-controls{right:22px;bottom:24px;width:228px;height:132px;transform:none}body.mobile-landscape .attack{width:78px;height:78px;right:0;bottom:0}body.mobile-landscape .attack svg{width:32px;height:32px}body.mobile-landscape .skill{width:58px;height:58px;right:14px;top:-18px}body.mobile-landscape .dash{width:58px;height:58px;right:93px;bottom:1px}body.mobile-landscape .potion{width:48px;height:48px;left:2px;top:8px;bottom:auto}body.mobile-landscape .ability>span{font-size:11px;letter-spacing:.2px;top:calc(100% + 4px)}body.mobile-landscape .ability svg{width:26px;height:26px}body.mobile-landscape .map-button, body.mobile-landscape .region-label{display:none}body.mobile-landscape .interact{bottom:30px;font-size:14px;padding:12px 15px;min-height:44px;max-width:38%;white-space:normal;text-align:center}body.mobile-landscape .boss-hud{top:10px;width:32%;max-width:300px}body.mobile-landscape .boss-hud>span{font-size:12px}body.mobile-landscape .combo-display{bottom:172px;right:24px;font-size:12px}body.mobile-landscape .intro-copy{top:7%;left:6%;bottom:auto;right:auto;max-width:46%;text-align:left}body.mobile-landscape .intro h1{font-size:clamp(40px,8vw,68px);margin:12px 0 7px}body.mobile-landscape .intro-copy p{font-size:16px;line-height:1.45;margin:13px 0}body.mobile-landscape .intro-chapter{font-size:12px;letter-spacing:1px}body.mobile-landscape .intro-footnote, body.mobile-landscape .hero-caption{display:none}body.mobile-landscape .intro-copy .primary-button{min-height:48px;padding:13px 18px;font-size:16px}body.mobile-landscape .intro-copy .text-button{font-size:14px;padding:10px 0}body.mobile-landscape .hero-art{height:110%;bottom:-10%;top:auto;right:1%;max-width:54%;transform:none}body.mobile-landscape .intro-bottom{right:24px;bottom:18px;left:auto}body.mobile-landscape .intro-bottom>span{display:none}body.mobile-landscape .intro-bottom button{font-size:14px}body.mobile-landscape .subtitle{justify-content:flex-start;font-size:12px;letter-spacing:2px}body.mobile-landscape dialog{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);width:min(560px,90vw);padding:20px 24px;overflow-y:auto}body.mobile-landscape dialog h2{font-size:27px}body.mobile-landscape dialog p{font-size:16px}body.mobile-landscape .modal-top{margin-bottom:12px}body.mobile-landscape .modal-top .icon-button{min-width:44px;min-height:44px}body.mobile-landscape .update-banner{bottom:12px;font-size:14px;z-index:22}body.mobile-landscape .update-banner button{font-size:14px;min-height:44px}

body.mobile-landscape.mobile-short .intro-copy p{display:none}body.mobile-landscape.mobile-short .intro-copy{top:10%}body.mobile-landscape.mobile-short .quest{top:74px;max-width:175px}body.mobile-landscape.mobile-short .quest-progress b{display:none}body.mobile-landscape.mobile-short .joystick{width:100px;height:100px;bottom:20px}body.mobile-landscape.mobile-short .combat-controls{height:115px}body.mobile-landscape.mobile-short .skill{top:-16px}body.mobile-landscape.mobile-short .app-bar{height:40px}body.mobile-landscape.mobile-short .intro-bottom{bottom:13px}body.mobile-landscape.mobile-short .player-card{width:184px}
@media(orientation:portrait) and (pointer:coarse){.app-bar{padding-top:max(8px,env(safe-area-inset-top));height:calc(58px + env(safe-area-inset-top))}.app-footer{height:calc(30px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.intro-copy .primary-button{min-height:52px}.intro-footnote{font-size:12px;letter-spacing:.5px}.intro-bottom button{font-size:14px}.intro-copy .text-button{font-size:14px}}
.option-row label{font-size:16px;line-height:1.4}.option-row select{background:#183e37;color:#e3ecd4;border:1px solid #9cbdad80;border-radius:6px;min-height:44px;max-width:55%;padding:8px;font-size:14px}.option-row input[type=checkbox]{width:26px;height:26px;accent-color:#a6d3af;flex-shrink:0}
.intro-bottom{gap:18px}.intro-bottom button{min-height:44px;white-space:nowrap}.save-slot{flex-wrap:wrap}.save-slot>.save-actions{margin:0;width:100%}.save-actions button:disabled{opacity:.4;cursor:default}button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #eadaaa;outline-offset:3px}
body.mobile-landscape .hud-right{width:auto;flex-wrap:nowrap}body.mobile-landscape .intro-copy .text-button{margin-left:0}body.mobile-landscape .intro-bottom{left:auto}body.mobile-landscape .app-footer{white-space:nowrap;overflow:hidden}body.mobile-landscape .app-footer>span{overflow:hidden;text-overflow:ellipsis}body.mobile-landscape .intro-chapter{font-size:10px}
@media(pointer:coarse) and (orientation:portrait){.intro-bottom{justify-content:space-between;gap:10px}.intro-bottom button{font-size:13px}}
body.mobile-landscape.mobile-short .intro h1{font-size:44px;margin-top:5px}body.mobile-landscape.mobile-short .intro-chapter{display:none}body.mobile-landscape.mobile-short .intro-copy .text-button{padding:8px 0}

/* A superfície do jogo acompanha a área visível, não o documento ampliado. */
html{height:100%;overflow:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0;overscroll-behavior:none}
body.mobile-viewport{position:fixed;inset:0;width:100%;height:100%;overflow:hidden}
body.mobile-viewport .app-shell{position:fixed;margin:0;max-width:none;min-width:0;min-height:0;transform-origin:0 0;overflow:hidden}
.stage{min-width:0;flex:1 1 0}
#world{position:absolute;inset:0;width:100%;height:100%}
button,a{touch-action:manipulation}
.controls button,.joystick{touch-action:none;-webkit-user-select:none;-webkit-touch-callout:none}
body.mobile-viewport dialog{position:fixed;inset:auto;margin:0;left:calc(var(--visible-left,0px) + var(--visible-width,100vw)/2);top:calc(var(--visible-top,0px) + var(--visible-height,100dvh)/2);transform:translate(-50%,-50%);width:min(560px,calc(var(--visible-width,100vw) - 24px));max-height:calc(var(--visible-height,100dvh) - 24px);touch-action:pan-y pinch-zoom;overscroll-behavior:contain}
body.mobile-viewport dialog input,body.mobile-viewport dialog select{font-size:16px}
body.mobile-landscape .combat-controls{width:180px;height:166px;right:18px;bottom:28px}
body.mobile-landscape .attack{width:76px;height:76px;right:0;bottom:0}
body.mobile-landscape .skill{width:56px;height:56px;right:10px;top:0;bottom:auto}
body.mobile-landscape .potion{width:48px;height:48px;left:0;right:auto;top:4px;bottom:auto}
body.mobile-landscape .dash{width:58px;height:58px;left:0;right:auto;bottom:2px;top:auto}
body.mobile-landscape .ability>span{font-size:12px;line-height:16px;letter-spacing:0;top:calc(100% + 4px)}
body.mobile-landscape .intro-copy .primary-button{min-width:0;width:100%;max-width:340px}
body.mobile-landscape.mobile-short .combat-controls{width:156px;height:140px;bottom:28px}
body.mobile-landscape.mobile-short .attack{width:64px;height:64px}
body.mobile-landscape.mobile-short .skill{width:52px;height:52px;right:6px}
body.mobile-landscape.mobile-short .potion{width:44px;height:44px;top:0}
body.mobile-landscape.mobile-short .dash{width:54px;height:54px;bottom:0}
body.mobile-landscape.mobile-short .quest{display:none}
body.mobile-landscape.mobile-short .combo-display{bottom:184px;font-size:12px}

.app-footer .release-version{font-size:11px;white-space:nowrap;flex-shrink:0;margin-left:8px}
