/* Phone-fit layout: every menu is designed at 390×N and scaled to width.
   Extra or missing height flexes the middle; the HUD and dock stay put.
   Do not shrink the whole UI to fit by height. */

:root {
    --canvas-w: 390px;
    --canvas-h: 844px;
    --menu-scale: 1;
    --canvas-left: 0px;
    --canvas-top: 0px;
}

#app {
    background-color: #071426;
    background-image:
        linear-gradient(90deg, rgba(6, 16, 32, .84) 0%, rgba(6, 16, 32, .42) 18%, rgba(6, 16, 32, .42) 82%, rgba(6, 16, 32, .84) 100%),
        url("../assets/ui/bg/bg-lobby-colosseum.jpg");
    background-size: cover;
    background-position: center;
}

#app .menu-screen {
    position: absolute;
    width: var(--canvas-w) !important;
    max-width: none !important;
    height: var(--canvas-h) !important;
    left: var(--canvas-left) !important;
    right: auto !important;
    top: var(--canvas-top) !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: scale(var(--menu-scale));
    transform-origin: top left;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

#app.wide-menu .menu-screen {
    box-shadow:
        0 0 0 3px rgba(242, 201, 76, .38),
        0 18px 48px rgba(0, 0, 0, .55);
}

/* Fixed chrome + flexing middle on every menu */
#app .menu-screen > .lx-top,
#app .menu-screen > .screen-head,
#app .menu-screen > .art-head,
#app .menu-screen > .roster-top,
#app .menu-screen > .map-top,
#app .menu-screen > .summon-top,
#app .menu-screen > .summon-banner,
#app .menu-screen > .roster-banner,
#app .menu-screen > .map-banner-row,
#app .menu-screen > .pvp-head,
#app .menu-screen > .result-top,
#app .menu-screen > .lx-banners,
#app .menu-screen > .lx-hubs,
#app .menu-screen > .lx-dock,
#app .menu-screen > .roster-dock,
#app .menu-screen > .map-dock,
#app .menu-screen > .summon-nav,
#app .menu-screen > .result-dock,
#app .menu-screen > .pvp-dock,
#app .menu-screen > .roster-filters,
#app .menu-screen > .roster-power-btn {
    flex: 0 0 auto;
}

#app .menu-screen > .lx-stage,
#app .menu-screen > .map-body,
#app .menu-screen > .screen-body,
#app .menu-screen > .summon-body,
#app .menu-screen > .pvp-scroll,
#app .menu-screen > .result-body,
#app .menu-screen > #heroGrid,
#app .menu-screen > #teamGrid {
    flex: 1 1 auto;
    min-height: 0;
}

#app .menu-screen .screen-body,
#app .menu-screen .summon-body,
#app .menu-screen .pvp-scroll,
#app .menu-screen .result-body,
#app .menu-screen .hub-body,
#app .menu-screen .allow-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Never truncate labels with ellipses. Wrap or size the slot instead. */
#app .lx-name,
#app .lx-pwr,
#app .ban-copy b,
#app .ban-copy small,
#app .orb-label,
#app .mile-copy b,
#app .node-label,
#app .roster-name,
#app .skill-node small,
#app .skill-inspect-copy p,
#app .skill-inspect-copy b,
#app .map-float span,
#app .stage-plate .pname {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* ---------- Lobby ---------- */
#app #screenTitle {
    padding: 8px 10px 8px;
    gap: 6px;
    overflow: hidden;
}
#app #screenTitle .lx-top {
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    overflow: visible;
}
#app #screenTitle .lx-profile {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 4px 8px 5px 2px;
    margin-top: 0;
}
#app #screenTitle .lx-id { min-width: 0; }
#app #screenTitle .lx-name,
#app #screenMap .lx-name {
    font-size: 13px;
    line-height: 1.1;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}
