/* HadesMT2 100% Authentic Ymir Metin2 Mobile HUD & Craft Theme
 * Built exclusively from real extracted Metin2 `etc` / `icon` pack textures under ./metin2-ui/,
 * ./skill-icons/, and ./hades-icons/:
 *   - ThinBoard 9-slice (thinboard_9slice.png / thinboard_modal_9slice.png)
 *   - Dragon-Head Bronze Rail (chat_bar_left/middle/right.png)
 *   - Native Window TitleBar & HorizontalBar (titlebar_*.png, horizontalbar_*.png)
 *   - Real Character Face Portraits (face_{warrior,assassin,sura,shaman}_{m,w}.png)
 *   - Metallic HP / SP / EXP Gauges (gauge_slot_*.png + gauge_red/blue/yellow.png)
 *   - Hand-Painted Circular MiniMap & Medallion Rims (minimap_rim.png, medallion_rim_gold.png)
 *   - Embossed Slots & Riveted Frames (slot_base.png, metin_slot_gold.png)
 *   - Native Stone Buttons (small/middle/large/xlarge_button_01..03.png, close_button_01..03.png)
 *
 * Strictly Mobile/Touch-Only Activation:
 *   Gated on html.m2-mobile-active / body.m2-mobile-active (zero desktop overhead).
 *   Zero generic rounded SaaS cards, zero backdrop blur slop, zero generic vector SVG icons.
 */

/* ============================================================================
 * 1. Mobile Full-Bleed Viewport & Canvas Touch Isolation (Rotation-Safe!)
 * ============================================================================ */
html.m2-mobile-active,
html.m2-mobile-active body {
  position: fixed;
  inset: 0;
  width: var(--m2-vw, 100vw);
  height: var(--m2-vh, 100dvh);
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  background: #0b0908;
}

html.m2-mobile-active canvas#canvas {
  position: fixed !important;
  inset: 0 !important;
  width: var(--m2-vw, 100vw) !important;
  height: var(--m2-vh, 100dvh) !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  display: block;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================================
 * 2. Suppress ALL Duplicate Desktop Floating Chrome on Mobile
 *    & Unify Hades Floor HUD + Young Uriel Dialogue in Real Metin2 ThinBoard!
 * ============================================================================ */
html.m2-mobile-active #m2-topbar,
html.m2-mobile-active #m2-pill,
html.m2-mobile-active #m2-gfx-pill,
html.m2-mobile-active #m2-hades-launcher,
html.m2-mobile-active #m2-qol-launcher,
html.m2-mobile-active #m2-pa-bar,
html.m2-mobile-active #m2-prealpha-bar,
html.m2-mobile-active #m2h-skillbar-dock {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Keep #m2-hud-wrap purely as an invisible host for #m2-settings / #m2-help drawers */
html.m2-mobile-active #m2-hud-wrap {
  top: calc(env(safe-area-inset-top, 0px) + 46px) !important;
  left: 50% !important;
  transform: translateX(-50%);
  align-items: center;
  max-width: calc(100vw - 16px);
  z-index: 9750;
}

/* Hades In-Run Floor Tracker: 100% Real Metin2 ThinBoard directly under Hero Frame! */
html.m2-mobile-active #m2-hades-hud .m2h-chamber-dock {
  top: calc(env(safe-area-inset-top, 0px) + 62px) !important;
  left: calc(env(safe-area-inset-left, 0px) + 8px) !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-panel-rail {
  display: none !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-panel-wrap {
  width: 206px !important;
  max-width: 206px !important;
}
html.m2-mobile-active #m2-hades-hud .m2-thinboard.m2h-panel-box {
  border-style: solid !important;
  border-width: 13px !important;
  border-image-source: url("./metin2-ui/thinboard_9slice.png") !important;
  border-image-slice: 16 fill !important;
  border-image-repeat: stretch !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.72) !important;
  padding: 0 !important;
  image-rendering: pixelated;
}
html.m2-mobile-active #m2-hades-hud .m2h-panel-inner {
  margin: -9px -8px !important;
  gap: 2.5px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-row-top {
  gap: 4px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-title {
  font-size: 9.5px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.1px;
}
html.m2-mobile-active #m2-hades-hud .m2h-top-right {
  gap: 3px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-heat-tag {
  font-size: 9.5px !important;
  gap: 2px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-heat-tag img,
html.m2-mobile-active #m2-hades-hud .m2h-res-item img,
html.m2-mobile-active #m2-hades-hud .m2h-obj-ico {
  width: 11px !important;
  height: 11px !important;
}
html.m2-mobile-active #m2-hades-hud .m2-btn-min {
  width: 13px !important;
  height: 13px !important;
  transform: scale(0.85);
}
html.m2-mobile-active #m2-hades-hud .m2h-row-obj {
  font-size: 9.5px !important;
  gap: 4px !important;
  line-height: 1.2 !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-obj-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.m2-mobile-active #m2-hades-hud .m2h-row-res {
  font-size: 9.2px !important;
  gap: 4px !important;
  padding-top: 2px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-res-group {
  gap: 5px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-mult-txt {
  font-size: 9px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-strip {
  font-size: 9.2px !important;
  padding: 2px 4px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-boon-dock {
  top: calc(env(safe-area-inset-top, 0px) + 128px) !important;
  left: calc(env(safe-area-inset-left, 0px) + 8px) !important;
  max-height: calc(100dvh - 260px);
  overflow-y: auto;
}
html.m2-mobile-active #m2-hades-hud .m2h-boss-dock {
  top: calc(env(safe-area-inset-top, 0px) + 6px) !important;
  width: min(300px, calc(100vw - 392px)) !important;
  min-width: 200px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-boss-port {
  width: 30px !important;
  height: 30px !important;
}
html.m2-mobile-active #m2-hades-hud .m2h-boss-port img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center top !important;
}

/* Hades Voice Dialogue Toast (Young Uriel / Demirci / Baek-Go):
 * 100% Authentic Metin2 ThinBoard + Riveted Gold Portrait Slot + 100% UNCROPPED portrait! */
html.m2-mobile-active #m2-hades-boss-banner,
html.m2-mobile-active #m2-hades-boss-banner.has-skillbar,
html.m2-mobile-active #m2-hades-sacrifice-banner,
html.m2-mobile-active #m2-hades-twist-banner {
  bottom: auto !important;
  top: calc(env(safe-area-inset-top, 0px) + 6px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(300px, calc(100vw - 392px)) !important;
  min-width: 210px !important;
  z-index: 9435;
}
html.m2-mobile-active #m2-hades-boss-banner .m2h-bb-rail {
  display: none !important;
}
html.m2-mobile-active #m2-hades-boss-banner .m2-thinboard {
  border-style: solid !important;
  border-width: 14px !important;
  border-image-source: url("./metin2-ui/thinboard_9slice.png") !important;
  border-image-slice: 16 fill !important;
  border-image-repeat: stretch !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.78) !important;
  padding: 0 !important;
  image-rendering: pixelated;
}
html.m2-mobile-active #m2-hades-boss-banner .m2h-bb-in {
  margin: -9px -8px !important;
  gap: 8px !important;
  align-items: center !important;
}
html.m2-mobile-active #m2-hades-boss-banner .m2h-bb-port {
  width: 42px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 3px !important;
  border-radius: 0 !important;
  border: 0 !important;
  background: url("./metin2-ui/metin_slot_gold.png?v=hd2") no-repeat center center / 100% 100% !important;
  image-rendering: auto;
  overflow: hidden !important;
  flex: none !important;
}
html.m2-mobile-active #m2-hades-boss-banner .m2h-bb-port img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center top !important;
  image-rendering: auto;
  filter: brightness(1.14) contrast(1.04);
}
html.m2-mobile-active #m2-hades-boss-banner .m2h-bb-txt {
  gap: 2px !important;
}
html.m2-mobile-active #m2-hades-boss-banner .m2h-bb-speaker {
  font-size: 10.5px !important;
  line-height: 1.15 !important;
}
html.m2-mobile-active #m2-hades-boss-banner .m2h-bb-quote {
  font-size: 9.8px !important;
  line-height: 1.25 !important;
}

/* Ensure ALL Hades modal portraits never clip heads on mobile either */
html.m2-mobile-active .m2h-pa-port img,
html.m2-mobile-active .m2h-mb-port img,
html.m2-mobile-active .m2h-ks-port img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center top !important;
}

/* WAN asset prefetch strip: authentic Metin2 ThinBoard clear of chat & controls */
html.m2-mobile-active #m2-wan-pill {
  right: auto;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 52px);
  min-width: 164px;
  max-width: min(86vw, 310px);
  padding: 4px 9px;
  font-size: 9.5px;
  border-radius: 0;
}
html.m2-mobile-active #m2-wan-pill .m2-wan-row {
  gap: 7px;
}
html.m2-mobile-active #m2-wan-pill .m2-wan-meta {
  flex: none;
  white-space: nowrap;
}
html.m2-mobile-active #m2-wan-pill.visible {
  transform: translateX(-50%) translateY(0);
}

