.ah-head {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ah-head-cost {
    font-size: 12px;
    color: #bbb;
}

.ah-map-tier-note {
    font-size: 11px;
    font-weight: 600;
    color: #e8b44c;
}

.ah-map-wrap {
    margin-bottom: 10px;
}

.ah-map-board {
    position: relative;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    height: clamp(460px, 72vh, 760px);
}

.ah-map-board--active {
    cursor: crosshair;
}

.ah-map-board--locked {
    cursor: default;
}

.ah-map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ah-map-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.28));
}

.ah-map-lock {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 22, 0.56);
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ah-map-lock-chip {
    padding: 10px 14px;
    border: 1px solid #6e3044;
    border-radius: 10px;
    background: rgba(20, 8, 12, 0.82);
    font-size: 16px;
    font-weight: 700;
    color: #ff808f;
    box-shadow: 0 0 20px rgba(255, 90, 120, 0.25);
}

.ah-boss-token {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    background: #111;
    z-index: 3;
    overflow: hidden;
}

.ah-boss-token--locked {
    opacity: 0.65;
    cursor: not-allowed;
}

.ah-boss-token img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ah-portal-token {
    position: absolute;
    left: 84%;
    top: 84%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #b486ff;
    background: radial-gradient(circle, #6f42c1, #2c1f52);
    color: #fff;
    font-size: 24px;
    z-index: 5;
    box-shadow: 0 0 16px rgba(180, 134, 255, 0.7);
}

.ah-portal-token--locked {
    opacity: 0.65;
    cursor: not-allowed;
}

.ah-avatar {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ffd278;
    z-index: 4;
    /* Плавное движение по карте: замедление к точке назначения, без рывка «ease» */
    transition:
        left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s ease-out;
}

.ah-controls {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ah-controls--split {
    align-items: flex-start;
    gap: 12px;
}

.ah-hunt-icon-picker {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    border: 1px solid #3a4555;
    border-radius: 10px;
    background: rgba(0, 20, 40, 0.35);
}

.ah-hunt-icon-picker-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8aa;
    margin-bottom: 6px;
}

.ah-hunt-icon-picker-hint {
    font-size: 10px;
    line-height: 1.35;
    color: #9aa7b8;
    margin-bottom: 8px;
}

.ah-hunt-icon-picker-hint--warn {
    color: #f0ad4e;
}

.ah-hunt-icon-picker-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.ah-hunt-icon-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 72px;
    padding: 6px 4px;
    border: 1px solid #4a5568;
    border-radius: 10px;
    background: rgba(15, 22, 34, 0.9);
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.ah-hunt-icon-slot:hover {
    border-color: #6a7a90;
}

.ah-hunt-icon-slot--active {
    border-color: #e8b44c;
    box-shadow: 0 0 12px rgba(232, 180, 76, 0.35);
}

.ah-hunt-icon-slot--shop {
    border-style: dashed;
}

.ah-hunt-icon-slot img {
    display: block;
    object-fit: contain;
    border-radius: 8px;
}

.ah-hunt-icon-slot-label {
    display: block;
    font-size: 10px;
    line-height: 1.2;
    color: #c8d0dc;
    max-width: 86px;
    text-align: center;
    margin-top: 4px;
}

.ah-hunt-icon-slot-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.ah-hunt-gold-ico {
    vertical-align: middle;
    object-fit: contain;
    flex-shrink: 0;
}

/* Компактное модальное окно описания / покупки иконки охоты */
#ahHuntIconDetailOverlay.ah-hunt-icon-detail-overlay {
    z-index: 10000072 !important;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.ah-hunt-icon-detail-overlay .ah-hunt-icon-detail-inner.bp-battle-inner {
    flex: 0 0 auto;
    width: auto;
    max-width: min(300px, calc(100vw - 24px));
    gap: 6px;
    padding: 10px 12px 11px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid rgba(120, 100, 160, 0.45);
    background: linear-gradient(165deg, rgba(28, 24, 42, 0.98), rgba(14, 12, 22, 0.99));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.ah-hunt-icon-detail-hint {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a7a8e;
    margin: 0;
    line-height: 1.2;
}

.ah-hunt-icon-detail-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 0;
    text-align: left;
}

.ah-hunt-icon-detail-col--img {
    flex-shrink: 0;
}

.ah-hunt-icon-detail-col--meta {
    flex: 1;
    min-width: 0;
}

.ah-hunt-icon-detail-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.ah-hunt-icon-detail-name {
    font-size: 14px;
    font-weight: 700;
    color: #eceef4;
    line-height: 1.25;
    margin: 0 0 4px;
}

.ah-hunt-icon-detail-bonuses {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 11px;
    line-height: 1.35;
    color: #a8b4c8;
}

.ah-hunt-icon-detail-bonuses li {
    position: relative;
    padding-left: 11px;
    margin-bottom: 3px;
}

.ah-hunt-icon-detail-bonuses li:last-child {
    margin-bottom: 0;
}

.ah-hunt-icon-detail-bonuses li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #d4a84b;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.35;
}

.ah-hunt-icon-detail-empty {
    margin: 0;
    font-size: 11px;
    color: #6d7588;
    line-height: 1.3;
}