#app #screenTitle .lx-star,
#app #screenMap .lx-star {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
}
#app #screenTitle .lx-pwr {
    font-size: 12px;
    line-height: 1.15;
    white-space: nowrap;
}
#app #screenTitle .lx-wallet {
    flex: 0 0 232px;
    width: 232px;
    max-width: 232px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px 6px;
    padding-right: 0;
    margin-top: 0;
    box-sizing: border-box;
    overflow: visible;
}
#app #screenTitle .lx-wallet .cur,
#app #screenMap .lx-wallet .cur {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 34px;
    min-height: 34px;
    overflow: visible;
    padding: 0 2px 0 3px;
    gap: 2px;
}
#app #screenTitle .lx-wallet .cur .ico,
#app #screenMap .lx-wallet .cur .ico {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-left: 0;
}
#app #screenTitle .lx-wallet .cur b,
#app #screenMap .lx-wallet .cur b {
    font-size: 12px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
    padding-right: 3px;
    white-space: nowrap;
    text-align: right;
}
#app #screenTitle .lx-wallet .plus,
#app #screenMap .lx-wallet .plus {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    margin: -5px 0 -5px 0 !important;
    position: relative;
    z-index: 1;
}
#app #screenTitle .lx-wallet .cur.nrg { grid-column: 2; }
#app #screenTitle .lx-wallet .nrg-time { grid-column: 2; justify-self: center; }

#app #screenTitle .lx-banners {
    display: grid;
    grid-template-columns: 1fr 58px;
    align-items: center;
    gap: 0;
    min-height: 68px;
    padding: 6px 8px;
}
#app #screenTitle .lx-banner.daily {
    display: grid;
    grid-template-columns: 46px minmax(0, 92px) 2px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 100%;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0 6px 0 0;
    min-height: 0;
    color: #fff;
}
#app #screenTitle .lx-banner.daily .cal-art { width: 46px; height: 46px; flex: none; }
#app #screenTitle .lx-banner.daily .login-copy { text-align: center; }
#app #screenTitle .lx-banner.daily .login-copy b {
    font-size: 14px;
    line-height: 1.05;
    color: #fde68a;
    text-shadow: var(--ol);
}
#app #screenTitle .lx-banner.daily .login-copy small {
    font-family: var(--disp);
    font-size: 10px;
    color: #fff;
    text-shadow: var(--ol);
}
#app #screenTitle .ban-split {
    width: 2px;
    align-self: stretch;
    background: rgba(242, 201, 76, .55);
    border-radius: 2px;
}
#app #screenTitle .lx-banner.daily .quest-copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    min-width: 0;
}
#app #screenTitle .lx-banner.daily .quest-copy b {
    font-size: 14px;
    color: #fff;
    text-shadow: var(--ol);
    line-height: 1.1;
}
#app #screenTitle .lx-chest { width: 56px; justify-self: end; }

/* Side orbs live in their own lanes, never over the pedestals. */
#app #screenTitle .lx-stage {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
    margin-top: 2px;
    min-height: 0;
}
#app #screenTitle .lx-diorama {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 0;
    box-shadow: none;
    background: transparent;
    z-index: 1;
}
#app #screenTitle .lx-stage .lx-col {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto !important;
    right: auto !important;
    flex: 0 0 78px;
    width: 78px;
    z-index: 2;
    justify-content: flex-start;
    gap: 14px;
    padding-top: 34px;
}
#app #screenTitle .orb-btn { width: 78px; }
#app #screenTitle .orb-label {
    font-size: 11px;
    line-height: 1.05;
    max-width: 78px;
    margin-top: -2px;
}
#app #screenTitle .stage-plate {
    width: 64px;
    padding: 3px 3px 4px;
    z-index: 2;
}
#app #screenTitle .stage-plate.lead { width: 70px; z-index: 3; }
#app #screenTitle .stage-plate .lvl-tab {
    top: -15px;
    font-size: 10px;
    padding: 1px 6px;
    white-space: nowrap;
}
#app #screenTitle .stage-plate .pname {
    font-size: 10px;
    line-height: 1.05;
    overflow-wrap: anywhere;
}
#app #screenTitle .lx-dock { padding: 0; gap: 8px; }
#app #screenTitle .side-btn { width: 88px; flex: 0 0 88px; }
#app #screenTitle .battle-btn { min-width: 0; }