/* ============================================================================
 * 3. Mobile Controls Root & Shared Authentic Metin2 UI Primitives
 * ============================================================================ */
#m2-mob-root {
  display: none;
  position: static;
  pointer-events: none;
  font-family: Tahoma, "Liberation Sans", Verdana, Arial, sans-serif;
  color: #efe2c6;
  text-shadow: 1px 1px 0 #000;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

html.m2-mobile-active #m2-mob-root {
  display: block;
}

#m2-mob-root *,
#m2-mob-root *::before,
#m2-mob-root *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Authentic Metin2 Dragon-Head Bronze Rail (chat_bar_left/middle/right: 64x22) */
.m2m-dragon-rail {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 16px;
  pointer-events: none;
  image-rendering: pixelated;
}
.m2m-dr-l {
  width: 46px;
  height: 100%;
  flex: none;
  background: url("./metin2-ui/chat_bar_left.png") no-repeat left top / 46px 100%;
}
.m2m-dr-m {
  flex: 1;
  height: 100%;
  min-width: 8px;
  background: url("./metin2-ui/chat_bar_middle.png") repeat-x left top / auto 100%;
}
.m2m-dr-r {
  width: 46px;
  height: 100%;
  flex: none;
  background: url("./metin2-ui/chat_bar_right.png") no-repeat right top / 46px 100%;
}

/* Authentic Metin2 Window TitleBar (titlebar_left/center/right: 32x23 + close_button_01..03: 15x15) */
.m2m-titlebar {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 23px;
  flex: none;
  image-rendering: pixelated;
}
.m2m-tb-l {
  width: 24px;
  height: 23px;
  flex: none;
  background: url("./metin2-ui/titlebar_left.png") no-repeat left top / 32px 23px;
}
.m2m-tb-c {
  flex: 1;
  min-width: 0;
  height: 23px;
  background: url("./metin2-ui/titlebar_center.png") repeat-x left top / 32px 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.m2m-tb-txt {
  font-size: 11px;
  font-weight: 700;
  color: #ffe28c;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}
.m2m-tb-r {
  width: 32px;
  height: 23px;
  flex: none;
  background: url("./metin2-ui/titlebar_right.png") no-repeat right top / 32px 23px;
}
.m2m-tb-close {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  right: 3px;
  top: 3px;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  background: url("./metin2-ui/close_button_01.png") no-repeat center center / 15px 15px;
  image-rendering: pixelated;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 2;
}
/* Invisible expanded mobile touch target around crisp 15x15 close button */
.m2m-tb-close::before {
  content: "";
  position: absolute;
  inset: -8px;
}
.m2m-tb-close:hover  { background-image: url("./metin2-ui/close_button_02.png"); }
.m2m-tb-close:active { background-image: url("./metin2-ui/close_button_03.png"); }

/* ============================================================================
 * 4. Authentic Metin2 1-Tap Login Window (#m2-mob-login-card)
 *    Real Dragon-Head Rail + ThinBoard Modal + TitleBar + XLarge & Middle Stone Buttons
 * ============================================================================ */
#m2-mob-login-card {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9440;
  width: min(calc(100vw - 20px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), 342px);
  pointer-events: auto;
  touch-action: manipulation;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#m2-mob-root.is-ingame #m2-mob-login-card,
#m2-mob-login-card.is-hidden {
  display: none !important;
}

.m2m-lc-win {
  display: flex;
  flex-direction: column;
  width: 100%;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.85));
}
.m2m-lc-rail {
  height: 18px;
  margin-bottom: -4px;
  position: relative;
  z-index: 2;
}
.m2m-lc-box {
  border-style: solid;
  border-width: 16px;
  border-image-source: url("./metin2-ui/thinboard_modal_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  image-rendering: pixelated;
}
.m2m-lc-inner {
  margin: -10px -10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m2m-lc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 3px 0;
}

.m2m-lc-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.m2m-lc-crest {
  width: 30px;
  height: 30px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.m2m-lc-crest-img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}

.m2m-lc-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
}

.m2m-lc-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.35px;
  color: #ffe28c;
  text-shadow: 1px 1px 0 #000;
}

.m2m-lc-sub {
  font-size: 9.5px;
  font-weight: 700;
  color: #b4c8dc;
  letter-spacing: 0.15px;
}

.m2m-lc-lang {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
}

/* Real Metin2 Small Stone Buttons (small_button_01..03.png: 43x21) for TR | EN */
.m2m-lc-lang-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  width: 38px;
  height: 21px;
  padding: 0;
  background: url("./metin2-ui/small_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  color: #b8ae9c;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  touch-action: manipulation;
}
.m2m-lc-lang-btn:hover {
  background-image: url("./metin2-ui/small_button_02.png");
  color: #ffffff;
}
.m2m-lc-lang-btn:active {
  background-image: url("./metin2-ui/small_button_03.png");
}
.m2m-lc-lang-btn.active {
  background-image: url("./metin2-ui/small_button_02.png");
  color: #ffe280;
  box-shadow: inset 0 0 0 1px rgba(235, 192, 92, 0.72);
}

/* Primary 1-Tap CTA: Real Metin2 XLarge Stone Button (xlarge_button_01..03.png) gilded warm gold! */
#m2-mob-instant-play {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: url("./metin2-ui/xlarge_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(226, 180, 78, 0.65),
    inset 0 0 16px rgba(196, 132, 28, 0.32);
  color: #fff2b6;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 1px 1px 0 #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  touch-action: manipulation;
}
#m2-mob-instant-play:hover:not(:disabled) {
  background-image: url("./metin2-ui/xlarge_button_02.png");
  color: #ffffff;
}
#m2-mob-instant-play:active:not(:disabled) {
  background-image: url("./metin2-ui/xlarge_button_03.png");
}
#m2-mob-instant-play:disabled {
  opacity: 0.82;
  cursor: wait;
}
.m2m-instant-ico {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
  image-rendering: auto;
  filter: drop-shadow(1px 1px 0 #000);
}

#m2-mob-creds-chip {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 0;
  border: 1px solid #4e7858;
  background: rgba(12, 26, 16, 0.9);
  font-size: 10.5px;
  color: #c8f2cf;
}
#m2-mob-creds-chip.visible { display: flex; }

.m2m-creds-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 10.5px;
  color: #fff4c8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m2m-creds-copy {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  min-width: 48px;
  height: 20px;
  padding: 0 7px;
  background: url("./metin2-ui/small_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  color: #ffe28c;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  flex: none;
}
.m2m-creds-copy:active { background-image: url("./metin2-ui/small_button_03.png"); }

#m2-mob-lc-err {
  display: none;
  font-size: 10.5px;
  color: #ff9c92;
  text-align: center;
  line-height: 1.25;
}
#m2-mob-lc-err.visible { display: block; }

