/* World Boss Tracker: cards, table, controls and Boss Watch footer.
Shared switches and Cards/Table controls remain in style.css. */

.boss-metric-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-card);
}

.engine-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 0;
  max-width: 100vw;
  overflow: hidden;
}

.engine-footer.is-hidden {
  display: none;
}

body.has-boss-footer .back-to-top {
  bottom: 88px;
}

.engine-footer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid rgba(101, 214, 206, 0.22);
  background: rgba(8, 19, 29, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.engine-title {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.boss-footer-track {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.boss-footer-track::-webkit-scrollbar {
  height: 8px;
}

.boss-footer-empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.boss-footer-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(160px, 220px);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px 8px 8px;
  border-radius: 16px;
  border: 1px solid rgba(173, 213, 255, 0.12);
  background: rgba(12, 27, 39, 0.82);
  color: var(--text);
  text-align: left;
  flex: 0 0 auto;
}

.boss-footer-track.density-compact {
  gap: 8px;
}

.boss-footer-track.density-compact .boss-footer-item {
  grid-template-columns: 44px minmax(116px, 154px);
  gap: 8px;
  padding: 6px 8px 6px 6px;
  border-radius: 14px;
}

.boss-footer-track.density-compact .boss-footer-thumb {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.boss-footer-track.density-compact .boss-footer-level {
  font-size: 0.54rem;
}

.boss-footer-track.density-compact .boss-footer-copy {
  gap: 4px;
}

.boss-footer-track.density-compact .boss-footer-head {
  gap: 8px;
}

.boss-footer-track.density-compact .boss-footer-name {
  font-size: 0.82rem;
}

.boss-footer-track.density-compact .boss-footer-countdown {
  font-size: 0.74rem;
}

.boss-footer-track.density-compact .boss-footer-meta {
  font-size: 0.72rem;
}

.boss-footer-track.density-icon {
  gap: 8px;
}

.boss-footer-track.density-icon .boss-footer-item {
  grid-template-columns: 48px;
  padding: 0;
  border-radius: 14px;
  min-width: 48px;
  width: 48px;
  height: 48px;
  overflow: hidden;
}

.boss-footer-track.density-icon .boss-footer-copy {
  display: none;
}

.boss-footer-track.density-icon .boss-footer-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 0;
}

.boss-footer-track.density-icon .boss-footer-time {
  display: block;
  inset: auto 0 0 0;
  padding: 0 3px 2px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(5, 12, 18, 0.08), rgba(5, 12, 18, 0.7));
  text-align: center;
  font-size: 0.62rem;
}

.boss-footer-track.density-icon .boss-footer-level {
  display: none;
}

.boss-footer-item:hover {
  border-color: rgba(101, 214, 206, 0.44);
  background: rgba(12, 31, 44, 0.92);
}

.boss-footer-item.is-live {
  border-color: rgba(105, 219, 124, 0.62);
  background:
  radial-gradient(circle at top right, rgba(105, 219, 124, 0.2), transparent 42%),
  linear-gradient(180deg, rgba(14, 48, 39, 0.94), rgba(8, 28, 27, 0.94));
  box-shadow:
  inset 3px 0 0 rgba(105, 219, 124, 0.8),
  0 0 18px rgba(105, 219, 124, 0.12);
}

.boss-footer-item.is-live:hover {
  border-color: rgba(137, 244, 154, 0.82);
  background:
  radial-gradient(circle at top right, rgba(105, 219, 124, 0.26), transparent 44%),
  linear-gradient(180deg, rgba(16, 56, 45, 0.96), rgba(9, 34, 31, 0.96));
}

.boss-footer-item.is-live .boss-footer-thumb {
  border-color: rgba(105, 219, 124, 0.72);
  box-shadow: 0 0 0 2px rgba(105, 219, 124, 0.14);
}

.boss-footer-item.is-live .boss-footer-cooldown {
  background: linear-gradient(180deg, rgba(7, 38, 29, 0.26), rgba(5, 24, 22, 0.12));
}

.boss-footer-item.is-live .boss-footer-countdown,
.boss-footer-item.is-live .boss-footer-meta {
  color: #8ff2a2;
}

.boss-footer-item.is-live .boss-footer-progress-fill {
  background: linear-gradient(90deg, #5edb79, #b4ffbd);
  box-shadow: 0 0 10px rgba(105, 219, 124, 0.46);
}

.boss-footer-item.is-live .boss-footer-time {
  background: rgba(25, 116, 65, 0.94);
  color: #effff2;
  letter-spacing: 0.06em;
}

.boss-footer-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(173, 213, 255, 0.14);
  background: rgba(6, 15, 23, 0.92);
}

.boss-footer-thumb img,
.boss-footer-thumb-fallback {
  width: 100%;
  height: 100%;
}

.boss-footer-thumb img {
  object-fit: cover;
  display: block;
}

.boss-footer-thumb-fallback {
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-weight: 800;
}

.boss-footer-cooldown {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 10, 16, 0.88), rgba(4, 10, 16, 0.64));
  transform-origin: top;
  transition: transform 0.35s linear;
  pointer-events: none;
}