/* ---------- Campaign ---------- */
#app #screenMap {
    padding: 8px 10px 6px;
    gap: 4px;
    overflow: hidden;
}
#app #screenMap .map-top {
    align-items: stretch;
    gap: 8px;
    position: relative;
    min-width: 0;
    overflow: visible;
}
#app #screenMap .map-top .map-back {
    display: none;
}
#app #screenMap .map-banner-row .map-back {
    display: flex;
    position: relative;
    left: auto;
    top: auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex: 0 0 44px;
    z-index: 5;
}
#app #screenMap .lx-profile {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    min-width: 0;
    margin-top: 0;
}
#app #screenMap .lx-name {
    font-size: 13px;
    line-height: 1.1;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}
#app #screenMap .lx-pwr {
    font-size: 12px;
    white-space: nowrap;
}
#app #screenMap .lx-wallet {
    flex: 0 0 232px;
    width: 232px;
    max-width: 232px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px 6px;
    padding-right: 0;
    margin-top: 0;
}
#app #screenMap .map-back {
    position: relative !important;
    left: auto !important;
    top: auto !important;
}
#app #screenMap .map-banner-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 8px;
    padding: 0;
    min-height: 0;
}
#app #screenMap .map-banner-row .map-modes {
    width: 100%;
    order: 3;
    flex: 0 0 auto;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}
#app #screenMap .map-title {
    order: 1;
    flex: 0 1 auto;
    font-size: 16px;
    padding: 5px 14px 6px;
    white-space: nowrap;
}
#app #screenMap .nm-box {
    order: 2;
    position: relative;
    right: auto;
    top: auto;
    flex: 0 0 auto;
    font-size: 10px;
}
#app #screenMap .map-body {
    position: relative;
    margin: 0;
    overflow: hidden;
}
#app #screenMap .map-float.loot { left: 4px; top: 6%; }
#app #screenMap .map-float span:not(.bang) { white-space: nowrap; }
#app #screenMap .node-label {
    max-width: 92px;
    font-size: 13px;
    line-height: 1.05;
    white-space: normal;
    text-align: center;
    padding: 0 2px;
    z-index: 3;
}
#app #screenMap .map-dock { margin: 0; }
#app #screenMap .side-btn { width: 84px; flex: 0 0 84px; }
#app #screenMap .mile-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
#app #screenMap .mile-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}
#app #screenMap .mile-copy b {
    font-size: 14px;
    white-space: nowrap;
}
#app #screenMap .mile-chests { flex: 0 0 auto; }

/* ---------- Roster ---------- */
#app #screenHeroes.roster-screen:not(.has-detail) {
    padding: 8px 10px 8px;
    gap: 6px;
}
#app .roster-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    padding: 2px 18px 6px 2px;
}
#app .roster-filters::-webkit-scrollbar { display: none; }
#app .roster-tab { flex: 0 0 auto; }
#app #screenHeroes:not(.has-detail) .roster-dock .dock-row {
    gap: 8px;
}
#app #screenHeroes:not(.has-detail) .roster-dock .battle-btn {
    flex: 1 1 auto;
    min-width: 0;
}
#app .roster-name {
    white-space: normal;
    overflow: visible;
    line-height: 1.05;
    font-size: 11px;
}

