:root {
  /* Color */
  --bg-void: #000000;
  --panel: #0c0c0e;
  --panel-raised: #161619;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --gold: #e8a847;
  --gold-bright: #ffc874;
  --text-primary: #f3f3f2;
  --text-muted: #8a8a92;
  --danger: #ff6b6b;
  --ok: #3ddc84;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}

body {
  background-image:
    radial-gradient(ellipse 1100px 520px at 50% -12%, rgba(232, 168, 71, 0.07), transparent 70%),
    radial-gradient(ellipse 700px 400px at 100% 0%, rgba(120, 130, 255, 0.05), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.brand__emblem {
  color: var(--gold);
  flex-shrink: 0;
  display: flex;
}

.brand__text h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text-primary);
}

.brand__meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 7px 14px 7px 12px;
  background: var(--panel);
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* ---------- Affixes banner ---------- */

.affixes-banner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-soft);
}

.affixes-banner__label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.affixes-banner__list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.affix-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
}

.affix-chip__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--panel-raised);
  flex-shrink: 0;
}

/* ---------- Page / Toolbar ---------- */

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

#search {
  flex: 1 1 220px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 150ms ease, background-color 150ms ease;
}

#search::placeholder { color: var(--text-muted); }
#search:focus { border-color: var(--border-strong); background: var(--panel-raised); }

.pillgroup {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px;
}

.pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.pill:hover { color: var(--text-primary); }

.pill.is-active {
  background: var(--text-primary);
  color: #000;
}

.sortgroup { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.sortgroup__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

#sort-select,
#class-select {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: 13px;
  font-family: var(--font-body);
}

.copy-link-btn {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms ease, color 150ms ease;
}

.copy-link-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ---------- Roster table ---------- */

.roster-wrap {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.roster { width: 100%; border-collapse: collapse; }

.roster thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.col-rank { width: 48px; }
.col-ilvl, .col-score { width: 130px; text-align: right; }

.roster tbody tr {
  border-bottom: 1px solid var(--border-soft);
  border-left: 3px solid var(--class-color, var(--gold));
  cursor: pointer;
  transition: background-color 150ms ease;
  animation: rowIn 280ms ease both;
}

@keyframes rowIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.roster tbody tr:last-child { border-bottom: none; }

.roster tbody tr:hover,
.roster tbody tr:focus-visible {
  background: var(--panel-raised);
}

.roster td { padding: 13px 18px; vertical-align: middle; }

.cell-rank { text-align: center; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.rank-badge--1 { background: rgba(255, 200, 116, 0.15); color: var(--gold-bright); box-shadow: 0 0 0 1px rgba(255, 200, 116, 0.25); }
.rank-badge--2 { background: rgba(255, 255, 255, 0.10); color: #d7d7da; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.rank-badge--3 { background: rgba(214, 138, 76, 0.15); color: #d6986a; box-shadow: 0 0 0 1px rgba(214, 138, 76, 0.25); }

.name-cell { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--panel-raised);
  background-size: cover;
  background-position: center top;
  border: 1.5px solid var(--class-color, var(--border-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.activity-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-void);
}

.activity-dot--recent { background: #22c55e; }
.activity-dot--this-week { background: #eab308; }
.activity-dot--quiet { background: #6b7280; }

.name-cell__text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }

.name-cell__name {
  font-weight: 600;
  color: var(--class-color, var(--text-primary));
  white-space: nowrap;
}

.name-cell__sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-cell__sub .role-icon { margin-right: 4px; opacity: 0.85; }

.cell-ilvl, .cell-score {
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: right;
}

.cell-ilvl { color: var(--text-muted); font-weight: 500; }

.score-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--score-color);
  background: color-mix(in srgb, var(--score-color) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--score-color) 32%, transparent);
}

.score-trend {
  display: block;
  font-size: 10px;
  font-weight: 600;
  margin-top: 3px;
}

.score-trend--up { color: #22c55e; }
.score-trend--down { color: #ef4444; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 20px;
}

/* ---------- Footer ---------- */

.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px 50px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

/* ---------- Modal / Gear popout ---------- */

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255,255,255,0.02);
}

.modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--panel-raised);
  border: 1px solid var(--border-soft);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms ease, border-color 150ms ease;
}