/* Secondary Login Actions: 3 Real Metin2 Middle Stone Buttons (middle_button_01..03.png) */
.m2m-lc-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding-top: 2px;
}
.m2m-lc-link {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  height: 25px;
  padding: 0 5px;
  background: url("./metin2-ui/middle_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  color: #e8dec8;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
.m2m-lc-link:hover  { background-image: url("./metin2-ui/middle_button_02.png"); color: #ffe89c; }
.m2m-lc-link:active { background-image: url("./metin2-ui/middle_button_03.png"); }
.m2m-lc-link-ico {
  width: 15px;
  height: 15px;
  display: block;
  flex: none;
  object-fit: contain;
  image-rendering: auto;
}

/* Minimized Login Restore Strip: Real Metin2 ThinBoard */
#m2-mob-login-restore {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9440;
  display: none;
  border-style: solid;
  border-width: 11px;
  border-image-source: url("./metin2-ui/thinboard_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  image-rendering: pixelated;
  pointer-events: auto;
}
#m2-mob-login-restore.visible { display: block; }
#m2-mob-root.is-ingame #m2-mob-login-restore { display: none !important; }
.m2m-lr-in {
  margin: -8px -5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.m2m-lr-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: #ffe28c;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.m2m-lr-ico {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}
.m2m-lr-sep { width: 1px; height: 14px; background: rgba(186, 168, 126, 0.35); }

/* ============================================================================
 * 5A. Top-Left Authentic Metin2 Mobile Hero Frame (#m2-mob-hero-frame)
 *     Real ThinBoard 9-Slice + Riveted Gold Portrait Frame + Real Race Face (0..7)
 *     + Real Metallic Gauge Troughs (gauge_slot_* + gauge_red/blue/yellow.png)
 * ============================================================================ */
#m2-mob-hero-frame {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  left: calc(env(safe-area-inset-left, 0px) + 8px);
  z-index: 9420;
  width: 206px;
  height: 52px;
  display: none;
  border-style: solid;
  border-width: 12px;
  border-image-source: url("./metin2-ui/thinboard_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.72);
  image-rendering: pixelated;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}
#m2-mob-root.is-ingame #m2-mob-hero-frame {
  display: block;
}
#m2-mob-hero-frame:active {
  filter: brightness(1.12);
}

.m2m-hero-in {
  margin: -9px -8px;
  width: calc(100% + 16px);
  height: calc(100% + 18px);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Real Metin2 Riveted Gold Slot Frame (metin_slot_gold.png) + Real Face Portrait */
.m2m-hero-face-slot {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 3px;
  background: url("./metin2-ui/metin_slot_gold.png?v=hd2") no-repeat center center / 100% 100%;
  image-rendering: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m2m-hero-face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  image-rendering: auto;
}

.m2m-hero-lv {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 28px;
  height: 12px;
  padding: 0 3px;
  border-radius: 0;
  border: 1px solid #9e8147;
  background: #140f0a;
  box-shadow: 0 1px 3px #000;
  color: #ffe280;
  font-size: 8.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 10px;
  text-align: center;
  white-space: nowrap;
  text-shadow: 1px 1px 0 #000;
}

.m2m-hero-bars {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m2m-hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  line-height: 1;
  margin-bottom: 1px;
}
.m2m-hero-name {
  font-size: 10px;
  font-weight: 700;
  color: #ffe699;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 96px;
}
.m2m-hero-gold {
  display: none;
  align-items: center;
  gap: 2px;
  font-size: 8.5px;
  font-weight: 700;
  color: #f0cf70;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}
.m2m-hero-gold.has-gold {
  display: inline-flex;
}
.m2m-yang-ico {
  width: 11px;
  height: 11px;
  display: block;
  flex: none;
  object-fit: contain;
  image-rendering: auto;
}

/* Real Metin2 Metallic Gauges (gauge_slot_left/center/right + gauge_red/blue/yellow.png) */
.m2m-gauge-track {
  position: relative;
  width: 100%;
  image-rendering: pixelated;
}
.m2m-gauge-track.hp,
.m2m-gauge-track.sp {
  background:
    url("./metin2-ui/gauge_slot_left.png") no-repeat left center / 14px 100%,
    url("./metin2-ui/gauge_slot_right.png") no-repeat right center / 14px 100%,
    url("./metin2-ui/gauge_slot_center.png") repeat-x center center / 16px 100%;
  padding: 1px 9px;
}
.m2m-gauge-track.hp { height: 11.5px; }
.m2m-gauge-track.sp { height: 10px; }
.m2m-gauge-track.exp {
  height: 4px;
  padding: 1px 1px;
  background: #0d0b09;
  border: 1px solid #594c38;
}

.m2m-gauge-well {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.m2m-bar-fill {
  height: 100%;
  width: 100%;
  transition: width 0.2s ease-out;
  image-rendering: auto;
}
.m2m-bar-fill.hp {
  background: url("./metin2-ui/gauge_red.png?v=hd2") repeat-x left center / 16px 100%;
}
.m2m-bar-fill.sp {
  background: url("./metin2-ui/gauge_blue.png?v=hd2") repeat-x left center / 16px 100%;
}
.m2m-bar-fill.exp {
  background: url("./metin2-ui/gauge_yellow.png?v=hd2") repeat-x left center / 16px 100%;
}

#m2-mob-hero-frame.low-hp .m2m-gauge-track.hp {
  animation: m2mLowHpPulse 0.9s ease-in-out infinite;
}
@keyframes m2mLowHpPulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 56, 40, 0.55)); }
  50%      { filter: drop-shadow(0 0 6px rgba(255, 72, 52, 0.98)); }
}

.m2m-bar-txt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7.8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff8ea;
  text-shadow: 1px 1px 0 #000, -1px 0 0 rgba(0, 0, 0, 0.65);
  pointer-events: none;
}
.m2m-gauge-track.sp .m2m-bar-txt {
  font-size: 7px;
  color: #e6f2ff;
}

/* ============================================================================
 * 5B. Collapsible Left-Side Metin2 Quest Tracker (#m2-mob-quest-wrap)
 *     Real ThinBoard 9-Slice + Authentic Red-Ribbon Quest Scroll (quest_scroll.png)
 *     Auto-collapses & hides cleanly inside Hades combat!
 * ============================================================================ */
#m2-mob-quest-wrap {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  left: calc(env(safe-area-inset-left, 0px) + 8px);
  z-index: 9416;
  width: 206px;
  display: none;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}
#m2-mob-root.is-ingame:not(.in-hades) #m2-mob-quest-wrap {
  display: flex;
}

#m2-mob-quest-pill {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0;
  border-style: solid;
  border-width: 10px;
  border-image-source: url("./metin2-ui/thinboard_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.68);
  image-rendering: pixelated;
  color: #f2e2be;
  font-family: inherit;
  font-size: 9.8px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
#m2-mob-quest-pill:active { filter: brightness(1.16); }

.m2m-qp-in {
  margin: -7px -5px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.m2m-qp-left {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.m2m-qp-scroll,
.m2m-quest-scroll {
  width: 16px;
  height: 16px;
  display: block;
  flex: none;
  object-fit: contain;
  image-rendering: auto;
}
.m2m-qp-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4e4c0;
}
.m2m-qp-cnt {
  flex: none;
  padding: 0 4px;
  height: 14px;
  line-height: 12px;
  border-radius: 0;
  background: #1c160f;
  border: 1px solid #8a7346;
  color: #ffe280;
  font-size: 8.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.m2m-qp-chev {
  font-size: 9px;
  color: #d6b872;
  flex: none;
  transition: transform 0.16s ease;
}
#m2-mob-quest-wrap.open .m2m-qp-chev {
  transform: rotate(180deg);
}

#m2-mob-quest-list {
  display: none;
  width: 100%;
  border-style: solid;
  border-width: 14px;
  border-image-source: url("./metin2-ui/thinboard_modal_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.82);
  image-rendering: pixelated;
  pointer-events: auto;
  touch-action: pan-y;
}
#m2-mob-quest-wrap.open #m2-mob-quest-list {
  display: block;
}

.m2m-ql-in {
  margin: -9px -8px;
  max-height: 152px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m2m-q-item {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 24px;
  padding: 3px 5px;
  border: 0;
  border-bottom: 1px solid rgba(154, 138, 104, 0.24);
  border-radius: 0;
  background: rgba(18, 15, 12, 0.72);
  color: #f0e2c2;
  font-family: inherit;
  font-size: 9.8px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  cursor: pointer;
  touch-action: manipulation;
}
.m2m-q-item:hover,
.m2m-q-item:active {
  background: rgba(88, 66, 30, 0.52);
  color: #ffe89c;
}
.m2m-q-scroll {
  width: 15px;
  height: 15px;
  display: block;
  flex: none;
  object-fit: contain;
  image-rendering: auto;
}
.m2m-q-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m2m-q-go {
  color: #e4c268;
  font-size: 11px;
  flex: none;
}
.m2m-q-empty {
  padding: 6px 8px;
  font-size: 9.5px;
  color: #a69a84;
  text-align: center;
}
.m2m-q-all-btn {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 3px;
  width: 100%;
  height: 22px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: url("./metin2-ui/large_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  color: #ffe28c;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  text-align: center;
  cursor: pointer;
}
.m2m-q-all-btn:hover  { background-image: url("./metin2-ui/large_button_02.png"); color: #fff; }
.m2m-q-all-btn:active { background-image: url("./metin2-ui/large_button_03.png"); }

/* ============================================================================
 * 5C. Top-Right 74px Authentic Metin2 Circular MiniMap (minimap_rim.png)
 *     + 2 Authentic Metin2 Square/Octagonal HUD Triggers (Hades Bloodstone & System Gears)
 * ============================================================================ */
#m2-mob-topright {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  z-index: 9422;
  display: none;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}
#m2-mob-root.is-ingame #m2-mob-topright {
  display: inline-flex;
}

#m2-mob-icon-bar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  pointer-events: auto;
  touch-action: manipulation;
}

/* Authentic Metin2 Square/Octagonal HUD Buttons (ZERO generic round pills or white SVGs!) */
.m2m-dock-btn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
  transition: transform 0.08s ease, filter 0.12s ease;
}
.m2m-dock-btn.is-hades {
  background: url("./metin2-ui/metin_slot_gold.png?v=hd2") no-repeat center center / 100% 100%;
  image-rendering: auto;
  padding: 4px;
}
.m2m-dock-btn.is-hades .m2m-dock-ico {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 0 4px rgba(255, 86, 32, 0.72));
}
.m2m-dock-btn.is-menu .m2m-dock-ico {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}
.m2m-dock-btn:active,
.m2m-dock-btn.active {
  transform: scale(0.93);
  filter: brightness(1.24) drop-shadow(0 0 6px rgba(255, 214, 108, 0.65));
}
.m2m-dock-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: #ffcf4a;
  border: 1px solid #1a0c04;
  box-shadow: 0 0 6px rgba(255, 206, 74, 0.95);
  display: none;
}
.m2m-dock-btn.has-badge .m2m-dock-dot { display: block; }
.m2m-dock-btn.ime-pulse { animation: m2mKbdPulse 1.3s ease-in-out infinite; }
@keyframes m2mKbdPulse {
  0%, 100% { filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85)); }
  50%      { filter: brightness(1.22) drop-shadow(0 0 8px rgba(132, 218, 255, 0.95)); }
}