/* ---------- Hero upgrade ---------- */
#app #screenHeroes.has-detail {
    padding: 8px 10px 8px;
    overflow: hidden;
}
#app #screenHeroes.has-detail #heroDetail {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    gap: 4px;
}
#app #screenHeroes.has-detail .up-top,
#app #screenHeroes.has-detail .up-banner,
#app #screenHeroes.has-detail .up-dock {
    flex: 0 0 auto;
}
#app #screenHeroes.has-detail .up-scroll {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 2px 4px;
}
#app #screenHeroes.has-detail .up-body { display: contents; }
#app #screenHeroes.has-detail .up-name { flex: 0 0 auto; margin-top: 2px; }
#app #screenHeroes.has-detail .up-name .star { width: 22px !important; height: 22px !important; }
#app #screenHeroes.has-detail .up-name .stars .star:nth-child(3) { width: 26px !important; height: 26px !important; margin-top: -2px; }
#app #screenHeroes.has-detail .up-name h3 { font-size: 20px; line-height: 1.1; }
#app #screenHeroes.has-detail .up-mid {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 118px;
    gap: 6px;
    align-items: stretch;
    flex: 1 1 0;
    min-height: 0;
    overflow: visible;
}
#app #screenHeroes.has-detail .pedestal-col {
    position: relative;
    min-height: 0;
    height: 100%;
    margin: 0 -14px;
    overflow: visible;
}
#app #screenHeroes.has-detail .up-mid #heroPreview,
#app #screenHeroes.has-detail #heroPreview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
}
#app #screenHeroes.has-detail .gear-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: space-evenly;
    min-height: 0;
}
#app #screenHeroes.has-detail .gear-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-height: 0;
}
#app #screenHeroes.has-detail .gear-slot .gico {
    width: auto !important;
    height: auto !important;
    max-width: 68px;
    max-height: 68px;
    aspect-ratio: 1;
    flex: 1 1 auto;
    min-height: 0;
}
#app #screenHeroes.has-detail .stat-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
    min-height: 0;
}
#app #screenHeroes.has-detail .stat-line { grid-column: auto; flex: 0 0 auto; }
#app #screenHeroes.has-detail .stat-col .rune-btn {
    width: 72px;
    align-self: center;
    margin-top: 2px;
    flex: 1 1 0;
    min-height: 0;
    max-height: 84px;
}
#app #screenHeroes.has-detail .stat-col .rune-btn img {
    width: auto !important;
    height: auto !important;
    max-width: 68px;
    max-height: 68px;
    aspect-ratio: 1;
    min-height: 0;
}
#app #screenHeroes.has-detail .skill-panel {
    position: relative;
    flex: 0 0 auto;
    min-height: 0;
    margin-top: 2px;
    padding: 6px 8px 6px;
    z-index: 2;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
#app #screenHeroes.has-detail .skill-panel h3 {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    display: block;
    margin: 0 auto 4px;
    width: max-content;
    max-width: 100%;
    z-index: 3;
    pointer-events: none;
}
#app #screenHeroes.has-detail .skill-board.tree3 {
    height: 108px;
    min-width: 340px;
    flex: 0 0 auto;
    overflow: hidden;
}
#app #screenHeroes.has-detail .skill-board.tree3 > .skill-node.special img { width: 56px; height: 56px; }
#app #screenHeroes.has-detail .skill-board.tree3 .skill-node.core img,
#app #screenHeroes.has-detail .skill-board.tree3 .skill-node.path img { width: 32px; height: 32px; }
#app #screenHeroes.has-detail .skill-board.tree3 .tnode.a0 { left: 66%; top: 26%; }
#app #screenHeroes.has-detail .skill-board.tree3 .tnode.a1 { left: 90%; top: 26%; }
#app #screenHeroes.has-detail .skill-board.tree3 .tnode.b0 { left: 66%; top: 72%; }
#app #screenHeroes.has-detail .skill-board.tree3 .tnode.b1 { left: 90%; top: 72%; }
#app #screenHeroes.has-detail .skill-board.tree3 .skill-node.core,
#app #screenHeroes.has-detail .skill-board.tree3 .skill-node.path { width: 56px; }
#app #screenHeroes.has-detail .skill-board.tree3 .skill-node.core small,
#app #screenHeroes.has-detail .skill-board.tree3 .skill-node.path small,
#app #screenHeroes.has-detail .skill-board.tree3 > .skill-node.special small {
    max-width: 56px;
    font-size: 8px;
}
#app #screenHeroes.has-detail .skill-respec-row { margin-top: 0; }
#app #screenHeroes.has-detail .skill-inspect {
    min-height: 0;
    max-height: none;
    height: auto;
    padding: 2px 0 0;
    overflow: visible;
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    align-items: flex-start;
}
#app #screenHeroes.has-detail .skill-board.tree3 > .skill-node.special small,
#app #screenHeroes.has-detail .skill-board.tree3 .skill-node.core small,
#app #screenHeroes.has-detail .skill-board.tree3 .skill-node.path small {
    position: static;
    display: block;
    max-width: 72px;
    font-size: 9px;
    line-height: 1.05;
    white-space: normal;
    overflow: visible;
    text-align: center;
    overflow-wrap: anywhere;
}
#app #screenHeroes.has-detail .skill-inspect-copy {
    overflow: visible;
    min-width: 0;
}
#app #screenHeroes.has-detail .skill-inspect-copy p {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    font-size: 11px;
    line-height: 1.25;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
}
#app #screenHeroes.has-detail .skill-inspect-copy small {
    display: block;
    white-space: normal;
    overflow: visible;
}
#app #screenHeroes.has-detail .up-dock {
    position: relative;
    z-index: 6;
    padding: 4px 2px 4px;
    background: linear-gradient(180deg, rgba(18, 58, 116, 0), #123a74 28%);
}

