/* ==========================================================
   BLACKSMITH MINIGAME
   static/css/blacksmith.css
   ========================================================== */

/* ──────────────────────────────────────────────────────────
   ОВЕРЛЕЙ
   ────────────────────────────────────────────────────────── */
.bs-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: max(16px, env(safe-area-inset-top))
             max(16px, env(safe-area-inset-right))
             max(16px, env(safe-area-inset-bottom))
             max(16px, env(safe-area-inset-left));
    box-sizing: border-box;
    animation: bs-fade-in 0.25s ease;
}
.bs-overlay--game { z-index: 9999; }
.bs-overlay--top  { z-index: 10001; }

.bs-overlay, .bs-overlay * { -webkit-tap-highlight-color: transparent; }
.bs-game,    .bs-game *    { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.bs-btn { -webkit-tap-highlight-color: transparent; }

@keyframes bs-fade-in { from{opacity:0} to{opacity:1} }

.bs-modal {
    background: linear-gradient(160deg, #2a1d14 0%, #1a120c 100%);
    border: 1px solid rgba(220, 140, 60, 0.25);
    border-radius: 18px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    color: #f0e4d0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    display: flex; flex-direction: column;
    animation: bs-pop 0.25s ease;
}
.bs-modal--wide { max-width: 720px; }

@keyframes bs-pop {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.bs-modal__header {
    padding: 22px 24px 14px;
    text-align: center;
    border-bottom: 1px solid rgba(220, 140, 60, 0.15);
}
.bs-modal__icon { font-size: 48px; line-height: 1; margin-bottom: 6px; }
.bs-modal__title {
    margin: 4px 0 2px;
    font-size: 22px; font-weight: 700;
    color: #ffd28a; letter-spacing: 0.3px;
}
.bs-modal__subtitle { font-size: 13px; color: #b89a7a; }

.bs-modal__body { padding: 16px 24px; overflow-y: auto; flex: 1; }
.bs-modal__body p { line-height: 1.5; margin: 8px 0; font-size: 14px; }
.bs-modal__body::-webkit-scrollbar { width: 5px; }
.bs-modal__body::-webkit-scrollbar-thumb { background: rgba(220, 140, 60, 0.3); border-radius: 3px; }

.bs-modal__footer {
    padding: 14px 20px 18px;
    display: flex; gap: 10px;
    border-top: 1px solid rgba(220, 140, 60, 0.15);
    flex-wrap: wrap;
}

/* ──────────────────────────────────────────────────────────
   КНОПКИ
   ────────────────────────────────────────────────────────── */
.bs-btn {
    flex: 1; border: none;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, filter 0.15s, background 0.15s;
    font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; min-height: 44px;
}
.bs-btn--primary {
    background: linear-gradient(135deg, #d97a3c 0%, #a04d18 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(217, 122, 60, 0.35);
}
.bs-btn--primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.bs-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #d4c4a8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.bs-btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.bs-btn--secondary {
    background: rgba(220, 140, 60, 0.12);
    color: #ffd28a;
    border: 1px solid rgba(220, 140, 60, 0.3);
}
.bs-btn--secondary:hover { background: rgba(220, 140, 60, 0.2); }
.bs-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; filter: none; }

/* ──────────────────────────────────────────────────────────
   ПРАВИЛА / RULES
   ────────────────────────────────────────────────────────── */
.bs-rules { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.bs-rule {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(220, 140, 60, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px; line-height: 1.45;
}
.bs-rule strong { color: #ffd28a; }
.bs-rule .bs-zone-perfect { color: #6cf078; font-weight: 700; }
.bs-rule .bs-zone-good    { color: #f0e4c9; font-weight: 700; }

/* ──────────────────────────────────────────────────────────
   БЛОКИ СТОИМОСТИ — мораль (личное) и ресурсы (общее)
   ────────────────────────────────────────────────────────── */
.bs-cost-section {
    display: flex; flex-direction: column;
    gap: 10px; margin: 10px 0;
}

/* Личный блок: мораль */
.bs-cost-personal {
    background: linear-gradient(135deg,
        rgba(255, 200, 80, 0.10) 0%,
        rgba(255, 150, 50, 0.05) 100%);
    border: 1px solid rgba(255, 200, 80, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    position: relative;
}
.bs-cost-personal::before {
    content: '👤 ЛИЧНОЕ';
    position: absolute;
    top: -9px; left: 14px;
    background: #2a1d14;
    padding: 0 8px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 1px;
    color: #ffd98a;
}
.bs-morale-line {
    display: flex; align-items: center; gap: 10px;
}
.bs-morale-icon {
    width: 32px; height: 32px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}
.bs-morale-text { flex: 1; }
.bs-morale-text__label {
    font-size: 11px;
    color: #b89a7a;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.bs-morale-text__value {
    font-size: 16px;
    color: #ffd98a;
    font-weight: 700;
}

/* Общий блок: ресурсы со склада */
.bs-cost-warehouse {
    background: rgba(220, 140, 60, 0.06);
    border: 1px solid rgba(220, 140, 60, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    position: relative;
}
.bs-cost-warehouse::before {
    content: '📦 СО СКЛАДА';
    position: absolute;
    top: -9px; left: 14px;
    background: #2a1d14;
    padding: 0 8px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 1px;
    color: #b89a7a;
}
.bs-cost-list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.bs-cost-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(220, 140, 60, 0.25);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px; font-weight: 600;
}

/* ──────────────────────────────────────────────────────────
   STOCKS PILL
   ────────────────────────────────────────────────────────── */
.bs-stocks {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
    margin-bottom: 14px;
}
.bs-stock-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(220, 140, 60, 0.2);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px; font-weight: 600;
    color: #f0e4d0;
}

/* ──────────────────────────────────────────────────────────
   КАРТОЧКИ ПРЕДМЕТОВ
   ────────────────────────────────────────────────────────── */
.bs-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.bs-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    overflow: hidden;
    display: flex; flex-direction: column;
    cursor: pointer;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s, opacity 0.25s;
    animation: bs-card-in 0.3s ease both;
    position: relative;
}
@keyframes bs-card-in {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}
.bs-card:hover:not(.bs-card--disabled) {
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}
.bs-card--disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.7); }

.bs-card--обычный      { --rarity-color: rgba(255,255,255,0.55); }
.bs-card--необычный    { --rarity-color: rgba(60,220,100,0.9); border-color: rgba(30,200,90,0.2); }
.bs-card--редкий       { --rarity-color: rgba(100,160,255,0.9); border-color: rgba(60,130,255,0.25); }
.bs-card--without-rarity,
.bs-card--без-редкости { --rarity-color: rgba(255,255,255,0.4); }

.bs-card__personal-tag {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(255, 200, 80, 0.95);
    color: #2a1d14;
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.6px;
    z-index: 2;
}
.bs-card__header {
    display: flex; gap: 12px;
    padding: 14px 14px 10px;
    align-items: center;
}
.bs-card__icon-wrap {
    flex-shrink: 0;
    width: 52px; height: 52px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--rarity-color, rgba(255,255,255,0.08));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.bs-card__icon { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.bs-card__info { flex: 1; min-width: 0; }
.bs-card__name {
    font-size: 14px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 2px;
}
.bs-card__sub {
    font-size: 11px; color: #b89a7a;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.bs-card__cost {
    padding: 8px 14px 12px;
    display: flex; flex-wrap: wrap; gap: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}
.bs-card__cost-tag {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11.5px;
    color: #d4c4a8;
}
.bs-card__cost-tag--lack { color: #ff6b6b; background: rgba(255, 100, 100, 0.1); }

.bs-empty {
    text-align: center;
    padding: 32px 16px;
    color: #8b7a60;
    font-size: 14px;
}
.bs-empty__icon { font-size: 40px; margin-bottom: 10px; }

/* ──────────────────────────────────────────────────────────
   ИГРОВОЕ ПОЛЕ
   ────────────────────────────────────────────────────────── */
.bs-game {
    width: 100%; max-width: 720px;
    height: min(96vh, 900px);
    background: linear-gradient(180deg, #1d130c 0%, #0d0805 100%);
    border: 1px solid rgba(220, 140, 60, 0.2);
    border-radius: 18px;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    color: #f0e4d0;
    font-family: 'Inter', sans-serif;
    animation: bs-pop 0.25s ease;
}

.bs-game__header {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(220, 140, 60, 0.15);
    text-align: center;
    font-size: 14px;
    color: #b89a7a;
    flex-shrink: 0;
}
.bs-game__header strong { color: #ffd28a; }

.bs-game__hud {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 10px 14px; flex-wrap: wrap;
    border-bottom: 1px solid rgba(220, 140, 60, 0.10);
    flex-shrink: 0;
}
.bs-hud-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(220, 140, 60, 0.2);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 13px; font-weight: 600;
}
.bs-hud-pill--save {
    background: linear-gradient(135deg, #5b2a8a 0%, #3a1a5e 100%);
    border-color: rgba(180, 130, 255, 0.4);
}

.bs-repair-bar {
    padding: 8px 18px 12px;
    flex-shrink: 0;
}
.bs-repair-bar__label {
    display: flex; justify-content: space-between;
    font-size: 11px; color: #b89a7a;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 4px;
}
.bs-repair-bar__track {
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(220, 140, 60, 0.15);
}
.bs-repair-bar__fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #d97a3c, #ffd28a);
    box-shadow: 0 0 8px rgba(255, 200, 80, 0.5);
    transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ──────────────────────────────────────────────────────────
   СЦЕНА КУЗНИЦЫ
   ────────────────────────────────────────────────────────── */
.bs-game__stage {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;     /* ← убирает 300ms задержку клика на тач-устройствах */
    background:
        radial-gradient(ellipse at 50% 75%,
            rgba(255, 100, 30, 0.10) 0%,
            transparent 55%),
        radial-gradient(ellipse at 50% 100%,
            rgba(255, 150, 50, 0.20) 0%,
            transparent 50%);
    display: grid;
    grid-template-rows: 1fr auto;   /* верх: круг (растёт), низ: наковальня */
    align-items: center;
    justify-items: center;
    padding: 12px 12px 0;
    gap: 0;
}

/* Тёплое мерцание горна */
.bs-stage__forge-glow {
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 85%; height: 50%;
    background: radial-gradient(ellipse at 50% 95%,
        rgba(255, 120, 40, 0.30) 0%,
        rgba(255, 80, 20, 0.10) 35%,
        transparent 70%);
    pointer-events: none;
    animation: bsForgeFlicker 2.4s ease-in-out infinite;
    z-index: 0;
}
@keyframes bsForgeFlicker {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

/* ── Верхний отсек: круг прицеливания ── */
.bs-stage__aim {
    position: relative;
    z-index: 2;
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    padding: 12px 0;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55));
}
.bs-skill-svg {
    display: block;
    width: clamp(180px, 42vh, 260px);
    aspect-ratio: 1;
    overflow: visible;            /* зоны не обрезаются */
    pointer-events: none;
}

/* ── Нижний отсек: молот + наковальня + предмет ── */
.bs-stage__forge {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex; justify-content: center; align-items: flex-end;
    padding-bottom: 0;
}

.bs-anvil {
    position: relative;
    width: 320px;
    height: 200px;
    pointer-events: none;
}

/* Тень-пол ВНУТРИ контейнера — прямо под наковальней */
.bs-anvil__shadow {
    position: absolute;
    bottom: 4px;                  /* тень почти у самого низа */
    left: 50%;
    transform: translateX(-50%);
    width: 78%;
    height: 18px;
    background: radial-gradient(ellipse,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.25) 45%,
        transparent 75%);
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
}

/* НАКОВАЛЬНЯ — ОПИРАЕТСЯ на тень */
.bs-anvil__base {
    position: absolute;
    bottom: 8px;                  /* стоит на тени */
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 165px;
    background-image: url('/static/img/minigames/blacksmith/anvil.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
    will-change: transform;
    z-index: 2;
}

/* ПРЕДМЕТ — лежит НА верхней плите наковальни.
   Верх плиты ≈ bottom: 8px (база) + ~145px (высота наковальни от низа до плиты) = 153px */
.bs-anvil__item {
    position: absolute;
    bottom: 138px;                /* погружён в плиту на 5–7px для эффекта "лежит" */
    left: 50%;
    transform: translateX(-50%);
    width: 64px; height: 64px;
    z-index: 4;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.bs-anvil__item img {
    width: 100%; height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    filter:
        drop-shadow(0 0 10px rgba(255, 150, 60, 0.7))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
    animation: bsItemHeat 1.6s ease-in-out infinite;
}
@keyframes bsItemHeat {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 130, 50, 0.5))
                       drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7)); }
    50%      { filter: drop-shadow(0 0 18px rgba(255, 180, 80, 0.95))
                       drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7)); }
}

/* Полоска прочности под предметом, на самой плите */
.bs-anvil__item-bar {
    position: absolute;
    bottom: 132px;
    left: 50%;
    transform: translateX(-50%);
    width: 84px; height: 5px;
    background: rgba(0, 0, 0, 0.78);
    border-radius: 3px;
    overflow: hidden;
    z-index: 5;
    border: 1px solid rgba(255, 200, 80, 0.3);
}
.bs-anvil__item-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #d97a3c, #ffd28a);
    box-shadow: 0 0 8px rgba(255, 200, 80, 0.7);
    transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* МОЛОТ — слева от наковальни, занесён */
.bs-anvil__hammer {
    position: absolute;
    bottom: 80px;
    left: 8px;
    width: 138px; height: 138px;
    background-image: url('/static/img/minigames/blacksmith/hammer.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
    transform-origin: 25% 80%;       /* низ рукоятки */
    transform: rotate(0deg);
    will-change: transform;
    z-index: 3;
}

/* Анимация удара */
.bs-anvil.is-strike .bs-anvil__hammer { animation: bsHammerStrike 0.4s cubic-bezier(.34, 1.5, .5, 1); }
.bs-anvil.is-strike .bs-anvil__base   { animation: bsAnvilBounce  0.36s cubic-bezier(.34, 1.5, .5, 1); }
.bs-anvil.is-strike .bs-anvil__item   { animation: bsItemBounce   0.36s cubic-bezier(.34, 1.5, .5, 1); }

@keyframes bsHammerStrike {
    0%   { transform: rotate(0deg); }
    18%  { transform: rotate(-32deg); }
    52%  { transform: rotate(48deg) translate(28px, 14px); }
    68%  { transform: rotate(42deg) translate(24px, 12px); }
    100% { transform: rotate(0deg); }
}
@keyframes bsAnvilBounce {
    0%, 100% { transform: translateX(-50%) translateY(0)   scaleY(1); }
    52%      { transform: translateX(-50%) translateY(4px) scaleY(0.96); }
    72%      { transform: translateX(-50%) translateY(-2px) scaleY(1.02); }
}
@keyframes bsItemBounce {
    0%, 100% { transform: translateX(-50%) translateY(0)     scale(1); }
    52%      { transform: translateX(-50%) translateY(-12px) scale(1.08); }
}

/* Промах */
.bs-anvil.is-miss .bs-anvil__hammer { animation: bsHammerMiss 0.4s ease-out; }
@keyframes bsHammerMiss {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    25%      { transform: rotate(-15deg) translateX(-6px); }
    50%      { transform: rotate(-8deg)  translateX(4px); }
    75%      { transform: rotate(-12deg) translateX(-3px); }
}

/* Вспышка перфекта */
.bs-anvil.is-perfect::before {
    content: '';
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px; height: 200px;
    background: radial-gradient(circle,
        rgba(255, 230, 160, 0.85) 0%,
        rgba(255, 154, 60, 0.45) 35%,
        transparent 70%);
    border-radius: 50%;
    animation: bsFlash 0.55s ease-out;
    pointer-events: none;
    z-index: 6;
}
@keyframes bsFlash {
    0%   { opacity: 0; transform: translateX(-50%) scale(0.3); }
    30%  { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) scale(1.5); }
}

/* Искры */
.bs-spark {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffe7a0 0%, #ff9a3c 60%, transparent 100%);
    box-shadow: 0 0 10px #ff9a3c;
    pointer-events: none;
    z-index: 7;
    animation: bsSparkFly 0.6s ease-out forwards;
}
@keyframes bsSparkFly {
    0%   { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.3); }
}

/* Hit-flash overlay */
.bs-hit-flash {
    position: absolute; inset: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 8;
}
.bs-hit-flash.is-perfect {
    background: radial-gradient(circle at 50% 70%, rgba(108, 240, 120, 0.25) 0%, transparent 60%);
    animation: bsHitFlash 0.35s ease-out;
}
.bs-hit-flash.is-good {
    background: radial-gradient(circle at 50% 70%, rgba(240, 228, 201, 0.22) 0%, transparent 60%);
    animation: bsHitFlash 0.35s ease-out;
}
.bs-hit-flash.is-miss {
    background: radial-gradient(circle at 50% 70%, rgba(255, 80, 80, 0.20) 0%, transparent 60%);
    animation: bsHitFlash 0.35s ease-out;
}
@keyframes bsHitFlash {
    0%   { opacity: 0; }
    30%  { opacity: 1; }
    100% { opacity: 0; }
}

.bs-game__footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(220, 140, 60, 0.15);
    display: flex; justify-content: center;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   ЭКРАН РЕЗУЛЬТАТА
   ────────────────────────────────────────────────────────── */
.bs-result {
    text-align: center;
    padding: 8px 0;
}
.bs-result__icon { font-size: 56px; margin-bottom: 6px; }
.bs-result__title {
    font-size: 22px; font-weight: 700;
    color: #ffd28a; margin: 0 0 4px;
}
.bs-result__sub { font-size: 13px; color: #b89a7a; margin-bottom: 14px; }

.bs-result__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0;
}
.bs-result__stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(220, 140, 60, 0.18);
    border-radius: 10px;
    padding: 10px 8px;
}
.bs-result__stat-label {
    font-size: 10.5px;
    color: #b89a7a;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.bs-result__stat-value {
    font-size: 20px; font-weight: 700;
    margin-top: 2px;
}
.bs-result__stat--perfect .bs-result__stat-value { color: #6cf078; }
.bs-result__stat--good    .bs-result__stat-value { color: #f0e4c9; }
.bs-result__stat--miss    .bs-result__stat-value { color: #ff8080; }

.bs-result__save {
    background: linear-gradient(135deg, rgba(180, 130, 255, 0.15) 0%, rgba(120, 80, 200, 0.08) 100%);
    border: 1px solid rgba(180, 130, 255, 0.35);
    border-radius: 12px;
    padding: 14px;
    margin: 14px 0 8px;
}
.bs-result__save-percent {
    font-size: 28px; font-weight: 800;
    color: #d4b8ff;
}
.bs-result__save-list {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.bs-modal--compact {
	max-width: 540px;
}

.bs-player-card {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	padding: 12px 14px;
	border: 1px solid rgba(230, 163, 88, 0.18);
	border-radius: 16px;
	background:
		linear-gradient(180deg, rgba(255, 183, 107, 0.08), rgba(255, 183, 107, 0.03)),
		rgba(20, 12, 8, 0.82);
}

.bs-player-card__avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255, 214, 156, 0.08);
	border: 1px solid rgba(255, 214, 156, 0.18);
	flex: 0 0 46px;
	display: grid;
	place-items: center;
}

.bs-player-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bs-player-card__avatar-fallback {
	font-size: 20px;
}

.bs-player-card__eyebrow,
.bs-cost-explain__eyebrow,
.bs-cost-box__eyebrow {
	font-size: 11px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #c79b6b;
	margin-bottom: 6px;
}

.bs-player-card__name,
.bs-cost-explain__title,
.bs-cost-box__title {
	font-size: 15px;
	font-weight: 700;
	color: #f4e4cf;
}

.bs-warning {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 16px;
	border: 1px solid rgba(255, 150, 103, 0.2);
	background: rgba(91, 35, 19, 0.28);
}

.bs-warning__icon {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	display: grid;
	place-items: center;
	font-size: 18px;
}

.bs-warning__morale {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.bs-warning__title {
	font-size: 14px;
	font-weight: 700;
	color: #ffd7b1;
	margin-bottom: 2px;
}

.bs-warning__text {
	font-size: 13px;
	color: #e9cdb3;
	line-height: 1.4;
}

.bs-cost-explain {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 14px;
	align-items: center;
	margin-top: 16px;
	padding: 16px;
	border-radius: 18px;
	border: 1px solid rgba(231, 162, 82, 0.18);
	background:
		radial-gradient(circle at top right, rgba(255, 183, 107, 0.12), transparent 42%),
		rgba(18, 10, 7, 0.84);
}

.bs-cost-explain__desc,
.bs-cost-box__desc,
.bs-confirm-text {
	font-size: 13px;
	line-height: 1.45;
	color: #d0b296;
}

.bs-cost-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 16px;
}

.bs-cost-box {
	padding: 16px;
	border-radius: 18px;
	border: 1px solid rgba(231, 162, 82, 0.18);
	background:
		linear-gradient(180deg, rgba(255, 197, 123, 0.07), rgba(255, 197, 123, 0.02)),
		rgba(19, 11, 8, 0.84);
}

.bs-cost-box__body {
	margin-top: 12px;
}

.bs-cost-box__body--tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bs-item-summary {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 14px;
	align-items: center;
	padding: 14px;
	border-radius: 18px;
	border: 1px solid rgba(235, 171, 96, 0.18);
	background:
		radial-gradient(circle at 10% 10%, rgba(255, 191, 120, 0.08), transparent 38%),
		rgba(18, 10, 7, 0.88);
	margin-bottom: 14px;
}

.bs-item-summary--compact {
	grid-template-columns: 62px 1fr;
	padding: 12px;
	margin-bottom: 0;
}

.bs-item-summary__media {
	width: 72px;
	height: 72px;
	border-radius: 16px;
	overflow: hidden;
	background: rgba(255, 228, 194, 0.06);
	border: 1px solid rgba(255, 228, 194, 0.14);
	display: grid;
	place-items: center;
}

.bs-item-summary--compact .bs-item-summary__media {
	width: 62px;
	height: 62px;
}

.bs-item-summary__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	padding: 10px;
}

.bs-item-summary__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.bs-item-summary__title {
	font-size: 16px;
	font-weight: 700;
	color: #f5e6d2;
}

.bs-item-summary__sub {
	font-size: 13px;
	color: #caa88a;
	margin-top: 4px;
}

.bs-item-summary__chips,
.bs-item-summary__meta,
.bs-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bs-item-summary__meta {
	margin-top: 10px;
}

.bs-inline-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 9px;
	border-radius: 999px;
	background: rgba(255, 213, 160, 0.08);
	border: 1px solid rgba(255, 213, 160, 0.12);
	font-size: 11px;
	color: #ecd4b9;
}