.boss-footer-level {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0 4px 2px;
  background: linear-gradient(180deg, rgba(28, 41, 58, 0.88), rgba(11, 20, 30, 0.96));
  border-top: 1px solid rgba(173, 213, 255, 0.12);
  color: #e9f3ff;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
}

.boss-footer-time {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: none;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(5, 12, 18, 0.8);
  color: #f4fbff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
}

.boss-footer-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.boss-footer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.boss-footer-name {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boss-footer-countdown {
  flex: 0 0 auto;
  color: #dff7ff;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.boss-footer-meta {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boss-footer-progress {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(173, 213, 255, 0.1);
}

.boss-footer-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.9), rgba(101, 214, 206, 0.92));
  transition: width 0.35s linear;
}

.boss-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1.15fr);
  gap: 16px;
  margin-bottom: 18px;
}

.boss-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.boss-metric-card strong {
  display: block;
  margin: 8px 0;
  font-size: 1.7rem;
}

.boss-controls {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-card);
}

.boss-alert-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: end;
  margin: 0;
  white-space: nowrap;
}

.boss-alert-field > span {
  margin-bottom: 8px;
}

.boss-alert-select {
  width: 130px;
  min-width: 130px;
  align-self: flex-start;
}

.boss-sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: end;
  min-height: var(--control-height);
  white-space: nowrap;
}

.boss-controls select {
  min-width: 104px;
}

.boss-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  align-self: end;
  gap: 10px;
  min-width: 0;
}

.boss-actions button {
  min-height: var(--control-height);
  white-space: nowrap;
}

.world-boss-panel > .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.boss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.boss-table-shell {
  overflow: hidden;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-card);
  background: rgba(8, 19, 29, 0.72);
}

.boss-table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-color);
}

.boss-table {
  min-width: 1080px;
  table-layout: fixed;
}

.boss-table-col-boss { width: 18%; }

.boss-table-col-status { width: 12%; }

.boss-table-col-location { width: 16%; }

.boss-table-col-loot { width: 28%; }

.boss-table-col-schedule { width: 16%; }

.boss-table-col-watch { width: 10%; }

.boss-table th {
  height: var(--table-header-height);
  padding: 10px 12px;
  color: #bddcff;
  font-size: var(--table-header-font-size);
  line-height: 1;
  vertical-align: middle;
}

.boss-table td {
  padding: 7px 12px;
  font-size: var(--table-data-font-size);
  line-height: 1.2;
  vertical-align: middle;
}