/* ---------- Shared screens ---------- */
#app #screenSummon,
#app #screenPvp,
#app #screenResult,
#app #screenDefeat,
#app #screenDaily,
#app #screenSettings,
#app #screenHowTo,
#app #screenPass,
#app #screenAchievements,
#app #screenLeaderboard,
#app #screenMail,
#app #screenEvents,
#app #screenGuilds,
#app #screenTeam,
#app #screenOnline,
#app #screenChest {
    overflow: hidden;
}

#app #screenSummon { padding: 8px 10px 8px; }
#app #screenPvp { padding: 14px 16px 8px; }
#app #screenPvp .pvp-nav { justify-content: center; }
#app #screenPvp .nav-btn { min-width: 148px; width: auto; padding: 8px 22px; }
#app #screenResult { padding: 14px 16px 8px; }

/* Battle HUD: keep the existing dock scale; hide 1px paint bleed only. */
#app #topHud,
#app #bottomHud {
    overflow: hidden;
}

/* Currency plus buttons sit beside the number, never over it. */
#app .cur .plus {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
#app .roster-wallet .cur,
#app .summon-top .cur,
#app .up-top .cur {
    min-width: 118px;
}
#app .roster-wallet .cur b,
#app .summon-top .cur b,
#app .up-top .cur b {
    padding-right: 3px;
    white-space: nowrap;
}

/* Keep floating boost tags over their own button. */
#app #screenTitle .boost-tag,
#app #screenMap .boost-tag {
    right: auto;
    left: 50%;
    top: -13px;
    transform: translateX(-50%);
}

/* Loot chest stays in the top-left pocket, clear of the first node. */
#app #screenMap .map-float.loot { left: 0; top: 0; min-width: 48px; width: 48px; }
#app #screenMap .map-float .mf-ico { width: 36px; height: 36px; }
#app #screenMap .map-float span:not(.bang) { font-size: 11px; max-width: 52px; white-space: normal; text-align: center; }

#app #screenMap .node-label {
    max-width: 84px;
    font-size: 12px;
}

#app #screenMap .mile-chests { gap: 8px; }
#app #screenMap .mile-chests button { width: 48px; overflow: visible; }
#app #screenMap .mile-chests button span {
    white-space: normal;
    text-align: center;
    line-height: 1.05;
    max-width: 48px;
}
#app #screenMap .mile-chests button em { right: 0; }


