/* Combat screen v2: slim vitals, one action deck (abilities + provisions + ultimate orb), hunting grounds strip. Loaded last. */

/* ---- Header buttons: always labelled ---- */
.hunt-header-actions button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 52px; height: 46px; padding: 4px 8px; }
.hunt-header-actions .hunt-control-icon { font-size: 17px; line-height: 1; }
.hunt-header-actions .hunt-control-label { display: block !important; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: #cdbcab; line-height: 1.1; }

/* ---- Nameplates: your frame top-left, each enemy's plate over its own sprite ---- */
.np-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.np { position: absolute; top: calc(10px + var(--row, 0) * 54px); min-width: 0; padding: 4px 10px 5px; }
.np-player { left: 6px; top: 8px; width: min(38%, 310px); background: linear-gradient(90deg, #0a0606c7 0%, #0a0606a6 70%, transparent); border-radius: 10px 0 0 10px; }
.np-enemy { left: var(--x); width: var(--w); max-width: 300px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, #0a0606b3 16%, #0a0606b3 84%, transparent); }
.np-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; min-width: 0; }
.np-enemy .np-head { justify-content: center; }
.np-head h3 { margin: 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #f0e5d3; font: 600 14px/1.15 Georgia, serif; text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.np-lv { flex: none; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; border: 1px solid #b98d4c; background: radial-gradient(circle at 50% 35%, #3d2719, #160d0a); box-shadow: 0 0 0 1px #000; color: #f3dca8; font: 700 11px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.np-stats { margin-left: auto; flex: none; color: #cdbda8; font-size: 11px; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.np-bar { position: relative; height: 14px; border-radius: 3px; overflow: hidden; background: #140b0b; border: 1px solid #000; box-shadow: 0 0 0 1px #7a573f70, inset 0 2px 4px #000; }
.np-bar > i { position: absolute; inset: 0 auto 0 0; }
.np-bar .np-trail { background: linear-gradient(180deg, #ffe2a8, #d49a55); transition: width .55s ease-in .3s; }
.np-bar .np-fill { background: linear-gradient(180deg, #ff8a6e 0%, #d8392a 45%, #8f1912 100%); box-shadow: inset 0 1px 0 #ffffff40; transition: width .18s ease-out; }
.np-bar > b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 11px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 4px #000; }
.np-player .np-bar.health { height: 17px; }
.np-player .np-bar.health > b { font-size: 11px; }
.np-bar.energy { height: 6px; margin-top: 3px; box-shadow: 0 0 0 1px #2f5a5270, inset 0 1px 2px #000; }
.np-bar.energy .np-fill { background: linear-gradient(180deg, #8af5de, #1c8f7b); }
.np-bar.energy .np-trail { display: none; }
.np-bar.is-low .np-fill { animation: np-low 1.1s ease-in-out infinite; }
@keyframes np-low { 50% { filter: brightness(1.45); } }
.np-cue { margin: 3px 0 0; color: #ffb39b; font-size: 11px; text-align: center; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-enemy.windup .np-bar { box-shadow: 0 0 0 1px #ff6a4d, 0 0 10px #ff4a2c99; }
.np-fx { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.np-enemy .np-fx { justify-content: center; }
.np-fx span { padding: 1px 5px; border-radius: 3px; border: 1px solid #ffffff24; background: #000000b3; color: #e8dccb; font-size: 11px; line-height: 1.35; white-space: nowrap; }
.np-fx b { color: #fff; }
.np.dead { opacity: .45; }
.np.dead .np-bar > b { color: #c9bba8; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.np.boss .np-lv { border-color: #e0705a; color: #ffd3b4; }
.np.boss h3 { color: #f6d79a; font-size: 16px; }
.np-enemies.pack .np h3 { font-size: 12.5px; }
.np-more { position: absolute; right: 12px; top: 118px; color: #e8dccb; font-size: 11px; text-shadow: 0 1px 3px #000; }
@media (max-width: 620px) {
 .np { top: calc(7px + var(--row, 0) * 46px); padding: 3px 7px 4px; }
 .np-player { left: 4px; top: 6px; width: 45%; }
 .np-head { gap: 4px; margin-bottom: 3px; }
 .np-head h3 { font-size: 12.5px; }
 .np-enemies.pack .np h3 { font-size: 11px; }
 .np.boss h3 { font-size: 14px; }
 .np-lv { min-width: 17px; height: 17px; font-size: 11px; padding: 0 3px; }
 .np-stats { display: none; }
 .np-bar { height: 12px; }
 .np-bar > b { font-size: 11px; }
 .np-player .np-bar.health { height: 15px; }
 .np-player .np-bar.health > b { font-size: 11px; }
 .np-bar.energy { height: 5px; }
 .np-fx span { font-size: 11px; padding: 0 4px; }
 .np-more { top: 100px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .np-bar > i { transition: none; } .np-bar.is-low .np-fill { animation: none; } }

/* ---- Action deck ---- */
.hunt-hotbar-row { display: block !important; }
.dk { isolation: isolate; width: 100% !important; max-width: 100% !important; justify-self: stretch !important; position: relative; display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top orb" "bottom orb" "energy energy"; gap: 8px 10px; margin: 0 !important; padding: 10px 12px 10px !important; border-radius: 16px !important; border: 1px solid #7a5a3a !important; background: linear-gradient(180deg, #2a1d17, #170f0d) !important; box-shadow: inset 0 0 0 1px #00000080, inset 0 1px 0 #ffffff14, 0 10px 26px #000a !important; }
.dk::before { content: ""; position: absolute; inset: 3px; border-radius: 13px; border: 1px solid #c8a26a33; pointer-events: none; }
.dk-top { grid-area: top; min-width: 0; }
.dk-bottom { grid-area: bottom; display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.dk-orb-wrap { grid-area: orb; display: grid; place-items: center; }
.dk-energy { grid-area: energy; }
.dk-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dk-label { display: flex; align-items: center; gap: 6px; font-family: var(--title); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #d9b98a; text-shadow: 0 1px 0 #000; }
.dk-edit { min-height: 0 !important; height: 18px; padding: 0 6px !important; font-family: inherit; font-size: 11px !important; letter-spacing: 1px; border-radius: 5px !important; color: #e8c99a !important; background: #ffffff0d !important; border: 1px solid #c8a26a44 !important; }
.dk-row { display: flex; gap: 6px; }
.dk-gem { width: 9px; height: 9px; margin-bottom: 21px; flex: none; transform: rotate(45deg); background: linear-gradient(135deg, #f4d79a, #8a6a38); box-shadow: 0 0 6px #c8a26a66; }
/* ability cells reuse the hotbar buttons, sized as square tiles */
.dk .dk-abilities .dk-row { gap: 6px; }
.dk .hot-cell { width: auto !important; min-width: 0; flex: 1 1 0; max-width: 64px; }
.dk .hot-slot { width: 100% !important; height: auto !important; aspect-ratio: 1; border-radius: 10px !important; border: 1px solid #a07c4c !important; background: linear-gradient(180deg, #2e2119, #150e0c) !important; box-shadow: inset 0 0 10px #000c !important; }
.dk .hot-slot.is-locked { border-color: #5a4430 !important; opacity: .8; }
.dk .hot-name { display: none !important; }
.dk .hot-ult-cell, .dk .hot-gear-cell { display: none !important; }
/* provision cells */
.dk-cell { position: relative; display: grid; place-items: center; width: 50px; height: 50px; padding: 0 !important; border-radius: 10px !important; border: 1px solid #a07c4c !important; background: linear-gradient(180deg, #2e2119, #150e0c) !important; box-shadow: inset 0 0 10px #000c; overflow: hidden; }
.dk-cell.is-empty { border-style: solid !important; border-color: #5a4430 !important; }
.dk-cell.is-out { opacity: .55; }
.dk-art { display: grid; place-items: center; width: 100%; height: 100%; }
.dk-img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 2px 4px #000); }
.dk-plus { font-size: 22px; color: #8a6a44; font-weight: 700; }
.dk-count { position: absolute; right: 3px; bottom: 2px; font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.dk-sub { position: absolute; left: 3px; top: 2px; padding: 0 3px; border-radius: 4px; background: #000a; font-size: 11px; font-weight: 700; color: #e8d6a8; }
.dk-time, .dk-cd { position: absolute; left: 0; bottom: 0; height: 3px; }
.dk-time { background: #e0b04a; }
.dk-cd { background: #6fb6ff; }
/* ultimate orb */
.dk-orb { position: relative; width: 104px; height: 104px; padding: 0 !important; border-radius: 50% !important; display: grid; place-items: center; overflow: hidden; border: 3px solid #b98d4e !important; background: radial-gradient(circle at 50% 35%, #2b1716, #0d0707 70%) !important; box-shadow: 0 0 0 2px #2a1b12, 0 0 0 4px #6b4b2a, inset 0 0 18px #000, 0 6px 16px #000a !important; }
.dk-orb-liquid { position: absolute; left: 0; right: 0; bottom: 0; height: var(--fill); background: radial-gradient(120% 60% at 50% 0%, #ff8a3a 0%, #d22a14 35%, #6d0d08 100%); box-shadow: 0 -2px 10px #ff6a2a88; transition: height .4s ease; }
.dk-orb-liquid::before { content: ""; position: absolute; left: -10%; right: -10%; top: -5px; height: 10px; border-radius: 50%; background: #ffb07a66; filter: blur(2px); animation: orb-wave 3s ease-in-out infinite; }
@keyframes orb-wave { 50% { transform: translateX(6%) scaleY(1.3); } }
.dk-orb-icon { position: absolute; top: 14px; width: 26px; height: 26px; opacity: .85; }
.dk-orb-icon svg { width: 100%; height: 100%; }
.dk-orb b { position: relative; margin-top: 12px; font-size: 21px; font-weight: 800; color: #fff; text-shadow: 0 2px 4px #000; }
.dk-orb small { position: absolute; bottom: 14px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: #f3dcc0; text-shadow: 0 1px 2px #000; }
.dk-orb.is-full { animation: orb-full 1.2s ease-in-out infinite; }
@keyframes orb-full { 50% { box-shadow: 0 0 0 2px #2a1b12, 0 0 0 4px #e0a84a, 0 0 26px #ff6a2a, inset 0 0 18px #000 !important; } }
.dk-orb.is-locked b { font-size: 15px; color: #cdb69a; }
.dk-energy .hot-energy, .dk-energy .hot-swing { width: 100% !important; max-width: none !important; }
.dk-energy .hot-energy { margin: 0 !important; height: 16px !important; border-radius: 8px !important; }
.dk-energy .hot-energy span { font-size: 11px !important; }
.dk-energy .hot-swing { margin-top: 4px !important; }

/* ---- Hunting grounds ---- */
.hg { margin-top: 10px; }
.hg-head { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 6px; }
.hg-all { min-height: 0 !important; height: 24px; padding: 0 9px !important; font-size: 11px !important; border-radius: 7px !important; }
.hg-strip { display: flex; gap: 8px; padding-top: 8px !important; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 2px 2px 8px; scrollbar-width: thin; }
.hg-strip::-webkit-scrollbar { height: 4px; }
.hg-strip::-webkit-scrollbar-thumb { background: #4a3530; border-radius: 2px; }
.hg-card { position: relative; flex: 0 0 168px; scroll-snap-align: start; display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 8px; align-items: center; padding: 7px 8px !important; border-radius: 12px !important; border: 1px solid #3f2c29 !important; background: linear-gradient(180deg, #1d1414, #110c0c) !important; text-align: left; min-height: 0 !important; }
.hg-card:not([disabled]):hover { border-color: #c2372a !important; transform: translateY(-1px); }
.hg-card.is-current { border-color: #e0533f !important; box-shadow: 0 0 0 1px #e0533f55, 0 0 16px #e0533f44; background: linear-gradient(180deg, #2c1312, #140d0d) !important; opacity: 1 !important; }
.hg-card.is-locked { opacity: .45; }
.hg-card[disabled] { cursor: default; }
.hg-art { grid-row: 1 / 4; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 9px; background: radial-gradient(circle at 50% 60%, #3a1d1a, #120c0c 75%); overflow: hidden; }
.hg-art img, .hg-art .sprite { max-width: 44px; max-height: 44px; object-fit: contain; }
.hg-pack { display: flex; align-items: flex-end; justify-content: center; }
.hg-pack > * { width: 22px !important; height: 34px !important; margin: 0 -4px; object-fit: contain; }
.hg-name { font-size: 12px; line-height: 1.15; color: #f1e2cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-lv { font-size: 11px; color: #9c8b80; }
.hg-stats { display: flex; gap: 6px; font-size: 11px; color: #d8c8b6; font-variant-numeric: tabular-nums; }
.hg-stats i { font-style: normal; white-space: nowrap; }
.hg-stats em { font-style: normal; margin-right: 2px; }
.hg-hp { color: #ef6a5a; } .hg-atk { color: #e8b45a; } .hg-def { color: #8ab4e8; }
.hg-badge { position: absolute; top: -6px; left: 8px; z-index: 1; padding: 1px 5px; border-radius: 5px; background: #6b2a24; color: #fbe0d4; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.hg-on { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #e0533f; box-shadow: 0 0 8px #e0533f; font-size: 0; }
.hg-sep { flex: 0 0 auto; align-self: center; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--title); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #7f6f66; padding: 0 2px; border-left: 1px solid #3a2a28; }

/* ---- Phones ---- */
@media (max-width: 760px) {
 .dk { padding: 9px 9px 9px !important; gap: 7px 8px; }
 .dk .hot-cell { max-width: 54px; }
 .dk-cell { width: 44px; height: 44px; }
 .dk-bottom { gap: 4px; }
 .dk-gem { width: 7px; height: 7px; margin-bottom: 18px; }
 .dk-orb { width: 86px; height: 86px; }
 .dk-orb b { font-size: 18px; }
 .dk-label { font-size: 11px; letter-spacing: 1.4px; }
}
@media (max-width: 380px) {
 .dk-cell { width: 40px; height: 40px; }
 .dk-orb { width: 74px; height: 74px; }
 .dk-gem { display: none; }
}

.hunt-header { position: relative; z-index: 30; }
.dk-energy { justify-self: stretch; width: 100%; min-width: 0; }
/* Desktop: deck and hunting grounds sit below the battlefield instead of covering it */
@media (min-width: 961px) {
 .hunt-hotbar-row { margin-top: 0 !important; padding: 10px 12px 8px !important; display: block !important; pointer-events: auto !important; background: linear-gradient(180deg, #130d0d, #0e0909); border-top: 1px solid #2e2220; }
 .dk { max-width: 720px !important; margin: 0 auto !important; }
 .hunt-arena .hunt-stage { min-height: 300px; }
}
/* Phones: the orb sits beside the abilities only; provisions get the full width */
@media (max-width: 760px) {
 .dk { grid-template-areas: "top orb" "bottom bottom" "energy energy"; align-items: center; }
 .dk-bottom { justify-content: space-between; }
}
@media (min-width: 961px) {
 .dk { max-width: 980px !important; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "top bottom orb" "energy energy orb"; align-items: end; gap: 6px 14px; padding: 8px 14px !important; }
 .dk .hot-cell { flex: 0 0 52px; max-width: 52px; }
 .dk-cell { width: 52px; height: 52px; }
 .dk-bottom { padding-left: 14px; border-left: 1px solid #c8a26a33; }
 .dk-orb { width: 82px; height: 82px; }
 .dk-orb b { font-size: 17px; }
 .hunt-arena .hunt-stage { min-height: 250px; }
}

/* ===== World map ===== */
.dialog:has(.wm) { width: min(980px, calc(100vw - 16px)); padding: 18px 18px 14px; }
.wm-top h2 { margin: 2px 0 10px; font-family: var(--title); font-size: 24px; color: #f4e6d4; }
.wg-strip { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: thin; }
.wg-card { position: relative; flex: 0 0 132px; height: 84px; padding: 0 !important; overflow: hidden; scroll-snap-align: start; border-radius: 12px !important; border: 1px solid #4a3532 !important; background: #120c0c !important; text-align: left; }
.wg-art { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .3s; }
.wg-card:hover .wg-art { transform: scale(1.06); }
.wg-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #0b070700 20%, #0b0707e6 100%); }
.wg-num { position: absolute; top: 6px; left: 8px; font-family: var(--title); font-size: 13px; color: #f2c46a; text-shadow: 0 1px 3px #000; }
.wg-seal { position: absolute; top: 6px; right: 8px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #3f6b48; color: #fff; font-size: 11px; box-shadow: 0 0 8px #5fb36e; }
.wg-here { position: absolute; top: 7px; right: 8px; padding: 1px 6px; border-radius: 6px; background: #c2372a; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .4px; }
.wg-seal + .wg-here { right: 30px; }
.wg-text { position: absolute; left: 8px; right: 8px; bottom: 6px; display: grid; }
.wg-text b { font-size: 12.5px; line-height: 1.15; color: #f6e8d6; text-shadow: 0 1px 3px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-text small { font-size: 11px; color: #d6c3ae; }
.wg-card.is-selected { border-color: #e0533f !important; box-shadow: 0 0 0 1px #e0533f, 0 0 16px #e0533f55; }
.wg-card.is-locked .wg-art { filter: grayscale(.85) brightness(.55); }
.wg-card.is-locked .wg-text small { color: #b9a698; }
.wm-hero { position: relative; min-height: 150px; display: flex; align-items: flex-end; margin: 4px 0 12px; border-radius: 14px; overflow: hidden; background-size: cover; background-position: center 40%; border: 1px solid #4a3532; }
.wm-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #0b0707f0 0%, #0b0707b0 45%, #0b070720 100%); }
.wm-hero-text { position: relative; padding: 14px 18px; } /* grows with a long locked note instead of clipping */
.wm-hero-text h2 { margin: 2px 0 4px; font-family: var(--title); font-size: 28px; color: #f6e8d6; text-shadow: 0 2px 10px #000; }
.wm-hero-text p { margin: 0; font-size: 13px; color: #d9c8b6; }
.wm-hero-text .wm-locked { margin-top: 6px; color: #f0b3a8; }
.wm-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: #0d0909; border: 1px solid #2a201e; overflow-x: auto; scrollbar-width: none; }
.wm-tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: #a8968a !important; font-size: 13px; font-weight: 600; white-space: nowrap; }
.wm-tabs button small { padding: 0 6px; border-radius: 999px; background: #ffffff12; font-size: 11px; color: #cdbcab; }
.wm-tabs button.is-on { background: linear-gradient(180deg, #3a1714, #241010) !important; color: #fbe6d4 !important; box-shadow: inset 0 0 0 1px #6b2a24; }
.wm-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.wm-chip { flex: none; min-height: 30px !important; padding: 0 12px !important; border-radius: 999px !important; font-size: 12px !important; background: #140e0e !important; border: 1px solid #3a2a28 !important; color: #cdbcab !important; }
.wm-chip.is-on { border-color: #c2372a !important; color: #fff !important; background: #2a1110 !important; }
.wm-list { display: grid; gap: 8px; }
.wm-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid #332523; background: linear-gradient(90deg, #1b1313, #110c0c); }
.wm-card.is-current { border-color: #e0533f; box-shadow: 0 0 14px #e0533f33; }
.wm-portrait { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 10px; background: radial-gradient(circle at 50% 60%, #3a1d1a, #120c0c 75%); overflow: hidden; }
.wm-portrait img, .wm-portrait .sprite { max-width: 60px; max-height: 60px; object-fit: contain; }
.wm-pack { display: flex; align-items: flex-end; justify-content: center; }
.wm-pack > * { width: 28px !important; height: 44px !important; margin: 0 -5px; object-fit: contain; }
.wm-body { min-width: 0; }
.wm-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.wm-title h3 { margin: 0; font-family: var(--title); font-size: 16px; color: #f2e2cf; }
.wm-lv { font-size: 11px; font-weight: 700; color: #e9d7c4; padding: 0 6px; border-radius: 5px; background: #ffffff12; }
.wm-threat { font-size: 11px; color: #9c8b80; }
.wm-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 2px; font-size: 12px; color: #d8c8b6; font-variant-numeric: tabular-nums; }
.wm-stats i { font-style: normal; white-space: nowrap; }
.wm-stats em { font-style: normal; margin-right: 3px; }
.wm-type { color: #c9b8a9; } .wm-type.magic { color: #b48cff; }
.wm-cue { margin: 2px 0; font-size: 12.5px; color: #c9b8a9; line-height: 1.4; }
.wm-cue b { color: #f1d8a6; font-weight: 600; }
.wm-tip { margin: 2px 0 0; font-size: 11.5px; color: #8f7e74; }
.wm-drops { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.wm-mat { display: inline-flex; align-items: center; gap: 5px; min-height: 26px !important; padding: 0 8px 0 4px !important; border-radius: 7px !important; font-size: 11.5px !important; background: #140e0e !important; border: 1px solid #3a2a28 !important; color: #d8c8b6 !important; }
.wm-mat img, .wm-mat .material-art { width: 18px !important; height: 18px !important; }
.wm-loot { display: inline-flex; align-items: center; padding: 0 8px; min-height: 26px; border-radius: 7px; font-size: 11.5px; color: #9fd8a8; border: 1px solid #2f4a35; background: #0f160f; }
.wm-act { align-self: center; }
.wm-go { min-width: 92px; }
.wm-fighting { font-size: 12px; font-weight: 700; color: #e0533f; white-space: nowrap; }
.wm-guardian { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 14px; border: 1px solid #6b2a24; background: radial-gradient(120% 120% at 0% 0%, #2c1312, #110c0c 60%); }
.wm-guardian.is-current { box-shadow: 0 0 18px #e0533f44; }
.wm-guardian-art { display: grid; place-items: end center; min-height: 200px; border-radius: 12px; background: radial-gradient(circle at 50% 70%, #4a1d19, #120c0c 70%); overflow: hidden; }
.wm-guardian-art img, .wm-guardian-art .sprite { max-width: 100%; max-height: 220px; object-fit: contain; }
.wm-guardian-body h3 { margin: 2px 0 4px; font-family: var(--title); font-size: 22px; color: #f4e6d4; }
.wm-guardian-body > p { margin: 6px 0; font-size: 13px; color: #cdbcab; line-height: 1.5; }
.wm-phases { margin: 6px 0; padding-left: 18px; font-size: 12.5px; color: #c9b8a9; }
.wm-phases li { margin: 2px 0; }
.wm-guardian .wm-act { margin-top: 10px; }
.wm-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.wm-mat-row { display: flex; align-items: center; gap: 10px; min-height: 52px !important; padding: 6px 12px 6px 8px !important; border-radius: 10px !important; text-align: left; background: #130e0e !important; border: 1px solid #332523 !important; }
.wm-mat-row img, .wm-mat-row .material-art { width: 34px !important; height: 34px !important; flex: none; }
.wm-mat-text { flex: 1; min-width: 0; display: grid; }
.wm-mat-text b { font-size: 13px; color: #ecdcc8; }
.wm-mat-text small { font-size: 11px; color: #8f7e74; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-mat-row em { font-style: normal; font-weight: 700; color: #e9d7c4; }
.wm-note { padding: 12px 14px; border-radius: 12px; border: 1px solid #332523; background: #120d0d; }
.wm-note h3 { margin: 2px 0 4px; font-family: var(--title); font-size: 16px; color: #ecdcc8; }
.wm-note p { margin: 0; font-size: 13px; color: #b9a89b; }
@media (max-width: 640px) {
 .dialog:has(.wm) { padding: 14px 12px 10px; }
 .wg-card { flex-basis: 118px; height: 76px; }
 .wm-hero { min-height: 120px; }
 .wm-hero-text h2 { font-size: 22px; }
 .wm-card { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px; }
 .wm-portrait { width: 52px; height: 52px; }
 .wm-act { grid-column: 1 / -1; }
 .wm-act .wm-go { width: 100%; }
 .wm-guardian { grid-template-columns: 1fr; }
 .wm-guardian-art { min-height: 150px; }
}
.wm-portrait img, .wm-portrait .sprite, .hg-art img, .hg-art .sprite { filter: brightness(1.35) contrast(1.05); }
@media (max-width: 640px) {
 .wm-card { position: relative; }
 .wm-card .wm-act { position: absolute; top: 9px; right: 9px; grid-column: auto; }
 .wm-card .wm-go { width: auto; min-width: 0; min-height: 32px !important; padding: 0 14px !important; font-size: 12.5px !important; }
 .wm-card .wm-title { padding-right: 72px; }
 .wm-guardian .wm-act .wm-go { width: 100%; }
}

/* Chat dock: Log filters */
.dock-filters { display: flex; gap: 6px; padding: 6px 2px 4px; }
.dock-filter { min-height: 26px !important; padding: 0 11px !important; border-radius: 999px !important; font-size: 11.5px !important; background: #140e0e !important; border: 1px solid #3a2a28 !important; color: #b9a89b !important; }
.dock-filter.active { border-color: #c2372a !important; background: #2a1110 !important; color: #fff !important; }
/* Log sits with the chat tabs, set apart by a thin divider (an auto margin left it floating mid-bar) */
.dock-tabs [data-tab="log"] { position: relative; margin-left: 13px; }
.dock-tabs [data-tab="log"]::before { content: ""; position: absolute; left: -7px; top: 25%; bottom: 25%; width: 1px; background: #3a2a28; }
.dock-drawer .dock-tabs [data-tab="log"] { margin-left: 0; }
.dock-drawer .dock-tabs [data-tab="log"]::before { left: 0; }

/* ---- Character switch: inside the game menu on phones ---- */
@media (max-width: 760px) { .nav-switch { display: none !important; } }
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 44px; }
.menu-head h2 { margin: 0; }
.menu-chars { white-space: nowrap; }

/* ---- Phone gear drawer ---- */
#gear-drawer { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.gd-handle { pointer-events: auto; position: fixed; right: 0; top: 46%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; width: 30px; padding: 10px 0 !important; min-height: 0 !important; border-radius: 10px 0 0 10px !important; border: 1px solid #7a5a3a !important; border-right: 0 !important; background: linear-gradient(90deg, #2a1d17, #170f0d) !important; box-shadow: -4px 0 14px #000a; color: #e8c99a !important; transition: right .28s cubic-bezier(.2,.8,.2,1); }
.gd-handle span { font-size: 14px; }
.gd-handle b { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--title); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.gd-backdrop { position: fixed; inset: 0; background: #000a; opacity: 0; transition: opacity .25s; }
.gd { position: fixed; top: 0; bottom: 0; right: 0; width: min(92vw, 420px); display: flex; flex-direction: column; background: linear-gradient(180deg, #1c1414, #110c0c); border-left: 1px solid #5a3a32; box-shadow: -18px 0 40px #000c; transform: translateX(104%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.gd-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid #2e2220; }
.gd-head h2 { flex: 1; margin: 0; font-family: var(--title); font-size: 20px; color: #f4e6d4; }
.gd-close { width: 34px; height: 34px; padding: 0 !important; min-height: 0 !important; border-radius: 50% !important; font-size: 18px; }
.gd-body { flex: 1; overflow-y: auto; padding: 10px 12px 90px; overscroll-behavior: contain; }
#gear-drawer.open { pointer-events: auto; }
#gear-drawer.open .gd-backdrop { opacity: 1; }
#gear-drawer.open .gd { transform: none; }
#gear-drawer.open .gd-handle { right: min(92vw, 420px); }
.gd-body .bag-heading h3 { display: none; } .gd-body .bag-heading { margin-top: -4px; }

/* Empty provision hints */
.dk-cell.is-empty .dk-art { display: flex; flex-direction: column; gap: 0; }
.dk-cell.is-empty .dk-plus { font-size: 18px; line-height: 1; }
.dk-hint { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: #9c7f5a; line-height: 1.2; }

/* Monster thumbnails: zoom the full-body sprites to fill their frames */
.hg-art img, .wm-portrait img { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain; transform: scale(1.45); transform-origin: 50% 62%; filter: brightness(1.45) contrast(1.08) saturate(1.1); }
.hg-art .hg-pack { width: 100%; height: 100%; }
.wm-portrait.wm-pack { width: 64px; height: 64px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.hg-pack > img { width: 26px !important; height: 42px !important; flex: none; margin: 0 -4px !important; transform: scale(1.3); transform-origin: 50% 70%; }
.wm-pack > img { width: 34px !important; height: 54px !important; flex: none; margin: 0 -6px !important; transform: scale(1.3); transform-origin: 50% 70%; }
@media (max-width: 640px) { .wm-portrait.wm-pack { width: 52px; height: 52px; } .wm-pack > img { width: 28px !important; height: 46px !important; } }

/* Goals: a header button with a dropdown instead of a card in the right column */
.goals-wrap{position:relative;display:inline-flex}
.goals-btn{position:relative}
.goals-btn.open{border-color:#c0393f;background:#3a1d1f}
.goals-badge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#c0393f;color:#fff;font:700 11px/18px var(--font);text-align:center;box-shadow:0 0 0 2px #140e0e}
.goals-pop{position:fixed;top:72px;right:12px;z-index:400;width:min(360px,calc(100vw - 24px));max-height:min(75vh,600px);overflow:auto;display:grid;gap:10px;padding:10px;border:1px solid #5b4442;border-radius:12px;background:linear-gradient(160deg,#241a1a,#140f0f);box-shadow:0 22px 60px #000d}
.goals-pop.enter{animation:goalsIn .16s ease-out}
.goals-pop>*{margin:0!important}
@keyframes goalsIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.goals-pop{animation:none}}
/* The dropdown sits inside the header; undo the compact header-button styling for its contents. */
.goals-pop button{width:auto;min-width:0;height:auto;min-height:0;flex-direction:row;text-transform:none;letter-spacing:normal;font-size:inherit}
.goals-pop .ng-row{width:100%!important;display:grid!important;grid-template-columns:26px 1fr!important}
.goals-pop .ng-text{text-align:left}
.hunt-header-actions .goals-pop .primary{padding:9px 14px!important;white-space:nowrap}
/* Centred portrait thumbnails replace the zoomed full-body sprites */
.hg-art img.portrait-img, .wm-portrait img.portrait-img { width: 94% !important; height: 94% !important; transform: none !important; object-fit: contain; filter: brightness(1.25) contrast(1.05) drop-shadow(0 2px 3px #000a); }
.wm-portrait.wm-pack, .hg-art .hg-pack { align-items: center; }
.hg-pack > img.portrait-img { width: 24px !important; height: 24px !important; margin: 0 -3px !important; transform: none !important; }
.wm-pack > img.portrait-img { width: 34px !important; height: 34px !important; margin: 0 -7px !important; transform: none !important; }
@media (max-width: 640px) { .wm-pack > img.portrait-img { width: 28px !important; height: 28px !important; } }
.bx-art img.portrait-img { width: 108px; height: 108px; }
/* World map: creature cards expand to show drops and fight numbers */
.wm-portrait-btn { position: relative; display: grid; place-items: center; padding: 0; min-height: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.wm-portrait-btn .wm-portrait { box-shadow: inset 0 0 0 1px #4a3330; transition: box-shadow .15s ease, transform .15s ease; }
.wm-portrait-btn:hover .wm-portrait, .wm-portrait-btn:focus-visible .wm-portrait, .wm-card.is-open .wm-portrait { box-shadow: inset 0 0 0 1px #c2372a, 0 0 12px #c2372a44; }
.wm-portrait-btn:hover .wm-portrait { transform: scale(1.04); }
.wm-more { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #c2372a; color: #fff; font-size: 11px; box-shadow: 0 2px 6px #000a; }
.wm-name { padding: 0; min-height: 0; border: 0; background: none; color: inherit; font: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.wm-title .wm-name { margin: 0; font-family: var(--title); font-size: 16px; color: #f2e2cf; }
.wm-name:hover { color: #fff; text-decoration: underline; text-decoration-color: #c2372a; text-underline-offset: 3px; }
.wi { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 8px; padding-top: 12px; border-top: 1px solid #3a2826; animation: wi-in .2s ease; }
@keyframes wi-in { from { opacity: 0; transform: translateY(-4px); } }
.wm-guardian .wi { margin-top: 14px; }
.wi-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.wi h4 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #c9a46a; }
.wi-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.wi-table th { text-align: left; padding: 4px 6px; color: #8b7b6a; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; border-bottom: 1px solid #2e2523; }
.wi-table td { padding: 5px 6px; border-bottom: 1px solid #221b19; color: #e6dccb; vertical-align: middle; }
.wi-table td small { color: #a99a85; }
.wi-ico { width: 30px; }
.wi-ico .wi-art, .wi-ico .fo-svg { width: 26px; height: 26px; display: block; }
.wi-gear { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: #1f2a1d; color: #9fd59a; }
.wi-rate { color: #f2d58a; font-weight: 700; white-space: nowrap; }
.wi-every { color: #8b7b6a; font-size: 11.5px; white-space: nowrap; }
.wi-own { color: #a99a85; text-align: right; }
.wi-rarity { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.wi-rarity small { color: #8b7b6a; margin-right: 2px; }
.wi-rar { padding: 2px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); color: var(--rc); font-size: 11.5px; }
.wi-rar b { color: #f1e2c4; font-weight: 600; }
.wi-sig { margin: 6px 0 0; color: #f0924a; font-size: 12.5px; }
.wi-note { margin: 6px 0 0; color: #8b7b6a; font-size: 11.5px; }
.wi-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.wi-stats div { padding: 6px 9px; border-radius: 8px; background: #151010; border: 1px solid #2a2120; }
.wi-stats dt { color: #8b7b6a; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.wi-stats dd { margin: 1px 0 0; color: #f1e2c4; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wi-stats dd small { color: #e0a55a; font-weight: 500; font-size: 11px; }
.wi-actions { display: flex; justify-content: flex-end; }
.wi-actions:empty { display: none; }
@media (max-width: 760px) { .wi-cols { grid-template-columns: 1fr; } .wi-every { display: none; } }

/* ---- Returning from the Graves: offline progress being replayed ---- */
.catchup { position: fixed; left: 50%; top: 14px; z-index: 60; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); display: grid; gap: 6px; padding: 10px 16px 11px; border: 1px solid #8a6a3d; border-radius: 12px; background: radial-gradient(120% 140% at 50% 0, #2a1c14f2, #120c0bf2 70%); box-shadow: 0 12px 32px #000b, inset 0 0 18px #d8b46a1f; text-align: center; pointer-events: none; animation: cu-in .35s ease-out; }
.catchup[hidden] { display: none; }
.catchup > b { color: #f1d9a6; font: 600 15px/1.2 Georgia, serif; letter-spacing: .04em; }
.cu-bar { position: relative; display: block; height: 7px; border-radius: 4px; overflow: hidden; background: #0b0707; border: 1px solid #000; box-shadow: 0 0 0 1px #7a573f70; }
.cu-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8f5a2a, #f1cf86); box-shadow: 0 0 10px #f1cf8666; transition: width .6s ease-out; }
.cu-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #fff6 50%, transparent); background-size: 60px 100%; animation: cu-sheen 1.4s linear infinite; }
.cu-text { color: #cdbda8; font-size: 12px; }
.catchup.done { border-color: #5f8a5a; }
.catchup.done .cu-fill { background: linear-gradient(90deg, #3f7a4a, #9fe0a0); }
@keyframes cu-in { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes cu-sheen { from { background-position: -60px 0; } to { background-position: 420px 0; } }
@media (max-width: 620px) { .catchup { top: 8px; padding: 8px 12px 9px; } .catchup > b { font-size: 13.5px; } .cu-text { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .catchup, .cu-fill::after { animation: none; } }
.wm-bounty { margin: 2px 0 0; font-size: 12px; color: #e3c47a; }
.wm-use { margin: 2px 0 0; font-size: 11.5px; color: #a8b27e; }
.wm-edge { margin: 2px 0 0; font-size: 11.5px; color: #9fc7e0; }
@media (pointer: coarse), (max-width: 760px) { .hg-all, .dk-edit { min-height: 44px !important; height: auto !important; } }