/* 74px Authentic Metin2 Circular MiniMap wrapped in Real Ornate Brass-Iron minimap_rim.png! */
#m2-mob-radar {
  position: relative;
  width: 74px;
  height: 74px;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
  flex: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.85));
}
#m2-mob-radar:active {
  transform: scale(0.95);
}
.m2m-radar-disc {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #16241b 0%, #0a140e 66%, #050907 100%);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.95);
}
#m2-mob-radar-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.m2m-radar-n {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  font-weight: 700;
  color: #ffe89e;
  line-height: 1;
  pointer-events: none;
  text-shadow: 1px 1px 0 #000;
}
.m2m-radar-rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  image-rendering: auto;
  z-index: 4;
}
#m2-mob-radar-zone {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 102px;
  padding: 1px 6px;
  border-radius: 0;
  border: 1px solid #6b5d44;
  background:
    url("./metin2-ui/horizontalbar_left.png") no-repeat left center / 14px 100%,
    url("./metin2-ui/horizontalbar_right.png") no-repeat right center / 14px 100%,
    url("./metin2-ui/horizontalbar_center.png") repeat-x center center / 24px 100%;
  image-rendering: pixelated;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  color: #ffea9c;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  text-align: center;
  z-index: 5;
}

/* ============================================================================
 * 5D. Collapsible Authentic Metin2 Right 3x3 Sidebar Window (#m2-mob-drawer)
 *     Real thinboard_modal_9slice + titlebar + close_button + slot_base 3x3 + Stone Buttons!
 * ============================================================================ */
#m2-mob-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9680;
  background: rgba(4, 3, 2, 0.34);
  display: none;
  pointer-events: auto;
}
#m2-mob-drawer-backdrop.open {
  display: block;
}

#m2-mob-drawer {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  z-index: 9690;
  width: 254px;
  max-height: calc(100dvh - 12px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  padding: 0;
  border-style: solid;
  border-width: 14px;
  border-image-source: url("./metin2-ui/thinboard_modal_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.9);
  image-rendering: pixelated;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.16s ease;
  touch-action: manipulation;
}
#m2-mob-drawer.open {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
}