.bs-inline-pill--accent {
	background: rgba(111, 255, 173, 0.08);
	border-color: rgba(111, 255, 173, 0.18);
	color: #c8f7d3;
}

.bs-inline-pill--rarity {
	background: rgba(155, 124, 255, 0.08);
	border-color: rgba(155, 124, 255, 0.16);
	color: #d9cdff;
}

.bs-inline-pill--personal {
	background: rgba(116, 188, 255, 0.08);
	border-color: rgba(116, 188, 255, 0.16);
	color: #d0ecff;
}

.bs-inline-pill--danger {
	background: rgba(255, 106, 106, 0.08);
	border-color: rgba(255, 106, 106, 0.16);
	color: #ffc1c1;
}

.bs-rule--admin {
	border-color: rgba(255, 200, 80, 0.35) !important;
	background: rgba(255, 200, 80, 0.06) !important;
}

.bs-rule--center {
	text-align: center;
}

.bs-picker-toolbar {
	display: grid;
	gap: 12px;
	margin-bottom: 14px;
}

.bs-filter-group {
	display: flex;
	flex-wrap: wrap;
    justify-content: center;
	gap: 8px;
}

.bs-filter-chip {
	appearance: none;
	border: 1px solid rgba(236, 182, 122, 0.16);
	background: rgba(255, 205, 141, 0.05);
	color: #e7d1b8;
	padding: 9px 12px;
	border-radius: 999px;
	font-size: 13px;
	cursor: pointer;
	transition: 0.18s ease;
}

