/* Combat right rail: compact hunt overview on top, inventory filling the rest.
   Loaded after sidebar.css. */

.hunt-sidebar {
  grid-template-rows: auto minmax(0, 1fr);
}

/* ---- Overview card ---- */
.hunt-overview { padding: 12px 13px 10px; }
.hunt-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.hunt-overview-head h2 { color: #e7ddd1; font: 500 20px/1.1 Georgia, serif; margin: 0; }
.hunt-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid #4d3a38;
  border-radius: 20px;
  color: var(--hunt-muted, #b0a48c);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
}
.hunt-state i { width: 7px; height: 7px; border-radius: 50%; background: #7d6462; }
.hunt-state.live { color: #b6d49b; border-color: #4f6a3c; }
.hunt-state.live i { background: #8fd06a; box-shadow: 0 0 7px #8fd06a; }

.hunt-tally {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}
.hunt-tally > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #423333;
  border-radius: 7px;
  background: #1c1515;
}
.hunt-tally dt { color: var(--hunt-muted, #b0a48c); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; }
.hunt-tally dd {
  margin: 2px 0 0;
  color: #e7dcd0;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hunt-tally small { display: block; color: #8f7270; font-size: 11px; font-variant-numeric: tabular-nums; }

.hunt-overview-xp { margin-top: 12px; }
.hunt-overview-xp .hunt-xp-row { margin-bottom: 8px; }
.hunt-overview-xp .hunt-xp-row > span { margin-top: 2px; }

.hunt-overview-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}
.hunt-overview-actions button {
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid #4d3a38;
  border-radius: 6px;
  background: #1f1818;
  color: #d1bda6;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.hunt-overview-actions button:hover { border-color: #dbcbb8; color: #e7dccf; }
.hunt-overview-actions .hunt-unspent { border-color: #a7272f; color: #e9dfd3; background: linear-gradient(#4a1418, #2a1012); }
.hunt-overview-actions .hunt-unspent b { color: #efe8df; }

/* ---- Inventory card ---- */
.hunt-bag {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 12px 11px 10px;
}
.hunt-bag > * { flex-shrink: 0; }
.hunt-bag .bag-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }

/* Rail wide enough for a usable item grid */
@media (min-width: 961px) {
  .hunt-layout { grid-template-columns: minmax(0, 1fr) clamp(290px, 24vw, 380px); }
  /* The rail now holds the bag, so the footer shortcut is redundant */
  .hunt-footer .hunt-footer-inventory,
  .hunt-header-actions [data-view="inventory"] { display: none; }
}

/* Narrow screens: overview only, full width (inventory lives on the Gear tab) */
@media (max-width: 960px) {
  .hunt-sidebar { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .hunt-bag { display: none; }
}

/* ---- Compact inventory inside the combat rail ---- */
.hunt-bag .bag-heading { min-height: 0; margin-bottom: 8px; align-items: center; }
.hunt-bag .bag-heading h3 { font-family: var(--title); font-size: 15px; letter-spacing: 2px; }
.hunt-bag .inventory-wallet { display: flex; gap: 10px; font-size: 11px; }
.hunt-bag :is(.tabs, .inventory-bags, .bag-tools, .inventory-menu, .inventory-selection) { gap: 4px; margin: 0 0 6px; }
.hunt-bag :is(.tabs, .inventory-bags, .bag-tools, .inventory-menu, .inventory-selection, .inventory-filters) button {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.15;
}
.hunt-bag .inventory-bags button small { display: inline; margin-left: 4px; font-size: 11px; opacity: .75; }
.hunt-bag .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.hunt-bag .bag-actions { gap: 6px; margin-top: 8px; }
.hunt-bag .bag-actions button { min-height: 28px; font-size: 11px; }
.hunt-bag .bag-actions [data-action="settings"] { display: none; }
@media (min-width: 1700px) {
  .hunt-bag .item-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Dread: push-your-luck panel on the hunt card. */
.dread { margin: 0 0 10px; padding: 9px 10px 10px; border: 1px solid #423333; border-radius: 8px; background: linear-gradient(180deg, #1d1516, #171112); }
.dread.is-live { border-color: #6d2a2e; background: linear-gradient(180deg, #2a1416, #180f10); }
.dread.is-deep { border-color: #a7272f; box-shadow: inset 0 0 22px rgba(167, 39, 47, .28); }
.dread-head { display: flex; align-items: center; gap: 8px; }
.dread-title { color: #b0a48c; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; }
.dread-title b { margin-left: 3px; color: #efe1d2; font-size: 17px; letter-spacing: 0; font-variant-numeric: tabular-nums; vertical-align: -1px; }
.dread.is-live .dread-title b { color: #ff8a80; text-shadow: 0 0 10px rgba(226, 60, 60, .55); }
.dread-pips { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; min-width: 0; }
.dread-pips i { height: 7px; border-radius: 2px; background: #33282a; position: relative; }
.dread-pips i.on { background: linear-gradient(#e2453f, #8f1f25); box-shadow: 0 0 6px rgba(226, 60, 60, .5); }
.dread-pips i.rest::after { content: ""; position: absolute; right: -2px; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: #d9c08a; }
.dread .dread-help { flex: none; width: 26px; height: 26px; min-height: 0; padding: 0; border: 1px solid #54403f; border-radius: 50%; background: #1c1515; color: #cdbfae; font-size: 12px; font-weight: 700; cursor: pointer; }
.dread-bar { display: block; width: 100%; height: 5px; margin: 8px 0 4px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 3px; background: #2b2122; overflow: hidden; }
.dread-bar::-webkit-progress-bar { background: #2b2122; }
.dread-bar::-webkit-progress-value { background: linear-gradient(90deg, #7d2a2d, #d9544d); }
.dread-bar::-moz-progress-bar { background: linear-gradient(90deg, #7d2a2d, #d9544d); }
.dread-next { margin: 0 0 8px; color: #a8998a; font-size: 11px; font-variant-numeric: tabular-nums; }
.dread-stakes { display: grid; gap: 3px; margin: 0 0 9px; }
.dread-stakes > div { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.dread-stakes dt { color: #a8998a; white-space: nowrap; }
.dread-stakes dd { margin: 0; color: #e7dcd0; text-align: right; font-variant-numeric: tabular-nums; }
.dread-rule { display: flex; align-items: center; gap: 6px; color: #b0a48c; font-size: 11.5px; }
.dread-rule > span { margin-right: auto; }
.dread-rule > b { min-width: 18px; color: #efe1d2; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.dread .dread-step, .dread .dread-rest { min-height: 30px; border: 1px solid #54403f; border-radius: 6px; background: #1c1515; color: #e2d6c8; font: inherit; font-weight: 700; cursor: pointer; }
.dread .dread-step { width: 30px; padding: 0; font-size: 15px; }
.dread .dread-rest { margin-left: 4px; padding: 0 10px; border-color: #8a6d3a; color: #ecd9a8; background: linear-gradient(#3a2c17, #241b0f); font-size: 11.5px; }
.dread button:disabled { opacity: .4; cursor: default; }
.dread button:not(:disabled):hover { border-color: #dbcbb8; }
.dread-table-wrap { overflow-x: auto; margin: 10px 0; }
.dread-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.dread-table th, .dread-table td { padding: 5px 8px; border-bottom: 1px solid #332829; text-align: left; white-space: nowrap; }
.dread-table thead th { color: #a8998a; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; }
.dread-table tr.now { background: rgba(167, 39, 47, .22); }
.dread-record { color: #a8998a; font-size: 12px; }
@media (pointer: coarse) { .dread .dread-step, .dread .dread-rest { min-height: 38px; } .dread .dread-step { width: 38px; } .dread .dread-help { width: 32px; height: 32px; } }
.dread.in-dialog { margin: 12px 0; }
.dread.in-dialog .dread-help { display: none; }
.dread-table-note { margin: 12px 0 0; color: #a8998a; font-size: 12px; }
.dread-table th, .dread-table td { padding: 5px 6px; }
.dread-chip { display: none; }
@media (max-width: 960px) {
  .hunt-stage .dread-chip { position: absolute; left: 8px; bottom: 8px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid #54403f; border-radius: 17px; background: rgba(20, 14, 15, .88); color: #b0a48c; font: inherit; font-size: 11px; letter-spacing: .6px; cursor: pointer; }
  .dread-chip span { text-transform: uppercase; }
  .dread-chip b { color: #efe1d2; font-size: 15px; font-variant-numeric: tabular-nums; }
  .dread-chip i { font-style: normal; font-variant-numeric: tabular-nums; }
  .dread-chip em { font-style: normal; color: #ecd9a8; font-variant-numeric: tabular-nums; }
  .dread-chip.is-live { border-color: #a7272f; }
  .dread-chip.is-live b { color: #ff8a80; }
}

/* Defeat countdown over the arena; targets below stay selectable. */
.hunt-death { position: absolute; left: 50%; top: 56%; z-index: 5; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 220px; padding: 14px 20px 12px; border: 1px solid #7a2a2f; border-radius: 12px; background: radial-gradient(120% 100% at 50% 0, #4a1418 0, #170e0fe6 70%); box-shadow: 0 10px 30px #000a, inset 0 0 24px #a7272f33; text-align: center; pointer-events: none; }
.hunt-death-title { color: #ff8a80; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.hunt-death-time { color: #e7dcd0; font-size: 15px; }
.hunt-death-time b { color: #fff3e6; font-size: 30px; font-variant-numeric: tabular-nums; margin: 0 2px; }
.hunt-death-bar { display: block; width: 100%; height: 5px; border-radius: 3px; background: #2b2122; overflow: hidden; }
.hunt-death-fill { display: block; height: 100%; width: calc(var(--hot-cd, 1) * 100%); background: linear-gradient(90deg, #7d2a2d, #e5dacd); }
.hunt-death small { color: #b9a998; font-size: 11.5px; }
@media (max-width: 560px) { .hunt-death { min-width: 190px; padding: 10px 14px; } .hunt-death-time b { font-size: 24px; } }
.hunt-next { display: block; margin-top: 2px; color: #b9a47e; font-size: 11px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* World map medallion on the battlefield (replaces the header Map button). */
.hunt-stage .hunt-map-btn{position:absolute;right:26px;bottom:14px;z-index:5;display:grid;justify-items:center;gap:0;width:84px;min-height:0;padding:4px 4px 6px;border:0;border-radius:14px;background:radial-gradient(circle at 50% 42%,rgba(40,28,22,.72),rgba(12,9,8,.0) 72%);cursor:pointer;transition:transform .18s ease,filter .18s ease}
.hunt-map-btn img{width:66px;height:66px;filter:drop-shadow(0 4px 8px rgba(0,0,0,.7)) brightness(.95);transition:transform .18s ease}
.hunt-map-btn span{margin-top:-4px;padding:1px 8px;border-radius:999px;background:rgba(14,10,9,.82);border:1px solid #5a4636;color:#e8d8bf;font-size:11px;letter-spacing:.12em;text-transform:uppercase;white-space:nowrap}
.hunt-map-btn:hover img,.hunt-map-btn:focus-visible img{transform:translateY(-2px) rotate(-3deg);filter:drop-shadow(0 6px 12px rgba(194,55,42,.45)) brightness(1.08)}
.hunt-map-btn:hover span{border-color:#c2372a;color:#fff}
@media (max-width:960px){.hunt-stage .hunt-map-btn{right:52px;bottom:8px;width:74px}.hunt-map-btn img{width:54px;height:54px}.hunt-map-btn span{font-size:11px}}
.hunt-stage{position:relative}

/* Combat stats: icon with a label in the arena's top corner, opens the Hunt overview */
.hunt-stage .hunt-stats-btn{position:absolute;right:26px;top:14px;z-index:6;display:grid;justify-items:center;gap:0;width:84px;min-height:0;padding:4px 4px 6px;border:0;border-radius:14px;background:radial-gradient(circle at 50% 42%,rgba(12,8,7,.55),transparent 72%);color:#e8d8bf;cursor:pointer}
.hunt-stats-btn img{width:60px;height:60px;filter:drop-shadow(0 4px 8px rgba(0,0,0,.7)) brightness(.95);transition:transform .18s ease}
.hunt-stats-btn span{margin-top:-4px;padding:1px 8px;border-radius:999px;background:rgba(14,10,9,.82);border:1px solid #5a4636;color:#e8d8bf;font-size:11px;letter-spacing:.1em;text-transform:uppercase;white-space:nowrap}
.hunt-stats-btn:hover img,.hunt-stats-btn:focus-visible img{transform:translateY(-2px) rotate(3deg);filter:drop-shadow(0 6px 12px rgba(194,55,42,.45)) brightness(1.1)}
.hunt-stats-dot{position:absolute;right:10px;top:6px;width:11px;height:11px;border-radius:50%;background:#c2372a;border:2px solid #140e0c}
@media (max-width:700px){.hunt-stage .hunt-stats-btn{right:24px;top:10px;width:76px}.hunt-stats-btn img{width:52px;height:52px}.hunt-stats-btn span{font-size:11px;padding:1px 6px}}
.dread-party { margin: 6px 0 2px; padding: 6px 8px; border-left: 2px solid #8a6a3a; background: rgba(138, 106, 58, .12); color: #d4c3a3; font-size: 11.5px; line-height: 1.4; }
.dread-choices { margin: 4px 0 8px; padding-left: 18px; }
.dread-choices li { margin: 4px 0; }
