/* Run — HUD R2 (topbar DOM), overlays shell, pausa grid 3 col, level-up split */

#run-chrome {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  font-family: var(--shell-font, 'Silkscreen', system-ui, sans-serif);
}
#run-chrome.hidden { display: none; }

.run-xp {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background: rgba(0, 0, 0, 0.5);
}
.run-xp i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4fd1ff, #a98bff);
  transition: width 0.12s linear;
}

.run-topbar {
  position: absolute;
  top: 10px;
  left: 8px;
  right: 8px;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px 10px;
  padding: 6px 12px;
  pointer-events: none;
  background: var(--shell-elev-1, rgba(21, 42, 82, 0.92));
  border: 2px solid var(--shell-border-strong, rgba(244, 248, 255, 0.22));
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.run-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-self: start;
}
.run-topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  text-align: center;
}
.run-topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  justify-self: end;
}
.run-topbar .run-name {
  font-weight: 800;
  font-size: var(--shell-fs-ui, 13px);
  color: #eaf2ff;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.run-topbar .run-lvl {
  font-weight: 700;
  font-size: var(--shell-fs-caption, 11px);
  color: #ffcb3d;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
}
.run-hp {
  position: relative;
  flex: 1 1 auto;
  width: min(168px, 28vw);
  max-width: 200px;
  min-width: 72px;
  height: 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.run-hp i {
  display: block;
  height: 100%;
  width: 0%;
  background: #ff5f6d;
  transition: width 0.1s linear;
}
.run-hp span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.run-topbar .run-clock {
  font-weight: 800;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1;
  white-space: nowrap;
}
.run-topbar .run-meta {
  font-size: 10px;
  font-weight: 600;
  color: #8fa3c4;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.run-topbar-center .run-hyper {
  flex: none;
  white-space: nowrap;
}
.run-topbar .run-wx {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
}
.run-topbar .run-wx.hidden { display: none; }
.run-topbar .run-hyper {
  font-size: 10px;
  font-weight: 800;
  color: #ffd23f;
}

.run-boss {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 32px));
  pointer-events: none;
}
.run-boss.hidden { display: none; }
.run-boss .run-boss-bar {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.run-boss-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #f2e6ff;
  opacity: 0.9;
  pointer-events: none;
}
.run-boss .run-boss-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: #ffcb3d;
}
.run-boss .run-boss-name {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  line-height: 12px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  color: #20160a;
}

body.touch #run-chrome .run-topbar {
  right: 52px;
}

.scr.run-dim.dim {
  background: radial-gradient(circle at 50% 40%, rgba(10, 20, 50, 0.72), rgba(3, 6, 16, 0.94));
}

.run-overlay-panel {
  width: min(960px, calc(100vw - 24px));
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--shell-elev-1, #152a52);
  border: 2px solid var(--shell-border-strong, rgba(244, 248, 255, 0.22));
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* Level up — desktop: lista full-width + ficha à direita */
.lvl-split {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.lvl-main { min-width: 0; }
.lvl-detail {
  min-height: 200px;
}
@media (min-width: 761px) {
  .lvl-split {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 300px);
    gap: 16px;
    align-items: center;
  }
  #scr-levelup .cards-lvl-list {
    width: 100%;
    max-width: none;
  }
  #scr-levelup .cards-lvl-list .card .ds,
  #scr-levelup .cards-lvl-list .card .buff-effects,
  #scr-levelup .cards-lvl-list .card .stat-hits {
    display: none;
  }
  .lvl-detail { display: block !important; min-height: 280px; max-height: min(62vh, 520px); }
}
@media (max-width: 760px) {
  #scr-levelup .lvl-detail { display: none !important; }
}

#scr-levelup .cards-lvl-list .card {
  width: 100%;
  max-width: none;
}

.cards-lvl-list .card.lvl-pick {
  border-color: var(--gold);
  background: rgba(255, 210, 63, 0.1);
}

/* Pausa — 3 colunas por grupo */
.pause-group .pause-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pause-group .pause-mv {
  min-width: 0;
  width: 100%;
  flex: unset;
}
.pause-group .pause-slot.empty {
  grid-column: 1 / -1;
  min-width: 0;
}

#scr-ally-preview.run-dim .ally-preview-box {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  width: min(960px, calc(100vw - 16px));
}