.boss-table-row {
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.boss-table-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.boss-table-row-imminent {
  background: rgba(255, 179, 71, 0.045);
}

.boss-table-row-alert {
  box-shadow: inset 3px 0 0 rgba(255, 179, 71, 0.52);
}

.boss-table-row-live {
  background: rgba(105, 219, 124, 0.07);
  box-shadow: inset 3px 0 0 rgba(105, 219, 124, 0.72);
}

.boss-table-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.boss-table-portrait {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border: 1px solid rgba(173, 213, 255, 0.14);
  border-radius: 12px;
  background: rgba(6, 15, 23, 0.9);
}

.boss-table-portrait img,
.boss-table-portrait .boss-portrait-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.boss-table-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.boss-table-name strong {
  overflow: hidden;
  color: var(--text);
  font-size: var(--table-primary-font-size);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-table-name span {
  color: var(--muted);
  font-size: 0.72rem;
}

.boss-table-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
}

.boss-table-status > strong {
  color: #dff7ff;
  font-size: var(--table-value-font-size);
  white-space: nowrap;
}

.boss-table-status > span:last-child {
  color: var(--muted);
  font-size: 0.72rem;
}

.boss-table-row-live .boss-table-status > strong,
.boss-table-row-live .boss-table-status > span:last-child {
  color: #91f2a4;
}

.boss-table-row-ended .boss-table-status > strong {
  display: none;
}

.boss-table-location {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.boss-table-location-chip {
  min-width: 0;
  max-width: 100%;
}

.boss-table .boss-table-loot-grid {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
}

.boss-table-loot-grid .boss-loot-item {
  width: 38px;
  min-width: 38px;
  padding: 4px 3px;
  gap: 3px;
  border-radius: 9px;
}

.boss-table-loot-grid .boss-loot-image,
.boss-table-loot-grid .boss-loot-item img {
  width: 24px;
  height: 24px;
}

.boss-table-loot-grid .boss-loot-chance {
  font-size: 0.66rem;
}

.boss-table .boss-table-schedule {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  white-space: nowrap;
}

.boss-table-schedule-arrow {
  color: var(--muted);
}

.boss-table .boss-subscribe-btn {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 0.72rem;
}

.boss-table-location .boss-location-characters {
  flex-wrap: nowrap;
  gap: 0;
}

.boss-table-location .boss-location-character + .boss-location-character {
  margin-left: -5px;
}

.boss-table-empty {
  color: var(--muted);
}

@media (min-width: 761px) and (max-width: 1250px) {
  .boss-table .boss-table-schedule {
    display: grid;
    gap: 2px;
  }

  .boss-table-schedule-arrow {
    display: none;
  }
}

.boss-card,
.boss-empty-state {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  --boss-imminent-alpha: 0.12;
  --boss-imminent-glow: 0.16;
  --boss-imminent-border: 0.18;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(13, 29, 43, 0.96), rgba(8, 19, 29, 0.96));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.boss-empty-state {
  padding: 26px;
  color: var(--muted);
}

.boss-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(101, 214, 206, 0.09), transparent 28%);
  pointer-events: none;
}

.boss-card-imminent {
  border-color: rgba(255, 179, 71, var(--boss-imminent-border));
  box-shadow:
  0 0 0 1px rgba(255, 179, 71, calc(var(--boss-imminent-border) * 0.5)),
  0 18px 48px rgba(0, 0, 0, 0.24);
}

.boss-card-imminent::before {
  background:
  radial-gradient(circle at top right, rgba(255, 179, 71, var(--boss-imminent-alpha)), transparent 34%),
  linear-gradient(135deg, rgba(255, 179, 71, calc(var(--boss-imminent-alpha) * 0.55)), transparent 48%),
  linear-gradient(180deg, rgba(255, 179, 71, calc(var(--boss-imminent-alpha) * 0.22)), transparent 42%);
}

.boss-card-alert {
  border-color: rgba(255, 179, 71, 0.32);
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.12), 0 18px 48px rgba(0, 0, 0, 0.24);
}

.boss-card-live {
  border-color: rgba(105, 219, 124, 0.68);
  background: linear-gradient(180deg, rgba(13, 47, 38, 0.97), rgba(7, 27, 26, 0.97));
  box-shadow:
  0 0 0 1px rgba(105, 219, 124, 0.14),
  0 18px 48px rgba(0, 0, 0, 0.26),
  0 0 30px rgba(105, 219, 124, 0.1);
}