.m2m-drw-in {
  margin: -8px -8px;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.m2m-drw-subbar {
  height: 18px;
  padding: 0 8px;
  background:
    url("./metin2-ui/horizontalbar_left.png") no-repeat left center / 22px 18px,
    url("./metin2-ui/horizontalbar_right.png") no-repeat right center / 22px 18px,
    url("./metin2-ui/horizontalbar_center.png") repeat-x center center / 32px 18px;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.m2m-drw-sub {
  font-size: 9.5px;
  color: #e8dbb8;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m2m-drw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

/* Authentic Metin2 Slot-Based 3x3 Tiles (square beveled iron + real slot_base.png!) */
.m2m-drw-tile {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  height: 50px;
  padding: 3px 2px 2px;
  border-radius: 0;
  border: 1px solid #594f42;
  background: linear-gradient(180deg, rgba(30, 26, 22, 0.92) 0%, rgba(14, 12, 10, 0.95) 100%);
  box-shadow: inset 0 1px 0 rgba(210, 198, 174, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.85);
  color: #efe2c4;
  font-family: inherit;
  text-shadow: 1px 1px 0 #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 0.1s ease, border-color 0.1s ease;
}
.m2m-drw-tile:hover {
  border-color: #b89852;
  filter: brightness(1.14);
}
.m2m-drw-tile:active {
  transform: scale(0.96);
  border-color: #ffe080;
}
.m2m-drw-tile.is-active {
  border-color: #d8ae4e;
  background: linear-gradient(180deg, rgba(72, 52, 20, 0.92) 0%, rgba(30, 20, 8, 0.95) 100%);
}

.m2m-tile-slot {
  width: 32px;
  height: 32px;
  background: url("./metin2-ui/slot_base.png") no-repeat center center / 32px 32px;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.m2m-tile-slot.is-full {
  background: none;
}
.m2m-tile-ico,
.m2m-drawer-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}
.m2m-tile-slot.is-full .m2m-tile-ico {
  width: 32px;
  height: 32px;
}

.m2m-drw-tile-lbl {
  font-size: 9.2px;
  font-weight: 700;
  line-height: 1.05;
  color: #efe2c0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.m2m-tile-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 13px;
  padding: 0 3px;
  border-radius: 0;
  background: #8a1d14;
  border: 1px solid #d4aa4c;
  color: #fff2be;
  font-size: 8px;
  font-weight: 700;
  line-height: 11px;
  text-align: center;
  display: none;
}
.m2m-drw-tile.has-badge .m2m-tile-badge {
  display: block;
}

.m2m-drw-foot {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(164, 152, 128, 0.28);
}
.m2m-sp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #e2d4b4;
}
.m2m-drw-btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

/* Real Metin2 Stone Buttons (large_button_01..03.png & xlarge_button_01..03.png) */
.m2m-sp-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  height: 24px;
  padding: 0 6px;
  background: url("./metin2-ui/large_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  color: #e8dec8;
  font-family: inherit;
  font-size: 9.8px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m2m-sp-btn:hover  { background-image: url("./metin2-ui/large_button_02.png"); color: #ffffff; }
.m2m-sp-btn:active { background-image: url("./metin2-ui/large_button_03.png"); }
.m2m-sp-btn.active {
  background-image: url("./metin2-ui/large_button_02.png");
  color: #ffe280;
  box-shadow: inset 0 0 0 1px rgba(235, 192, 92, 0.65);
}
.m2m-sp-btn.is-xl {
  height: 25px;
  background-image: url("./metin2-ui/xlarge_button_01.png");
}
.m2m-sp-btn.is-xl:hover  { background-image: url("./metin2-ui/xlarge_button_02.png"); }
.m2m-sp-btn.is-xl:active { background-image: url("./metin2-ui/xlarge_button_03.png"); }

/* ============================================================================
 * 5E. Slim Top-Center Metin2 ThinBoard Notice Strip (Replaces Giant BigBoard!)
 * ============================================================================ */
#m2-mob-notice-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 9430;
  max-width: min(410px, calc(100vw - 416px));
  padding: 0 4px;
  border-style: solid;
  border-width: 10px;
  border-image-source: url("./metin2-ui/thinboard_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.72);
  image-rendering: pixelated;
  color: #ffea9c;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 1px 1px 0 #000;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#m2-mob-notice-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================================
 * 5F. Authentic Metin2 Bottom-Center 2-Line Chat Strip + Expandable Chat Drawer
 *     Real Dragon-Head Bronze Rail (chat_bar_*) + thinboard_9slice + real icon_chat.png!
 * ============================================================================ */
#m2-mob-chat-strip {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  left: 196px;
  right: 320px;
  max-width: 344px;
  margin: 0 auto;
  z-index: 9410;
  display: none;
  flex-direction: column;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
  opacity: 0.74;
  transition: opacity 0.35s ease;
}
#m2-mob-root.controls-shown #m2-mob-chat-strip {
  display: flex;
}
#m2-mob-chat-strip.fresh,
#m2-mob-chat-strip:active {
  opacity: 0.96;
}

.m2m-chat-rail {
  height: 11px;
  margin-bottom: -3px;
  position: relative;
  z-index: 2;
}
.m2m-chat-rail .m2m-dr-l,
.m2m-chat-rail .m2m-dr-r {
  width: 32px;
  background-size: 32px 11px;
}

.m2m-chat-box {
  border-style: solid;
  border-width: 9px;
  border-image-source: url("./metin2-ui/thinboard_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  image-rendering: pixelated;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}
.m2m-chat-in {
  margin: -6px -4px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}

.m2m-chat-ico {
  width: 18px;
  height: 16px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m2m-chat-ico-img {
  width: 18px;
  height: 16px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}

.m2m-chat-lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.m2m-chat-line {
  font-size: 9.2px;
  font-weight: 700;
  line-height: 1.22;
  color: #f0dcb0;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m2m-chat-line.t-info   { color: #ffdf85; }
.m2m-chat-line.t-notice { color: #ffd06b; }
.m2m-chat-line.t-whisper{ color: #dfaef8; }
.m2m-chat-line.t-shout  { color: #8ff0a8; }
.m2m-chat-line.t-placeholder { color: rgba(226, 210, 176, 0.72); font-style: italic; font-weight: 400; }

/* Expanded Authentic Metin2 Chat Drawer */
#m2-mob-chat-drawer {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 46px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9760;
  width: min(calc(100vw - 20px), 380px);
  max-height: min(246px, calc(100dvh - 60px));
  padding: 0;
  border-style: solid;
  border-width: 16px;
  border-image-source: url("./metin2-ui/thinboard_modal_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.9);
  image-rendering: pixelated;
  display: none;
  pointer-events: auto;
  touch-action: manipulation;
}
#m2-mob-chat-drawer.open {
  display: block;
}
.m2m-cd-in {
  margin: -11px -10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m2m-cd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.m2m-cd-tabs {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}
.m2m-cd-tab {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  min-width: 52px;
  height: 21px;
  padding: 0 7px;
  background: url("./metin2-ui/small_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  color: #c8beaa;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
}
.m2m-cd-tab:hover  { background-image: url("./metin2-ui/small_button_02.png"); color: #fff; }
.m2m-cd-tab.active {
  background-image: url("./metin2-ui/small_button_02.png");
  color: #ffe280;
  box-shadow: inset 0 0 0 1px rgba(235, 192, 92, 0.65);
}
.m2m-cd-log {
  flex: 1;
  min-height: 70px;
  max-height: 112px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 5px 6px;
  border-radius: 0;
  background: rgba(6, 5, 4, 0.85);
  border: 1px solid #594f42;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.m2m-cd-log .m2m-chat-line {
  white-space: normal;
  word-break: break-word;
  font-size: 10.2px;
  line-height: 1.3;
}
.m2m-cd-input-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
#m2-mob-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 0;
  border: 1px solid #6b5d44;
  background: #080706;
  color: #fff6dc;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 16px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
#m2-mob-chat-input:focus {
  border-color: #ffd866;
}

/* ============================================================================
 * 6. Top-Anchored Native Mobile Keyboard Bar (#m2-mob-kbd-bar, z-index: 9700)
 *    + 1-Tap IME Restore Pill (#m2-mob-ime-pill)
 *    Authentic Metin2 thinboard_modal + titlebar + 16px anti-zoom input + OK/Tab!
 * ============================================================================ */
#m2-mob-kbd-bar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9700;
  display: none;
  width: min(calc(100vw - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), 476px);
  padding: 0;
  border-style: solid;
  border-width: 14px;
  border-image-source: url("./metin2-ui/thinboard_modal_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(218, 178, 86, 0.35);
  image-rendering: pixelated;
  pointer-events: auto;
  touch-action: manipulation;
}
#m2-mob-kbd-bar.open { display: block; }

.m2m-kbd-in {
  margin: -9px -8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.m2m-kbd-form {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin: 0;
}
#m2-mob-kbd-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border-radius: 0;
  border: 1.5px solid #9e8147;
  background: #080706;
  color: #fff6dc;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  outline: none;
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.9);
  user-select: text;
  -webkit-user-select: text;
  touch-action: manipulation;
}
#m2-mob-kbd-input:focus {
  border-color: #ffe072;
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 214, 92, 0.42);
}
#m2-mob-kbd-input::placeholder { color: #9c8f78; font-size: 13.5px; }

.m2m-kbd-inline-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.m2m-kbd-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}
.m2m-kbd-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.m2m-kbtn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 34px;
  min-width: 40px;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  background: url("./metin2-ui/middle_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  color: #f0e6d0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
.m2m-kbtn:hover  { background-image: url("./metin2-ui/middle_button_02.png"); color: #fff; }
.m2m-kbtn:active { background-image: url("./metin2-ui/middle_button_03.png"); }
.m2m-kbtn.primary {
  min-width: 64px;
  height: 38px;
  padding: 0 11px;
  background-image: url("./metin2-ui/middle_button_02.png");
  color: #fff0a8;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(242, 196, 86, 0.85), 0 0 8px rgba(235, 178, 56, 0.28);
}
.m2m-kbtn.is-compact {
  height: 38px;
  min-width: 38px;
  padding: 0 8px;
  font-size: 11px;
}
.m2m-kbtn.type-only {
  color: #bce4ff;
}
.m2m-kbd-hint {
  font-size: 9.5px;
  color: #c7bca6;
  line-height: 1.22;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.m2m-kbd-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9bf2b4;
  font-weight: 700;
  white-space: nowrap;
}
.m2m-kbd-live-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52e884;
  box-shadow: 0 0 5px #52e884;
}

/* 1-Tap IME Restore Pill (shown ONLY when user closed kbd bar while an EditLine is still focused) */
#m2-mob-ime-pill {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9695;
  display: none;
  padding: 0;
  border-style: solid;
  border-width: 10px;
  border-image-source: url("./metin2-ui/thinboard_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), 0 0 10px rgba(245, 202, 92, 0.35);
  image-rendering: pixelated;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}
#m2-mob-ime-pill.visible { display: block; }
.m2m-ime-pill-in {
  margin: -7px -4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffe896;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}
.m2m-ime-pill-ico {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}

/* ============================================================================
 * 7. Gameplay Touch Controls Layer (Visible ONLY in-game & when NO modal open)
 * ============================================================================ */
#m2-mob-game-layer {
  position: fixed;
  inset: 0;
  z-index: 9365;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}
#m2-mob-root.controls-shown #m2-mob-game-layer {
  opacity: 1;
  visibility: visible;
}

/* --- 7A. Etched East-Asian / Metin2 Ghost-Fade Left-Thumb Compass Joystick --- */
#m2-mob-joy-zone {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 34vw;
  max-width: 260px;
  min-width: 148px;
  height: 56vh;
  min-height: 176px;
  max-height: 300px;
  pointer-events: auto;
  touch-action: none;
}

#m2-mob-joy-ring {
  position: absolute;
  left: calc(env(safe-area-inset-left, 0px) + 24px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  width: 106px;
  height: 106px;
  border-radius: 50%;
  opacity: 0.22;
  background: radial-gradient(circle at 50% 50%, rgba(12, 10, 8, 0.18) 0%, rgba(8, 7, 5, 0.44) 72%, rgba(0, 0, 0, 0.65) 100%);
  transition: opacity 0.22s ease, filter 0.12s ease;
  pointer-events: none;
  will-change: transform, opacity;
}
#m2-mob-joy-ring.active {
  opacity: 0.88;
  transition: opacity 0.06s ease-out, filter 0.08s ease;
  background: radial-gradient(circle at 50% 50%, rgba(16, 12, 8, 0.30) 0%, rgba(10, 8, 6, 0.62) 72%, rgba(18, 12, 6, 0.78) 100%);
  filter: drop-shadow(0 0 10px rgba(226, 174, 72, 0.34));
}

.m2m-joy-rim-img {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  display: block;
  pointer-events: none;
  opacity: 0.9;
  image-rendering: auto;
}

.m2m-joy-compass-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

#m2-mob-joy-wedge {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  opacity: 0;
  transform: rotate(0deg);
  transition: opacity 0.1s ease;
  pointer-events: none;
  will-change: transform, opacity;
}
#m2-mob-joy-ring.active.moving #m2-mob-joy-wedge { opacity: 1; }

#m2-mob-joy-nub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #4a3a22 0%, #1d160e 65%, #0c0906 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.85), inset 0 1px 4px rgba(0, 0, 0, 0.9);
  transform: translate3d(0, 0, 0);
  will-change: transform;
  pointer-events: none;
}
#m2-mob-joy-nub::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: url("./metin2-ui/minimap_rim.png?v=hd2") no-repeat center center / 100% 100%;
  image-rendering: auto;
  pointer-events: none;
}
#m2-mob-joy-ring.active #m2-mob-joy-nub {
  background: radial-gradient(circle at 38% 32%, #866228 0%, #3a260c 64%, #120c05 100%);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.9), 0 0 10px rgba(242, 194, 82, 0.45);
}

/* --- 7B. Right Thumb: Authentic Ymir Hand-Painted Iron-Bronze Medallion Dual-Arc --- */
#m2-mob-actions {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 2px);
  width: 308px;
  height: 226px;
  pointer-events: none;
  touch-action: none;
}

.m2m-act-btn {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  padding: 3.5px;
  border: 0;
  border-radius: 50%;
  background: #14110e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.88);
  color: #f6e7c6;
  font-family: inherit;
  pointer-events: auto;
  touch-action: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, filter 0.12s ease, right 0.2s ease, bottom 0.2s ease, opacity 0.15s ease;
}
/* Real Hand-Painted Ymir Metin2 Braided Iron-Bronze Circular Ring Overlay (512px Retina HD!) */
.m2m-act-btn::after,
.m2m-medallion-rim {
  content: "";
  position: absolute;
  inset: -2px;
  background: url("./metin2-ui/minimap_rim.png?v=hd2") no-repeat center center / 100% 100%;
  image-rendering: auto;
  pointer-events: none;
  z-index: 7;
}
.m2m-act-btn.is-hidden {
  display: none !important;
  pointer-events: none !important;
}

.m2m-med-core {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 46% 36%, #241b14 0%, #110d0a 68%, #070504 100%);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}

.m2m-skill-ico,
.m2m-skill-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  image-rendering: auto;
  filter: contrast(1.04) saturate(1.06);
  transition: filter 0.12s ease;
}

.m2m-act-btn.pressed {
  transform: scale(0.92);
  filter: brightness(1.22) drop-shadow(0 0 10px rgba(255, 206, 86, 0.65));
}

