:root {
  --bg: #f6f7f2;
  --ink: #19201c;
  --muted: #68746e;
  --panel: #ffffff;
  --line: #dfe5dc;
  --alliance: #2f65d8;
  --horde: #b63b33;
  --accent: #2d7c67;
  --gold: #b6842c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  background: #111714;
  color: #f8fbf5;
  padding: 24px 18px;
  min-height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #111714;
  border-radius: 8px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.1;
}

.brand p,
#viewSubtitle {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.nav-section {
  margin: 12px 0 2px;
  color: #8f9b95;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-section:first-child {
  margin-top: 0;
}

.nav-button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: #d8e0da;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.nav-button.active,
.nav-button:hover {
  background: #243129;
  color: #ffffff;
}

.hidden {
  display: none;
}

main {
  min-width: 0;
  padding: 16px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.topbar.world-topbar .controls {
  display: none;
}

h2 {
  font-size: 24px;
  line-height: 1.1;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

select,
input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.faction-buttons {
  display: flex;
  gap: 6px;
}

.faction-filter {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.faction-filter.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.faction-filter img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin: 0 auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.compact-metrics {
  padding: 14px;
}

.rank-projection {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.projection-table-wrap {
  border-top: 1px solid var(--line);
}

.projection-tabs {
  margin: 0;
  align-self: start;
}

.projection-tabs .subtab {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.arsenal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.arsenal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 0;
  padding: 0 10px 10px;
}

.arsenal-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 0;
  background: #fff;
}

.arsenal-item strong,
.arsenal-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arsenal-slot,
.arsenal-ilvl,
.arsenal-enchants {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.item-link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.player-alias-name {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.guild-active-pool-count {
  margin-left: 4px;
  color: #1f8f3a;
  font-weight: 900;
  white-space: nowrap;
}

.item-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-link-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid rgba(0, 0, 0, .55);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .32)),
    #1b130d;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 126, .24);
}

.item-link-icon.missing {
  opacity: .35;
}

.arsenal-slot {
  text-transform: uppercase;
}

.arsenal-ilvl {
  text-align: right;
}

.arsenal-enchants {
  grid-column: 2 / 4;
  margin-top: -3px;
}

.arsenal-item.quality-2 {
  border-left-color: #1f8f3a;
}

.arsenal-item.quality-3 {
  border-left-color: #2767d8;
}

.arsenal-item.quality-4 {
  border-left-color: #7d3bd6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .62);
}

.modal-overlay.hidden {
  display: none;
}

.modal-panel {
  width: min(980px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--accent);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.historical-items-list {
  display: grid;
  gap: 0;
  max-height: calc(min(760px, 100vh - 48px) - 86px);
  overflow-y: auto;
  padding: 10px;
}

.historical-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, .8fr) 120px 140px 96px;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  background: #fff;
}

.historical-item-row + .historical-item-row {
  border-top: 0;
}

.historical-item-row > span,
.historical-item-row > small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.historical-item-row.quality-2 {
  border-left-color: #1f8f3a;
}

.historical-item-row.quality-3 {
  border-left-color: #2767d8;
}

.historical-item-row.quality-4 {
  border-left-color: #7d3bd6;
}

.level-trend-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.level-trend-stage > div {
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.level-trend-stage span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.level-trend-stage strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.level-trend-bars {
  display: grid;
  grid-template-columns: repeat(51, minmax(18px, 1fr));
  align-items: end;
  gap: 5px;
  min-width: 1180px;
  overflow-x: auto;
  padding: 6px 10px 14px;
}

.level-trend-column {
  display: grid;
  grid-template-rows: 18px 150px 18px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.level-trend-column-track {
  display: flex;
  align-items: end;
  height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(0, 0, 0, .07)),
    rgba(0, 0, 0, .08);
}

.level-trend-column-fill {
  width: 100%;
  background: linear-gradient(180deg, #4fbf63, #1f6f44 62%, #113b67);
  transition: height .45s ease;
}

.level-trend-column.peak .level-trend-column-track {
  border-color: #d49a2a;
  box-shadow: inset 0 0 0 1px rgba(255, 218, 92, .45);
}

.level-trend-column.peak .level-trend-column-fill {
  background: linear-gradient(180deg, #ffe066, #38a169 54%, #17437a);
}

.level-trend-column strong {
  min-width: 0;
  font-size: 11px;
}

.level-trend-value {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.rankup-row {
  background: #f3f8ef;
}

.rankup-row:hover {
  background: #edf6e7;
}

.out-of-pool-row {
  color: var(--muted);
}

.out-of-pool-row td {
  background: #faf8f0;
}

.rank-projection h4 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-projection p {
  color: var(--muted);
  line-height: 1.45;
}

.projection-reset {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 700;
}

.projection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.projection-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.projection-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.projection-grid strong {
  display: block;
  margin-top: 4px;
  line-height: 1.2;
}

.projection-grid b {
  display: block;
}

.projection-grid small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rank-timeline-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 240px;
}

.timeline-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4ec;
  font-weight: 800;
}

.timeline-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.timeline-chip.blocked {
  background: #f5e8bf;
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.item-holder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.subtab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.subtab.active,
.subtab:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: #eef4ec;
}

.hidden {
  display: none !important;
}

.item-metrics {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.pool-metrics {
  gap: 8px;
  margin-bottom: 8px;
}

.pool-metrics .metric {
  padding: 10px 12px;
}

.pool-metrics .metric strong {
  margin-top: 4px;
  font-size: 22px;
}

.item-metrics .metric {
  padding: 10px 12px;
}

.item-metrics .metric strong {
  margin-top: 4px;
  font-size: 22px;
}

.item-history-table {
  table-layout: auto;
}

.compact-table th,
.compact-table td,
.item-history-table th,
.item-history-table td {
  padding: 7px 10px;
  font-size: 13px;
}

.compact-table .pill,
.compact-table .status-pill,
.item-history-table .pill,
.item-history-table .status-pill {
  min-height: 20px;
  padding: 0 7px;
  font-size: 12px;
}

.pool-overall-table th:first-child,
.pool-overall-table td:first-child {
  width: 44px;
}

.item-holder-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  background: #fff;
}

.item-holder-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.item-holder-card span,
.item-holder-card small {
  color: var(--muted);
  font-size: 12px;
}

.item-holder-card.quality-2,
.quality-text.quality-2 {
  border-left-color: #1f8f3a;
  color: #1f8f3a;
}

.item-holder-card.quality-3,
.quality-text.quality-3 {
  border-left-color: #2767d8;
  color: #2767d8;
}

.item-holder-card.quality-4,
.quality-text.quality-4 {
  border-left-color: #7d3bd6;
  color: #7d3bd6;
}

.out-of-pool-card {
  background: #faf8f0;
  color: var(--muted);
}

.timeline-list {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.timeline-week {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.timeline-week:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline-week h4 {
  margin: 0 0 8px;
}

.timeline-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.timeline-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  background: #fff;
}

.timeline-item strong,
.timeline-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-item.quality-2 {
  border-left-color: #1f8f3a;
}

.timeline-item.quality-3 {
  border-left-color: #2767d8;
}

.timeline-item.quality-4 {
  border-left-color: #7d3bd6;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.briefing-panel {
  margin-bottom: 14px;
}

.activity-panel {
  margin-top: 14px;
}

.job-status-badge {
  align-self: flex-start;
  max-width: 360px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 218, 92, .42);
  background: rgba(8, 6, 3, .72);
  color: #f1d28b;
  font: 12px/1.25 "Trebuchet MS", Arial, sans-serif;
  text-align: right;
  text-shadow: 1px 1px 0 #000;
  white-space: normal;
}

.job-status-badge.running {
  color: #40c7eb;
  border-color: rgba(64, 199, 235, .58);
}

.job-status-badge.idle {
  color: #ffd100;
}

.job-status-badge.failed {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, .58);
}

.activity-log {
  min-height: 160px;
  max-height: 260px;
  overflow-y: auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 218, 92, .22);
  background:
    linear-gradient(180deg, rgba(11, 8, 4, .88), rgba(4, 4, 4, .92)),
    radial-gradient(circle at 20% 0, rgba(74, 48, 12, .45), transparent 42%);
  color: #f1d28b;
  font: 14px/1.45 "Trebuchet MS", Arial, sans-serif;
  text-shadow: 1px 1px 0 #000;
}

.activity-line {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 7px;
  padding: 2px 0;
}

.activity-time {
  color: #8a8a8a;
}

.activity-channel {
  color: #f5c542;
}

.activity-message {
  min-width: 0;
  color: #e8d4a5;
}

.activity-actor {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 3px;
}

.activity-actor .player-mini-icon {
  width: 16px;
  height: 16px;
}

.activity-actor .link-button {
  color: inherit;
  text-shadow: inherit;
  vertical-align: baseline;
}

.activity-message .item-link-with-icon {
  display: inline-flex;
  vertical-align: -4px;
}

.activity-line.loot .activity-message {
  color: #b04cff;
}

.activity-line.guild .activity-message {
  color: #40c7eb;
}

.activity-line.level .activity-message {
  color: #1eff00;
}

.activity-line.system .activity-message {
  color: #ffd100;
}

.briefing-body {
  padding: 16px;
}

.briefing-lead {
  display: grid;
  gap: 10px;
  padding: 18px;
  margin-bottom: 14px;
  background: #f3f6ef;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.briefing-lead h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.briefing-lead p {
  margin: 0;
  max-width: 920px;
  color: var(--muted);
  line-height: 1.45;
}

.briefing-lead ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.briefing-lead strong {
  color: var(--ink);
}

.briefing-note {
  color: var(--muted);
  font-size: 13px;
}

.briefing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.briefing-grid article {
  min-width: 0;
}

.briefing-grid h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.briefing-list {
  display: grid;
  gap: 8px;
}

.briefing-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.briefing-item:hover {
  border-color: var(--accent);
}

.briefing-item span,
.briefing-empty {
  color: var(--muted);
  font-size: 12px;
}

.briefing-empty {
  padding: 9px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.panel {
  overflow: hidden;
}

.panel-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-subtitle {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

h3 {
  font-size: 15px;
}

.bars {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 150px) 1fr minmax(60px, auto);
  gap: 12px;
  align-items: center;
}

.bar-track {
  height: 12px;
  background: #e8ece7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 2px;
  background: var(--accent);
}

.bar-fill.alliance {
  background: var(--alliance);
}

.bar-fill.horde {
  background: var(--horde);
}

.bar-label,
.bar-value {
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
}

.rank-row {
  grid-template-columns: minmax(120px, 180px) 1fr minmax(60px, auto);
}

.rank-faction-group {
  display: grid;
  gap: 12px;
}

.rank-faction-group h4 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
}

.class-versus-row {
  display: grid;
  grid-template-columns: 44px minmax(70px, 1fr) minmax(112px, auto) minmax(70px, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.bar-track.mirror {
  display: flex;
  justify-content: flex-end;
}

.class-count {
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.class-count.alliance {
  color: var(--alliance);
  text-align: right;
}

.class-count.horde {
  color: var(--horde);
}

.bracket-balance-panel {
  align-self: start;
}

.bracket-class-balance {
  gap: 9px;
  padding: 14px;
}

.bracket-class-single-row {
  grid-template-columns: minmax(86px, 130px) 1fr minmax(42px, auto);
}

.bracket-class-row {
  grid-template-columns: 40px minmax(58px, 1fr) minmax(96px, auto) minmax(58px, 1fr) 40px;
}

.class-pair-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.class-pair-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-pair-label .alliance {
  color: var(--alliance);
}

.class-pair-label .horde {
  color: var(--horde);
}

.class-pair-separator {
  color: var(--muted);
}

.bar-label {
  color: var(--ink);
  font-weight: 700;
}

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

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8faf6;
}

.link-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.link-button {
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.link-button:hover {
  text-decoration: underline;
}

.player-name-with-icons {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.player-name-with-icons .player-link {
  margin-left: 2px;
}

.player-mini-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}

.race-mini-icon {
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .18));
}

.class-mini-icon {
  border-radius: 2px;
}

.item-link {
  font-weight: 800;
  text-decoration: none;
}

.item-link:hover {
  text-decoration: underline;
}

.classicdb-tooltip {
  position: fixed;
  z-index: 10000;
  width: max-content;
  min-width: 300px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px;
  color: #fff;
  background: rgba(10, 10, 14, .96);
  border: 1px solid #6e5a2c;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  pointer-events: none;
  font-size: 14px;
  line-height: 1.32;
  overflow-wrap: normal;
}

.classicdb-tooltip table {
  width: 100%;
  border-collapse: collapse;
  font-size: inherit;
}

.classicdb-tooltip td,
.classicdb-tooltip th {
  padding: 0;
  border: 0;
  white-space: normal;
  background: transparent;
  color: #fff;
  font: inherit;
  line-height: inherit;
  text-shadow: none;
}

.classicdb-tooltip th {
  color: #ffd36a;
  font-weight: 800;
  text-align: right;
  text-transform: none;
  letter-spacing: 0;
}

.classicdb-tooltip-icon {
  float: left;
  width: 36px;
  height: 36px;
  margin: 0 8px 8px 0;
  background-size: cover;
  border: 1px solid #7d6b40;
  border-radius: 4px;
}

.classicdb-tooltip .q0 { color: #9d9d9d; }
.classicdb-tooltip .q1 { color: #fff; }
.classicdb-tooltip .q2 { color: #1eff00; }
.classicdb-tooltip .q3 { color: #0070dd; }
.classicdb-tooltip .q4 { color: #a335ee; }
.classicdb-tooltip .q5 { color: #ff8000; }

.note {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
}

.secondary-button {
  min-height: 38px;
  padding: 0 12px;
  background: #ecf1ec;
  color: var(--ink);
  border: 1px solid var(--line);
}

.row-filter {
  width: min(260px, 38vw);
}

.inline-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.inline-filters select {
  min-width: 140px;
}

.sort-header {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
}

.sort-header.active {
  color: var(--accent);
}

.pagination-bar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

.pagination-bar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-button {
  min-width: 36px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.page-button.active {
  background: var(--ink);
  color: #fff4a6;
}

.page-gap {
  color: var(--ink);
  font-weight: 900;
  padding: 0 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.pill.alliance {
  color: #123a93;
  background: #dce7ff;
}

.pill.horde {
  color: #8b201a;
  background: #f8dfdc;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.active {
  color: #1e5d4e;
  background: #dceee8;
}

.status-pill.joined {
  color: #73510b;
  background: #f7ead0;
}

.status-pill.left {
  color: #6f2b2b;
  background: #f1dddd;
}

.status-pill.previous {
  color: #8f1d1d;
  background: #f7d6d6;
}

.muted {
  color: var(--muted);
}

@media (max-width: 980px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .metric-grid,
  .split-layout,
  .briefing-grid,
  .rank-projection,
  .item-holder-grid,
  .arsenal-list,
  .timeline-items {
    grid-template-columns: 1fr;
  }

  .historical-item-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 4px;
  }

  .level-trend-stage {
    grid-template-columns: 1fr;
  }

  .level-trend-bars {
    grid-template-columns: repeat(51, minmax(18px, 1fr));
    min-width: 1080px;
  }

  .topbar {
    display: grid;
  }

  .controls {
    justify-content: flex-start;
  }

  .panel-header,
  .inline-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .row-filter {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .class-versus-row {
    grid-template-columns: 32px minmax(42px, 1fr) minmax(74px, auto) minmax(42px, 1fr) 32px;
    gap: 6px;
  }

  .class-count,
  .class-pair-label {
    font-size: 12px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  html,
  body {
    display: block !important;
    min-height: auto;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: #111 !important;
  }

  body::before,
  body::after,
  .sidebar,
  .topbar,
  .export-actions,
  .classicdb-tooltip {
    display: none !important;
  }

  main {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.printing-player .view {
    display: none !important;
  }

  body.printing-player #playerDetail {
    display: block !important;
  }

  body.printing-player #playerDetail > .panel {
    border: 1px solid #7a5520 !important;
    box-shadow: none !important;
    background: #f5e8bf !important;
  }

  body.printing-player .panel,
  body.printing-player .metric,
  body.printing-player .arsenal-item {
    break-inside: avoid;
    box-shadow: none !important;
  }

  body.printing-player .panel-header,
  body.printing-player .metric-grid,
  body.printing-player .rank-projection,
  body.printing-player .arsenal-grid,
  body.printing-player .arsenal-list {
    padding: 6px 8px !important;
  }

  body.printing-player .arsenal-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.printing-player table {
    font-size: 10px !important;
  }

  body.printing-player th,
  body.printing-player td {
    padding: 4px 5px !important;
  }
}
