#touchControls[hidden],#rotateNotice[hidden]{display:none!important}#touchToggle{font-size:12px}#touchControls{position:absolute;inset:0;pointer-events:none;z-index:5;touch-action:none;user-select:none;-webkit-user-select:none}#joystick{position:absolute;left:max(12px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom));width:104px;height:104px;border:2px solid #cfbb8780;border-radius:50%;background:#17251c88;pointer-events:auto;touch-action:none;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 12px #0004}#joystick::before{content:'이동';position:absolute;bottom:8px;font-size:10px;color:#e4ddc4aa}#stick{width:45px;height:45px;border-radius:50%;background:#bca46dbb;border:1px solid #f3dca8;pointer-events:none}.touch-top{position:absolute;right:max(8px,env(safe-area-inset-right));top:7px;display:flex;gap:5px;pointer-events:auto}.touch-top button{min-height:42px;min-width:45px;padding:8px;font-size:12px;background:#202d23e8;touch-action:none}.touch-world,.touch-battle{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;max-width:210px;pointer-events:auto}.touch-world button,.touch-battle button{min-width:68px;height:52px;font-size:14px;font-weight:650;background:#24382be8;border-color:#b39b66;touch-action:none}.touch-battle button:first-child{background:#9b7f43ed;color:#fff4d4}#touchContext{position:absolute;left:50%;transform:translateX(-50%);bottom:5px;color:#e5ddc6;background:#102016a6;border-radius:4px;padding:3px 10px;font-size:10px;white-space:nowrap}#touchControls .held{background:#c9ad72!important;color:#152018!important;transform:scale(.97)}#touchControls:not([data-screen=world]):not([data-screen=battle]) #joystick{display:none}#touchControls:not([data-screen=world]) .touch-world,#touchControls:not([data-screen=battle]) .touch-battle{display:none}#touchControls:not([data-screen=world]):not([data-screen=battle]) #touchContext{bottom:auto;top:55px}#rotateNotice{position:absolute;inset:0;z-index:15;background:#152018f5;display:flex;align-items:center;justify-content:center;text-align:center;padding:25px;color:#edddba}#rotateNotice h2{font-size:25px}#rotateNotice p{line-height:1.8;color:#bdc9b6}.touch-mode.playing header{height:40px;padding:0 max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left))}.touch-mode.playing .seal,.touch-mode.playing .brand small,.touch-mode.playing footer{display:none}.touch-mode.playing .brand strong{font-size:14px}.touch-mode.playing header button{font-size:11px;padding:6px 9px}.touch-mode.playing header .actions{gap:5px}.touch-mode .mobile{display:block}.touch-mode{height:100dvh;overscroll-behavior:none}.touch-mode main{touch-action:none}.touch-mode.playing .help{inset:6px;padding:16px 20px;z-index:20}.touch-mode.playing .help p{font-size:12px}.touch-mode.playing .help h2{font-size:18px}.touch-mode.playing .help .close{right:12px;top:12px}.touch-mode.playing #touchControls[data-screen=title] .touch-top{display:none}@media(orientation:portrait){.touch-mode .welcome{padding:18px}.touch-mode .welcome h1{font-size:53px}.touch-mode .kicker{letter-spacing:.12em;font-size:10px}.touch-mode .keys{display:none}.touch-mode .description{font-size:12px}.touch-mode #joystick{bottom:32px}.touch-mode .touch-world,.touch-mode .touch-battle{bottom:42px}.touch-mode #touchContext{bottom:10px}}
@media(orientation:landscape) and (max-height:500px){.touch-mode:not(.playing) header{height:44px;padding:0 12px}.touch-mode:not(.playing) header .seal,.touch-mode:not(.playing) header .brand small{display:none}.touch-mode:not(.playing) .brand strong{font-size:16px}.touch-mode:not(.playing) header button{font-size:11px;padding:7px 9px}.touch-mode:not(.playing) footer{height:22px;font-size:9px;padding:0 12px}.touch-mode:not(.playing) .welcome{padding:6px 12px;width:100%;max-width:650px}.touch-mode:not(.playing) .kicker,.touch-mode:not(.playing) .keys{display:none}.touch-mode:not(.playing) .welcome h1{font-size:43px;line-height:1.1;margin:0 0 4px}.touch-mode:not(.playing) .subtitle{font-size:15px;margin:0 0 6px}.touch-mode:not(.playing) .portraits{gap:15px;margin:0 0 6px}.touch-mode:not(.playing) .portrait{width:46px;height:46px}.touch-mode:not(.playing) .start{font-size:15px;padding:10px 33px}.touch-mode:not(.playing) .description{font-size:10px;line-height:1.35;margin:7px 0 0}.touch-mode:not(.playing) .mobile{font-size:10px;margin:5px 0 0}}
#touchOrders[hidden]{display:none!important}#touchOrders{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:143px;display:flex;flex-direction:column;gap:5px;padding:7px;border:1px solid #b6a16c;border-radius:6px;background:#18291ef5;pointer-events:auto}#touchOrders button{min-width:120px;min-height:44px;font-size:13px;touch-action:none}#touchControls:not([data-screen=battle]) #touchOrders{display:none}
#bootOverlay[hidden]{display:none!important}#bootOverlay{position:absolute;inset:0;z-index:18;background:#172018f8;display:flex;align-items:center;justify-content:center;text-align:center;padding:20px}#bootOverlay>div{max-width:550px}#bootTitle{font-size:21px;color:#eddbb0}#bootDetail{line-height:1.7;font-size:13px;color:#c3cdbb;overflow-wrap:anywhere}#bootProgress{width:85%;max-width:360px;accent-color:#c6a363}#bootOverlay a{display:inline-block;padding:10px 16px;border:1px solid #6b7a61;border-radius:5px;margin-left:7px;font-size:13px}#bootOverlay button{font-size:13px}