.bs-filter-chip:hover {
	border-color: rgba(236, 182, 122, 0.34);
	transform: translateY(-1px);
}

.bs-filter-chip.is-active {
	background: linear-gradient(180deg, rgba(255, 182, 96, 0.18), rgba(255, 182, 96, 0.08));
	border-color: rgba(255, 182, 96, 0.42);
	color: #fff0dd;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.bs-search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	height: 44px;
	border-radius: 14px;
	border: 1px solid rgba(236, 182, 122, 0.16);
	background: rgba(18, 10, 7, 0.84);
}

.bs-search__icon {
	opacity: 0.8;
}

.bs-search input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	outline: none;
	color: #f2e4d1;
	font-size: 14px;
}

.bs-picker-counter {
	margin: 12px 0 10px;
	font-size: 13px;
	color: #cfae8e;
}

.bs-recipes-panel {
	margin: 14px 0 10px;
	border-radius: 18px;
	border: 1px solid rgba(236, 182, 122, 0.14);
	background: rgba(18, 10, 7, 0.84);
	overflow: hidden;
}

.bs-recipes-panel__summary {
	list-style: none;
	cursor: pointer;
	padding: 14px 16px;
	font-size: 14px;
	font-weight: 700;
	color: #f1dfc9;
}

.bs-recipes-panel__summary::-webkit-details-marker {
	display: none;
}

