/**
 * HUD hero/character strip — fix v2
 *
 * Restores centered card group (justify-content: center) and stops cards from
 * crushing below a readable min-width. Scroll only when the centered group
 * cannot fit. No combat/economy/squad logic changes.
 *
 * Replaces the previous patch that used flex-start (left-aligned regression).
 */

/* Thin scrollbar only when overflow actually appears */
._strip_abewu_1,
._stripFramed_abewu_364,
._stripDock_abewu_241,
._stripRotateCompact_abewu_568 {
  scrollbar-width: thin;
  scrollbar-color: #c9a84c55 transparent;
}

._strip_abewu_1::-webkit-scrollbar,
._stripFramed_abewu_364::-webkit-scrollbar,
._stripDock_abewu_241::-webkit-scrollbar,
._stripRotateCompact_abewu_568::-webkit-scrollbar {
  height: 3px;
}

._strip_abewu_1::-webkit-scrollbar-thumb,
._stripFramed_abewu_364::-webkit-scrollbar-thumb,
._stripDock_abewu_241::-webkit-scrollbar-thumb,
._stripRotateCompact_abewu_568::-webkit-scrollbar-thumb {
  background: #c9a84c55;
  border-radius: 2px;
}

/* Desktop / tablet dock: keep CENTERED cluster; protect min card width */
@media (width >= 768px) {
  ._stripDock_abewu_241 {
    justify-content: center;
    justify-content: safe center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  ._stripDock_abewu_241 ._card_abewu_11 {
    /* Keep equal flex share like original, but never crush past readable size */
    flex: 1 1 0;
    min-width: 92px;
    max-width: 108px;
    width: auto;
  }
}

/*
 * Mobile / small window / short landscape
 * Original used justify-content:center + flex:1 1 0 + min-width:0 (crush).
 * Keep centering + equal flex; raise min-width; allow horizontal scroll if needed.
 */
@media (width <= 767px), (orientation: landscape) and (height <= 500px) {
  ._strip_abewu_1,
  ._stripFramed_abewu_364 {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    justify-content: safe center;
    align-items: center;
    gap: 3px;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  ._strip_abewu_1 ._card_abewu_11,
  ._stripFramed_abewu_364 ._card_abewu_11 {
    flex: 1 1 0;
    min-width: 88px;
    max-width: 102px;
    width: auto;
    height: calc(var(--hero-strip-h, 118px) - 4px);
    max-height: calc(var(--hero-strip-h, 118px) - 4px);
  }

  /* Internal layout: give bars remaining space; avoid portrait eating the card */
  ._midRow_abewu_86 {
    left: 5px;
    right: 5px;
    gap: 3px;
    min-width: 0;
  }

  ._statBars_abewu_105 {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  ._statBar_abewu_105 {
    width: 70%;
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }

  ._statValue_abewu_130 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  ._clsName_abewu_69 {
    max-width: calc(100% - 42px);
  }
}

/* Narrow phones: densify internals while keeping the centered flex group */
@media (width <= 480px) {
  ._strip_abewu_1 ._card_abewu_11,
  ._stripFramed_abewu_364 ._card_abewu_11 {
    min-width: 82px;
    max-width: 96px;
  }

  ._clsName_abewu_69 {
    display: none;
  }

  ._portraitFrame_abewu_97 {
    flex: 0 0 42px;
    width: 42px;
    height: 48px;
  }

  ._midRow_abewu_86 {
    left: 4px;
    right: 4px;
    gap: 2px;
  }

  ._statLabel_abewu_121 {
    font-size: 0.42rem;
  }

  ._statValue_abewu_130 {
    font-size: 0.36rem;
  }

  ._statBar_abewu_105 {
    width: 66%;
    max-width: 66%;
    height: 6px;
  }
}

/* Extra-narrow: slightly smaller min, still centered */
@media (width <= 360px) {
  ._strip_abewu_1 ._card_abewu_11,
  ._stripFramed_abewu_364 ._card_abewu_11 {
    min-width: 76px;
    max-width: 90px;
  }

  ._portraitFrame_abewu_97 {
    flex: 0 0 38px;
    width: 38px;
    height: 44px;
  }

  ._lvText_abewu_57 {
    font-size: 0.44rem;
  }
}

/*
 * Short landscape — original already centers + compact cards (flex:0 auto).
 * Keep center; add min-width so absolute mid-row does not collide.
 */
@media (orientation: landscape) and (height <= 500px),
  (width <= 767px) and (orientation: landscape) {
  ._strip_abewu_1,
  ._stripFramed_abewu_364 {
    justify-content: center;
    justify-content: safe center;
    overflow-x: auto;
    overflow-y: hidden;
  }

  ._strip_abewu_1 ._card_abewu_11,
  ._stripFramed_abewu_364 ._card_abewu_11 {
    flex: 0 1 auto;
    min-width: 68px;
    max-width: 78px;
    width: auto;
  }

  ._portraitFrame_abewu_97 {
    flex: 0 0 32px;
    width: 32px;
    height: 36px;
  }
}

/* Rotate/duel compact strip: stay centered */
._stripRotateCompact_abewu_568 {
  justify-content: center;
  justify-content: safe center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

._stripRotateCompact_abewu_568 ._card_abewu_11 {
  flex: 0 0 auto;
  min-width: 60px;
}

/*
 * Mid desktop widths using the base 4-column grid:
 * switch to centered flex with min-width so columns do not crush.
 * Keep justify-content:center (NOT flex-start).
 */
@media (width >= 768px) and (width <= 1100px) {
  ._strip_abewu_1:not(._stripDock_abewu_241):not(._stripRotateCompact_abewu_568) {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    justify-content: safe center;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  ._strip_abewu_1:not(._stripDock_abewu_241):not(._stripRotateCompact_abewu_568) ._card_abewu_11 {
    flex: 1 1 0;
    min-width: 92px;
    max-width: 108px;
    width: auto;
  }
}

/* Parent dock: ensure the strip can center inside the framed area */
@media (width <= 767px) {
  ._mobileHeroDock_134if_28 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  ._mobileHeroDock_134if_28 >:not(._mobileHeroBg_134if_113) {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
  }
}


/* Slightly shorter HP/MP bars horizontally (all strip variants) */
._strip_abewu_1 ._statBar_abewu_105,
._stripFramed_abewu_364 ._statBar_abewu_105,
._stripDock_abewu_241 ._statBar_abewu_105,
._stripRotateCompact_abewu_568 ._statBar_abewu_105 {
  width: 70%;
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}