.modal__close:hover { color: var(--text-primary); border-color: var(--border-strong); }

.modal__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  padding-right: 38px;
  border-bottom: 1px solid var(--border-soft);
}

.modal__title { min-width: 0; }

.modal__header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--class-color, var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal__sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal__ilvl {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.modal__ilvl span { display: block; font-size: 22px; font-weight: 700; color: var(--gold-bright); }
.modal__ilvl small { font-size: 10px; letter-spacing: 0.1em; color: var(--text-muted); }

/* ---- Big character-render pane + gear list, side by side ---- */

.character-viewer {
  display: flex;
  gap: 22px;
  align-items: stretch;
  height: min(560px, 65vh);
}

.character-viewer__portrait {
  width: 300px;
  flex-shrink: 0;
  height: 100%;
  position: relative;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--class-color, var(--gold)) 45%, var(--border-strong));
  background-color: var(--panel-raised);
  background-image: radial-gradient(circle at 50% 26%, color-mix(in srgb, var(--class-color, var(--gold)) 35%, transparent), transparent 65%);
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow:
    0 0 50px -14px color-mix(in srgb, var(--class-color, var(--gold)) 55%, transparent),
    inset 0 0 70px -22px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.character-viewer__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.character-viewer__stage.is-dragging { cursor: grabbing; }

.character-viewer__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  display: none;
}

.character-viewer__initials {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 72px;
  pointer-events: none;
}

.character-viewer__hint {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 300ms ease;
  display: none;
}

.character-viewer__hint.is-hidden { opacity: 0; }

.character-viewer__controls {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 4px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(4px);
}

.cv-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 120ms ease;
}

.cv-btn:hover { background: rgba(255, 255, 255, 0.14); }

.character-viewer__gear {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding-right: 6px;
}

/* ---- Character stat chips ---- */

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 68px;
  padding: 7px 12px;
  background: var(--panel-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

.stat-chip__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--gold-bright);
}

