　/*
 * battleBoss.css
 * Version 1.5.2
 * ----------------------------------------
 * ボス専用戦闘UIのスタイルを管理する。
 *
 * 主な役割：
 * ・BREAKゲージを画面上部に表示
 * ・HPゲージを画面上部に表示
 * ・ボス名を画面中央に表示
 * ・ボス本体を画面中央に配置
 * ・ボス専用ATBを表示
 * ・ターゲット状態
 * ・撃破状態
 *
 * 通常敵用CSSとは分離して管理する。
 *
 * Version 1.5.2 変更点：
 * ・battle-boss-centerを横幅いっぱいに確実に
 *   展開するよう修正。
 * ・ボス本体の横方向中央基準を
 *   battle-boss-center全体へ統一。
 * ・ボス戦時の縦方向中央配置は
 *   battleUIStyles.js側の設定を使用する。
 * ・ボスカードのサイズは変更しない。
 * ・既存のBREAK / HP / ATB / 撃破表示は変更しない。
 *
 * ----------------------------------------
 */

/* =========================================================
 * ボス表示エリア
 * ========================================================= */
.battle-boss-area {
    position: relative;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding:
        6px
        0
        18px;
}

/* =========================================================
 * 上部UI
 *
 * BREAK → HP → ボス名
 *
 * battleUIBoss.js v1.3.0で追加された
 * battle-boss-top-ui専用。
 *
 * ここはボスカードとは完全に別の領域。
 * ========================================================= */
.battle-boss-top-ui {
    position: relative;

    /*
     * 画面端から少し余白を取る。
     */
    width: calc(100% - 32px);
    max-width: none;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    box-sizing: border-box;

    margin:
        0
        auto
        10px;

    padding: 0;

    border: 0;

    background: transparent;

    box-shadow: none;

    left: auto;
    transform: none;
}

/* =========================================================
 * 上部ステータスのゲージ行
 * ========================================================= */
.battle-boss-status-gauge-row {
    position: relative;
    width: 100%;

    margin:
        0
        0
        4px;

    box-sizing: border-box;
}

.battle-boss-status-gauge-row:last-of-type {
    margin-bottom: 0;
}

/* =========================================================
 * ゲージタイトル
 * ========================================================= */
.battle-boss-status-gauge-title {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;

    box-sizing: border-box;

    padding:
        0
        4px;

    margin-bottom: 2px;

    color: #fff;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 0.04em;

    line-height: 1.1;

    text-shadow:
        1px 1px 0 #000;
}

/* =========================================================
 * ボス名
 * ========================================================= */
.battle-boss-status-name {
    width: 100%;

    margin:
        6px
        0
        0;

    box-sizing: border-box;

    text-align: center;

    color: #fff;

    font-size:
        clamp(20px, 4vw, 34px);

    font-weight: 900;

    letter-spacing: 0.04em;

    line-height: 1.15;

    text-shadow:
        3px 3px 0 #000,
        0 0 14px rgba(255, 255, 255, 0.15);

    overflow-wrap: anywhere;
}

/* =========================================================
 * ゲージ本体
 * ========================================================= */
.battle-boss-gauge {
    position: relative;

    width: 100%;

    height: 7px;
    min-height: 7px;
    max-height: 7px;

    box-sizing: border-box;

    overflow: hidden;

    border:
        1px solid #080808;

    border-radius: 999px;

    background: #090909;

    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.9);
}

/*
 * ゲージ内部。
 */
.battle-boss-gauge-fill {
    position: absolute;

    top: 0;
    left: 0;

    width: 0;
    height: 100%;

    min-height: 100%;
    max-height: 100%;

    border-radius: inherit;

    transition:
        width 0.08s linear;

    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        0 0 5px rgba(255, 255, 255, 0.15);
}

/* =========================================================
 * HPゲージ
 * ========================================================= */
.battle-boss-hp-gauge {
    height: 7px;
    min-height: 7px;
    max-height: 7px;
}

.battle-boss-hp-gauge .battle-boss-gauge-fill {
    background:
        linear-gradient(
            to bottom,
            #ff6559 0%,
            #e32626 48%,
            #9e0909 100%
        );
}

/* =========================================================
 * BREAKゲージ
 * ========================================================= */