#mobileQuickMenu { display: none; }

@media (orientation: landscape) {
  .touch-controls-ready.touch-mode.playing header { display: none; }
  .touch-mode.playing[data-game-screen="world"] main { background: #17251c; }
  .touch-mode #touchControls[data-screen="world"] .touch-top {
    align-items: stretch;
    flex-direction: column;
    background: #17251cee;
    border-radius: 8px;
  }
  .touch-mode #touchControls[data-screen="world"] .touch-top #mobileQuickMenu { display: block; }
  .touch-mode #touchControls[data-screen="world"]:not(.quick-open) .touch-top [data-action] { display: none; }
  .touch-mode #touchControls[data-screen="world"] .touch-world {
    align-items: end;
    flex-wrap: nowrap;
    max-width: none;
  }
  .touch-mode #touchControls[data-screen="world"] .touch-world [data-action="camp"] { display: none; }
  .touch-mode #touchControls[data-screen="world"].quick-open .touch-world [data-action="camp"] { display: block; }
  .touch-mode #touchControls[data-screen="world"] .touch-world button {
    min-width: 48px;
    height: 44px;
    padding: 5px;
  }
  .touch-mode #touchControls[data-screen="world"] .touch-world .primary-touch {
    min-width: 70px;
    height: 70px;
    border-radius: 50%;
    border-width: 2px;
    color: #fff1c9;
  }
  .touch-mode #touchControls[data-screen="world"] #touchContext { display: none; }
}

.field-tabs { display: contents; }
.field-tabs .online-tab { display: none; }

@media (orientation: landscape) {
  .touch-mode #touchControls[data-screen="world"] .touch-world {
    left: max(115px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    gap: 10px;
    justify-content: flex-end;
    pointer-events: none;
  }
  .touch-mode #touchControls[data-screen="world"] .touch-world button { pointer-events: auto; }
  .touch-mode #touchControls[data-screen="world"] .field-tabs {
    display: flex;
    flex: 0 1 460px;
    min-width: 0;
    margin-inline: auto;
    gap: 3px;
    padding: 3px;
    border: 1px solid #b29c69;
    border-radius: 9px;
    background: #141e17ed;
    box-shadow: 0 3px 10px #0005;
  }
  .touch-mode #touchControls[data-screen="world"] .field-tabs button {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    font-size: clamp(11px, 1.7vw, 15px);
    line-height: 1.1;
    border-radius: 5px;
  }
  .touch-mode #touchControls[data-screen="world"] .field-tabs .online-tab {
    display: block;
    color: #ffedbf;
    background: #333322f0;
    border-color: #aa9157;
  }
  .touch-mode #touchControls[data-screen="world"].quick-open .touch-world [data-action="camp"] {
    position: absolute;
    right: 0;
    bottom: 78px;
  }
}

/* Keep a recovery menu reachable on every active mobile game screen. */
.touch-mode #touchControls:not([data-screen="title"]) #mobileQuickMenu { display: block; }
