/* Cooperative beast raid scene, v4.50.0. */
body.bst-raid-open { overflow: hidden !important; }
.bst-raid-overlay {
    position: fixed; inset: 0; z-index: 100300; display: grid; place-items: center;
    padding: 3vh 2vw; background: rgba(12, 8, 6, .88); backdrop-filter: blur(5px);
    color: #2b2118; box-sizing: border-box;
}
.bst-raid-overlay *, .bst-raid-overlay *::before, .bst-raid-overlay *::after { box-sizing: border-box; }
.bst-raid-shell {
    width: min(1420px, 96vw); height: min(94dvh, 960px); min-height: 620px;
    display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden;
    border: 2px solid #b88b35; outline: 1px solid #5e251e; outline-offset: -7px;
    border-radius: 6px; background: #f2dfaa; box-shadow: 0 24px 80px rgba(0,0,0,.72);
    font-family: "EB Garamond", Garamond, serif;
}
.bst-raid-header {
    min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 13px 22px; color: #f8e9c1; background: #2d1812; border-bottom: 3px solid #a47728;
}
.bst-raid-kicker { display: block; color: #dfb860; font: 700 11px/1.2 Cinzel, serif; text-transform: uppercase; }
.bst-raid-header h2 { margin: 4px 0 0; color: #fff6da; font: 700 24px/1.15 Cinzel, serif; letter-spacing: 0; }
.bst-raid-header-actions { display: flex; align-items: center; gap: 12px; }
.bst-raid-connection { width: 10px; height: 10px; border-radius: 50%; background: #7b332c; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.bst-raid-connection.is-online { background: #57a878; box-shadow: 0 0 0 3px rgba(87,168,120,.2); }
.bst-raid-icon-btn {
    width: 42px; height: 42px; border: 1px solid #c69b4b; border-radius: 4px; cursor: pointer;
    color: #fff1c7; background: #4c241b; font: 30px/36px Georgia, serif;
}
.bst-raid-icon-btn:hover, .bst-raid-icon-btn:focus-visible { background: #762c25; outline: 2px solid #f0c96c; }
.bst-raid-notice { display: none; min-height: 0; padding: 9px 20px; color: #164a31; background: #dff0df; border-bottom: 1px solid #9dbd9f; font-weight: 700; }
.bst-raid-notice.is-visible { display: block; }
.bst-raid-notice.is-error { color: #75251f; background: #f3d5c4; border-color: #c27a65; }
.bst-raid-content { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.bst-raid-loading { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; font-size: 20px; }
.bst-raid-loading span { width: 36px; height: 36px; border: 4px solid #c49c54; border-top-color: #8b231f; border-radius: 50%; animation: bstRaidSpin .8s linear infinite; }
@keyframes bstRaidSpin { to { transform: rotate(360deg); } }

.bst-raid-primary, .bst-raid-secondary {
    min-height: 44px; padding: 9px 18px; border-radius: 4px; cursor: pointer;
    font: 700 13px/1.2 Cinzel, serif; letter-spacing: 0; text-transform: uppercase;
}
.bst-raid-primary { color: #fff7de; background: #8b241f; border: 2px solid #5f1816; box-shadow: inset 0 0 0 1px #d69e52; }
.bst-raid-secondary { color: #362215; background: #efd58f; border: 2px solid #8f6727; }
.bst-raid-primary:hover, .bst-raid-primary:focus-visible { background: #a52d26; outline: 2px solid #e7ba5c; }
.bst-raid-secondary:hover, .bst-raid-secondary:focus-visible { background: #f8e7b5; outline: 2px solid #8b231f; }
.bst-raid-primary:disabled, .bst-raid-secondary:disabled { opacity: .56; cursor: wait; }

.bst-raid-lobby { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(330px, .8fr); }
.bst-raid-lobby-main { min-width: 0; padding: 25px 28px 30px; border-right: 1px solid #c49d55; background: #ead09a; }
.bst-raid-event-copy { max-width: 940px; }
.bst-raid-stage { display: inline-block; padding: 4px 8px; color: #fff7df; background: #355c58; border-radius: 3px; font: 700 11px/1.2 Cinzel, serif; }
.bst-raid-countdown { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 13px 0; }
.bst-raid-countdown strong { color: #8a241e; font: 700 42px/1 Cinzel, serif; font-variant-numeric: tabular-nums; }
.bst-raid-countdown span { color: #67503a; font-style: italic; }
.bst-raid-event-copy > p { max-width: 880px; margin: 12px 0; font-size: 18px; line-height: 1.48; }
.bst-raid-rewards { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 20px; }
.bst-raid-rewards span { padding: 6px 10px; color: #3d3426; background: #f9ebc5; border: 1px solid #c79842; border-radius: 3px; font-weight: 700; }
.bst-raid-monster-preview h3, .bst-raid-lobby-side h3, .bst-raid-loadout h3, .bst-raid-allies h3, .bst-raid-battle-feed h3 {
    margin: 0 0 10px; color: #6d211d; font: 700 16px/1.2 Cinzel, serif; letter-spacing: 0;
}
.bst-raid-preview-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bst-raid-preview { min-width: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 9px; align-items: center; padding: 8px; background: #f7e8bc; border: 1px solid #b98c3b; border-radius: 4px; }
.bst-raid-preview-portrait { grid-row: 1 / span 2; width: 52px; height: 52px; overflow: hidden; display: grid; place-items: center; border-radius: 50%; background: #3a2118; border: 2px solid #8c2922; }
.bst-raid-preview-portrait img { width: 100%; height: 100%; object-fit: cover; }
.bst-raid-preview strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.bst-raid-preview > span { color: #69513a; font-size: 12px; white-space: nowrap; }
.bst-raid-initial { display: grid; place-items: center; width: 100%; height: 100%; color: #f5d68b; background: #43251b; font: 700 22px Cinzel, serif; }

.bst-raid-lobby-side { min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 24px; background: #f6e7bd; }
.bst-raid-lobby-side h3 small { color: #6b5944; font: 700 13px "EB Garamond", serif; }
.bst-raid-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 9px; }
.bst-raid-roster-person { min-width: 0; text-align: center; }
.bst-raid-roster-avatar { position: relative; width: 54px; height: 54px; margin: 0 auto 4px; overflow: visible; border-radius: 50%; background: #42271e; border: 2px solid #9b7440; }
.bst-raid-roster-avatar > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bst-raid-ready-dot { position: absolute; right: -1px; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: #9f4a3d; border: 2px solid #f6e7bd; }
.bst-raid-roster-person.is-ready .bst-raid-roster-avatar { border-color: #3f7c58; box-shadow: 0 0 0 2px rgba(63,124,88,.16); }
.bst-raid-roster-person.is-ready .bst-raid-ready-dot { background: #4d9b68; }
.bst-raid-roster-person > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.bst-raid-roster-person small { color: #715d45; }
.bst-raid-empty { margin: 8px 0; color: #725d45; font-style: italic; }
.bst-raid-loadout { margin-top: auto; padding-top: 18px; border-top: 1px solid #c59f5d; }
.bst-raid-helper-grid { max-height: 250px; overflow: auto; display: grid; gap: 7px; padding-right: 4px; }
.bst-raid-helper { min-width: 0; display: grid; grid-template-columns: 18px 44px minmax(0,1fr); align-items: center; gap: 8px; padding: 7px; cursor: pointer; background: #ead3a0; border: 1px solid #c09447; border-radius: 4px; }
.bst-raid-helper.is-selected { background: #dce6cf; border-color: #557b51; }
.bst-raid-helper input { width: 16px; height: 16px; accent-color: #7e211d; }
.bst-raid-helper-portrait { width: 44px; height: 44px; overflow: hidden; border-radius: 50%; background: #3c241b; }
.bst-raid-helper-portrait img { width: 100%; height: 100%; object-fit: cover; }
.bst-raid-helper strong, .bst-raid-helper small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bst-raid-helper small { color: #6d5840; }
.bst-raid-lobby-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.bst-raid-lobby-actions p { width: 100%; margin: 0 0 5px; }
.bst-raid-ready-banner { color: #285739; font-weight: 700; }

.bst-raid-battle { min-height: 100%; display: grid; grid-template-rows: auto minmax(360px, 1fr) auto; background: #18100d; color: #f7e9c8; }
.bst-raid-battle-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 18px; background: #332019; border-bottom: 1px solid #996d2b; }
.bst-raid-battle-toolbar > div { display: flex; align-items: center; gap: 8px; }
.bst-raid-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #e14a3e; box-shadow: 0 0 0 5px rgba(225,74,62,.13); animation: bstRaidLive 1s ease-in-out infinite; }
@keyframes bstRaidLive { 50% { box-shadow: 0 0 0 9px rgba(225,74,62,0); } }
.bst-raid-battle-numbers { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px !important; font-variant-numeric: tabular-nums; }
.bst-raid-arena { position: relative; min-height: 360px; overflow: hidden; touch-action: manipulation; background-color: #21140f; border-bottom: 1px solid #8c632a; }
.bst-raid-arena::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 44px 44px; }
.bst-raid-arena-caption { position: absolute; top: 10px; left: 50%; z-index: 5; transform: translateX(-50%); padding: 5px 11px; color: #d9bd7b; background: rgba(20,11,8,.72); border: 1px solid #705127; border-radius: 3px; font: 700 11px Cinzel, serif; white-space: nowrap; pointer-events: none; }
.bst-raid-monster-layer { position: absolute; inset: 0; }
.bst-raid-target { position: absolute; left: 50%; top: 50%; z-index: 3; width: 104px; height: 138px; transform: translate(-50%, -50%); display: grid; justify-items: center; align-content: start; padding: 0; color: #fff2ce; background: transparent; border: 0; cursor: crosshair; touch-action: manipulation; }
.bst-raid-target-ring { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; background: #5c1f1a; border: 4px solid #c89136; box-shadow: 0 0 0 4px rgba(120,27,22,.62), 0 8px 20px rgba(0,0,0,.6); transition: transform .12s ease, filter .12s ease; }
.bst-raid-target:hover .bst-raid-target-ring, .bst-raid-target:focus-visible .bst-raid-target-ring { transform: scale(1.08); filter: brightness(1.14); outline: 3px solid #f4d06e; }
.bst-raid-target:active .bst-raid-target-ring { transform: scale(.92); }
.bst-raid-target.is-cooldown .bst-raid-target-ring { animation: bstRaidCooldown .25s linear; }
@keyframes bstRaidCooldown { 50% { transform: scale(.82); filter: grayscale(.8); } }
.bst-raid-target.is-fallen { opacity: .28; filter: grayscale(1); pointer-events: none; }
.bst-raid-target-portrait { width: 78px; height: 78px; overflow: hidden; display: grid; place-items: center; border-radius: 50%; background: #261510; }
.bst-raid-target-portrait img { width: 100%; height: 100%; object-fit: cover; }
.bst-raid-target-name { max-width: 104px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 3px #000; font-weight: 700; }
.bst-raid-target-hp { width: 86px; height: 8px; overflow: hidden; background: #170b09; border: 1px solid #bc8b41; border-radius: 2px; }
.bst-raid-target-hp i { display: block; height: 100%; background: #b72e25; transition: width .25s ease; }
.bst-raid-target-value { font-size: 11px; color: #eed69c; text-shadow: 0 1px 2px #000; }
.bst-raid-player-corner { position: absolute; right: 12px; bottom: 10px; z-index: 8; display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 5px; pointer-events: none; }
.bst-raid-corner-avatar { position: relative; width: 48px; height: 48px; border-radius: 50%; background: #274d4a; border: 2px solid #d0a94f; box-shadow: 0 4px 10px #000; }
.bst-raid-corner-avatar > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bst-raid-corner-avatar > span:last-child { position: absolute; right: -3px; bottom: -2px; min-width: 20px; padding: 1px 4px; color: #fff; background: #7d221e; border-radius: 8px; text-align: center; font-size: 11px; }
.bst-raid-corner-avatar.is-fallen { filter: grayscale(1); opacity: .45; }
.bst-raid-float-layer { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.bst-raid-float { position: absolute; color: #ffe28b; font: 800 20px Cinzel, serif; text-shadow: 0 2px 4px #000; animation: bstRaidFloat 1.4s ease-out forwards; }
.bst-raid-float.is-bad { color: #ff8374; }
@keyframes bstRaidFloat { from { transform: translate(-50%, 0) scale(.82); opacity: 0; } 18% { opacity: 1; } to { transform: translate(-50%, -70px) scale(1.08); opacity: 0; } }
.bst-raid-battle-bottom { min-height: 170px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .38fr); gap: 16px; padding: 14px 18px; background: #302019; }
.bst-raid-ally-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; }
.bst-raid-ally { flex: 0 0 178px; min-width: 0; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 8px; align-items: center; padding: 7px; color: #f7e8c4; background: #213c3a; border: 1px solid #52726b; border-radius: 4px; }
.bst-raid-ally.is-fallen { opacity: .42; filter: grayscale(1); }
.bst-raid-ally-portrait { position: relative; width: 48px; height: 48px; border-radius: 50%; overflow: visible; background: #16100e; }
.bst-raid-ally-portrait > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bst-raid-effect-mark { position: absolute; right: -2px; top: -3px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #8e2b25; font-weight: 800; }
.bst-raid-ally strong, .bst-raid-ally small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bst-raid-ally small { color: #d8c694; }
.bst-raid-mini-hp { height: 7px; margin: 4px 0 2px; overflow: hidden; background: #130b09; border: 1px solid #8c713e; }
.bst-raid-mini-hp i { display: block; height: 100%; background: #52a26c; transition: width .25s ease; }
.bst-raid-battle-feed { min-width: 0; border-left: 1px solid #79582c; padding-left: 15px; }
.bst-raid-log { max-height: 110px; margin: 0; padding: 0; overflow: auto; list-style: none; font-size: 13px; }
.bst-raid-log li { padding: 3px 0; color: #dbc89d; border-bottom: 1px solid rgba(255,255,255,.06); }

.bst-raid-result { min-height: 100%; display: grid; align-content: center; justify-items: center; padding: 34px 22px; text-align: center; background: #ead19b; }
.bst-raid-result-mark { width: 86px; height: 86px; display: grid; place-items: center; margin-bottom: 10px; color: #f5d377; background: #31554f; border: 4px double #c09137; border-radius: 50%; font-size: 42px; }
.bst-raid-result.is-loss .bst-raid-result-mark { background: #6f2924; }
.bst-raid-result h2 { margin: 5px 0; color: #69221d; font: 700 29px Cinzel, serif; letter-spacing: 0; }
.bst-raid-result > p { max-width: 680px; margin: 8px auto; font-size: 18px; }
.bst-raid-result-stats { width: min(720px, 100%); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.bst-raid-result-stats > div { padding: 12px 8px; background: #f8e9bf; border: 1px solid #b88734; border-radius: 4px; }
.bst-raid-result-stats strong, .bst-raid-result-stats span { display: block; }
.bst-raid-result-stats strong { color: #315b50; font: 700 25px Cinzel, serif; }
.bst-raid-loot { padding: 9px 14px; background: #dce8cf; border: 1px solid #5f8051; border-radius: 4px; }
.bst-raid-casualties { width: min(720px,100%); margin: 10px 0; padding: 12px 15px; text-align: left; background: #f3dfae; border: 1px solid #b98b3c; }
.bst-raid-casualties h3 { margin: 0 0 6px; font: 700 15px Cinzel, serif; }
.bst-raid-casualties p { margin: 4px 0; }
.bst-raid-casualties .is-saved { color: #2c633e; }
.bst-raid-casualties .is-fallen { color: #812c26; }
.bst-raid-result-actions { margin-top: 15px; }
.bst-raid-result-reason { margin-top: 12px; color: #786149; }

@media (max-width: 900px) {
    .bst-raid-overlay { padding: 0; }
    .bst-raid-shell { width: 100vw; height: 100dvh; min-height: 0; border-radius: 0; border-width: 0; outline: 0; }
    .bst-raid-header { min-height: 64px; padding: 9px 12px; }
    .bst-raid-header h2 { font-size: 19px; }
    .bst-raid-lobby { grid-template-columns: 1fr; }
    .bst-raid-lobby-main { padding: 18px 15px; border-right: 0; border-bottom: 1px solid #bd9146; }
    .bst-raid-lobby-side { padding: 17px 15px 24px; }
    .bst-raid-countdown strong { font-size: 33px; }
    .bst-raid-event-copy > p { font-size: 16px; }
    .bst-raid-battle { grid-template-rows: auto minmax(360px, 58dvh) auto; }
    .bst-raid-battle-toolbar { align-items: flex-start; padding: 8px 10px; }
    .bst-raid-battle-toolbar, .bst-raid-battle-toolbar > div { flex-wrap: wrap; }
    .bst-raid-battle-numbers { justify-content: flex-start; }
    .bst-raid-battle-bottom { grid-template-columns: 1fr; min-height: 0; padding: 10px; }
    .bst-raid-battle-feed { border-left: 0; border-top: 1px solid #79582c; padding: 9px 0 0; }
    .bst-raid-target { width: 82px; height: 116px; }
    .bst-raid-target-ring { width: 68px; height: 68px; border-width: 3px; }
    .bst-raid-target-portrait { width: 60px; height: 60px; }
    .bst-raid-target-name { max-width: 82px; font-size: 12px; }
    .bst-raid-target-hp { width: 68px; }
    .bst-raid-player-corner { right: 7px; bottom: 7px; max-width: 48%; flex-wrap: wrap-reverse; }
    .bst-raid-corner-avatar { width: 38px; height: 38px; }
}
@media (max-width: 520px) {
    .bst-raid-kicker { font-size: 9px; }
    .bst-raid-header h2 { font-size: 16px; }
    .bst-raid-icon-btn { width: 38px; height: 38px; }
    .bst-raid-preview-list { grid-template-columns: 1fr 1fr; }
    .bst-raid-preview { grid-template-columns: 42px minmax(0,1fr); padding: 6px; }
    .bst-raid-preview-portrait { width: 42px; height: 42px; }
    .bst-raid-preview > span { font-size: 10px; }
    .bst-raid-roster { grid-template-columns: repeat(4, minmax(0,1fr)); }
    .bst-raid-roster-avatar { width: 46px; height: 46px; }
    .bst-raid-helper-grid { max-height: 220px; }
    .bst-raid-primary, .bst-raid-secondary { width: 100%; }
    .bst-raid-battle { grid-template-rows: auto minmax(330px, 55dvh) auto; }
    .bst-raid-arena-caption { top: 5px; max-width: 82%; overflow: hidden; text-overflow: ellipsis; }
    .bst-raid-ally { flex-basis: 158px; }
    .bst-raid-result { padding: 24px 12px; }
    .bst-raid-result h2 { font-size: 22px; }
    .bst-raid-result-stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .bst-raid-live-dot, .bst-raid-loading span, .bst-raid-float { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}