/* One fixed combat panel keeps health, casts and the deadline out of the arena. */
body.boss-hall-map :is(#daily-hud,#weekly-hud).boss-room-hud{border-color:#786f61;border-top-color:#d5b878;background:linear-gradient(125deg,#16202cf2,#0b111bf2);box-shadow:0 8px 24px #0006;padding:9px 12px}
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-heading{margin-bottom:6px}
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-heading strong{font-size:18px!important}
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-timer b{font-size:21px}
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-hp{height:17px}
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-hp span{line-height:15px}
body.boss-hall-map :is(#daily-hud,#weekly-hud) footer small{display:none}
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-hall-preview-toggle{display:inline-flex;align-items:center;gap:6px;min-height:36px!important;padding:4px 8px!important;font-size:10px!important;background:#26303b;border:1px solid #8b7958;border-radius:4px;color:#f3d89e}
.boss-hall-preview-toggle img{width:21px;height:21px;flex:none}
.boss-hall-preview-toggle:focus-visible{outline:2px solid #ffda83;outline-offset:3px}
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-hall-preview-toggle[hidden]{display:none}
body.boss-hall-visual .vitals{background:linear-gradient(125deg,#182531ee,#0b131fee);border-color:#8a7c6466;box-shadow:0 5px 20px #0005}
@media(max-width:700px){body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-heading strong{font-size:15px!important}body.boss-hall-map :is(#daily-hud,#weekly-hud) footer button{min-height:44px!important}body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-hall-preview-toggle{min-height:44px!important}}
@media(max-height:540px) and (orientation:landscape){body.boss-hall-map :is(#daily-hud,#weekly-hud) footer{position:static;margin-top:4px}body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-heading{padding-right:0}body.boss-hall-map :is(#daily-hud,#weekly-hud){width:310px}body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-hall-preview-toggle{min-height:32px!important}}
body.boss-room-active .location-banner,body.boss-room-active #target-hud,body.boss-room-active #objectives-hud{display:none!important}
body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{position:fixed;top:var(--hud-top,126px);bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:min(580px,calc(100vw - 660px));min-width:320px;max-width:calc(100vw - 24px);display:block;padding:12px 16px;border:1px solid #67747a;border-top:2px solid #d5b878;border-radius:8px;background:linear-gradient(125deg,#172732f5,#0b1620f5);box-shadow:0 6px 25px #0005;z-index:18;font-family:Arial,sans-serif;pointer-events:none}
body #raid-hud.boss-room-hud[hidden],body #weekly-hud.boss-room-hud[hidden],body #daily-hud.boss-room-hud[hidden]{display:none}
.boss-room-hud button{pointer-events:auto;min-height:32px!important;padding:5px 12px!important;font-size:11px!important}
.boss-room-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:9px}
.boss-room-heading>div{min-width:0}.boss-room-heading small{display:block!important;font-size:8px!important;letter-spacing:1px;color:#aaaeb1!important;margin-bottom:4px}
body .boss-room-heading strong{display:block;font-family:Georgia,serif;font-size:20px!important;line-height:1.1;color:#f4e3c1!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.boss-room-timer{flex-shrink:0;text-align:right}.boss-room-timer b{font-size:24px;font-variant-numeric:tabular-nums;color:#f0d191}
.boss-room-hp{position:relative;height:20px;border:1px solid #7e6355;border-radius:3px;overflow:hidden;background:#351e20}.boss-room-hp i{display:block;height:100%;background:linear-gradient(#be6a55,#8c3f39);transition:width .12s linear}
body .boss-room-hp span{position:absolute;inset:0;text-align:center;font-size:10px!important;color:#fff2e0!important;line-height:18px;text-shadow:0 1px 2px #000;font-variant-numeric:tabular-nums}
.boss-room-hp em{position:absolute;top:0;bottom:0;border-left:1px solid #f1cf8555;pointer-events:none}
.boss-room-meta{display:flex!important;justify-content:space-between;gap:8px;margin:7px 0;font-size:10px}.boss-room-meta span{color:#bac7ca!important;font-size:10px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.boss-room-cast{border-top:1px solid #45556088;padding-top:8px;min-width:0!important}.boss-room-cast>div{display:flex;justify-content:space-between;gap:8px}.boss-room-cast strong{font-size:11px!important;font-weight:500!important;color:#c0cdd0!important}.boss-room-cast span{font-size:11px!important;color:#ffce82!important;font-variant-numeric:tabular-nums;white-space:nowrap}
.boss-room-cast progress{display:block;width:100%;height:3px;border:0;accent-color:#f0b55c;background:#2a3942;margin-top:7px}.boss-room-cast progress::-webkit-progress-bar{background:#2a3942}.boss-room-cast progress::-webkit-progress-value{background:#f0b55c}
.boss-room-hud[data-casting=true] .boss-room-cast strong{color:#ffd487!important}.boss-room-hud[data-urgent=true] .boss-room-timer b{color:#ff8e80}
.boss-room-hud footer{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:7px}.boss-room-hud footer small{font-size:9px!important;color:#aeb9bd!important}
@media(max-width:1100px){body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{width:360px;min-width:0;top:calc(var(--hud-top,126px) + 94px);padding:10px 12px}}
@media(max-width:700px){body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{width:calc(100vw - 20px);max-width:420px;top:calc(var(--hud-top,88px) + 83px);padding:9px 11px}.boss-room-heading{margin-bottom:7px}body .boss-room-heading strong{font-size:16px!important}.boss-room-timer b{font-size:20px}.boss-room-cast{padding-top:6px}.boss-room-hud footer small{max-width:65%;font-size:8px!important}.boss-room-hud button{min-height:36px!important}.boss-room-meta{margin:5px 0}}
@media(max-height:540px) and (orientation:landscape){body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{top:calc(var(--hud-top,70px) + 4px);left:auto;right:10px;transform:none;width:330px}.boss-room-hud footer small{display:none}.boss-room-hud footer{position:absolute;right:8px;top:2px;margin:0}.boss-room-heading{padding-right:73px}.boss-room-heading small{display:none!important}.boss-room-cast{padding-top:4px}.boss-room-hud footer button{min-height:30px!important}}
@media(max-width:700px){body.boss-room-active .combat-tools-dock{top:auto;bottom:160px;right:8px;flex-direction:row}body.boss-room-active .combat-tools-dock button{font-size:0;padding:6px;min-height:34px}body.boss-room-active .combat-tools-dock button>span{font-size:18px}body.boss-room-active [data-combat-tool="training"]{display:none}}
@media(max-width:700px){body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{padding:6px 10px}.boss-room-heading{margin-bottom:4px}.boss-room-heading small{margin-bottom:2px}body .boss-room-heading strong{font-size:15px!important}.boss-room-timer b{font-size:19px}.boss-room-hp{height:16px}body .boss-room-hp span{line-height:14px;font-size:9px!important}.boss-room-meta{margin:3px 0}.boss-room-cast{padding-top:4px}.boss-room-cast progress{margin-top:3px}.boss-room-hud footer{margin-top:4px}.boss-room-hud footer button{min-height:28px!important;padding:4px 9px!important}body.boss-room-active .combat-tools-dock{bottom:215px}}
@media(max-height:540px) and (orientation:landscape){body.boss-room-active .hunt-controls{left:8px;right:auto;width:300px}body.boss-room-active .world-context{left:8px;transform:none}body.boss-room-active .combat-tools-dock{top:auto;bottom:145px;left:8px;right:auto}body.boss-room-active .combat-tools-dock button{min-height:30px;padding:4px 8px}body.boss-room-active [data-combat-tool="training"]{display:none}}

/* Compact solo rules share the existing pirate icon catalogue. */
.solo-boss-status{color:#f4d08c;font-size:11px;line-height:1.5;padding-top:6px;overflow-wrap:anywhere}.solo-boss-status[hidden]{display:none}.solo-boss-guide{margin:12px 0;padding:10px 14px;border:1px solid #536772;border-radius:7px;background:#13252f}.solo-boss-guide summary{cursor:pointer;display:flex;align-items:center;gap:8px;color:#f4d08c;font-weight:bold}.solo-boss-guide summary img{width:26px;height:26px;object-fit:contain}.solo-boss-guide p{font-size:12px;line-height:1.6;color:#c6d4d9}

/* Raids share the boss-room panel, with an objective row only when needed. */
body #raid-hud.boss-room-hud{max-width:calc(100vw - 20px);color:#d6e1e8;backdrop-filter:none}.boss-room-hp[hidden],.raid-room-actions[hidden]{display:none}.raid-room-actions{display:flex;align-items:center;gap:8px;margin-top:7px;pointer-events:auto}.raid-room-actions button{flex:1;white-space:normal}.raid-room-actions strong{font-size:11px;color:#bce0c4}.boss-room-hud[data-phase=defeat]{border-color:#bc6c59}.boss-room-hud[data-phase=cleared]{border-top-color:#80c69e}

#raid-hud[data-mandatory="true"] .boss-room-cast{border-color:#ed815e;background:linear-gradient(100deg,#4d251f,#201f2b)}
#raid-hud[data-mandatory="true"] [data-room-cast-time]{font-size:20px!important;color:#ffcf79;font-weight:800}
#raid-hud[data-mandatory="true"] .solo-boss-status{color:#ffd5b9}

#raid-hud[data-mandatory="true"] .raid-room-actions{gap:5px}
#raid-hud[data-mandatory="true"] .raid-room-actions button{min-width:0;padding:6px 8px!important}

/* A slim combat strip; only live mechanics add another row. */
body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{width:min(460px,calc(100vw - 660px));padding:7px 10px;border-radius:6px;box-shadow:0 3px 12px #0004}
.boss-room-heading{gap:8px;margin-bottom:5px;padding-right:76px;min-height:27px}
.boss-room-heading small{margin-bottom:2px!important;letter-spacing:.5px}
body .boss-room-heading strong{font-size:14px!important;line-height:1.2}
.boss-room-timer b{font-size:17px;line-height:1;font-variant-numeric:tabular-nums}
.boss-room-timer small{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.boss-room-hp{height:14px}body .boss-room-hp span{line-height:12px!important;font-size:9px!important}
.boss-room-meta{margin:4px 0 0;line-height:13px}.boss-room-meta span{font-size:9px!important}
.boss-room-cast{padding-top:5px;margin-top:5px}.boss-room-cast strong{font-size:11px!important;line-height:1.35}.boss-room-cast progress{margin-top:4px}
.boss-room-hud[data-casting=false] .boss-room-cast{display:none}
.boss-room-hud .solo-boss-status{font-size:10px;line-height:1.35;padding-top:4px}
.boss-room-hud footer{position:absolute;right:8px;top:7px;margin:0}.boss-room-hud footer small{display:none}
.boss-room-hud footer button{min-height:28px!important;padding:4px 8px!important;font-size:10px!important}
.raid-room-actions{margin-top:5px;flex-wrap:wrap}.raid-room-actions button{min-height:30px!important}
#raid-hud[data-mandatory=true] [data-room-cast-time]{font-size:16px!important}
@media(max-width:1100px){body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{width:340px;min-width:0}}
@media(max-width:700px){body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{width:calc(100vw - 20px);max-width:380px;padding:6px 9px}.boss-room-heading{margin-bottom:4px;padding-right:76px}body .boss-room-heading strong{font-size:13px!important}.boss-room-timer b{font-size:16px}.boss-room-hp{height:14px}.boss-room-hud footer{top:6px}.boss-room-hud .solo-boss-status{font-size:9px}}
@media(max-height:540px) and (orientation:landscape){body #raid-hud.boss-room-hud,body #weekly-hud.boss-room-hud,body #daily-hud.boss-room-hud{width:320px}.boss-room-heading{min-height:24px}}

/* Keep both preview actions below the timer, including the compact HUD rules. */
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-heading{padding-right:0}
body.boss-hall-map :is(#daily-hud,#weekly-hud) footer{position:static;margin-top:5px;justify-content:space-between}
body.boss-hall-map :is(#daily-hud,#weekly-hud) .boss-room-hp span{line-height:15px!important}
@media(min-width:1101px){body.boss-hall-map :is(#daily-hud,#weekly-hud).boss-room-hud{top:var(--boss-hall-hud-top,168px)}}

/* Raid deadlines, navigation and rewards each keep their own place in flow.
   The shared compact footer rules must never lay text across the clock. */
body #raid-hud.boss-room-hud{border-color:#786f61;border-top-color:#d5b878;background:linear-gradient(125deg,#16202cf2,#0b111bf2);padding:9px 12px}
#raid-hud.boss-room-hud .boss-room-heading{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;padding-right:0;min-height:32px;margin-bottom:6px}
body #raid-hud.boss-room-hud .boss-room-heading strong{font-size:16px!important}
#raid-hud.boss-room-hud .boss-room-timer{min-width:49px;text-align:center}
#raid-hud.boss-room-hud .boss-room-timer b{font-size:21px;line-height:1.1;letter-spacing:.25px}
#raid-hud.boss-room-hud .raid-room-guide{pointer-events:auto}
#raid-hud.boss-room-hud .raid-room-guide button{white-space:nowrap;min-height:32px!important;padding:5px 8px!important;font-size:10px!important}
#raid-hud.boss-room-hud .boss-room-hp{height:17px}
body #raid-hud.boss-room-hud .boss-room-hp span{line-height:15px!important}
#raid-hud.boss-room-hud .boss-room-meta{gap:10px;align-items:flex-start}
#raid-hud.boss-room-hud .boss-room-meta span:first-child{flex:none}
#raid-hud.boss-room-hud .boss-room-meta span:last-child{min-width:0;text-align:right;white-space:normal;overflow:visible;overflow-wrap:anywhere}
#raid-hud.boss-room-hud .boss-room-cast strong{min-width:0;overflow-wrap:anywhere}
#raid-hud.boss-room-hud .boss-room-cast progress[hidden]{display:none}
#raid-hud.boss-room-hud .raid-room-actions{min-width:0;gap:6px}
#raid-hud.boss-room-hud .raid-room-actions button{min-width:0;overflow-wrap:anywhere;min-height:32px!important}
#raid-hud.boss-room-hud footer.raid-room-reward{position:static;display:block;inset:auto;margin-top:6px;padding-top:5px;border-top:1px solid #45556066}
#raid-hud.boss-room-hud footer.raid-room-reward small{display:block;max-width:none;font-size:9px!important;line-height:1.3;color:#b5c4ca!important;white-space:normal;overflow-wrap:anywhere}
@media(max-width:700px){
 body #raid-hud.boss-room-hud{padding:7px 9px}
 #raid-hud.boss-room-hud .boss-room-heading{gap:6px;min-height:36px;margin-bottom:5px}
 body #raid-hud.boss-room-hud .boss-room-heading strong{font-size:14px!important}
 #raid-hud.boss-room-hud .boss-room-heading small{font-size:8px!important}
 #raid-hud.boss-room-hud .boss-room-timer{min-width:43px}
 #raid-hud.boss-room-hud .boss-room-timer b{font-size:19px}
 #raid-hud.boss-room-hud .raid-room-guide button{min-height:36px!important;padding:5px 6px!important}
 #raid-hud.boss-room-hud .raid-room-actions button{min-height:36px!important}
 #raid-hud.boss-room-hud .boss-room-hp{height:16px}
 body #raid-hud.boss-room-hud .boss-room-hp span{line-height:14px!important}
 #raid-hud.boss-room-hud footer.raid-room-reward{margin-top:5px;padding-top:4px}
}
@media(max-height:540px) and (orientation:landscape){
 body #raid-hud.boss-room-hud{width:340px;padding:6px 9px}
 #raid-hud.boss-room-hud .boss-room-heading{min-height:30px;margin-bottom:4px;gap:6px}
 #raid-hud.boss-room-hud .raid-room-guide button{min-height:30px!important}
 #raid-hud.boss-room-hud .raid-room-actions button{min-height:30px!important}
 #raid-hud.boss-room-hud footer.raid-room-reward small{display:block}
}