.ah-hunt-icon-detail-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #d8c896;
    margin-top: 6px;
}

.ah-hunt-icon-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: stretch;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ah-hunt-icon-detail-actions .bp-btn {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 8px;
}

.ah-hunt-icon-detail-lock-hint {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    color: #9aa7b8;
    max-width: 240px;
    text-align: left;
}

.ah-hunt-icon-detail-actions .ah-hunt-icon-detail-active-pill {
    flex: 1 1 auto;
    text-align: center;
}

.ah-hunt-icon-detail-active-pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #1a1a22;
    background: linear-gradient(180deg, #e8c86a, #c9a227);
}

/* Иконка охоты на карте: только спрайт, без квадратной рамки; лёгкая тень по альфе PNG */
.ah-avatar.ah-avatar--hunt-icon {
    width: clamp(46px, 8vmin, 68px);
    height: clamp(46px, 8vmin, 68px);
    border-radius: 0;
    border: none;
    outline: none;
    background: transparent;
    object-fit: contain;
    box-sizing: border-box;
    box-shadow: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.ah-keys-line {
    margin-top: 12px;
    padding: 8px;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    font-size: 12px;
}

.ah-bag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: 12px;
}

.ah-bag-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ah-bag-empty {
    font-size: 12px;
    color: #888;
}

.ah-icon-16 {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.ah-icon-12 {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.ah-training-icon-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
}

.ah-training-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.ah-training-effect {
    font-size: 11px;
    line-height: 1.35;
    color: #9cc8e8;
    text-align: center;
    margin: 0 4px 6px;
    max-width: 100%;
}

.ah-artifact-upgrade-inner .ah-upgrade-level-jump {
    font-size: 15px;
    font-weight: 600;
    color: #c4b5fd;
}

.ah-artifact-upgrade-inner .ah-upgrade-delta-caption {
    font-size: 13px;
    color: #9aa5b8;
    margin-top: 6px;
    align-self: stretch;
    text-align: left;
}

.ah-upgrade-delta {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    align-self: stretch;
    text-align: left;
}

.ah-upgrade-delta li {
    font-size: 14px;
    color: #b8e0c8;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ah-upgrade-delta li:last-child {
    border-bottom: none;
}

.ah-upgrade-delta-empty {
    font-size: 14px;
    color: #9aa5b8;
    margin-top: 8px;
}

#ahArtifactUpgradeOverlay.bp-battle-overlay {
    z-index: 10000070 !important;
}

.ah-reward-inner {
    max-width: 420px;
    text-align: center;
}

.ah-reward-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 10px 0 12px;
}

.ah-reward-icon {
    width: 86px;
    height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(120, 180, 255, 0.45));
}

.ah-reward-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffd57a;
}

.ah-reward-amount {
    font-size: 16px;
    color: #9fe2a9;
}

/* Сундук артефактов из сумки: награда поверх #arenaBagModal (z-index ~50–60) */
#ahChestRewardOverlay.bp-battle-overlay {
    z-index: 10000070 !important;
}

.ah-fight-inner {
    max-width: 460px;
}

.ah-fight-boss-image-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: #0b0c12;
    background-image: radial-gradient(circle at 50% 18%, #1b2438 0%, #0e121d 72%);
}

.ah-fight-boss-image {
    width: auto;
    height: auto;
    max-width: 96%;
    max-height: 96%;
    object-fit: contain;
    image-rendering: auto;
}

/* При наличии карты фон задаётся из JS; босс «стоит» на нижней кромке области */
#ahFightOverlay #ahFightBossImgWrap {
    background-color: #0b0c12;
}

#ahFightOverlay #ahFightBossImgWrap .ah-fight-boss-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
}

.ah-inline-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ah-fight-consumables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

/* Keep boss stat icons compact inside tomb card */
#ahFightOverlay .bp-boss-card--tomb .ah-inline-stat img.gi-img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.ah-row-gap {
    margin-top: 6px;
    font-size: 12px;
    color: #bfc9d6;
}

.ah-hp-line {
    margin-top: 6px;
    font-size: 12px;
    color: #bfc9d6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ah-player-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #4a4f63;
    background: #0f1624;
}

.ah-player-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ah-player-row--hunt-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.ah-player-row--hunt-icon img {
    object-fit: contain;
}

.ah-player-name {
    flex: 1;
    font-weight: 700;
    color: #e8e8f0;
}

.ah-mt10 {
    margin-top: 10px;
}

/*
 * Бой «Охота на артефакты»: после удара лог становится многострочным → у оверлея
 * появляется вертикальный скролл, полоса забирает ширину и блоки width:100% «прыгают».
 * scrollbar-gutter + фиксация flex у колонки убирают сдвиг кнопки «Атаковать».
 */
#ahFightOverlay.bp-battle-overlay {
    scrollbar-gutter: stable;
    align-items: stretch;
}

#ahFightOverlay .bp-battle-inner.ah-fight-inner {
    flex: 0 0 auto;
    width: 100%;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

#ahFightOverlay .ah-fight-consumables {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#ahFightOverlay #ahFightAttackBtn.bp-btn--wide {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}
