/* Combat owns the screen. The rest of the game keeps its usual navigation. */
#app[data-view="combat"] {
 grid-template: minmax(0, 1fr) / minmax(0, 1fr);
 background: #120e0e;
}
#app[data-view="combat"] > :is(#status,#nav,#bag,#journal) { display: none; }
#app[data-view="combat"] > #view { grid-area: 1 / 1; }

.hunt-screen {
 --hunt-gold: #dbcbb8;
 --hunt-paper: #ece4da;
 --hunt-muted: #b9af9b;
 --hunt-line: #55403e;
 --hunt-panel: #1a1414;
 height: 100%;
 min-height: 0;
 display: flex;
 flex-direction: column;
 overflow: auto;
 color: var(--hunt-paper);
 background: radial-gradient(ellipse at 36% 110%, #351d1d, transparent 68%), #130f0f;
 scrollbar-width: thin;
}
.hunt-screen h2,.hunt-screen h3,.hunt-screen p,.hunt-screen dl { margin: 0; }
.hunt-header {
 position: sticky; top: 0; z-index: 3;
 display: flex; align-items: center; gap: clamp(12px, 2.2vw, 34px);
 min-height: 72px; padding: 9px clamp(12px, 2.2vw, 34px);
 background: linear-gradient(105deg, #181313, #211a1a 62%, #151111);
 border-bottom: 1px solid var(--hunt-line);
 box-shadow: 0 3px 16px #0009;
}
.hunt-brand {
 display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
 border: 0; background: transparent; color: var(--hunt-gold); padding: 0;
 font: 600 clamp(17px, 1.8vw, 26px)/1.15 var(--title, Georgia, serif);
 text-transform: uppercase; letter-spacing: .09em; white-space: nowrap;
}
.hunt-brand-mark {
 display: grid; place-items: center; width: 39px; aspect-ratio: 1;
 border: 1px solid #8e2a2f; border-radius: 50%; font-size: 16px; letter-spacing: 0;
}
.hunt-location {
 min-width: 0; padding-left: clamp(12px, 2vw, 28px);
 border-left: 1px solid #55403e; flex: 1;
}
.hunt-location > span,.hunt-current,.hunt-section-label {
 color: var(--hunt-gold); font-size: 10px; font-weight: 700;
 text-transform: uppercase; letter-spacing: .16em;
}
.hunt-location h2 {
 color: var(--hunt-paper); font: 500 clamp(18px, 2vw, 26px)/1.18 Georgia, serif;
 overflow-wrap: anywhere;
}
.hunt-header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.hunt-header-actions button,.hunt-footer button,.hunt-report {
 display: inline-flex; align-items: center; justify-content: center; gap: 7px;
 min-height: 39px; padding: 5px 11px; color: var(--hunt-gold);
 background: linear-gradient(150deg, #271e1e, #181313);
 border: 1px solid #503d3d; border-radius: 7px; font-weight: 700;
}
.hunt-header-actions button:hover,.hunt-footer button:hover,.hunt-report:hover { border-color: var(--hunt-gold); }
.hunt-header-actions .hunt-mobile-settings { display: none; }
.hunt-control-icon { font-size: 17px; line-height: 1; }
.hunt-live-dot {
 width: 8px; height: 8px; flex: 0 0 8px; display: inline-block;
 background: #936d6a; border-radius: 50%;
}
.hunt-auto.running .hunt-live-dot,.hunt-current.live .hunt-live-dot {
 background: #88d39a; box-shadow: 0 0 12px #75c88ca0;
}

.hunt-layout {
 flex: 1 0 auto; display: grid; gap: 12px;
 grid-template-columns: minmax(0, 1fr) clamp(245px, 22vw, 310px);
 min-height: 0; padding: 11px 12px 0;
}
.hunt-card {
 min-width: 0; border: 1px solid #4d3a38; border-radius: 12px;
 background: linear-gradient(155deg, #221a1a, #151010 64%); box-shadow: 0 7px 24px #0005;
}
.hunt-arena { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.hunt-stage {
 position: relative; flex: 1 0 auto; min-height: clamp(370px, 49vh, 650px);
 isolation: isolate;
}
.hunt-stage .battlefield-space { position: absolute; inset: 0; display: block; container-type: size; }
.hunt-stage .combat-battlefield { width: 100%; height: 100%; }
.hunt-stage .battlefield-background { filter: brightness(.87) saturate(.86); }
.hunt-stage .battlefield-player,.hunt-stage .battlefield-enemy { width: min(31%, 65cqh); }
.hunt-stage .battlefield-founder { width: min(36%, 70cqh); }
.hunt-stage .battlefield-pack .battlefield-enemy { width: min(22%, 62cqh); }
.hunt-stage .battlefield-pack:has(.battlefield-enemy + .battlefield-enemy + .battlefield-enemy) .battlefield-enemy { width: min(16%, 60cqh); }
.hunt-stage::after {
 content: ''; position: absolute; inset: 0; pointer-events: none;
 background: linear-gradient(#0a09094d, transparent 27%, transparent 72%, #161111 100%);
}
.hunt-overlay {
 position: absolute; inset: clamp(10px, 2vw, 26px) clamp(10px, 2vw, 28px) auto;
 z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
}
.hunt-hud {
 min-width: 0; padding: 10px 13px; border: 1px solid #906b68; border-radius: 10px;
 background: linear-gradient(150deg, #171111fa, #1a1414f2); box-shadow: 0 4px 19px #0009;
}
.hunt-player,.hunt-opponents { width: min(36%, 285px); }
.hunt-opponents { display: grid; gap: 5px; max-height: 220px; overflow: auto; scrollbar-width: thin; }
.hunt-opponents.pack-hud { width: min(54%, 475px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hunt-hud-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.hunt-hud-title h3 { color: var(--hunt-paper); font: 500 clamp(15px, 1.5vw, 23px)/1.12 Georgia, serif; overflow-wrap: anywhere; }
.hunt-hud-title > span {
 flex: none; color: #d8c6b2; font-size: 9px; line-height: 1.35; white-space: nowrap;
 border: 1px solid #4e3c3c; border-radius: 4px; background: #2c2222; padding: 2px 5px;
}
.hunt-hud .vital-label,.hunt-target-summary .vital-label { color: #ddd1bf; font-size: 10px; }
.hunt-hud .combat-meter,.hunt-target-summary .combat-meter {
 height: 7px; margin: 2px 0 6px; background: #302525; border: 1px solid #534040;
}
.hunt-hud .combat-meter i,.hunt-target-summary .combat-meter i { background: linear-gradient(90deg, #a64a42, #ec8779); }
.hunt-hud .combat-meter.energy i { background: linear-gradient(90deg, #487c82, #83c8cc); }
.hunt-stats {
 display: flex; flex-wrap: wrap; gap: 4px 11px; border-top: 1px solid #4b3939;
 padding-top: 6px; color: #d9c8b5; font-size: 11px;
}
.hunt-cue { color: #ddd0bb; font-size: 11px; line-height: 1.3; }
.hunt-cue.windup::before { content: '●'; margin-right: 6px; color: #e17b65; }
.hunt-hud .combat-statuses { min-height: 0; padding: 3px 0 0; }
.hunt-hud .combat-statuses:has(> .muted:only-child) { display: none; }
.hunt-pack-overflow { grid-column: 1/-1; color: var(--hunt-paper); text-shadow: 0 1px 5px black; }
.hunt-enemy.defeated { opacity: .72; }
.hunt-party { position: absolute; z-index: 1; bottom: 5px; left: 12px; right: 12px; max-height: 84px; overflow: auto; }

.hunt-action-deck {
 position: relative; display: grid; grid-template-columns: minmax(140px,.8fr) minmax(0,1.2fr) minmax(0,.25fr);
 align-items: center; gap: 15px; padding: 2px 18px 16px;
 background: radial-gradient(ellipse at 50% 0, #312525, #161111 72%);
}
.hunt-action-message { min-width: 0; }
.hunt-current { display: flex; gap: 8px; align-items: center; line-height: 1.45; }
.hunt-latest { margin-top: 8px !important; color: #e1d4c4; font-size: 13px; line-height: 1.5; }
.hunt-mobile-kills { display: none; }
.hunt-ability-bar { display: grid; gap: 12px; min-width: 0; }
.hunt-ability-slots { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: clamp(8px, 1.4vw, 17px); }
.hunt-ability {
 --ability-color: #d7c5b0;
 position: relative; aspect-ratio: 1; min-width: 0; width: 100%; max-width: 82px;
 margin-inline: auto; padding: 0; border: 1px solid #7c5c59; border-radius: 10px;
 background: radial-gradient(ellipse at 50% 53%, #96232a54, #1b1414 72%);
 color: var(--ability-color); box-shadow: inset 0 0 12px #0008;
}
.hunt-ability:hover,.hunt-ability:focus-visible { border-color: #cfbba3; }
.hunt-ability.activated { border-color: #dfd2c2; box-shadow: 0 0 16px #bea281a0, inset 0 0 14px #cf343d50; }
.ability-key,.ability-cost {
 position: absolute; z-index: 1; border: 1px solid #5c4443; background: #1f1717;
 color: #e3d8ca; font-weight: 700; line-height: 1; white-space: nowrap;
}
.ability-key { top: -4px; left: -4px; border-radius: 4px; padding: 3px 4px; font-size: 10px; }
.ability-cost { bottom: -5px; left: 50%; transform: translateX(-50%); border-radius: 5px; padding: 3px 5px; font-size: 11px; }
.ability-cost.cooldown { border-color: #82605e; border-radius: 12px; }
.ability-art {
 display: grid; place-items: center; height: 100%; overflow: hidden; border-radius: inherit;
 font: 700 clamp(25px, 4.4vw, 59px)/1 Georgia, serif;
 text-shadow: 0 0 13px currentColor, 0 2px 4px #000;
}
.ability-art img { width: 82%; height: 82%; object-fit: contain; filter: sepia(.25) drop-shadow(0 0 5px #cc3039a0); }
.ability-heal { color: #d9c8b5; background: radial-gradient(ellipse, #bea28242, transparent 72%); }
.ability-guard { color: #cdb89f; background: radial-gradient(ellipse, #8c212748, transparent 72%); }
.ability-energy { color: #97d8c9; background: radial-gradient(ellipse, #4e8f714a, transparent 72%); }
.ability-arcane { color: #c6a5fa; background: radial-gradient(ellipse, #8364ac68, transparent 72%); }
.ability-strike,.ability-precision { color: #c0e4a6; background: radial-gradient(ellipse, #547b4678, transparent 72%); }
.ability-strike { position: relative; }
.ability-strike img { position: absolute; filter: sepia(.65) hue-rotate(38deg) drop-shadow(0 0 5px #a5df84); }
.ability-strike img:last-child { transform: scaleX(-1); }
.ability-slash { position: relative; font-size: 0; background: radial-gradient(ellipse, #9b412c6e, transparent 76%); }
.ability-slash::after {
 content: ''; width: 76%; height: 49%; transform: rotate(-37deg) translateY(-9%);
 border-radius: 50%; border-bottom: 5px solid #dbccba;
 box-shadow: 0 5px 8px #ff9a45, inset 0 -4px 8px #cd303980;
}
.hunt-ability.dimmed .ability-art { opacity: .48; filter: saturate(.55); }
.hunt-ability-detail {
 display: flex; justify-content: center; align-items: center; gap: 10px; min-width: 0;
 min-height: 34px; padding: 4px 9px; border: 1px solid #6b4f4e; border-radius: 18px;
 background: #211919; color: #dfd1c1; font-size: 12px; line-height: 1.15;
}
.hunt-ability-detail strong { color: #f0eae3; }
.hunt-ability-detail small { color: #b7d39a; font-size: 10px; }

.hunt-sidebar { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 10px; }
.hunt-journal { display: flex; min-height: 0; flex-direction: column; padding: 14px 13px 10px; }
.hunt-journal > h2 { color: #e7ddd1; font: 500 24px/1.1 Georgia, serif; }
.hunt-journal-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; margin: 9px 0 8px; border-bottom: 1px solid #4f3d3d; }
.hunt-journal-tabs button {
 border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent;
 color: var(--hunt-muted); min-width: 0; min-height: 36px; padding: 3px 2px; font-size: 11px; font-weight: 700;
}
.hunt-journal-tabs button[aria-pressed="true"] { border-bottom-color: #c3a98a; color: var(--hunt-gold); }
.hunt-journal-content { min-height: 0; overflow: auto; scrollbar-width: thin; }
.hunt-section-label { margin: 9px 0 7px !important; }
.hunt-target-summary { padding: 9px; border: 1px solid #4c3a3a; border-radius: 7px; background: #241b1b; }
.hunt-target-summary > strong { display: block; font: 500 16px/1.2 Georgia, serif; margin-bottom: 6px; }
.hunt-target-summary p { color: var(--hunt-muted); font-size: 11px; line-height: 1.4; }
.hunt-totals { display: grid; gap: 7px; font-size: 12px; color: var(--hunt-muted); }
.hunt-totals > div { display: flex; justify-content: space-between; gap: 7px; }
.hunt-totals dd { margin: 0; font-weight: 700; color: #dbccba; text-align: right; }
.hunt-totals .hunt-positive { color: #b6d49b; }
.hunt-finds { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.hunt-finds button { aspect-ratio: 1; max-width: 68px; min-width: 0; padding: 4px; background: #1f1919; border-color: #503e3e; }
.hunt-finds .equipment-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.hunt-report { margin-top: 11px; min-height: 30px; font-size: 11px; }
.hunt-log { list-style: none; display: grid; margin: 0; padding: 0; }
.hunt-log li { display: flex; align-items: flex-start; gap: 7px; padding: 8px 1px; border-bottom: 1px solid #3e2f2f; color: #e1d5c1; font-size: 12px; line-height: 1.35; }
.hunt-log-icon { color: var(--hunt-gold); font-size: 14px; flex: 0 0 16px; text-align: center; }
.hunt-log li > small { margin-left: auto; color: var(--hunt-muted); white-space: nowrap; }
.hunt-log .event-crit { color: #cfbba3; }
.hunt-progression { padding: 12px 13px 6px; }
.hunt-xp-row { margin-bottom: 12px; }
.hunt-xp-row > div { display: flex; justify-content: space-between; gap: 5px; color: #dccdbc; font-size: 10px; text-transform: uppercase; }
.hunt-xp-row > span { display: block; text-align: right; color: var(--hunt-muted); font-size: 10px; margin-top: 3px; }
.hunt-xp-row progress { display: block; width: 100%; height: 7px; margin-top: 4px; appearance: none; border: 0; border-radius: 9px; background: #483838; overflow: hidden; }
.hunt-xp-row progress::-webkit-progress-bar { background: #483838; }
.hunt-xp-row progress::-webkit-progress-value { background: #dbcbb8; border-radius: 9px; }
.hunt-xp-row progress.mastery::-webkit-progress-value { background: #93ac75; }
.hunt-xp-row progress::-moz-progress-bar { background: #dbcbb8; }
.hunt-xp-row progress.mastery::-moz-progress-bar { background: #93ac75; }
.hunt-build { display: flex; justify-content: space-between; width: 100%; background: transparent; border: 0; border-top: 1px solid #4c3a3a; border-radius: 0; color: var(--hunt-gold); padding: 5px 0; font-size: 11px; }
.hunt-footer { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px 12px; }
.hunt-footer .hunt-footer-inventory { justify-content: space-between; min-width: 170px; }
.hunt-footer-inventory > span:last-child { color: var(--hunt-muted); font-weight: 400; }
.hunt-menu nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.hunt-menu .nav-section { grid-column: 1/-1; color: var(--gold); padding: 8px 0 1px; }
.hunt-menu nav button { min-width: 0; text-align: left; }

@media (min-width: 961px) and (min-height: 680px) {
 .hunt-layout { flex: 1 1 auto; }
 .hunt-stage { flex: 1 1 auto; min-height: 350px; }
}
@media (max-width: 960px) {
 .hunt-layout { grid-template-columns: minmax(0,1fr); }
 .hunt-sidebar { grid-template-columns: minmax(0,1fr) minmax(190px,.55fr); grid-template-rows: auto; }
 .hunt-journal-content:not([data-section="overview"]) { max-height: 270px; }
 .hunt-action-deck { grid-template-columns: minmax(0,1fr) minmax(0,1.65fr); }
 .hunt-brand > span:last-child { display: none; }
}
@media (max-width: 620px) {
 .hunt-header { min-height: 59px; padding: 7px 9px; gap: 8px; }
 .hunt-brand-mark { width: 30px; font-size: 12px; }
 .hunt-location { padding-left: 7px; }
 .hunt-location > span { font-size: 8px; letter-spacing: .08em; }
 .hunt-location h2 { font-size: clamp(13px, 4vw, 20px); }
 .hunt-header-actions { gap: 4px; }
 .hunt-header-actions button { min-height: 35px; padding: 4px 6px; font-size: 10px; }
 .hunt-header-actions button:not(.hunt-auto) { width: 30px; }
 .hunt-control-label,.hunt-header-actions .hunt-desktop-gear { display: none; }
 .hunt-header-actions .hunt-mobile-settings { display: inline-flex; }
 .hunt-layout { padding: 6px 6px 0; gap: 7px; }
 .hunt-stage { min-height: clamp(300px, 47vh, 440px); }
 .hunt-overlay { inset: 8px 7px auto; gap: 5px; }
 .hunt-player,.hunt-opponents { width: 47%; }
 .hunt-opponents.pack-hud { width: 51%; grid-template-columns: 1fr; max-height: 142px; }
 .hunt-hud { padding: 6px 7px; border-radius: 7px; }
 .hunt-hud-title h3 { font-size: 14px; }
 .hunt-hud-title > span { padding: 2px 3px; font-size: 8px; }
 .hunt-hud .vital-label,.hunt-cue,.hunt-stats { font-size: 9px; }
 .hunt-stats { gap: 3px 6px; }
 .hunt-stage .battlefield-player,.hunt-stage .battlefield-enemy { width: 39%; }
 .hunt-stage .battlefield-founder { width: 45%; }
 .hunt-stage .battlefield-pack .battlefield-enemy { width: 23%; }
 .hunt-action-deck { grid-template-columns: 1fr; gap: 10px; padding: 1px 11px 12px; }
 .hunt-latest { margin-top: 4px !important; font-size: 12px; }
 .hunt-mobile-kills { display: block; margin-top: 4px !important; font-size: 10px; color: var(--hunt-muted); }
 .hunt-mobile-kills strong { color: var(--hunt-gold); }
 .hunt-ability-slots { width: min(100%, 400px); margin: 0 auto; gap: 8px; }
 .ability-art { font-size: clamp(24px, 9vw, 51px); }
 .ability-slash { font-size: 0; }
 .ability-cost { font-size: 9px; }
 .hunt-sidebar { grid-template-columns: minmax(0,1fr); gap: 7px; }
 .hunt-journal { padding: 10px 11px; }
 .hunt-journal > h2 { font-size: 21px; }
 .hunt-journal-content:not([data-section="overview"]) { max-height: 230px; }
 .hunt-footer { padding: 7px 6px 10px; }
 .hunt-footer .hunt-footer-inventory { flex: 1; min-width: 0; }
}