.bs-recipes-panel__content {
	padding: 0 16px 16px;
}

.bs-recipes-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	overflow: hidden;
}

.bs-recipes-table th,
.bs-recipes-table td {
	padding: 10px 12px;
	border-bottom: 1px solid rgba(255, 214, 156, 0.08);
	text-align: left;
	color: #e6d1b9;
}

.bs-recipes-table th {
	color: #f6e6d3;
	font-weight: 700;
}

.bs-recipes-table__cell--lack {
	color: #ff9f88 !important;
	font-weight: 700;
}

.bs-card__status {
	margin-top: 10px;
	font-size: 12px;
	color: #ffb497;
}

.bs-empty__title {
	font-size: 16px;
	font-weight: 700;
	margin-top: 10px;
	color: #f4e4cf;
}

.bs-empty__text {
	margin-top: 6px;
	color: #c7aa8d;
	font-size: 13px;
}

.bs-toast-stack {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.bs-toast {
	min-width: 240px;
	max-width: 360px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid rgba(255, 213, 160, 0.12);
	background: rgba(20, 12, 8, 0.95);
	color: #f5e4ce;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
	opacity: 0;
	transform: translateY(8px);
	transition: 0.2s ease;
}

.bs-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.bs-toast--warning {
	border-color: rgba(255, 167, 112, 0.28);
}

.bs-toast--error {
	border-color: rgba(255, 102, 102, 0.28);
}

.bs-bullets {
	margin: 10px 0 0;
	padding-left: 18px;
	color: #d8b89a;
	font-size: 13px;
	line-height: 1.45;
}

.bs-game__title {
	font-size: 18px;
	font-weight: 800;
	color: #f6e5d0;
}

.bs-game__subtitle {
	margin-top: 4px;
	font-size: 13px;
	color: #cba98a;
}

.bs-game__item-card {
	margin-bottom: 14px;
}

.bs-stage__aim {
	margin-bottom: 8px;
}

.bs-skill-svg {
	display: block;
	width: min(280px, 86vw);
	height: auto;
	margin: 0 auto;
	filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.28));
}