/* Equipment slots: color-coded rarity borders and readable stat lines. */
#app #screenHeroes.has-detail .gear-slot {
    border: 2px solid #94a3b8;
    border-radius: 10px;
    padding: 3px 4px 4px;
    background: rgba(8, 16, 32, 0.35);
    min-width: 0;
}
#app #screenHeroes.has-detail .gear-slot.rarity-common { border-color: #94a3b8; }
#app #screenHeroes.has-detail .gear-slot.rarity-rare { border-color: #38bdf8; box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35); }
#app #screenHeroes.has-detail .gear-slot.rarity-epic { border-color: #c084fc; box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.4); }
#app #screenHeroes.has-detail .gear-slot.rarity-legendary { border-color: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.55); }
#app #screenHeroes.has-detail .gear-slot.rarity-empty { border-color: #475569; border-style: dashed; }
#app #screenHeroes.has-detail .gear-slot .gname {
    display: block;
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    overflow: visible;
    max-width: 100%;
}
#app #screenHeroes.has-detail .gear-slot .gstat {
    display: block;
    font-size: 9px;
    line-height: 1.1;
    color: #e2e8f0;
    text-align: center;
    white-space: normal;
    overflow: visible;
}
#app #screenHeroes.has-detail .merge-shop-btn {
    margin-top: 4px;
    width: 100%;
    min-height: 28px;
    border-radius: 8px;
    border: 2px solid #fbbf24;
    background: linear-gradient(180deg, #3b2a0c, #1f1608);
    color: #fde68a;
    font-family: var(--disp);
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 4px 6px;
}
#app #screenHeroes.has-detail .picker button {
    border: 2px solid #64748b;
    border-radius: 8px;
    margin: 3px 0;
    white-space: normal;
    text-align: left;
}
#app #screenHeroes.has-detail .picker button.rarity-common { border-color: #94a3b8; }
#app #screenHeroes.has-detail .picker button.rarity-rare { border-color: #38bdf8; }
#app #screenHeroes.has-detail .picker button.rarity-epic { border-color: #c084fc; }
#app #screenHeroes.has-detail .picker button.rarity-legendary { border-color: #fbbf24; }
#app #screenHeroes.has-detail .picker button small {
    display: block;
    font-size: 10px;
    color: #cbd5e1;
}
#app #gearWorkshop .econ-row .gear-rarity.rarity-common { color: #e2e8f0; }
#app #gearWorkshop .econ-row .gear-rarity.rarity-rare { color: #38bdf8; }
#app #gearWorkshop .econ-row .gear-rarity.rarity-epic { color: #c084fc; }
#app #gearWorkshop .econ-row .gear-rarity.rarity-legendary { color: #fbbf24; }

#app #screenHeroes.has-detail #gearWorkshop.open {
    display: block;
    position: absolute;
    left: 4px;
    right: 4px;
    top: 4px;
    bottom: 4px;
    z-index: 12;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, rgba(16, 22, 40, 0.98), rgba(8, 12, 24, 0.98));
    border: 2px solid #fbbf24;
    border-radius: 14px;
    padding: 10px 10px 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
#app #screenHeroes.has-detail #gearWorkshop.open .merge-shop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 6px;
}
#app #screenHeroes.has-detail #gearWorkshop.open .merge-shop-head h3 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.06em;
    color: #fde68a;
}
#app #screenHeroes.has-detail #gearWorkshop.open .merge-shop-close {
    min-width: 34px;
    min-height: 34px;
    border-radius: 8px;
    border: 1px solid #fbbf24;
    background: #1f1608;
    color: #fde68a;
    font-size: 16px;
    line-height: 1;
}
#app #screenHeroes.has-detail #gearWorkshop.open .econ-row {
    align-items: stretch;
}
#app #screenHeroes.has-detail #gearWorkshop.open .econ-mini {
    white-space: normal;
    text-align: center;
    line-height: 1.15;
}

#app #screenHeroes.has-detail #gearWorkshop.open .gear-rarity {
    display: inline;
    font-weight: 800;
}