.stat-chip__label {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.paperdoll {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.paperdoll__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.paperdoll__bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.gear-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  background: var(--panel-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  transition: border-color 150ms ease;
}

.gear-slot:hover { border-color: var(--border-strong); }

.gear-slot__icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1.5px solid var(--slot-color, var(--border-soft));
  box-shadow: 0 0 10px -2px var(--slot-color, transparent);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.gear-slot__icon--empty {
  background: var(--panel);
  border-style: dashed;
}

.gear-slot__text { overflow: hidden; min-width: 0; }

.gear-slot__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--slot-color, var(--text-muted));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gear-slot__meta {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.gear-slot:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 1px;
}

.modal__links {
  display: flex;
  gap: 18px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ---- Score sparkline ---- */

.score-sparkline-section {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--panel-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

.sparkline-wrap { display: flex; align-items: center; gap: 12px; }

.sparkline-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.sparkline-svg {
  flex: 1;
  height: 44px;
  display: block;
  overflow: visible;
}

/* ---- Great Vault tracker ---- */

.great-vault {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.great-vault__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.great-vault__title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.great-vault__count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.vault-progress {
  display: flex;
  gap: 3px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.vault-seg {
  position: relative;
  background: var(--panel-raised);
  border-radius: 999px;
  overflow: hidden;
}

.vault-seg:nth-child(1) { flex: 1; }
.vault-seg:nth-child(2) { flex: 3; }
.vault-seg:nth-child(3) { flex: 4; }

.vault-seg__fill {
  height: 100%;
  background: var(--gold-bright);
  border-radius: 999px;
  transition: width 400ms ease;
}

.vault-seg--done .vault-seg__fill { background: #22c55e; }

.vault-seg__mark {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 7px;
  color: var(--text-muted);
  pointer-events: none;
}

.vault-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.vault-slot {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel-raised);
  border: 1px solid var(--border-soft);
}

.vault-slot--locked { opacity: 0.55; }

.vault-slot--open { border-color: color-mix(in srgb, #22c55e 30%, var(--border-soft)); }

.vault-slot__icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

.vault-slot__name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vault-slot__detail {
  font-size: 11px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.vault-slot__detail strong { color: var(--gold-bright); }

.modal__rio-link {
  display: inline-block;
  font-size: 12px;
  color: var(--gold-bright);
}

.modal__rio-link[hidden] { display: none; }

/* ---- Best Mythic+ runs ---- */

.best-runs {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.best-runs__title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.best-runs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.run-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100px;
  background-color: var(--panel-raised);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-decoration: none;
  transition: border-color 150ms ease;
}

.run-card:hover { border-color: var(--border-strong); }

.run-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.run-card__dungeon {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.run-card__chest {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.run-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
}

.run-card__level {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--gold-bright);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.run-card__score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--score-color);
  background: color-mix(in srgb, var(--score-color) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--score-color) 32%, transparent);
}

.run-card__time {
  font-size: 10px;
  font-family: var(--font-mono);
  margin-top: 3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ---- Item hover tooltip (real WoW-tooltip style) ---- */

.item-tooltip {
  position: fixed;
  z-index: 300;
  max-width: 280px;
  background: #0a0c10;
  border: 1px solid var(--tooltip-color, var(--border-strong));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tooltip-color, var(--border-strong)) 35%, transparent), 0 18px 40px rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  padding: 10px 12px;
  pointer-events: none;
  font-family: var(--font-body);
}

.item-tooltip[hidden] { display: none; }

.item-tooltip__name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}

.item-tooltip__line {
  font-size: 12px;
  color: #e9e7df;
  line-height: 1.4;
}

.item-tooltip__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #e9e7df;
  line-height: 1.4;
}

.item-tooltip__line--secondary {
  color: #1eff00;
}

.item-tooltip__enchant,
.item-tooltip__effect {
  font-size: 12px;
  color: #1eff00;
  line-height: 1.4;
  margin-top: 3px;
}

.item-tooltip__gem {
  font-size: 12px;
  color: #c4b5fd;
  line-height: 1.4;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .roster thead { display: none; }
  .vault-slots { grid-template-columns: 1fr; }

  .roster tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    padding: 10px 4px;
    row-gap: 2px;
  }

  .roster td { padding: 2px 16px; border: none; }
  .cell-rank { display: none; }
  .cell-name { grid-row: 1 / 3; grid-column: 1; }
  .cell-score { grid-row: 1; grid-column: 2; }
  .cell-ilvl { grid-row: 2; grid-column: 2; font-size: 12px; }

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

  .modal { padding: 10px; }
  .modal__panel { padding: 18px; max-height: 95vh; }
  .modal__header { gap: 10px; padding-right: 32px; }
  .modal__header h2 { font-size: 17px; }
  .modal__ilvl span { font-size: 18px; }

  .character-viewer { flex-direction: column; height: auto; gap: 14px; }
  .character-viewer__portrait { width: 100%; height: 240px; }
  .character-viewer__initials { font-size: 52px; }
  .character-viewer__gear { height: auto; overflow-y: visible; padding-right: 0; }
  .paperdoll { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .modal__panel { padding: 14px; }
  .gear-slot { padding: 6px 7px; gap: 8px; }
  .gear-slot__icon { width: 30px; height: 30px; }
  .paperdoll__bottom { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .paperdoll { gap: 8px; }
  .character-viewer__portrait { height: 190px; }
  .character-viewer__initials { font-size: 40px; }
  .stat-chip { min-width: 58px; padding: 6px 9px; }
}