.bs-skill-track {
	filter: drop-shadow(0 0 12px rgba(255, 192, 120, 0.08));
}

.bs-anvil {
	position: relative;
	overflow: visible;
}

.bs-anvil__hammer,
.bs-anvil__base {
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

.bs-anvil__item {
	will-change: transform, filter;
}

.bs-anvil.is-strike .bs-anvil__hammer,
.bs-anvil.is-perfect .bs-anvil__hammer {
	animation: bsHammerStrike 0.22s ease-out;
}

.bs-anvil.is-miss .bs-anvil__hammer {
	animation: bsHammerMiss 0.22s ease-out;
}

.bs-anvil.is-perfect .bs-anvil__item {
	animation: bsItemPerfect 0.22s ease-out;
	filter: drop-shadow(0 0 14px rgba(111, 255, 173, 0.32));
}

.bs-anvil.is-strike .bs-anvil__item {
	animation: bsItemHit 0.18s ease-out;
}

.bs-anvil.is-miss .bs-anvil__item {
	animation: bsItemMiss 0.18s ease-out;
	filter: grayscale(0.12);
}

@keyframes bsHammerStrike {
	0% {
		transform: translate3d(0, 0, 0) rotate(-18deg);
	}
	55% {
		transform: translate3d(10px, 34px, 0) rotate(16deg);
	}
	100% {
		transform: translate3d(0, 0, 0) rotate(-18deg);
	}
}

@keyframes bsHammerMiss {
	0% {
		transform: translate3d(0, 0, 0) rotate(-18deg);
	}
	50% {
		transform: translate3d(16px, 24px, 0) rotate(10deg);
	}
	100% {
		transform: translate3d(0, 0, 0) rotate(-18deg);
	}
}

@keyframes bsItemHit {
	0% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(2px) scale(0.98);
	}
	100% {
		transform: translateY(0) scale(1);
	}
}

@keyframes bsItemPerfect {
	0% {
		transform: translateY(0) scale(1);
	}
	45% {
		transform: translateY(1px) scale(0.975);
	}
	100% {
		transform: translateY(0) scale(1.02);
	}
}

@keyframes bsItemMiss {
	0% {
		transform: translateX(0);
	}
	30% {
		transform: translateX(-2px);
	}
	60% {
		transform: translateX(2px);
	}
	100% {
		transform: translateX(0);
	}
}

@media (max-width: 720px) {
	.bs-cost-grid,
	.bs-cost-explain {
		grid-template-columns: 1fr;
	}
}

.bs-modal--compact {
	max-width: 540px;
}

.bs-toast-stack {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.bs-toast {
	min-width: 240px;
	max-width: 360px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid rgba(255, 213, 160, 0.12);
	background: rgba(20, 12, 8, 0.95);
	color: #f5e4ce;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
	opacity: 0;
	transform: translateY(8px);
	transition: 0.2s ease;
}

.bs-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.bs-toast--warning {
	border-color: rgba(255, 167, 112, 0.28);
}

.bs-toast--error {
	border-color: rgba(255, 102, 102, 0.28);
}

.bs-intro-panel {
	display: grid;
	grid-template-columns: minmax(260px, 320px) 1fr;
	gap: 16px;
	padding: 16px;
	border-radius: 22px;
	border: 1px solid rgba(235, 171, 96, 0.16);
	background:
		radial-gradient(circle at top right, rgba(255, 184, 96, 0.08), transparent 36%),
		linear-gradient(180deg, rgba(255, 196, 124, 0.04), rgba(255, 196, 124, 0.02)),
		rgba(17, 10, 7, 0.88);
}

.bs-intro-panel__title {
	font-size: 18px;
	font-weight: 800;
	color: #f6e6d3;
	margin-bottom: 12px;
}

.bs-profile-card {
	display: grid;
	gap: 14px;
	padding: 16px;
	border-radius: 18px;
	border: 1px solid rgba(230, 163, 88, 0.18);
	background:
		linear-gradient(180deg, rgba(255, 183, 107, 0.08), rgba(255, 183, 107, 0.03)),
		rgba(20, 12, 8, 0.82);
	height: 100%;
}

.bs-profile-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.bs-profile-card__avatar {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255, 214, 156, 0.08);
	border: 1px solid rgba(255, 214, 156, 0.18);
	flex: 0 0 58px;
	display: grid;
	place-items: center;
}

