.boss-flow{--combat-surface:#122e3b;--combat-control:#1c4355;position:fixed;inset:0;z-index:25000;display:grid;place-items:center;background:#071923d9;padding:16px;color:#edf4f6;font-family:inherit;box-sizing:border-box;}
.boss-flow *{box-sizing:border-box;}
.boss-flow button{border:0;box-shadow:none;border-radius:10px;background:#294957;color:#edf4f6;padding:12px;font:inherit;font-weight:700;cursor:pointer;}
.boss-flow button:disabled{opacity:.45;cursor:default;}
.boss-flow .boss-primary{background:#ffcc51;color:#172e37;min-height:46px;}
.boss-flow-card{width:min(100%,530px);min-width:0;max-height:calc(100dvh - 32px);overflow:clip;position:relative;background:#142e3b;border-radius:22px;box-shadow:0 24px 90px #0008;}
.boss-flow .boss-flow-close,.boss-flow [data-boss-back]{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;padding:0;line-height:1;}
.boss-flow-close{position:absolute;right:12px;top:11px;z-index:2;}
.boss-flow[data-stage=intro] .boss-flow-close{background:#421e29;color:#fff1e4;}
.boss-flow[data-stage=intro] .boss-flow-close:hover{background:#6f3444;}
.boss-flow[data-stage=intro] .boss-flow-close:active{background:#351823;}
.boss-flow .boss-flow-close:focus-visible{outline:2px solid #ffd166;outline-offset:2px;}
.boss-flow-close svg,.boss-flow [data-boss-back] svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;}
.boss-flow-pages{display:flex;width:200%;transition:transform .32s ease;align-items:flex-start;}
.boss-flow-intro,.boss-flow-loadout{width:50%;flex-shrink:0;max-height:calc(100dvh - 32px);overflow:auto;}
.boss-flow[data-stage=loadout] .boss-flow-intro,.boss-flow[data-stage=intro] .boss-flow-loadout{height:0;padding-top:0;padding-bottom:0;overflow:hidden;}
.boss-flow[data-stage=loadout] .boss-flow-pages{transform:translateX(-50%);}
.boss-flow-intro>img{width:100%;height:clamp(150px,32dvh,290px);object-fit:cover;object-position:center 28%;display:block;}
.boss-flow-intro{display:flex;flex-direction:column;}
.boss-flow-intro>div{padding:20px;display:flex;flex:1;flex-direction:column;gap:14px;}
.boss-flow h1{font-size:clamp(24px,5vw,34px);margin:0;line-height:1.15;}
.boss-flow p{margin:0;line-height:1.5;color:#bbccd3;}
.boss-eyebrow{font-size:11px;letter-spacing:.16em;color:#ffcf65;font-weight:800;}
.boss-facts{background:#213e4c;padding:12px;border-radius:10px;font-size:13px;}
.boss-flow-intro .boss-primary{width:100%;margin-top:auto;}
.boss-flow-loadout{padding:11px 20px 20px;}
.boss-flow-loadout>header{display:flex;align-items:center;gap:12px;min-height:38px;margin:0 36px 18px -8px;}
.boss-flow h2{font-size:20px;margin:0;line-height:1.2;}
.boss-flow .boss-loadout-stats{margin-bottom:12px;display:flex;flex-wrap:wrap;gap:5px 14px;justify-content:space-between;font-weight:700;font-size:14px;}
.boss-flow .boss-loadout-stats span{font-size:11px;line-height:1.4;}
.boss-gear-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.boss-flow .boss-gear{display:flex;align-items:center;flex-direction:column;gap:4px;text-align:center;padding:8px 6px;min-width:0;background:#1c4355;}
.boss-flow .boss-gear.is-broken{background:#5a3036;color:#f7e9e9}
.boss-flow .boss-gear.is-broken>:is(.item-icon,img,svg){filter:grayscale(1) brightness(.55);opacity:.82}
.boss-flow .boss-gear.is-broken>span{color:#ffd0cf}
.boss-gear small,.boss-food small{font-size:10px;color:#a9c1cb;}
.boss-gear strong{font-size:11px;line-height:1.3;}
.boss-gear>span{font-size:9px;color:#bbd0d8;}
.boss-gear .boss-empty{display:grid;place-items:center;height:36px;font-size:28px;}
.boss-flow .boss-eat{grid-column:span 2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px;background:#1c4355;text-align:center;min-width:0;}
.boss-eat strong{font-size:10px;line-height:1.4;letter-spacing:.06em;color:#ffd166;}
.boss-eat>small{font-size:11px;line-height:1.4;color:#bbd0d8;}
.boss-eat-action{display:flex;align-items:center;justify-content:center;gap:8px;min-height:36px;width:100%;max-width:150px;padding:8px 12px;border-radius:8px;background:#ffd166;color:#122e3b;font-size:12px;}
.boss-flow .boss-eat:hover .boss-eat-action{background:#ffdf8b;}
.boss-flow .boss-error{font-size:12px;margin:12px 0;color:#ffd387!important;}
.boss-error:empty{display:none;}
.boss-flow-loadout>.boss-primary{width:100%;margin-top:18px;}
.boss-picker,.boss-exit-confirm{position:absolute;inset:0;display:grid;place-items:center;background:#06141bdc;padding:20px;z-index:5;}
.boss-picker>div{width:min(100%,460px);max-height:80dvh;background:#193846;padding:18px;border-radius:18px;box-shadow:0 15px 65px #0008;display:flex;flex-direction:column;gap:10px;}
.boss-picker header{display:flex;align-items:center;justify-content:space-between;gap:12px;}.boss-picker p{margin:0;font-size:12px;}
.boss-picker-list{overflow:auto;display:grid;gap:8px;min-height:0;overscroll-behavior:contain;}
.boss-flow .boss-picker-list button.is-broken{background:#5a3036;color:#f7e9e9}
.boss-flow .boss-picker-list button.is-broken>:is(.item-icon,img,svg){filter:grayscale(1) brightness(.55);opacity:.82}
.boss-picker-list button{display:flex;align-items:center;gap:12px;text-align:left;}.boss-picker-list span{display:grid;gap:5px;}.boss-picker-list strong{font-size:13px;}.boss-picker-list small{font-size:11px;color:#bfd0d8;}
.boss-arena{position:absolute;inset:0;width:100%;height:100%;border:0;background:#142e3b;}.boss-flow .boss-retreat{position:absolute;bottom:calc(24px + env(safe-area-inset-bottom));left:calc(16px + env(safe-area-inset-left));display:flex;align-items:center;justify-content:center;gap:6px;width:88px;height:34px;padding:0 9px;border-radius:11px;background:var(--combat-surface);color:#edf4f6;font-size:10px;box-shadow:0 4px 14px #07192340;}
.boss-retreat svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;flex:none;}
.boss-exit-confirm>div{width:min(100%,400px);max-height:calc(100dvh - 40px);overflow:auto;display:flex;flex-direction:column;gap:16px;padding:18px;background:var(--combat-surface);border-radius:20px;border-top:4px solid #ffd166;box-shadow:0 15px 65px #0008;}
.boss-exit-confirm header{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.boss-exit-confirm h2{margin:0;color:#ffe5a3;font-size:22px;line-height:1.2;}
.boss-exit-confirm p{margin:0;color:#bfd3dc;font-size:13px;line-height:1.6;}
.boss-exit-confirm [data-exit-close]{width:36px;height:36px;flex:none;display:grid;place-items:center;padding:8px;background:#1c4355;}
.boss-exit-confirm [data-exit-close] svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;}
.combat-exit-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.boss-exit-confirm [data-exit-no]{background:#1c4355;min-height:44px;font-size:12px;}
.boss-exit-confirm [data-exit-yes]{font-size:12px;}
@media(hover:hover){.boss-flow .boss-retreat:hover{background:var(--combat-surface);color:#ffd166;}}
.boss-result{position:relative;display:flex;flex-direction:column;gap:14px;width:min(100%,450px);max-height:calc(100dvh - 40px);overflow:auto;padding:28px 24px 24px;background:var(--game-popup-bg,#122e3b);border-radius:22px;text-align:center;box-shadow:0 20px 90px #0008;border-top:4px solid #ffd166;}
.boss-result>.boss-eyebrow{display:block;line-height:1.4;}
.boss-result>h1{font-size:clamp(24px,6vw,30px);line-height:1.2;}
.boss-result>p{max-width:36ch;margin:0 auto;}
.boss-result>.boss-error{margin:0;}
.boss-result>.boss-result-actions{margin-top:6px;}
.boss-result-actions>button{min-height:44px;background:var(--game-popup-raised,#1c4355);}
.boss-result.is-victory{background:var(--game-popup-bg,#122e3b);}
.boss-result[hidden]{display:none;}
.boss-rewards{display:grid;gap:8px;max-height:47dvh;overflow:auto;margin:16px 0;}.boss-reward{display:grid;grid-template-columns:48px 1fr;align-items:center;gap:3px 12px;padding:10px;text-align:left;border-radius:13px;background:var(--game-popup-raised,#1c4355);}.boss-reward[hidden],.boss-result-actions[hidden]{display:none;}
.boss-reward>:first-child{grid-row:span 2;}.boss-reward strong{font-size:13px;color:#ffcf65;}.boss-reward small{color:#bed2d9;font-size:10px;}.boss-result-actions{display:grid;gap:10px;}.boss-reward.reveal{animation:boss-reward-pop .55s cubic-bezier(.2,.8,.2,1.2) both;}
@keyframes boss-reward-pop{from{opacity:0;transform:translateY(24px) scale(.7)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-height:600px) and (min-width:650px){.boss-flow-card{width:760px;}.boss-flow-intro{display:flex;}.boss-flow-intro>img{width:40%;height:85dvh;}.boss-flow-intro>div{width:60%;}.boss-gear-grid{grid-template-columns:repeat(6,minmax(0,1fr));}}
@media(prefers-reduced-motion:reduce){.boss-flow-pages{transition:none;}.boss-reward.reveal{animation:none;}}
.boss-flow.reduced-motion .boss-flow-pages,.boss-flow.reduced-motion .boss-reward{transition:none;animation:none;}

.boss-intro-alert{background:linear-gradient(90deg,#96383e,#5b2936);min-height:60px;display:flex;align-items:center;padding:12px 62px 12px 16px;color:#fff1e4;font-size:11px;font-weight:800;letter-spacing:.14em;}
.boss-reward-tracker{margin:0;}
.boss-reward-tracker .brute-arrival-loot{grid-template-columns:repeat(3,minmax(0,1fr));}
.boss-reward-tracker .brute-loot-tile{min-height:62px;}
.boss-gear-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
.boss-flow .boss-food{display:flex;align-items:center;flex-direction:column;gap:4px;width:auto;text-align:center;margin-top:0;}
.boss-flow .boss-food strong{font-size:11px;line-height:1.3;}
.boss-flow .boss-food>span:not(.boss-empty){font-size:9px;color:#bbd0d8;}

.expedition-flow .boss-intro-alert{background:#1c4355;color:#ffd166}.expedition-flow[data-stage=intro] .boss-flow-close{background:#122e3b;color:#e8f0f0}.expedition-flow .boss-flow-intro>img{object-fit:contain;object-position:center;padding:12px;background:var(--game-popup-bg,#122e3b)}.expedition-idle-unlocked{background:#1c4355;color:#ffd166;padding:12px;border:0;border-radius:12px;text-align:center;font-weight:700}

.boss-return-loading{position:absolute;inset:0;display:grid;place-items:center;background:var(--game-popup-bg,#122e3b);}

/* Compact boss introduction; expedition preparation keeps its destination artwork. */
.boss-flow:not(.expedition-flow) .boss-flow-card{width:min(100%,440px);background:#122e3b}
.boss-flow:not(.expedition-flow) .boss-intro-alert{min-height:52px;padding:10px 62px 10px 16px;letter-spacing:.1em}
.boss-flow:not(.expedition-flow)[data-stage=intro] .boss-flow-close{top:7px}
.boss-model-preview{position:relative;flex:none;display:grid;place-items:center;width:100%;height:clamp(130px,20dvh,180px);margin:0;overflow:hidden;background:#122e3b}
.boss-model-preview canvas{display:block;position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.boss-preview-status{font-size:11px;color:#b7ced2}
.boss-flow:not(.expedition-flow) .boss-flow-intro>div{padding:12px 14px 14px;gap:12px}
.boss-flow:not(.expedition-flow) .boss-flow-intro h1{font:700 20px/1.2 Georgia,serif;color:#ffebbd}
.boss-flow:not(.expedition-flow) .boss-facts{padding:9px 11px;font-size:11px;line-height:1.45;background:#1c4355}
.boss-flow:not(.expedition-flow) .brute-arrival-loot{gap:7px}
.boss-flow:not(.expedition-flow) .brute-arrival-loot .brute-loot-tile{min-height:84px;padding:7px 5px;gap:3px;border:0;box-shadow:none}
.boss-flow:not(.expedition-flow) .brute-loot-art{width:32px;height:32px}
.boss-flow:not(.expedition-flow) .brute-loot-tile.is-unlocked small{font-size:8px;min-height:19px}
.boss-flow:not(.expedition-flow) .boss-flow-intro .boss-primary{min-height:42px;padding:10px;font-size:12px}
@media(max-height:600px){.boss-flow:not(.expedition-flow) .boss-flow-intro{display:flex;flex-direction:column}.boss-flow:not(.expedition-flow) .boss-flow-intro>div{width:100%}.boss-model-preview{height:120px}}
.expedition-flow .expedition-combat-xp{margin:10px 0 14px;color:var(--popup-yellow,#ffd15b);font-size:12px;font-weight:700;line-height:1.4}