.boss-card-live::before {
  background:
  radial-gradient(circle at top right, rgba(105, 219, 124, 0.25), transparent 38%),
  linear-gradient(135deg, rgba(105, 219, 124, 0.09), transparent 52%);
}

.boss-card-live .boss-countdown-value,
.boss-card-live .boss-countdown-label {
  color: #91f2a4;
}

.boss-card-body {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 18px;
  min-height: 100%;
}

.boss-card-top {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 104px;
  gap: 12px;
  align-items: start;
  min-height: 96px;
}

.boss-portrait-shell {
  position: relative;
  width: 86px;
  height: 86px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(173, 213, 255, 0.12);
  background: rgba(6, 15, 23, 0.84);
}

.boss-portrait {
  width: 86px;
  height: 86px;
  border-radius: 0;
  border: 0;
  background: transparent;
  object-fit: cover;
}

.boss-portrait-fallback {
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-weight: 800;
  font-size: 1.4rem;
}

.boss-level-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 5px 6px 6px;
  border-radius: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border: 0;
  border-top: 1px solid rgba(173, 213, 255, 0.12);
  background: linear-gradient(180deg, rgba(25, 37, 52, 0.9), rgba(13, 22, 32, 0.96));
  backdrop-filter: blur(4px);
}

.boss-meta {
  display: grid;
  grid-template-rows: minmax(56px, auto) minmax(28px, auto) 1fr;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.boss-name-row {
  display: flex;
  align-items: flex-start;
  min-height: 56px;
  margin-bottom: 0;
}

.boss-name {
  margin-bottom: 0;
  line-height: 1.1;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.boss-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.boss-level-badge,
.boss-status-badge,
.boss-location-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.boss-level-badge {
  border: 1px solid rgba(173, 213, 255, 0.14);
  background: rgba(173, 213, 255, 0.06);
  color: #d7eaff;
}

.boss-status-badge {
  border: 1px solid rgba(173, 213, 255, 0.14);
  background: rgba(173, 213, 255, 0.05);
  color: var(--muted);
}

.boss-status-badge[hidden] {
  display: none;
}

.boss-status-badge.upcoming {
  border-color: rgba(255, 179, 71, 0.25);
  color: #ffe2b5;
  background: rgba(255, 179, 71, 0.08);
}

.boss-status-badge.live {
  border-color: rgba(105, 219, 124, 0.24);
  color: var(--positive);
  background: rgba(105, 219, 124, 0.08);
}

.boss-status-badge.ended {
  color: var(--negative);
  border-color: rgba(255, 143, 143, 0.2);
  background: rgba(255, 143, 143, 0.08);
}

.boss-location-chip {
  max-width: 100%;
  border: 1px solid rgba(101, 214, 206, 0.2);
  background: rgba(101, 214, 206, 0.06);
  color: var(--accent-2);
}

.boss-location-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-location-chip img {
  width: 16px;
  height: 16px;
  border-radius: 5px;
}

.boss-countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 104px;
  min-height: 86px;
  text-align: right;
}

.boss-countdown-value {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.boss-countdown-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.boss-card-actions {
  display: grid;
  grid-template-columns: minmax(128px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.boss-subscribe-btn {
  min-width: 128px;
}

.boss-subscribe-btn.is-subscribed {
  border-color: rgba(255, 179, 71, 0.4);
  background: rgba(255, 179, 71, 0.12);
  color: #ffe2b5;
}

.boss-timer-meta {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
}

.boss-loot {
  margin-top: 18px;
  flex: 1 1 auto;
}

.boss-loot h4 {
  margin-bottom: 10px;
  font-size: 0.94rem;
}

.boss-loot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 8px;
}

.boss-loot-item {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 13px;
  border: 1px solid rgba(173, 213, 255, 0.08);
  background: rgba(6, 15, 23, 0.68);
}

.boss-loot-item-epic {
  border-color: var(--quality-epic-border);
  background: var(--quality-epic-background);
  box-shadow: inset 0 0 0 1px var(--quality-epic-border);
}

.boss-loot-item-legendary {
  border-color: var(--quality-legendary-border);
  background: var(--quality-legendary-background);
  box-shadow: inset 0 0 0 1px var(--quality-legendary-border);
}

.boss-loot-item-premium {
  border-color: var(--quality-premium-border);
  background: var(--quality-premium-background);
  box-shadow: inset 0 0 0 1px var(--quality-premium-border);
}

.boss-loot-item-refined {
  border-color: var(--quality-refined-border);
  background: var(--quality-refined-background);
  box-shadow: inset 0 0 0 1px var(--quality-refined-border);
}

.boss-loot-item-mythic {
  border-color: var(--quality-mythic-border);
  background: var(--quality-mythic-background);
  box-shadow: inset 0 0 0 1px var(--quality-mythic-border);
}

.boss-loot-item-standard {
  border-color: var(--quality-standard-border);
  background: var(--quality-standard-background);
  box-shadow: inset 0 0 0 1px var(--quality-standard-border);
}

.boss-loot-item-unique {
  border-color: var(--quality-unique-border);
  background: var(--quality-unique-background);
  box-shadow: inset 0 0 0 1px var(--quality-unique-border);
}

.boss-loot-item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.boss-loot-image {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
}

.boss-loot-chance {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.boss-location-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: auto -18px -18px;
  padding: 9px 18px 10px;
  border-top: 1px solid rgba(173, 213, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 30, 41, 0.88), rgba(10, 20, 29, 0.96));
}

.boss-location-chip-footer {
  display: flex;
  justify-content: center;
  margin: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #bfeee9;
  font-size: 0.9rem;
  text-align: center;
}

.boss-location-characters {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.boss-location-character,
.boss-location-character img,
.boss-location-character-fallback {
  width: 24px;
  height: 24px;
  border-radius: 999px;
}

.boss-location-character {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border: 1px solid rgba(173, 213, 255, 0.14);
  background: rgba(6, 15, 23, 0.78);
}

.boss-location-character-clip {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
}

.boss-location-character img {
  object-fit: cover;
}

.boss-location-character-fallback {
  display: grid;
  place-items: center;
  color: #d7eaff;
  font-size: 0.7rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .boss-toolbar,
  .boss-metrics {
    grid-template-columns: 1fr;
  }

  .boss-controls {
    grid-template-columns: 1fr;
  }

  .boss-card-top {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .boss-portrait-shell {
    width: 72px;
    height: 72px;
  }

  .boss-portrait {
    width: 72px;
    height: 72px;
  }

  .boss-countdown {
    grid-column: 1 / -1;
    align-items: flex-start;
    width: auto;
    min-height: 0;
    text-align: left;
  }

  .boss-card-actions {
    grid-template-columns: 1fr;
  }

  .boss-timer-meta {
    text-align: left;
  }

  .engine-footer {
    bottom: 0;
    padding: 0;
  }

  .engine-footer-inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }

  .boss-footer-item {
    grid-template-columns: 48px;
    padding: 0;
    border-radius: 14px;
    min-width: 48px;
    width: 48px;
    height: 48px;
    overflow: hidden;
  }

  .boss-footer-copy {
    display: none;
  }

  .boss-footer-thumb {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 0;
  }

  .boss-footer-time {
    display: block;
    inset: auto 0 0 0;
    padding: 0 3px 2px;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(5, 12, 18, 0.08), rgba(5, 12, 18, 0.7));
    text-align: center;
    font-size: 0.62rem;
  }

  .boss-footer-level {
    display: none;
  }
}

@media (max-width: 760px) {
  .world-boss-panel > .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .world-boss-panel > .panel-header {
    gap: 9px;
    margin-bottom: 12px;
  }

  .world-boss-panel > .panel-header h2 {
    margin: 0;
    font-size: 1.35rem;
  }

  .boss-toolbar {
    gap: 10px;
    margin-bottom: 12px;
  }

  .boss-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .boss-metric-card {
    min-width: 0;
    padding: 9px 8px;
    border-radius: 13px;
  }

  .boss-metric-card .metric-label,
  .boss-metric-card .metric-note {
    display: block;
    overflow: hidden;
    font-size: 0.64rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .boss-metric-card strong {
    margin: 4px 0;
    font-size: 1.28rem;
    line-height: 1.1;
  }

  .boss-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 9px 8px;
    padding: 11px;
    border-radius: 14px;
  }

  .boss-alert-field {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: 12px;
  }

  .boss-alert-field > span {
    margin: 0;
    font-size: 0.74rem;
  }

  .boss-alert-select {
    width: 130px;
    min-width: 130px;
  }

  .boss-alert-field .multi-filter-toggle {
    min-height: 36px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .boss-controls .boss-sound-toggle {
    justify-content: flex-start;
    min-width: 0;
    min-height: 34px;
    gap: 7px;
    font-size: 0.72rem;
  }

  .boss-controls .boss-switch-track {
    width: 40px;
    height: 22px;
    flex-basis: 40px;
  }

  .boss-controls .boss-switch-thumb {
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
  }

  .boss-controls .boss-switch input:checked + .boss-switch-track .boss-switch-thumb {
    transform: translateX(18px);
  }

  .boss-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .boss-actions button {
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.7rem;
  }

  .boss-table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .boss-table-scroll {
    overflow: visible;
  }

  .boss-table,
  .boss-table thead,
  .boss-table tbody,
  .boss-table tr,
  .boss-table td {
    display: block;
    width: 100%;
  }

  .boss-table {
    min-width: 0;
  }

  .boss-table thead {
    display: none;
  }

  .boss-table tbody {
    display: grid;
    gap: 12px;
  }

  .boss-table-row {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line-subtle);
    border-radius: 16px;
    background: rgba(13, 29, 43, 0.92);
  }

  .boss-table-row-live {
    border-color: rgba(105, 219, 124, 0.58);
    background: rgba(14, 48, 39, 0.9);
  }

  .boss-table-row-imminent {
    border-color: rgba(255, 179, 71, 0.34);
  }

  .boss-table td {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-bottom: 1px solid rgba(173, 213, 255, 0.08);
  }

  .boss-table td:last-child {
    border-bottom: 0;
  }

  .boss-table td::before {
    content: attr(data-label);
    color: #8ebce8;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .boss-table-loot-grid {
    flex-wrap: wrap;
  }

  .boss-table .boss-subscribe-btn {
    width: max-content;
    min-width: 118px;
  }

  .engine-title {
    display: none;
  }

  .engine-footer-inner {
    padding: 10px 14px;
  }

  .boss-footer-track {
    gap: 8px;
  }
}

@media (max-width: 760px) {
  body.has-boss-footer { padding-bottom: calc(142px + env(safe-area-inset-bottom)); }

  .engine-footer {
    bottom: calc(68px + env(safe-area-inset-bottom));
    z-index: 44;
  }

  body.has-boss-footer .back-to-top {
    bottom: calc(146px + env(safe-area-inset-bottom));
  }

  .engine-footer-inner {
    min-height: 60px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(173, 213, 255, 0.1);
  }

  body.has-boss-footer .global-toast-stack {
    bottom: calc(146px + env(safe-area-inset-bottom));
  }

  .world-boss-panel {
    min-width: 0;
    max-width: 100%;
  }

  .boss-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .boss-grid,
  .boss-card,
  .boss-card-body,
  .boss-card-top,
  .boss-controls,
  .boss-metrics,
  .boss-table-shell,
  .boss-table-row,
  .boss-table td {
    min-width: 0;
    max-width: 100%;
  }

  .boss-table td {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .boss-table td > * {
    min-width: 0;
    max-width: 100%;
  }
}