.m2m-hit-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 220, 114, 0);
  pointer-events: none;
  z-index: 6;
}
.m2m-act-btn.is-casting .m2m-hit-ring { animation: m2mHitFlash 0.34s ease-out forwards; }
@keyframes m2mHitFlash {
  0%   { transform: scale(0.88); border-color: rgba(255, 232, 138, 0.96); box-shadow: 0 0 14px rgba(255, 198, 72, 0.85); opacity: 1; }
  100% { transform: scale(1.22); border-color: rgba(255, 186, 64, 0); box-shadow: 0 0 0 rgba(255, 186, 64, 0); opacity: 0; }
}
.m2m-act-btn.is-ready-flash { animation: m2mReadyShimmer 0.36s ease-out; }
@keyframes m2mReadyShimmer {
  0%   { filter: brightness(1.42); }
  100% { filter: brightness(1); }
}

.m2m-cd-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  background: conic-gradient(
    from 0deg,
    rgba(6, 4, 3, 0.82) 0deg,
    rgba(6, 4, 3, 0.82) var(--m2m-cd-deg, 0deg),
    rgba(255, 218, 112, 0.72) var(--m2m-cd-deg, 0deg),
    transparent calc(var(--m2m-cd-deg, 0deg) + 2.5deg)
  );
}
.m2m-act-btn.is-on-cd .m2m-cd-sweep,
.m2m-act-btn.is-recharging .m2m-cd-sweep { opacity: 1; }
.m2m-act-btn.is-on-cd .m2m-skill-ico { filter: grayscale(0.45) brightness(0.68); }

.m2m-cd-txt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff3cb;
  text-shadow: 1px 1px 0 #000, 0 0 4px #000;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
}
.m2m-act-btn.is-on-cd .m2m-cd-txt { opacity: 1; }

/* --- 7C. Primary Attack Medallion (72px, Forged Ymir Gold Ring + Crossed Metin2 Battle Swords!) --- */
.m2m-btn-atk {
  right: 34px;
  bottom: 7px;
  width: 72px;
  height: 72px;
  padding: 5px;
  background: #1a0906;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.9),
    0 0 14px rgba(186, 62, 24, 0.34);
}
.m2m-btn-atk::after {
  inset: -2px;
  background-image: url("./metin2-ui/medallion_rim_gold.png?v=hd2");
  image-rendering: auto;
}
.m2m-btn-atk .m2m-med-core {
  background: radial-gradient(circle at 50% 42%, #5e1910 0%, #2d0a07 58%, #100403 100%);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.94), inset 0 0 10px rgba(216, 78, 28, 0.25);
}
.m2m-atk-emblem,
.m2m-atk-img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  image-rendering: auto;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.95));
  transition: transform 0.08s ease, filter 0.1s ease;
}
.m2m-btn-atk.pressed {
  transform: scale(0.92);
  animation: m2mAtkEmber 0.65s ease-in-out infinite;
}
.m2m-btn-atk.pressed .m2m-med-core {
  background: radial-gradient(circle at 50% 42%, #8c2614 0%, #441008 58%, #160503 100%);
}
.m2m-btn-atk.pressed .m2m-atk-emblem {
  transform: scale(1.06);
  filter: drop-shadow(0 0 7px rgba(255, 208, 92, 0.85));
}
@keyframes m2mAtkEmber {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 168, 56, 0.68)); }
  50%      { filter: drop-shadow(0 0 18px rgba(255, 212, 92, 0.94)); }
}

/* --- 7D. 4 Inner-Arc Class Skill Medallions (48px, Equal-Spacing Circular Arc) --- */
.m2m-btn-skill { width: 48px; height: 48px; }
.m2m-btn-s1 { right: 146px; bottom: 6px; }
.m2m-btn-s2 { right: 137px; bottom: 62px; }
.m2m-btn-s3 { right: 99px;  bottom: 105px; }
.m2m-btn-s4 { right: 44px;  bottom: 120px; }

/* --- 7E. Evade-Dash Medallion (44px, Real Metin2 Wind Shoes 72701.tga + 2 Charge Pips!) --- */
.m2m-btn-dash {
  right: 2px;
  bottom: 78px;
  width: 44px;
  height: 44px;
}
.m2m-btn-dash .m2m-med-core {
  background: radial-gradient(circle at 50% 40%, #1c282e 0%, #0d1316 68%, #05080a 100%);
}
.m2m-dash-emblem,
.m2m-dash-img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
  transform: none;
  image-rendering: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.95));
}
.m2m-btn-dash.is-invuln {
  filter: drop-shadow(0 0 10px rgba(146, 232, 255, 0.9));
}
.m2m-dash-pips {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border-radius: 0;
  background: #140f0a;
  border: 1px solid #8a7346;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.92);
  pointer-events: none;
  z-index: 8;
}
.m2m-pip {
  width: 6px;
  height: 5px;
  border-radius: 0;
  background: #2b2116;
  border: 1px solid #59462a;
  transition: background 0.14s ease, box-shadow 0.14s ease;
}
.m2m-pip.ready {
  background: linear-gradient(180deg, #fff09e 0%, #e09c24 100%);
  border-color: #ffe896;
  box-shadow: 0 0 5px rgba(255, 196, 62, 0.9);
}

/* --- 7F. Compact Utility Sockets (40px — Real Red Potion 27003.png & Real Yang Coins icon_loot.png) --- */
.m2m-btn-util { width: 40px; height: 40px; padding: 3px; }
.m2m-btn-pickup { right: 204px; bottom: 5px; }
.m2m-btn-pot    { right: 254px; bottom: 5px; }
.m2m-btn-pot .m2m-med-core {
  background: radial-gradient(circle at 50% 45%, #421112 0%, #190607 68%, #0a0203 100%);
}
.m2m-btn-pot .m2m-skill-ico,
.m2m-pot-img {
  width: 88%;
  height: 88%;
  transform: none;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.95));
}
.m2m-util-emblem,
.m2m-loot-img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
  image-rendering: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.95));
}
#m2-mob-actions.no-class-skills .m2m-btn-pickup { right: 120px; bottom: 8px; }
#m2-mob-actions.no-class-skills .m2m-btn-pot    { right: 170px; bottom: 8px; }

.m2m-pot-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 18px;
  height: 13px;
  padding: 0 3px;
  border-radius: 0;
  border: 1px solid #9e8147;
  background: #140f0a;
  box-shadow: 0 1px 3px #000;
  color: #fff2c4;
  font-size: 8.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 11px;
  text-align: center;
  pointer-events: none;
  z-index: 8;
}
.m2m-pot-tag {
  display: none;
  position: absolute;
  left: -3px;
  top: -4px;
  padding: 0 3px;
  border: 1px solid #c99438;
  background: linear-gradient(180deg, #4b140d 0%, #1d0705 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  color: #ffe285;
  font-size: 7.5px;
  font-weight: 800;
  line-height: 10px;
  pointer-events: none;
  z-index: 9;
}
.m2m-btn-pot.is-hades-flask .m2m-pot-tag {
  display: block;
}
.m2m-btn-pot.is-hades-flask::after {
  background-image: url("./metin2-ui/medallion_rim_gold.png?v=hd2");
  image-rendering: auto;
}
.m2m-btn-pot.is-hades-flask .m2m-med-core {
  background: radial-gradient(circle at 50% 42%, #681c10 0%, #2a0909 64%, #100303 100%);
  box-shadow: inset 0 0 8px rgba(255, 174, 72, 0.45);
}
.m2m-btn-pot.is-hades-flask:not(.is-empty) {
  filter: drop-shadow(0 0 6px rgba(255, 122, 54, 0.55));
}
.m2m-btn-pot.is-hades-flask .m2m-pot-badge {
  border-color: #d9a84a;
  background: #220b07;
  color: #fff3bf;
}
.m2m-btn-pot.is-empty { opacity: 0.48; filter: grayscale(0.55); }

/* --- 7G. Contextual Hades Outer-Arc ([R] Dragon God Seal + [5]/[6] Cross-Class) --- */
.m2m-btn-ult {
  right: 108px;
  bottom: 162px;
  width: 50px;
  height: 50px;
  padding: 4px;
}
.m2m-btn-ult::after {
  background-image: url("./metin2-ui/medallion_rim_gold.png?v=hd2");
  image-rendering: auto;
}
.m2m-ult-ring-svg {
  position: absolute;
  inset: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  transform: rotate(-90deg);
  pointer-events: none;
  z-index: 8;
  overflow: visible;
}
.m2m-ult-track { fill: none; stroke: rgba(20, 14, 8, 0.72); stroke-width: 3; }
.m2m-ult-prog {
  fill: none;
  stroke: #f6c954;
  stroke-width: 3;
  stroke-linecap: butt;
  transition: stroke-dashoffset 0.2s ease, stroke 0.2s ease;
  filter: drop-shadow(0 0 4px rgba(255, 206, 76, 0.75));
}
.m2m-ult-pct {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 4px;
  height: 13px;
  line-height: 11px;
  border-radius: 0;
  border: 1px solid #9e8147;
  background: #140f0a;
  color: #ffe28c;
  font-size: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9;
}
.m2m-btn-ult.ult-ready { animation: m2mDragonSealPulse 1.35s ease-in-out infinite; }
.m2m-btn-ult.ult-ready .m2m-ult-prog { stroke: #fff096; filter: drop-shadow(0 0 8px rgba(255, 224, 102, 1)); }
.m2m-btn-ult.ult-ready .m2m-ult-pct { display: none; }
.m2m-btn-ult.ult-active .m2m-ult-prog { stroke: #9ce6ff; filter: drop-shadow(0 0 8px rgba(132, 226, 255, 0.95)); }
@keyframes m2mDragonSealPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 208, 76, 0.65)); }
  50%      { filter: drop-shadow(0 0 16px rgba(255, 232, 114, 0.96)); }
}