.bs-profile-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bs-profile-card__avatar-fallback {
	font-size: 22px;
}

.bs-profile-card__eyebrow,
.bs-intro-cost__eyebrow,
.bs-cost-box__eyebrow {
	font-size: 11px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #c79b6b;
	margin-bottom: 6px;
}

.bs-profile-card__name,
.bs-intro-cost__title,
.bs-cost-box__title {
	font-size: 16px;
	font-weight: 700;
	color: #f4e4cf;
}

.bs-profile-card__stats {
	display: grid;
	gap: 10px;
}

.bs-profile-stat {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid rgba(255, 213, 160, 0.1);
	background: rgba(255, 213, 160, 0.04);
}

.bs-profile-stat__icon {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(255, 213, 160, 0.08);
	font-size: 14px;
	flex: 0 0 28px;
}

.bs-profile-stat__icon-image {
	width: 18px;
	height: 18px;
	object-fit: contain;
	flex: 0 0 18px;
}

.bs-profile-stat__label {
	font-size: 11px;
	color: #caa98a;
	line-height: 1.1;
}

.bs-profile-stat__value {
	font-size: 14px;
	font-weight: 700;
	color: #f4e4cf;
	line-height: 1.2;
	margin-top: 2px;
}

.bs-intro-rules {
	display: grid;
	gap: 10px;
}

.bs-intro-rule {
	display: grid;
	grid-template-columns: 32px 1fr;
	gap: 10px;
	align-items: start;
	padding: 12px 14px;
	border-radius: 16px;
	border: 1px solid rgba(255, 214, 156, 0.08);
	background: rgba(255, 214, 156, 0.03);
}

.bs-intro-rule__num {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 800;
	color: #24150d;
	background: linear-gradient(180deg, #ffca88, #d48741);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.bs-intro-rule__text {
	font-size: 14px;
	line-height: 1.5;
	color: #e4cfb6;
}

.bs-intro-cost {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 14px;
	align-items: center;
	margin-top: 14px;
	padding: 16px;
	border-radius: 18px;
	border: 1px solid rgba(231, 162, 82, 0.18);
	background:
		radial-gradient(circle at top right, rgba(255, 183, 107, 0.12), transparent 42%),
		rgba(18, 10, 7, 0.84);
}

.bs-intro-cost__desc,
.bs-cost-box__desc,
.bs-confirm-text {
	font-size: 13px;
	line-height: 1.45;
	color: #d0b296;
}

.bs-warning {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 16px;
	border: 1px solid rgba(255, 150, 103, 0.2);
	background: rgba(91, 35, 19, 0.28);
}

.bs-warning__icon {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	display: grid;
	place-items: center;
	font-size: 18px;
}

.bs-warning__morale {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.bs-warning__title {
	font-size: 14px;
	font-weight: 700;
	color: #ffd7b1;
	margin-bottom: 2px;
}

.bs-warning__text {
	font-size: 13px;
	color: #e9cdb3;
	line-height: 1.4;
}

.bs-cost-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 16px;
}

.bs-cost-box {
	padding: 16px;
	border-radius: 18px;
	border: 1px solid rgba(231, 162, 82, 0.18);
	background:
		linear-gradient(180deg, rgba(255, 197, 123, 0.07), rgba(255, 197, 123, 0.02)),
		rgba(19, 11, 8, 0.84);
}

.bs-cost-box__body {
	margin-top: 12px;
}

.bs-cost-box__body--tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bs-item-summary {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 14px;
	align-items: center;
	padding: 14px;
	border-radius: 18px;
	border: 1px solid rgba(235, 171, 96, 0.18);
	background:
		radial-gradient(circle at 10% 10%, rgba(255, 191, 120, 0.08), transparent 38%),
		rgba(18, 10, 7, 0.88);
	margin-bottom: 14px;
}

.bs-item-summary--compact {
	grid-template-columns: 62px 1fr;
	padding: 12px;
	margin-bottom: 0;
}

.bs-item-summary__media {
	width: 72px;
	height: 72px;
	border-radius: 16px;
	overflow: hidden;
	background: rgba(255, 228, 194, 0.06);
	border: 1px solid rgba(255, 228, 194, 0.14);
	display: grid;
	place-items: center;
}

.bs-item-summary--compact .bs-item-summary__media {
	width: 62px;
	height: 62px;
}

.bs-item-summary__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	padding: 10px;
}

.bs-item-summary__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.bs-item-summary__title {
	font-size: 16px;
	font-weight: 700;
	color: #f5e6d2;
}

.bs-item-summary__sub {
	font-size: 13px;
	color: #caa88a;
	margin-top: 4px;
}

.bs-item-summary__chips,
.bs-item-summary__meta,
.bs-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bs-item-summary__meta {
	margin-top: 10px;
}

.bs-inline-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 9px;
	border-radius: 999px;
	background: rgba(255, 213, 160, 0.08);
	border: 1px solid rgba(255, 213, 160, 0.12);
	font-size: 11px;
	color: #ecd4b9;
}

.bs-inline-pill--accent {
	background: rgba(111, 255, 173, 0.08);
	border-color: rgba(111, 255, 173, 0.18);
	color: #c8f7d3;
}

.bs-inline-pill--rarity {
	background: rgba(155, 124, 255, 0.08);
	border-color: rgba(155, 124, 255, 0.16);
	color: #d9cdff;
}

.bs-inline-pill--personal {
	background: rgba(116, 188, 255, 0.08);
	border-color: rgba(116, 188, 255, 0.16);
	color: #d0ecff;
}

.bs-inline-pill--danger {
	background: rgba(255, 106, 106, 0.08);
	border-color: rgba(255, 106, 106, 0.16);
	color: #ffc1c1;
}

.bs-rule--admin {
	border-color: rgba(255, 200, 80, 0.35) !important;
	background: rgba(255, 200, 80, 0.06) !important;
}

.bs-rule--center {
	text-align: center;
}

.bs-picker-toolbar {
	display: grid;
	gap: 12px;
	margin-bottom: 14px;
}

.bs-filter-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bs-filter-chip {
	appearance: none;
	border: 1px solid rgba(236, 182, 122, 0.16);
	background: rgba(255, 205, 141, 0.05);
	color: #e7d1b8;
	padding: 9px 12px;
	border-radius: 999px;
	font-size: 13px;
	cursor: pointer;
	transition: 0.18s ease;
}