.battle-boss-break-gauge {
    height: 7px;
    min-height: 7px;
    max-height: 7px;
}

.battle-boss-break-gauge .battle-boss-gauge-fill {
    background:
        linear-gradient(
            to bottom,
            #ffe978 0%,
            #ffc400 48%,
            #e08a00 100%
        );
}

/*
 * BREAK中。
 */
.battle-boss-status-gauge-row.is-broken
    .battle-boss-break-gauge {
    border-color: #fff0a0;

    box-shadow:
        0 0 6px rgba(255, 220, 60, 0.8),
        inset 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* =========================================================
 * BREAK状態表示
 * ========================================================= */
.battle-boss-break-status {
    position: absolute;

    right: 8px;
    bottom: 20px;

    padding:
        3px
        8px;

    border:
        2px solid #fff1a6;

    border-radius: 5px;

    background: #5b3300;

    color: #fff5bd;

    font-size: 12px;
    font-weight: 900;

    letter-spacing: 0.08em;

    text-shadow:
        1px 1px 0 #000;

    animation:
        battleBossBreakStatusPulse
        0.35s
        ease-in-out
        infinite alternate;
}

@keyframes battleBossBreakStatusPulse {
    from {
        transform: scale(1);
        opacity: 0.75;
    }

    to {
        transform: scale(1.08);
        opacity: 1;
    }
}

/* =========================================================
 * ボス中央領域
 *
 * 上部UIとは完全に分離する。
 *
 * ボスカードをこの領域の中央へ配置する。
 *
 * v1.5.2：
 * ・横幅いっぱいに確実に展開する。
 * ・CSS Gridで中央配置する。
 * ・ボスカード自身のmarginや
 *   align-selfによる位置ズレを防ぐ。
 *
 * battleUIStyles.js v1.8.1側で
 * ボス戦時の縦方向領域を確保しているため、
 * ここではその領域内で中央配置する。
 * ========================================================= */
.battle-boss-center {
    position: relative;

    /*
     * 親のbattle-boss-area全体を横方向に使用する。
     */
    width: 100%;
    min-width: 0;

    /*
     * 親のflexレイアウト内で、
     * 上部UI以外の残り領域を使用する。
     */
    flex:
        1 1 auto;

    min-height: 0;

    /*
     * 横方向の基準を必ずこの領域全体にする。
     */
    align-self: stretch;

    /*
     * ボスカードを縦・横とも中央に配置する。
     */
    display: grid;

    place-items: center;

    box-sizing: border-box;

    margin:
        0;

    padding: 0;
}

/* =========================================================
 * ボスカード
 *
 * ボス本体を画面中央へ配置する。
 *
 * サイズは変更しない。
 * ========================================================= */
.battle-boss-card {
    position: relative;

    /*
     * ボスカードのサイズは変更しない。
     */
    width: min(720px, 92vw);

    min-height: 330px;

    /*
     * Grid側の中央配置を使用するため、
     * auto marginによる位置調整は行わない。
     */
    margin: 0;

    box-sizing: border-box;

    padding:
        8px
        14px
        14px;

    border:
        3px solid #222;

    border-radius: 16px;

    background:
        linear-gradient(
            to bottom,
            #343434 0%,
            #202020 48%,
            #111 100%
        );

    box-shadow:
        0 7px 0 #000,
        0 0 0 3px rgba(255, 255, 255, 0.12),
        0 0 24px rgba(0, 0, 0, 0.75);

    color: #fff;

    cursor: pointer;

    overflow: visible;

    user-select: none;

    /*
     * カード内部を中央揃えにする。
     */
    display: flex;
    flex-direction: column;
    align-items: center;

    /*
     * 親のGridによって中央配置されるため、
     * align-selfによる追加位置指定は行わない。
     */
    align-self: auto;

    transition:
        transform 0.12s ease,
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}

/*
 * ボスがターゲットになっている状態。
 */
.battle-boss-card.is-target {
    border-color: #ffcf33;

    box-shadow:
        0 7px 0 #000,
        0 0 0 4px rgba(255, 207, 51, 0.3),
        0 0 32px rgba(255, 190, 40, 0.7);
}

/*
 * タップ時の視覚的フィードバック。
 */
.battle-boss-card:active {
    transform: scale(0.985);
}

/*
 * 撃破後。
 */
.battle-boss-card.is-defeated {
    cursor: default;

    filter:
        grayscale(0.75);

    opacity: 0.7;
}

/* =========================================================
 * BOSSラベル
 * ========================================================= */
.battle-boss-label {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    width: 100%;

    min-height: 34px;

    margin-bottom: 5px;

    box-sizing: border-box;

    border-bottom:
        2px solid rgba(255, 255, 255, 0.12);
}

.battle-boss-label-main {
    font-size: 25px;
    font-weight: 900;

    letter-spacing: 0.16em;

    line-height: 1;

    text-shadow:
        2px 2px 0 #000,
        0 0 12px rgba(255, 80, 60, 0.7);
}

.battle-boss-label-sub {
    padding:
        3px
        7px;

    border:
        2px solid #e44;

    border-radius: 5px;

    background: #3a1111;

    color: #ff8b7d;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.12em;
}

/* =========================================================
 * ボスATB
 * ========================================================= */
.battle-boss-atb-panel {
    position: relative;

    width: 100%;

    box-sizing: border-box;

    margin:
        0
        0
        5px;

    padding:
        5px
        7px;

    border:
        2px solid rgba(255, 255, 255, 0.12);

    border-radius: 7px;

    background:
        rgba(0, 0, 0, 0.45);
}

.battle-boss-atb-title {
    display: flex;

    justify-content: space-between;
    align-items: center;

    width: 100%;

    margin-bottom: 3px;

    color: #fff;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 0.04em;

    line-height: 1.1;

    text-shadow:
        1px 1px 0 #000;
}

/* =========================================================
 * ATBゲージ
 * ========================================================= */
.battle-boss-atb-gauge {
    height: 14px;
}

.battle-boss-atb-gauge .battle-boss-gauge-fill {
    background:
        linear-gradient(
            to bottom,
            #8ee7ff 0%,
            #2da9e8 48%,
            #1264a1 100%
        );
}

/* =========================================================
 * ボスビジュアル
 *
 * ボス本体のサイズは変更しない。
 * 配置だけ中央にする。
 * ========================================================= */
.battle-boss-visual-area {
    position: relative;

    display: flex;

    justify-content: center;
    align-items: center;

    width: 100%;

    min-height: 225px;

    margin:
        2px
        auto
        0;

    box-sizing: border-box;

    overflow: visible;

    /*
     * ボス本体をカード中央にする。
     */
    align-self: center;
}

.battle-boss-visual {
    position: relative;

    display: flex;

    justify-content: center;
    align-items: center;

    width: 100%;

    min-height: 215px;

    margin:
        0
        auto;

    box-sizing: border-box;

    text-align: center;

    transform-origin:
        center center;
}

/*
 * visual内部の要素も中央へ揃える。
 */
.battle-boss-visual > * {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =========================================================
 * ボス画像
 *
 * サイズは変更しない。
 * ========================================================= */
.battle-boss-image {
    display: block;

    width: auto;
    height: auto;

    max-width: 58vw;
    max-height: 220px;

    margin:
        0
        auto;

    object-fit: contain;

    pointer-events: none;

    user-select: none;

    filter:
        drop-shadow(
            0 10px 7px rgba(0, 0, 0, 0.6)
        )
        drop-shadow(
            0 0 14px rgba(0, 0, 0, 0.4)
        );
}

/* =========================================================
 * visualがない場合の仮表示
 * ========================================================= */
.battle-boss-placeholder {
    display: flex;

    justify-content: center;
    align-items: center;

    width: min(50vw, 280px);

    height: 170px;

    margin:
        0
        auto;

    border:
        3px dashed #777;

    border-radius: 14px;

    background:
        repeating-linear-gradient(
            45deg,
            #292929,
            #292929 10px,
            #202020 10px,
            #202020 20px
        );

    color: #ddd;

    font-size: 34px;
    font-weight: 900;

    letter-spacing: 0.12em;

    text-shadow:
        3px 3px 0 #000;
}

/* =========================================================
 * 撃破表示
 * ========================================================= */
.battle-boss-defeated {
    position: absolute;

    top: 50%;
    left: 50%;

    transform:
        translate(-50%, -50%)
        rotate(-5deg);

    padding:
        8px
        15px;

    border:
        3px solid #fff;

    border-radius: 8px;

    background:
        rgba(0, 0, 0, 0.85);

    color: #fff;

    font-size:
        clamp(24px, 5vw, 46px);

    font-weight: 900;

    letter-spacing: 0.08em;

    text-shadow:
        4px 4px 0 #000;

    pointer-events: none;

    z-index: 20;
}

/* =========================================================
 * スマートフォン / iPad向け
 * ========================================================= */
@media (max-width: 700px) {
    .battle-boss-area {
        padding:
            4px
            0
            10px;
    }

    /*
     * 上部UIを画面幅から少し内側にする。
     */
    .battle-boss-top-ui {
        width: calc(100% - 32px);

        margin:
            0
            auto
            7px;

        left: auto;

        transform: none;
    }

    .battle-boss-status-gauge-row {
        margin-bottom: 4px;
    }

    .battle-boss-status-gauge-title {
        padding:
            0
            4px;

        font-size: 10px;
    }

    .battle-boss-status-name {
        margin-top: 5px;

        font-size:
            clamp(19px, 5.5vw, 28px);
    }

    .battle-boss-gauge {
        height: 7px;
        min-height: 7px;
        max-height: 7px;
    }

    .battle-boss-hp-gauge {
        height: 7px;
        min-height: 7px;
        max-height: 7px;
    }

    .battle-boss-break-gauge {
        height: 7px;
        min-height: 7px;
        max-height: 7px;
    }

    /*
     * ボスカードのサイズは変更しない。
     */
    .battle-boss-card {
        width: min(680px, 92vw);

        min-height: 285px;

        margin: 0;

        padding:
            6px
            9px
            10px;

        border-width: 3px;

        border-radius: 13px;
    }

    .battle-boss-label {
        min-height: 31px;
        margin-bottom: 4px;
    }

    .battle-boss-label-main {
        font-size: 21px;
    }

    .battle-boss-label-sub {
        font-size: 8px;

        padding:
            2px
            5px;
    }

    .battle-boss-atb-panel {
        padding:
            4px
            6px;
    }

    .battle-boss-atb-title {
        font-size: 9px;
    }

    .battle-boss-atb-gauge {
        height: 12px;
    }

    /*
     * ボス本体の領域サイズは変更しない。
     */
    .battle-boss-visual-area {
        min-height: 190px;

        margin:
            1px
            auto
            0;
    }

    .battle-boss-visual {
        min-height: 180px;

        margin:
            0
            auto;
    }

    /*
     * ボス画像サイズは変更しない。
     */
    .battle-boss-image {
        max-width: 55vw;
        max-height: 185px;

        margin:
            0
            auto;
    }

    .battle-boss-placeholder {
        width: 58vw;
        height: 140px;

        font-size: 28px;
    }

    .battle-boss-break-status {
        right: 5px;
        bottom: 24px;

        font-size: 9px;
    }
}

/* =========================================================
 * iPad横向きなど、横幅が広い場合
 * ========================================================= */
@media (min-width: 701px) {
    /*
     * 上部UIを画面幅から少し内側にする。
     */
    .battle-boss-top-ui {
        width: calc(100% - 32px);

        left: auto;

        transform: none;
    }

    .battle-boss-status-gauge-title {
        padding:
            0
            4px;

        font-size: 11px;
    }

    .battle-boss-gauge {
        height: 7px;
        min-height: 7px;
        max-height: 7px;
    }

    .battle-boss-hp-gauge {
        height: 7px;
        min-height: 7px;
        max-height: 7px;
    }

    .battle-boss-break-gauge {
        height: 7px;
        min-height: 7px;
        max-height: 7px;
    }

    .battle-boss-atb-gauge {
        height: 16px;
    }

    /*
     * ボスカードのサイズは変更しない。
     */
    .battle-boss-card {
        width: min(720px, 88vw);

        /*
         * 横位置はbattle-boss-centerの
         * Grid中央配置に任せる。
         */
        margin: 0;
    }

    /*
     * ボス画像サイズは変更しない。
     */
    .battle-boss-image {
        max-width: 52vw;
        max-height: 220px;
    }
}