.m2m-btn-xclass { width: 44px; height: 44px; }
.m2m-btn-s5 { right: 196px; bottom: 70px; }
.m2m-btn-s6 { right: 165px; bottom: 124px; }
.m2m-btn-xclass.is-buff-active {
  filter: drop-shadow(0 0 9px rgba(255, 214, 92, 0.78));
}

/* Classic Metin2 Square Faceted Grade Seal (matches .m2h-seal in hades-hud.css!) */
.m2m-grade-gem {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 15px;
  height: 15px;
  border-radius: 0;
  border: 1px solid #d4aa4c;
  background: #140f0a;
  box-shadow: 0 1px 4px #000;
  color: #ffe896;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  pointer-events: none;
  z-index: 9;
}
.m2m-btn-xclass.grade-m .m2m-grade-gem { border-color: #6ef5a0; background: #0c2e16; color: #c8ffe0; }
.m2m-btn-xclass.grade-g .m2m-grade-gem { border-color: #84c6ff; background: #0d2240; color: #d6eeff; }
.m2m-btn-xclass.grade-p .m2m-grade-gem { border-color: #ffe88a; background: #3b2406; color: #fff8d4; }
.m2m-btn-xclass.grade-s .m2m-grade-gem { border-color: #fff0a8; background: linear-gradient(135deg, #b8421c 0%, #d4961a 50%, #7d28b8 100%); color: #fff; animation: m2mMythicGem 2s ease-in-out infinite; }
@keyframes m2mMythicGem { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.24); } }

/* ============================================================================
 * 8. Authentic Metin2 Fullscreen "Rotate Phone to Landscape" Gate
 *    (#m2-mob-rotate-gate, z-index: 9800 — Real Dragon Rail + ThinBoard + TitleBar + XLarge Button)
 * ============================================================================ */
#m2-mob-rotate-gate {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 18px)
           calc(env(safe-area-inset-right, 0px) + 18px)
           calc(env(safe-area-inset-bottom, 0px) + 18px)
           calc(env(safe-area-inset-left, 0px) + 18px);
  background: radial-gradient(circle at 50% 42%, rgba(36, 20, 12, 0.94) 0%, rgba(11, 9, 8, 0.97) 68%, rgba(6, 5, 4, 0.99) 100%);
  pointer-events: auto;
  touch-action: manipulation;
}
#m2-mob-rotate-gate.open {
  display: flex;
}
.m2m-rg-win {
  display: flex;
  flex-direction: column;
  width: min(calc(100vw - 32px), 344px);
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.95));
}
.m2m-rg-rail {
  height: 18px;
  margin-bottom: -4px;
  position: relative;
  z-index: 2;
}
.m2m-rg-box {
  border-style: solid;
  border-width: 16px;
  border-image-source: url("./metin2-ui/thinboard_modal_9slice.png");
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  image-rendering: pixelated;
}
.m2m-rg-in {
  margin: -10px -10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
}
.m2m-rg-titlebar {
  width: 100%;
  height: 22px;
  padding: 0 10px;
  background:
    url("./metin2-ui/horizontalbar_left.png") no-repeat left center / 24px 22px,
    url("./metin2-ui/horizontalbar_right.png") no-repeat right center / 24px 22px,
    url("./metin2-ui/horizontalbar_center.png") repeat-x center center / 32px 22px;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m2m-rg-titlebar .m2m-tb-txt {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffe28c;
  letter-spacing: 0.35px;
}
.m2m-rg-anim-wrap {
  position: relative;
  width: 108px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.m2m-rg-svg {
  width: 104px;
  height: 80px;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 3px 10px rgba(218, 166, 62, 0.35));
}
.m2m-rg-phone-group {
  transform-origin: 52px 42px;
  animation: m2mPhoneRotate 2.4s cubic-bezier(0.45, 0.05, 0.35, 1) infinite;
}
@keyframes m2mPhoneRotate {
  0%, 16%   { transform: rotate(0deg); }
  46%, 76%  { transform: rotate(-90deg); }
  100%      { transform: rotate(0deg); }
}
.m2m-rg-arrow {
  animation: m2mArrowPulse 2.4s ease-in-out infinite;
}
@keyframes m2mArrowPulse {
  0%, 100% { opacity: 0.45; }
  45%, 65% { opacity: 1; }
}
.m2m-rg-heading {
  font-size: 15px;
  font-weight: 700;
  color: #ffe48c;
  letter-spacing: 0.3px;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.2;
}
.m2m-rg-desc {
  font-size: 11.5px;
  color: #e4d8be;
  line-height: 1.4;
  max-width: 268px;
}
#m2-mob-rotate-cta {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: url("./metin2-ui/xlarge_button_01.png") no-repeat center center / 100% 100%;
  image-rendering: pixelated;
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.85),
    inset 0 0 0 1px rgba(232, 186, 82, 0.72),
    inset 0 0 16px rgba(196, 132, 28, 0.34);
  color: #fff2b6;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25px;
  text-shadow: 1px 1px 0 #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  touch-action: manipulation;
}
#m2-mob-rotate-cta:hover  { background-image: url("./metin2-ui/xlarge_button_02.png"); color: #fff; }
#m2-mob-rotate-cta:active { background-image: url("./metin2-ui/xlarge_button_03.png"); }
.m2m-rg-cta-ico {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}
#m2-mob-rotate-continue {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 8px;
  color: #a89b82;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  touch-action: manipulation;
}
#m2-mob-rotate-continue:hover,
#m2-mob-rotate-continue:active {
  color: #e6d6b4;
}
#m2-mob-rotate-continue.is-hidden {
  display: none !important;
}

/* ============================================================================
 * 9. Portrait Phone Sizing (<= 520px width, e.g., iPhone 15 Portrait 393x852)
 *    Zero collision between Top-Left Hero, Top-Right Radar, Dialogue, Chat, & Controls!
 * ============================================================================ */
@media (max-width: 520px) {
  #m2-mob-hero-frame {
    width: 184px;
    height: 46px;
  }
  .m2m-hero-face-slot { width: 36px; height: 36px; }
  .m2m-hero-name { font-size: 9px; max-width: 80px; }
  .m2m-hero-gold { font-size: 8px; }

  #m2-mob-quest-wrap {
    top: calc(env(safe-area-inset-top, 0px) + 56px);
    width: 184px;
  }
  .m2m-ql-in { max-height: 210px; }

  html.m2-mobile-active #m2-hades-hud .m2h-chamber-dock {
    top: calc(env(safe-area-inset-top, 0px) + 56px) !important;
  }
  html.m2-mobile-active #m2-hades-hud .m2h-panel-wrap {
    width: 186px !important;
    max-width: 186px !important;
  }
  html.m2-mobile-active #m2-hades-boss-banner,
  html.m2-mobile-active #m2-hades-boss-banner.has-skillbar {
    top: calc(env(safe-area-inset-top, 0px) + 128px) !important;
    width: calc(100vw - 20px) !important;
    max-width: 340px !important;
  }
  #m2-mob-notice-toast {
    top: calc(env(safe-area-inset-top, 0px) + 116px);
    max-width: calc(100vw - 24px);
  }

  #m2-mob-topright { gap: 4px; }
  #m2-mob-icon-bar { gap: 4px; }
  .m2m-dock-btn { width: 30px; height: 30px; }
  .m2m-dock-btn.is-hades .m2m-dock-ico { width: 20px; height: 20px; }
  .m2m-dock-btn.is-menu .m2m-dock-ico  { width: 30px; height: 30px; }
  #m2-mob-radar { width: 64px; height: 64px; }

  #m2-mob-chat-strip {
    left: 10px;
    right: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 216px);
    width: min(230px, calc(100vw - 20px));
    margin: 0;
  }

  #m2-mob-joy-ring {
    left: calc(env(safe-area-inset-left, 0px) + 12px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    width: 96px;
    height: 96px;
  }
  #m2-mob-joy-nub {
    width: 36px;
    height: 36px;
    margin-left: -18px;
    margin-top: -18px;
  }

  #m2-mob-actions {
    right: calc(env(safe-area-inset-right, 0px) + 6px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
    width: 266px;
    height: 204px;
  }
  .m2m-btn-atk    { width: 62px; height: 62px; right: 28px;  bottom: 12px; }
  .m2m-atk-emblem { width: 82%; height: 82%; }
  .m2m-btn-skill  { width: 42px; height: 42px; }
  .m2m-btn-s1     { right: 128px; bottom: 13px; }
  .m2m-btn-s2     { right: 118px; bottom: 63px; }
  .m2m-btn-s3     { right: 84px;  bottom: 101px; }
  .m2m-btn-s4     { right: 34px;  bottom: 113px; }
  .m2m-btn-dash   { width: 38px; height: 38px; right: 2px;   bottom: 72px; }
  .m2m-dash-emblem{ width: 80%; height: 80%; }
  .m2m-btn-util   { width: 36px; height: 36px; }
  .m2m-util-emblem{ width: 80%; height: 80%; }
  .m2m-btn-pickup { right: 180px; bottom: 6px; }
  .m2m-btn-pot    { right: 224px; bottom: 6px; }
  #m2-mob-actions.no-class-skills .m2m-btn-pickup { right: 104px; bottom: 10px; }
  #m2-mob-actions.no-class-skills .m2m-btn-pot    { right: 148px; bottom: 10px; }
  .m2m-btn-xclass { width: 38px; height: 38px; }
  .m2m-btn-s5     { right: 176px; bottom: 66px; }
  .m2m-btn-s6     { right: 148px; bottom: 118px; }
  .m2m-btn-ult    { width: 44px; height: 44px; right: 95px;  bottom: 152px; }
}