.bs-filter-chip:hover {
	border-color: rgba(236, 182, 122, 0.34);
	transform: translateY(-1px);
}

.bs-filter-chip.is-active {
	background: linear-gradient(180deg, rgba(255, 182, 96, 0.18), rgba(255, 182, 96, 0.08));
	border-color: rgba(255, 182, 96, 0.42);
	color: #fff0dd;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.bs-search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	height: 44px;
	border-radius: 14px;
	border: 1px solid rgba(236, 182, 122, 0.16);
	background: rgba(18, 10, 7, 0.84);
}

.bs-search__icon {
	opacity: 0.8;
}

.bs-search input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	outline: none;
	color: #f2e4d1;
	font-size: 14px;
}

.bs-picker-counter {
	margin: 12px 0 10px;
	font-size: 13px;
	color: #cfae8e;
}

.bs-recipes-panel {
	margin: 14px 0 10px;
	border-radius: 18px;
	border: 1px solid rgba(236, 182, 122, 0.14);
	background: rgba(18, 10, 7, 0.84);
	overflow: hidden;
}

.bs-recipes-panel__summary {
	list-style: none;
	cursor: pointer;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
	font-weight: 700;
	color: #f1dfc9;
}

.bs-recipes-panel__summary::-webkit-details-marker {
	display: none;
}

.bs-recipes-panel__toggle {
	font-size: 12px;
	color: #cda37a;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid rgba(255, 214, 156, 0.1);
	background: rgba(255, 214, 156, 0.04);
}

.bs-recipes-panel__content {
	padding: 0 16px 16px;
}

.bs-recipes-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.bs-recipes-table th,
.bs-recipes-table td {
	padding: 10px 12px;
	border-bottom: 1px solid rgba(255, 214, 156, 0.08);
	text-align: left;
	color: #e6d1b9;
}

.bs-recipes-table th {
	color: #f6e6d3;
	font-weight: 700;
}

.bs-recipes-table__cell--lack {
	color: #ff9f88 !important;
	font-weight: 700;
}

.bs-empty__title {
	font-size: 16px;
	font-weight: 700;
	margin-top: 10px;
	color: #f4e4cf;
}

.bs-empty__text {
	margin-top: 6px;
	color: #c7aa8d;
	font-size: 13px;
}

.bs-card__status {
	margin-top: 10px;
	font-size: 12px;
	color: #ffb497;
}

.bs-bullets {
	margin: 10px 0 0;
	padding-left: 18px;
	color: #d8b89a;
	font-size: 13px;
	line-height: 1.45;
}

.bs-game__title {
	font-size: 18px;
	font-weight: 800;
	color: #f6e5d0;
}

.bs-game__subtitle {
	margin-top: 4px;
	font-size: 13px;
	color: #cba98a;
}

.bs-game__item-card {
	margin-bottom: 14px;
}

.bs-stage__aim {
	margin-bottom: 8px;
}

.bs-skill-svg {
	display: block;
	width: min(280px, 86vw);
	height: auto;
	margin: 0 auto;
	filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.28));
}

.bs-skill-track {
	filter: drop-shadow(0 0 12px rgba(255, 192, 120, 0.08));
}

.bs-game__stage {
	will-change: transform, filter;
	transform-origin: center center;
}

.bs-game__stage.is-impact-good {
	animation: bsStageImpactGood 0.18s ease-out;
}

.bs-game__stage.is-impact-perfect {
	animation: bsStageImpactPerfect 0.24s ease-out;
}

.bs-game__stage.is-impact-miss {
	animation: bsStageImpactMiss 0.16s ease-out;
}

.bs-anvil {
	position: relative;
	overflow: visible;
	will-change: transform, filter;
}

.bs-anvil__hammer,
.bs-anvil__base {
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	will-change: transform;
}

.bs-anvil__item {
	will-change: transform, filter;
	transform-origin: center bottom;
}

.bs-anvil.is-strike .bs-anvil__hammer,
.bs-anvil.is-perfect .bs-anvil__hammer {
	animation: bsHammerStrike 0.24s cubic-bezier(.2, .8, .2, 1);
}

.bs-anvil.is-miss .bs-anvil__hammer {
	animation: bsHammerMiss 0.22s ease-out;
}

.bs-anvil.is-perfect .bs-anvil__item {
	animation: bsItemPerfect 0.24s ease-out;
	filter: drop-shadow(0 0 18px rgba(111, 255, 173, 0.44));
}

.bs-anvil.is-strike .bs-anvil__item {
	animation: bsItemHit 0.2s ease-out;
	filter: drop-shadow(0 0 12px rgba(255, 215, 141, 0.18));
}

.bs-anvil.is-miss .bs-anvil__item {
	animation: bsItemMiss 0.18s ease-out;
	filter: grayscale(0.12);
}

.bs-hit-flash {
	pointer-events: none;
}

.bs-hit-flash.is-good {
	animation: bsFlashGood 0.22s ease-out;
}

.bs-hit-flash.is-perfect {
	animation: bsFlashPerfect 0.28s ease-out;
}

.bs-hit-flash.is-miss {
	animation: bsFlashMiss 0.18s ease-out;
}

@keyframes bsStageImpactGood {
	0% {
		transform: scale(1);
		filter: brightness(1);
	}
	35% {
		transform: scale(1.01) translateY(-1px);
		filter: brightness(1.05);
	}
	100% {
		transform: scale(1);
		filter: brightness(1);
	}
}

@keyframes bsStageImpactPerfect {
	0% {
		transform: scale(1);
		filter: brightness(1);
	}
	25% {
		transform: scale(1.018) translateY(-2px);
		filter: brightness(1.12);
	}
	55% {
		transform: scale(0.995) translateY(1px);
		filter: brightness(1.04);
	}
	100% {
		transform: scale(1);
		filter: brightness(1);
	}
}

@keyframes bsStageImpactMiss {
	0% {
		transform: translateX(0);
	}
	30% {
		transform: translateX(-3px);
	}
	60% {
		transform: translateX(3px);
	}
	100% {
		transform: translateX(0);
	}
}

@keyframes bsHammerStrike {
	0% {
		transform: translate3d(0, 0, 0) rotate(-18deg);
	}
	52% {
		transform: translate3d(12px, 40px, 0) rotate(20deg);
	}
	100% {
		transform: translate3d(0, 0, 0) rotate(-18deg);
	}
}

