/* Camada visual mobile. Os comandos continuam no mobile-ui.js. */
#mu-mobile .mu-ctl,
#mu-mobile .mu-panel,
#mu-mobile .mu-editbar,
#mu-mobile .mu-recover {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  position: absolute;
}
#mu-mobile .mu-ctl { z-index: 2; }
#mu-ui-menu, #mu-ui-chat { z-index: 6; }
#mu-mobile .mu-ctl {
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  border: 0;
  padding: 0;
  color: #f4e7c4;
  font: 700 12px/1 "Segoe UI", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
}
#mu-mobile .mu-ctl img { pointer-events: none; display: block; }
#mu-ui-joy {
  background-image: url("mobile/ui/01_joystick_base.png");
  opacity: .92;
}
#mu-ui-knob {
  position: absolute;
  left: 32.5%;
  top: 32.5%;
  width: 35%;
  height: 35%;
  background: url("mobile/ui/02_joystick_center_normal.png") center / contain no-repeat;
  pointer-events: none;
}
#mu-ui-joy.is-down #mu-ui-knob {
  background-image: url("mobile/ui/03_joystick_center_pressed.png");
}
#mu-ui-atk {
  background-image: url("mobile/ui/04_attack_normal.png");
}
#mu-ui-atk.is-down { background-image: url("mobile/ui/05_attack_pressed.png"); }
#mu-ui-atk span, #mu-mobile .mu-round span, #mu-mobile .mu-rect span, #mu-mobile .mu-square span {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
}
#mu-ui-atk span { bottom: 18%; font-size: 11px; letter-spacing: .04em; }
.mu-round {
  background-image: url("mobile/ui/06_round_button_normal.png");
}
.mu-round.is-down { background-image: url("mobile/ui/07_round_button_pressed.png"); }
.mu-round.is-on { background-image: url("mobile/ui/08_round_button_active.png"); }
.mu-round .mu-ico, .mu-rect .mu-ico, .mu-square .mu-ico, .mu-tile .mu-ico {
  position: absolute;
  background: center / contain no-repeat;
  pointer-events: none;
}
.mu-round .mu-ico { left: 22%; top: 16%; width: 56%; height: 42%; }
.mu-round span { bottom: 16%; font-size: 10px; }
.mu-dot {
  position: absolute;
  right: 16%;
  top: 16%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(80, 80, 80, .8);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45);
}
.mu-round.is-on .mu-dot { background: #3ddc6a; }
.mu-square {
  background-image: url("mobile/ui/27_square_normal.png");
}
.mu-square.is-down { background-image: url("mobile/ui/28_square_pressed.png"); }
.mu-square.is-on { background-image: url("mobile/ui/29_square_active.png"); }
.mu-square .mu-ico { left: 22%; top: 8%; width: 56%; height: 52%; }
.mu-square span { top: auto; bottom: 7%; transform: none; font-size: 9px; }
.mu-square.mu-textonly span { top: 50%; bottom: auto; transform: translateY(-50%); font-size: 12px; }
#mu-ui-move .mu-ico { left: 14%; top: 14%; width: 72%; height: 72%; }
#mu-ui-move.is-down .mu-ico { background-image: url("mobile/ui/26_move_pressed.png") !important; }
.mu-f8 { background-image: url("mobile/ui/30_f8_attack_normal.png"); }
.mu-f8.is-on { background-image: url("mobile/ui/32_f8_attack_active.png"); }
.mu-f8.is-down { background-image: url("mobile/ui/31_f8_attack_pressed.png"); }
.mu-rect {
  background-image: url("mobile/ui/09_small_rectangle_normal.png");
}
.mu-rect.is-down { background-image: url("mobile/ui/10_small_rectangle_pressed.png"); }
.mu-rect .mu-ico { left: 8%; top: 18%; width: 22%; height: 64%; }
.mu-rect span { top: 50%; transform: translateY(-50%); font-size: 13px; }
#mu-mobile .mu-panel {
  display: none;
  z-index: 4;
  overflow: hidden;
  box-sizing: border-box;
  pointer-events: auto;
}
#mu-mobile.mu-menu-open #mu-panel-menu,
#mu-mobile.mu-personal-open #mu-panel-personal { display: block; }
.mu-panel-bg,
.mu-panel-frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mu-panel-bg {
  background: url("mobile/ui/14_panel_background.png") center / 100% 100% no-repeat;
  opacity: var(--mu-panel-alpha, .9);
}
.mu-panel-frame {
  box-sizing: border-box;
  border-style: solid;
  border-width: 16px;
  border-image: url("mobile/ui/13_panel_frame.png") 72 / 16px / 0 stretch;
}
.mu-panel-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
  pointer-events: auto;
}
.mu-panel-chrome {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 28px;
  margin: 0;
  pointer-events: none;
}
.mu-panel-chrome .mu-close,
.mu-panel-chrome .mu-back,
.mu-panel-chrome h2 { pointer-events: auto; }
.mu-panel-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 4px 8px;
  box-sizing: border-box;
}
.mu-panel h2 {
  margin: 4px 32px 8px 0;
  text-align: center;
  color: #f0e2b8;
  font: 700 15px/1.2 "Segoe UI", sans-serif;
  letter-spacing: .12em;
}
.mu-section {
  margin: 12px 0 6px;
  color: #e7d7a4;
  font: 700 13px/1.2 "Segoe UI", sans-serif;
  letter-spacing: .06em;
}
.mu-field {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 4px 8px;
  align-items: center;
  margin: 0 0 10px;
  color: #f4e7c4;
  font: 600 12px/1.2 "Segoe UI", sans-serif;
}
.mu-field .mu-name { grid-column: 1 / -1; font: 700 13px/1.2 "Segoe UI", sans-serif; }
.mu-close {
  position: absolute;
  right: 0;
  top: 0;
  width: 28px;
  height: 28px;
  z-index: 2;
  border: 0;
  padding: 0;
  background: url("mobile/ui/15_close_normal.png") center / contain no-repeat;
}
.mu-close.is-down { background-image: url("mobile/ui/16_close_pressed.png"); }
.mu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.mu-tile {
  position: relative;
  height: 42px;
  border: 0;
  color: #f4e7c4;
  background: url("mobile/ui/11_menu_tile_normal.png") center / 100% 100% no-repeat;
  font: 700 13px/1 "Segoe UI", sans-serif;
  text-shadow: 0 1px 2px #000;
}
.mu-tile.is-down { background-image: url("mobile/ui/12_menu_tile_pressed.png"); }
.mu-tile .mu-ico { left: 8px; top: 7px; width: 26px; height: 26px; }
.mu-tile span { position: absolute; left: 38px; right: 6px; top: 50%; transform: translateY(-50%); text-align: left; }
.mu-tile.mu-textonly span { left: 8px; text-align: center; right: 8px; }
.mu-tile.mu-wide { grid-column: 1 / -1; }
#mu-personal-list > .mu-tile { display: block; width: 100%; margin: 6px 0; }
.mu-back {
  display: block;
  margin: 0 auto 8px;
  background: transparent;
  border: 0;
  color: #e7d7a4;
  font: 700 12px/1 "Segoe UI", sans-serif;
}
.mu-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
  color: #f4e7c4;
  font: 600 11px/1.2 "Segoe UI", sans-serif;
  margin: 0 0 8px;
}
.mu-row input[type="range"] { width: 100%; grid-column: 1 / -1; }
.mu-editbar {
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  display: none;
  gap: 8px;
  z-index: 4;
}
#mu-mobile.mu-play.mu-edit .mu-editbar { display: flex; }
.mu-editbar button, .mu-recover {
  border: 0;
  color: #f4e7c4;
  background: url("mobile/ui/09_small_rectangle_normal.png") center / 100% 100% no-repeat;
  height: 36px;
  min-width: 108px;
  font: 700 12px/1 "Segoe UI", sans-serif;
}
#mu-mobile.mu-edit .mu-ctl { outline: 1px dashed rgba(240, 210, 120, .7); }
.mu-recover {
  display: none;
  left: 8px;
  top: 8px;
  width: 92px;
}
#mu-mobile.mu-recover-menu .mu-recover { display: block; }
#mu-turn-hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 80;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .55);
  color: #f4e7c4;
  font: 600 12px/1.2 "Segoe UI", sans-serif;
  pointer-events: none;
}
html.mu-portrait #mu-turn-hint { display: block; }
#mu-mobile .mu-world { display: none; }
#mu-mobile.mu-play .mu-world { display: block; }
#mu-mobile.mu-play .mu-panel { display: none; }
#mu-mobile.mu-play.mu-menu-open #mu-panel-menu,
#mu-mobile.mu-play.mu-personal-open #mu-panel-personal,
#mu-mobile.mu-play.mu-sheet-open #mu-sheet { display: block; }
#mu-sheet {
  position: absolute;
  left: 50%;
  top: 16%;
  width: 280px;
  z-index: 50;
  transform: translateX(-50%);
}
#mu-sheet .mu-sheet-text {
  margin: 0 0 10px;
  text-align: center;
  color: #f4e7c4;
  font: 700 14px/1.35 "Segoe UI", sans-serif;
  text-shadow: 0 1px 2px #000;
}
#mu-sheet .mu-tile { display: block; width: 100%; margin: 0 0 6px; }
#mu-sheet.mu-sheet-item {
  left: 10px;
  top: 8%;
  width: 230px;
  transform: none;
}
#mu-carry {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  z-index: 45;
  max-width: 280px;
  padding: 8px 12px;
  pointer-events: none;
  text-align: center;
  color: #f4e7c4;
  font: 700 13px/1.3 "Segoe UI", sans-serif;
  text-shadow: 0 1px 2px #000;
  background: rgba(0, 0, 0, .55);
}
#mu-mobile.mu-carry-on #mu-carry { display: block; }
#mu-mobile .mu-off { display: none !important; }
#mu-mobile.mu-cover-right #mu-toprow,
#mu-mobile.mu-cover-right #mu-toprow .mu-ctl,
#mu-mobile.mu-cover-right #mu-ui-atk,
#mu-mobile.mu-cover-right #mu-ui-ctrl,
#mu-mobile.mu-cover-right #mu-ui-auto {
  visibility: hidden !important;
  pointer-events: none !important;
}
#mu-mobile.mu-cover-left #mu-ui-joy,
#mu-mobile.mu-cover-left #mu-ui-knob {
  visibility: hidden !important;
  pointer-events: none !important;
}
#mu-toprow {
  position: absolute;
  z-index: 6;
  display: none;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-end;
  box-sizing: border-box;
  pointer-events: none;
  min-width: 0;
}
#mu-mobile.mu-play #mu-toprow { display: flex; }
#mu-toprow-scroll {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  pointer-events: auto;
  touch-action: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
#mu-toprow-pin {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  margin-left: 8px;
  pointer-events: auto;
}
#mu-mobile #mu-toprow .mu-ctl {
  position: relative;
  left: auto;
  top: auto;
  flex: 0 0 auto;
  touch-action: none;
}
.mu-field input[type="range"] { width: 100%; touch-action: none; }