/* Short Landscape Compaction (e.g., iPhone 15 Landscape 852x393 / 844x390) */
@media (max-height: 440px) {
  #m2-mob-login-card {
    top: calc(env(safe-area-inset-top, 0px) + 6px);
  }
  .m2m-lc-inner { gap: 6px; }
  #m2-mob-instant-play { height: 34px; font-size: 13px; }
  #m2-mob-joy-ring {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    width: 100px;
    height: 100px;
  }
  #m2-mob-joy-nub {
    width: 36px;
    height: 36px;
    margin-left: -18px;
    margin-top: -18px;
  }
  #m2-mob-kbd-bar {
    top: calc(env(safe-area-inset-top, 0px) + 6px);
  }
  #m2-mob-kbd-input { height: 36px; }
  .m2m-kbtn { height: 32px; font-size: 10.5px; padding: 0 7px; }
  .m2m-kbtn.primary,
  .m2m-kbtn.is-compact { height: 36px; }
}

/* ============================================================================
 * 10. Responsive Rules for ALL Existing Modals & Drawers
 * ============================================================================ */
@media (max-width: 900px), (max-height: 520px) {
  .m2-drawer {
    width: min(calc(100vw - 16px), 370px) !important;
    max-height: calc(100dvh - 58px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #m2-pa-reg-ov {
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px calc(env(safe-area-inset-bottom, 0px) + 8px);
  }
  .m2-pa-reg-box {
    width: min(calc(100vw - 16px), 390px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .m2-pa-reg-box input { font-size: 16px; min-height: 40px; }

  #m2-hades-prealpha-overlay,
  #m2-prealpha-modal {
    padding: calc(env(safe-area-inset-top, 0px) + 6px)
             calc(env(safe-area-inset-right, 0px) + 8px)
             calc(env(safe-area-inset-bottom, 0px) + 6px)
             calc(env(safe-area-inset-left, 0px) + 8px);
  }
  .m2h-pa-modal { width: min(calc(100vw - 16px), 660px); max-height: calc(100dvh - 10px); }
  .m2h-pa-win { max-height: calc(100dvh - 20px); overflow: hidden; }
  .m2h-pa-in { margin: -4px -6px; padding-top: 2px; max-height: calc(100dvh - 42px); overflow-y: auto; -webkit-overflow-scrolling: touch; gap: 5px; padding-right: 2px; }
  .m2h-pa-opt { min-height: 40px; padding: 6px 8px; }
  .m2h-pa-foot .m2-btn-xlarge,
  .m2h-pa-foot .m2-btn-large { min-height: 38px; height: auto; padding: 6px 12px; }

  #m2-hades-meta-overlay,
  #m2-hades-sanctuary {
    padding: calc(env(safe-area-inset-top, 0px) + 6px)
             calc(env(safe-area-inset-right, 0px) + 6px)
             calc(env(safe-area-inset-bottom, 0px) + 6px)
             calc(env(safe-area-inset-left, 0px) + 6px);
  }
  #m2-hades-meta-modal { width: calc(100vw - 12px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); max-width: 960px; max-height: calc(100dvh - 12px); }
  .m2h-meta-win { max-height: calc(100dvh - 22px); }
  .m2h-meta-in { max-height: calc(100dvh - 38px); overflow: hidden; }
  .m2h-meta-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .m2h-meta-tab { flex: 0 0 auto; min-height: 36px; height: 36px; padding: 0 10px; }
  .m2h-meta-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }

  #m2-hades-choice-overlay,
  #m2-hades-modal {
    padding: calc(env(safe-area-inset-top, 0px) + 6px)
             calc(env(safe-area-inset-right, 0px) + 6px)
             calc(env(safe-area-inset-bottom, 0px) + 6px)
             calc(env(safe-area-inset-left, 0px) + 6px);
  }
  .m2h-ov-shell { width: calc(100vw - 12px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); max-width: 1020px; max-height: calc(100dvh - 12px); }
  .m2h-ov-window-in { max-height: calc(100dvh - 40px); overflow-y: auto; -webkit-overflow-scrolling: touch; gap: 7px; }
  .m2h-ov-titlebar { height: auto; min-height: 28px; flex-wrap: wrap; padding: 3px 8px; }

  #m2-qol-overlay,
  #m2-qol-panel {
    padding: calc(env(safe-area-inset-top, 0px) + 6px)
             calc(env(safe-area-inset-right, 0px) + 6px)
             calc(env(safe-area-inset-bottom, 0px) + 6px)
             calc(env(safe-area-inset-left, 0px) + 6px);
  }
  #m2-qol-modal { width: calc(100vw - 12px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); max-height: calc(100dvh - 12px); }
  .m2q-win-body { max-height: calc(100dvh - 22px); }
  .m2q-win-in { max-height: calc(100dvh - 38px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .m2q-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .m2q-tab-btn { flex: 0 0 auto; min-height: 36px; height: 36px; padding: 0 10px; }
  .m2q-filter-bar { flex-wrap: wrap; }
  .m2q-input, .m2q-select { font-size: 16px; min-height: 36px; }
  .m2q-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .m2q-btn { min-height: 34px; height: auto; padding: 4px 10px; }
}

@media (max-width: 640px) {
  .m2h-pa-lvl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .m2h-pa-banner { padding: 6px 8px; gap: 8px; }
  .m2h-pa-port { width: 44px; height: 52px; }
  .m2h-ov-body { grid-template-columns: 1fr !important; gap: 8px !important; }
  .m2h-ov-left { min-height: auto !important; flex-direction: row !important; align-items: center !important; gap: 8px !important; }
  .m2h-portrait-box { min-height: 76px !important; width: 74px !important; flex: none !important; }
  .m2h-portrait-img { width: 72px !important; max-height: 76px !important; }
  .m2h-speaker-box { margin-top: 0 !important; flex: 1 !important; }
  .m2h-route-grid { grid-template-columns: 1fr !important; }
  .m2q-shop-split { grid-template-columns: 1fr !important; }
  .m2h-meta-hdr-r { flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
}

@media (max-height: 500px) {
  .m2h-pa-banner { padding: 4px 7px; gap: 7px; }
  .m2h-pa-port { width: 36px; height: 42px; }
  .m2h-pa-btitle { font-size: 11px; }
  .m2h-pa-bsub { font-size: 9.5px; line-height: 1.2; }
  .m2h-pa-sec { padding: 4px 7px; gap: 3px; }
  .m2h-pa-opt { min-height: 32px; padding: 3px 6px; gap: 1px; }
  .m2h-pa-opt-t { font-size: 10.5px; }
  .m2h-pa-opt-d { font-size: 9.2px; line-height: 1.15; }
  .m2h-pa-foot .m2-btn-xlarge,
  .m2h-pa-foot .m2-btn-large { min-height: 30px; padding: 3px 10px; font-size: 10.5px; }
  .m2h-ov-body { grid-template-columns: 144px minmax(0, 1fr); gap: 8px; }
  .m2h-ov-left { min-height: auto; }
  .m2h-portrait-box { min-height: 104px; }
  .m2h-portrait-img { width: 132px; max-height: 136px; }
  .m2h-meta-banter { padding: 4px 7px; gap: 7px; }
  .m2h-mb-port { width: 40px; height: 42px; }
  .m2h-mb-quote { font-size: 10px; line-height: 1.25; }
}