@keyframes bsHammerMiss {
	0% {
		transform: translate3d(0, 0, 0) rotate(-18deg);
	}
	50% {
		transform: translate3d(18px, 28px, 0) rotate(12deg);
	}
	100% {
		transform: translate3d(0, 0, 0) rotate(-18deg);
	}
}

@keyframes bsItemHit {
	0% {
		transform: translateY(0) scale(1);
	}
	45% {
		transform: translateY(3px) scale(0.975);
	}
	100% {
		transform: translateY(0) scale(1);
	}
}

@keyframes bsItemPerfect {
	0% {
		transform: translateY(0) scale(1);
	}
	45% {
		transform: translateY(2px) scale(0.965);
	}
	100% {
		transform: translateY(0) scale(1.03);
	}
}

@keyframes bsItemMiss {
	0% {
		transform: translateX(0);
	}
	30% {
		transform: translateX(-3px);
	}
	60% {
		transform: translateX(3px);
	}
	100% {
		transform: translateX(0);
	}
}

@keyframes bsFlashGood {
	0% {
		opacity: 0;
		transform: scale(0.96);
	}
	35% {
		opacity: 0.65;
		transform: scale(1.02);
	}
	100% {
		opacity: 0;
		transform: scale(1.08);
	}
}

@keyframes bsFlashPerfect {
	0% {
		opacity: 0;
		transform: scale(0.94);
	}
	28% {
		opacity: 0.92;
		transform: scale(1.03);
	}
	100% {
		opacity: 0;
		transform: scale(1.12);
	}
}

@keyframes bsFlashMiss {
	0% {
		opacity: 0;
	}
	35% {
		opacity: 0.35;
	}
	100% {
		opacity: 0;
	}
}

@media (max-width: 900px) {
	.bs-intro-panel {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.bs-cost-grid,
	.bs-intro-cost {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================
   BLACKSMITH INTRO OVERRIDE — профиль как в expedition
   ДОБАВИТЬ В САМЫЙ КОНЕЦ ФАЙЛА
   ========================================================== */

.bs-intro-panel,
.bs-profile-card,
.bs-player-card {
	display: none !important;
}

.bs-intro-shell {
	border: 1px solid rgba(220, 140, 60, 0.14);
	border-radius: 18px;
	overflow: hidden;
	background:
		linear-gradient(180deg, rgba(255, 170, 90, 0.03), rgba(255, 170, 90, 0.015)),
		rgba(17, 10, 7, 0.9);
}

.bs-user-info {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border-bottom: 1px solid rgba(220, 140, 60, 0.12);
	background: rgba(255, 255, 255, 0.02);
}

.bs-user-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
	flex: 0 0 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(220, 140, 60, 0.18);
	color: #f0e4d0;
	font-weight: 700;
	font-size: 18px;
}

.bs-user-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bs-user-details {
	flex: 1;
	min-width: 0;
}

.bs-user-name {
	font-size: 15px;
	font-weight: 700;
	color: #f0e4d0;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bs-user-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.2;
}

.bs-user-level {
	color: #78a8ff;
	font-weight: 600;
}

.bs-user-class {
	color: #b89a7a;
}

.bs-user-morale {
	margin-left: auto;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.04);
	color: #f0e4d0;
	font-size: 14px;
	font-weight: 700;
}

.bs-user-morale__icon {
	width: 18px;
	height: 18px;
	object-fit: contain;
	display: block;
}

.bs-intro-content {
	padding: 16px 18px 18px;
}

.bs-intro-content__title {
	font-size: 18px;
	font-weight: 800;
	color: #f6e6d3;
	margin-bottom: 12px;
}

.bs-intro-rules {
	display: grid;
	gap: 10px;
}

.bs-intro-rule {
	display: grid;
	grid-template-columns: 32px 1fr;
	gap: 10px;
	align-items: start;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid rgba(220, 140, 60, 0.12);
	background: rgba(255, 255, 255, 0.03);
}

.bs-intro-rule__num {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 800;
	color: #24150d;
	background: linear-gradient(180deg, #ffca88, #d48741);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.bs-intro-rule__text {
	font-size: 14px;
	line-height: 1.5;
	color: #e4cfb6;
}

.bs-intro-rule__text strong {
	color: #ffd28a;
}

.bs-intro-cost {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 14px;
	align-items: center;
	margin-top: 14px;
	padding: 16px;
	border-radius: 14px;
	border: 1px solid rgba(231, 162, 82, 0.18);
	background:
		radial-gradient(circle at top right, rgba(255, 183, 107, 0.08), transparent 42%),
		rgba(18, 10, 7, 0.84);
}

.bs-intro-cost__eyebrow {
	font-size: 11px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #c79b6b;
	margin-bottom: 6px;
}

.bs-intro-cost__title {
	font-size: 15px;
	font-weight: 700;
	color: #f4e4cf;
}

.bs-intro-cost__desc {
	font-size: 13px;
	line-height: 1.45;
	color: #d0b296;
	margin-top: 4px;
}

@media (max-width: 600px) {
	.bs-user-info {
		flex-wrap: wrap;
		align-items: center;
	}

	.bs-user-details {
		min-width: 140px;
	}

	.bs-user-morale {
		margin-left: 0;
	}

	.bs-intro-cost {
		grid-template-columns: 1fr;
	}
}

/* ──────────────────────────────────────────────────────────
   АДАПТИВНОСТЬ
   ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bs-modal__title { font-size: 19px; }
    .bs-modal__body { padding: 14px 18px; }
    .bs-modal__footer { padding: 12px 16px 16px; }
    .bs-items-grid { grid-template-columns: 1fr; }

    .bs-game { height: 100vh; height: 100dvh; max-width: none; border-radius: 0; }
    .bs-game__header { padding: 10px 14px; font-size: 13px; }
    .bs-game__hud { padding: 8px 12px; }
    .bs-hud-pill { font-size: 12px; padding: 4px 11px; }
    .bs-repair-bar { padding: 6px 14px 10px; }

    .bs-anvil { width: 280px; height: 180px; }
    .bs-anvil__base   { width: 180px; height: 150px; bottom: 8px; }
    .bs-anvil__hammer { width: 120px; height: 120px; bottom: 70px; left: 4px; }
    .bs-anvil__item   { width: 56px; height: 56px; bottom: 124px; }
    .bs-anvil__item-bar { bottom: 118px; width: 76px; }

    .bs-result__stats { grid-template-columns: repeat(3, 1fr); }
    .bs-result__stat-value { font-size: 17px; }
}

@media (max-height: 700px) {
    .bs-skill-svg { width: clamp(160px, 36vh, 220px); }
}
