/**
 * FORRE_DARK - XP Hero Row
 */

.tw-xp-hero-shell {
  width: 100%;
  max-width: calc(var(--max-width) - 2px);
  margin: 0 auto;
  margin-top: 6px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 45;
}

.tw-xp-row {
  --tw-xp-level-rgb: 39,150,242;
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 74px;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  overflow: visible;
  border-left: 1px solid rgba(255,255,255,0.02);
  border-right: 1px solid rgba(255,255,255,0.02);
}

.tw-xp-cell {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 0 9px;
  background: transparent;
  border: 0;
  margin: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}

.tw-xp-cell:hover {
  background: rgba(255,255,255,0.02);
}

.tw-xp-cell:focus-visible {
  outline: 1px solid rgba(39,150,242,0.40);
  outline-offset: -1px;
}

.tw-xp-level {
  flex: 0 0 96px;
  justify-content: center;
  padding-left: 14px;
}

.tw-xp-rank {
  flex: 0 1 28%;
  border-left: 1px solid rgba(39,150,242,0.16);
  border-right: 1px solid rgba(39,150,242,0.16);
}

.tw-xp-online {
  flex: 1 1 44%;
  cursor: default;
}

.tw-xp-latest {
  flex: 0 0 220px;
  justify-content: flex-end;
  padding-right: 8px;
}

.tw-xp-divider {
  flex: 0 0 14px;
  position: relative;
}

.tw-xp-divider::before {
  content: '|';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.08);
}

.tw-xp-section-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tw-xp-top,
.tw-xp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.tw-xp-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.60);
  white-space: nowrap;
}

.tw-xp-subvalue,
.tw-xp-meta {
  font-variant-numeric: tabular-nums;
}

.tw-xp-subvalue {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
}

.tw-xp-meta {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
}

.tw-xp-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tw-xp-level-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tw-xp-ring {
  position: relative;
  width: 62px;
  height: 62px;
}

.tw-xp-ring-svg {
  width: 62px;
  height: 62px;
  transform: rotate(-90deg);
  overflow: visible;
}

.tw-xp-ring-track {
  fill: none;
  stroke: rgba(39,150,242,0.08);
  stroke-width: 4;
  stroke-dasharray: 8 4;
  transform-origin: 31px 31px;
  animation: tw-xp-ring-rotate 20s linear infinite;
}

.tw-xp-ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: butt;
  filter: drop-shadow(0 0 4px rgba(39,150,242,0.30));
  transition: stroke-dashoffset 0.5s ease;
}

.tw-xp-ring-fill.is-close {
  animation: tw-xp-ring-pulse 2s ease-in-out infinite;
}

.tw-xp-ring-core {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tw-xp-ring-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 3px;
}

.tw-xp-ring-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.tw-xp-level-meta {
  font-size: 10px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.tw-xp-rank {
  --tw-xp-fill-color: var(--tw-xp-rank-color, var(--primary));
  --tw-xp-fill-rgb: var(--tw-xp-rank-rgb, 39,150,242);
}

.tw-xp-rank--bronze {
  --tw-xp-rank-color: #CD7F32;
  --tw-xp-rank-rgb: 205,127,50;
}

.tw-xp-rank--silver {
  --tw-xp-rank-color: #C0C0C0;
  --tw-xp-rank-rgb: 192,192,192;
}

.tw-xp-rank--gold {
  --tw-xp-rank-color: #FFD700;
  --tw-xp-rank-rgb: 255,215,0;
}

.tw-xp-rank--platinum {
  --tw-xp-rank-color: #00CCCC;
  --tw-xp-rank-rgb: 0,204,204;
}

.tw-xp-rank--diamond {
  --tw-xp-rank-color: #88DDFF;
  --tw-xp-rank-rgb: 136,221,255;
}

.tw-xp-rank--elite {
  --tw-xp-rank-color: #00D4AA;
  --tw-xp-rank-rgb: 0,212,170;
}

.tw-xp-rank--champion {
  --tw-xp-rank-color: #FF6B6B;
  --tw-xp-rank-rgb: 255,107,107;
}

.tw-xp-rank--unreal {
  --tw-xp-rank-color: #A855F7;
  --tw-xp-rank-rgb: 168,85,247;
}

.tw-xp-rank--unranked {
  --tw-xp-rank-color: var(--text-muted);
  --tw-xp-rank-rgb: 119,119,119;
}

.tw-xp-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(var(--tw-xp-fill-rgb), 0.52);
  background: rgba(var(--tw-xp-fill-rgb), 0.20);
  color: var(--tw-xp-fill-color);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(var(--tw-xp-fill-rgb), 0.34);
}

.tw-xp-rank.is-max .tw-xp-rank-badge {
  box-shadow: 0 0 18px rgba(var(--tw-xp-fill-rgb), 0.32);
}

.tw-xp-rank-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.tw-xp-bar {
  position: relative;
  height: 4px;
  overflow: visible;
}

.tw-xp-track,
.tw-xp-fill {
  position: absolute;
  inset: 0;
  height: 4px;
}

.tw-xp-track {
  background: rgba(var(--tw-xp-fill-rgb, 39,150,242), 0.12);
}

.tw-xp-fill {
  width: 0;
  background: rgba(var(--tw-xp-fill-rgb, 39,150,242), 0.30);
  transition: width 0.45s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tw-xp-fill::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  background: inherit;
  box-shadow: 0 0 5px rgba(var(--tw-xp-fill-rgb, 39,150,242), 0.55), 0 0 10px rgba(var(--tw-xp-fill-rgb, 39,150,242), 0.30);
  opacity: 0;
}

.tw-xp-fill.is-mid {
  background: rgba(var(--tw-xp-fill-rgb, 39,150,242), 0.60);
}

.tw-xp-fill.is-high {
  background: rgb(var(--tw-xp-fill-rgb, 39,150,242));
  box-shadow: 0 0 10px rgba(var(--tw-xp-fill-rgb, 39,150,242), 0.18);
}

.tw-xp-fill.has-edge::after {
  opacity: 1;
}

.tw-xp-streak {
  --tw-xp-fill-color: var(--success);
  --tw-xp-fill-rgb: 34,197,94;
}

.tw-xp-streak.is-warning {
  --tw-xp-fill-color: var(--warning);
  --tw-xp-fill-rgb: 245,158,11;
}

.tw-xp-streak.is-muted {
  --tw-xp-fill-color: var(--text-muted);
  --tw-xp-fill-rgb: 119,119,119;
}

.tw-xp-streak-hero {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tw-xp-flame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--tw-xp-fill-color);
}

.tw-xp-streak.is-active .tw-xp-flame {
  text-shadow: 0 0 6px rgba(34,197,94,0.40);
}

.tw-xp-streak.is-warning .tw-xp-flame {
  animation: tw-xp-warning-pulse 1.8s ease-in-out infinite;
}

.tw-xp-streak-value,
.tw-xp-ach-counter {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1;
}

.tw-xp-ach-counter > span {
  display: inline-block;
  white-space: nowrap;
}

.tw-xp-ach-trophy {
  color: #FFD700;
  font-size: 0.82em;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255,215,0,0.35);
}

.tw-xp-zero-state {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.tw-xp-online:hover {
  background: transparent;
}

.tw-xp-online-inner {
  gap: 5px;
}

.tw-xp-online .tw-xp-title {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #f8fbff;
  text-shadow: 0 0 8px rgba(39,150,242,0.32);
}

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

.tw-xp-online-col-head {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f5f9ff;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.1;
  text-shadow: 0 0 8px rgba(39,150,242,0.24);
}

.tw-xp-online-col--compact {
  position: relative;
  isolation: isolate;
}

.tw-xp-online-col--compact.has-live {
  cursor: pointer;
}

.tw-xp-online-col--compact.is-empty {
  cursor: default;
}

.tw-xp-online-preview {
  min-height: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tw-xp-online-preview-name {
  font-size: 10px;
  font-weight: 800;
  color: #f8fbff;
  text-decoration: none;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tw-xp-online-preview-name:hover {
  color: var(--primary);
}

.tw-xp-online-preview-more {
  font-size: 9px;
  color: var(--text-tertiary);
}

.tw-xp-online-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  bottom: auto;
  width: min(440px, calc(100vw - 28px));
  z-index: 80;
  padding: 7px;
  margin-top: 0;
  border: 1px solid rgba(39,150,242,0.42);
  background: linear-gradient(180deg, rgba(14,14,14,0.98) 0%, rgba(18,18,18,0.98) 100%);
  box-shadow: 0 16px 30px rgba(0,0,0,0.52), 0 0 18px rgba(39,150,242,0.14);
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
  max-height: 150px;
  overflow-y: auto;
}

.tw-xp-online-col--compact.has-live:hover .tw-xp-online-popover,
.tw-xp-online-col--compact.has-live:focus-within .tw-xp-online-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.tw-xp-side-ctas {
  flex: 0 0 148px;
  justify-content: center;
  padding: 0 10px 0 6px;
  border-left: 1px solid rgba(39,150,242,0.24);
  overflow: hidden;
  box-sizing: border-box;
}

.tw-xp-side-ctas-wrap {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
}

.tw-xp-side-ctas .tw-fort-status-cta {
  width: 100%;
  max-width: 132px;
  height: 28px;
  padding: 0 8px;
  border-radius: 0;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 10px rgba(34,197,94,0.14);
  transform: none;
}

.tw-xp-side-ctas .tw-fort-status-cta:hover {
  transform: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 0 12px rgba(34,197,94,0.18);
}

.tw-xp-side-ctas .tw-fort-status-pill {
  height: 16px;
  font-size: 9px;
  padding: 0 5px;
}

.tw-xp-online-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tw-xp-online-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tw-xp-online-item-detail {
  font-size: 10px;
  color: rgba(255,255,255,0.82);
  padding: 0 0 2px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-top: -2px;
}

.tw-xp-online-name {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255,255,255,0.16);
}

.tw-xp-online-name.is-link {
  text-decoration: none;
  transition: color 0.12s ease;
}

.tw-xp-online-name.is-link:hover {
  color: var(--primary);
}

.tw-xp-online-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.tw-xp-online-empty {
  font-size: 9px;
  color: rgba(255,255,255,0.74);
}

.tw-xp-online-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 14px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 800;
  color: #FFFFFF;
  background: rgba(39,150,242,0.28);
  border: 1px solid rgba(39,150,242,0.58);
  line-height: 1;
  box-shadow: 0 0 10px rgba(39,150,242,0.30);
}

.tw-xp-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  white-space: nowrap;
}

.tw-xp-online-badge.is-live {
  color: #FFFFFF;
  background: rgba(34,197,94,0.18);
  border-color: rgba(34,197,94,0.55);
  box-shadow: 0 0 10px rgba(34,197,94,0.28);
}

.tw-xp-online-now {
  color: #FFFFFF;
  text-shadow: 0 0 10px rgba(34,197,94,0.82), 0 0 18px rgba(34,197,94,0.52);
}

.tw-xp-online-badge.is-mode {
  color: #FFFFFF;
  background: rgba(39,150,242,0.16);
  border-color: rgba(39,150,242,0.45);
}

.tw-xp-online-badge.is-kills {
  color: #ff9c9c;
  background: rgba(239,68,68,0.16);
  border-color: rgba(239,68,68,0.44);
}

.tw-xp-online-badge.is-time {
  color: #FFFFFF;
  background: rgba(148,163,184,0.14);
  border-color: rgba(148,163,184,0.35);
}

.tw-xp-online-badge.is-site {
  color: #FFFFFF;
  background: rgba(148,163,184,0.14);
  border-color: rgba(148,163,184,0.38);
}

.tw-xp-online-pulse {
  width: 6px;
  height: 6px;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52,211,153,0.70);
  animation: tw-online-pulse 1.6s ease-out infinite;
}

.tw-xp-latest-inner {
  align-items: stretch;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.tw-xp-latest .tw-xp-top,
.tw-xp-latest .tw-xp-meta {
  justify-content: space-between;
  align-items: baseline;
}

.tw-xp-latest-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.tw-xp-latest-head i {
  color: var(--primary);
  font-size: 11px;
}

.tw-xp-latest-mode {
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(39,150,242,0.24);
}

.tw-xp-latest-stats {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.86);
}

.tw-xp-latest-stats strong {
  font-size: 14px;
  color: #ffffff;
  text-shadow: 0 0 7px rgba(255,255,255,0.14);
}

.tw-xp-latest-stats .is-kills strong {
  color: #ff6b6b;
}

.tw-xp-latest {
  border-left: 1px solid rgba(39,150,242,0.24);
  background: transparent;
}

.tw-xp-latest.is-empty .tw-xp-latest-inner {
  border-color: rgba(148,163,184,0.24);
  background: rgba(148,163,184,0.06);
}

.tw-xp-latest.is-empty .tw-xp-latest-head {
  color: #e2e8f0;
}

.tw-xp-latest.is-empty .tw-xp-latest-stats strong {
  color: #f8fafc;
}

.tw-xp-latest.is-empty .tw-xp-meta {
  color: rgba(255,255,255,0.80);
}

.tw-xp-ach-inner {
  align-items: flex-end;
}

.tw-xp-ach .tw-xp-top,
.tw-xp-ach .tw-xp-meta {
  justify-content: flex-end;
}

.tw-xp-ach.is-empty .tw-xp-ach-counter {
  color: var(--text-muted);
}

.tw-xp-ach-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tw-xp-ach-dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.08);
}

.tw-xp-ach-dot.is-filled {
  background: var(--primary);
  box-shadow: 0 0 8px rgba(39,150,242,0.20);
}

.tw-xp-ach-meta {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.tw-xp-ach-meta.is-new {
  color: var(--primary);
}

.tw-ach-slide-panel {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-top: 1px solid rgba(51,51,51,0.20);
  transition: max-height 0.28s ease, opacity 0.18s ease;
}

.tw-ach-slide-panel.is-open {
  opacity: 1;
  max-height: 760px;
}

.tw-ach-panel-wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--surface-2);
  border-left: 1px solid rgba(255,255,255,0.02);
  border-right: 1px solid rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tw-ach-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.tw-ach-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.tw-ach-panel-subtitle {
  margin: 4px 0 0;
  font-size: 10px;
  color: var(--text-tertiary);
}

.tw-ach-panel-close {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-secondary);
  cursor: pointer;
}

.tw-ach-panel-close:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tw-ach-panel-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tw-ach-panel-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tw-ach-filter-btn {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.tw-ach-filter-btn:hover {
  border-color: rgba(39,150,242,0.45);
  color: var(--text-primary);
}

.tw-ach-filter-btn.is-active {
  border-color: rgba(39,150,242,0.50);
  background: rgba(39,150,242,0.12);
  color: var(--primary);
}

.tw-ach-panel-section.is-hidden {
  display: none;
}

.tw-ach-summary-item {
  background: var(--surface-3);
  border: 1px solid rgba(51,51,51,0.70);
  padding: 8px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.tw-ach-summary-item strong {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.tw-ach-summary-item.is-done strong {
  color: var(--success);
}

.tw-ach-summary-item.is-open strong {
  color: var(--primary);
}

.tw-ach-summary-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.tw-ach-panel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tw-ach-panel-section-head h4 {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-secondary);
}

.tw-ach-panel-badges {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.tw-ach-badge-card {
  background: var(--surface-3);
  border: 1px solid rgba(39,150,242,0.30);
  padding: 8px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.tw-ach-badge-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(39,150,242,0.45);
  background: rgba(39,150,242,0.18);
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
}

.tw-ach-badge-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tw-ach-badge-meta {
  font-size: 9px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tw-ach-panel-progress-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.tw-ach-progress-item {
  background: var(--surface-3);
  border: 1px solid rgba(51,51,51,0.70);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tw-ach-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tw-ach-progress-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.tw-ach-progress-value {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.tw-ach-progress-track {
  position: relative;
  height: 4px;
  background: rgba(39,150,242,0.12);
}

.tw-ach-progress-fill {
  height: 4px;
  width: 0;
  background: rgba(39,150,242,0.70);
  transition: width 0.35s ease;
}

.tw-ach-progress-desc {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tw-ach-panel-status {
  font-size: 10px;
  color: var(--text-tertiary);
}

@keyframes tw-xp-ring-rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tw-xp-ring-pulse {
  0%,
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(39,150,242,0.30));
  }
  50% {
    opacity: 0.7;
    filter: drop-shadow(0 0 8px rgba(39,150,242,0.50));
  }
}

@keyframes tw-xp-warning-pulse {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 3px rgba(245,158,11,0.22);
  }
  50% {
    opacity: 0.62;
    text-shadow: 0 0 9px rgba(245,158,11,0.36);
  }
}

@keyframes tw-online-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52,211,153,0.70);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(52,211,153,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52,211,153,0);
  }
}

@media (max-width: 1100px) {
  .tw-xp-row {
    min-height: 0;
    flex-wrap: wrap;
    padding: 8px 0;
  }

  .tw-xp-divider {
    display: none;
  }

  .tw-xp-cell,
  .tw-xp-level,
  .tw-xp-latest,
  .tw-xp-rank,
  .tw-xp-online,
  .tw-xp-side-ctas {
    flex: 1 1 50%;
    min-width: 0;
    padding: 8px 12px;
  }

  .tw-xp-rank,
  .tw-xp-online {
    flex: 1 1 46%;
  }

  .tw-xp-latest {
    flex: 1 1 54%;
  }

  .tw-xp-side-ctas {
    border-left: 0;
    justify-content: flex-start;
  }

  .tw-xp-side-ctas-wrap {
    justify-content: flex-start;
  }

  .tw-xp-level,
  .tw-xp-latest {
    justify-content: flex-start;
  }

  .tw-xp-latest-inner {
    align-items: flex-start;
  }

  .tw-xp-latest .tw-xp-top,
  .tw-xp-latest .tw-xp-meta {
    justify-content: space-between;
    width: 100%;
  }

  .tw-ach-panel-badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tw-ach-panel-progress-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .tw-xp-hero-shell {
    position: sticky;
    top: 0;
    z-index: 34;
  }

  .tw-xp-row {
    min-height: 48px;
    max-width: 100%;
    margin-top: -8px;
    padding: 0 6px 0 0;
    cursor: pointer;
  }

  .tw-xp-cell,
  .tw-xp-level,
  .tw-xp-latest,
  .tw-xp-rank,
  .tw-xp-online,
  .tw-xp-side-ctas {
    flex: 1 1 0;
    min-height: 48px;
    padding: 0 10px;
  }

  .tw-xp-rank,
  .tw-xp-online {
    flex: 0.88 1 0;
  }

  .tw-xp-latest {
    flex: 1.24 1 0;
  }

  .tw-xp-side-ctas {
    flex: 0.9 1 0;
    border-left: 0;
    justify-content: flex-start;
  }

  .tw-xp-side-ctas-wrap {
    justify-content: flex-start;
  }

  .tw-xp-side-ctas .tw-fort-status-cta {
    max-width: 120px;
    height: 26px;
    font-size: 10px;
  }

  .tw-xp-ring,
  .tw-xp-ring-svg {
    width: 40px;
    height: 40px;
  }

  .tw-xp-ring-svg {
    transform: rotate(-90deg) scale(0.64516129);
    transform-origin: center;
  }

  .tw-xp-ring-value {
    font-size: 15px;
  }

  .tw-xp-ring-label,
  .tw-xp-level-meta,
  .tw-xp-title,
  .tw-xp-bar,
  .tw-xp-meta,
  .tw-xp-zero-state {
    display: none;
  }

  .tw-xp-rank-side,
  .tw-xp-top {
    justify-content: flex-start;
    gap: 8px;
  }

  .tw-xp-rank-badge {
    min-height: 20px;
    font-size: 9px;
  }

  .tw-xp-streak-hero,
  .tw-xp-latest .tw-xp-top {
    gap: 6px;
  }

  .tw-xp-streak-value,
  .tw-xp-ach-counter {
    font-size: 13px;
  }

  .tw-xp-online-grid {
    display: none;
  }

  .tw-xp-online-popover {
    position: absolute;
    left: 0;
    right: auto;
    top: calc(100% + 6px);
    bottom: auto;
    width: min(360px, calc(100vw - 20px));
    z-index: 84;
    box-shadow: 0 8px 20px rgba(0,0,0,0.28);
    border-color: rgba(39,150,242,0.30);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    max-height: 140px;
  }

  .tw-xp-online-count,
  .tw-xp-online-badge.is-time {
    display: none;
  }

  .tw-xp-row.is-expanded {
    min-height: 0;
    flex-wrap: wrap;
    padding: 8px 0;
  }

  .tw-xp-row.is-expanded .tw-xp-cell,
  .tw-xp-row.is-expanded .tw-xp-level,
  .tw-xp-row.is-expanded .tw-xp-latest,
  .tw-xp-row.is-expanded .tw-xp-rank,
  .tw-xp-row.is-expanded .tw-xp-online,
  .tw-xp-row.is-expanded .tw-xp-side-ctas {
    flex: 1 1 50%;
    min-height: 0;
    padding: 8px 12px;
  }

  .tw-xp-row.is-expanded .tw-xp-ring,
  .tw-xp-row.is-expanded .tw-xp-ring-svg {
    width: 62px;
    height: 62px;
  }

  .tw-xp-row.is-expanded .tw-xp-ring-svg {
    transform: rotate(-90deg) scale(1);
  }

  .tw-xp-row.is-expanded .tw-xp-ring-value {
    font-size: 22px;
  }

  .tw-xp-row.is-expanded .tw-xp-ring-label,
  .tw-xp-row.is-expanded .tw-xp-level-meta,
  .tw-xp-row.is-expanded .tw-xp-title,
  .tw-xp-row.is-expanded .tw-xp-bar,
  .tw-xp-row.is-expanded .tw-xp-meta,
  .tw-xp-row.is-expanded .tw-xp-zero-state {
    display: flex;
  }

  .tw-xp-row.is-expanded .tw-xp-level-meta,
  .tw-xp-row.is-expanded .tw-xp-zero-state {
    display: block;
  }

  .tw-xp-row.is-expanded .tw-xp-online-grid {
    display: grid;
  }

  .tw-xp-row.is-expanded .tw-xp-latest-inner {
    align-items: flex-start;
  }

  .tw-xp-row.is-expanded .tw-xp-latest .tw-xp-top,
  .tw-xp-row.is-expanded .tw-xp-latest .tw-xp-meta {
    justify-content: space-between;
    width: 100%;
  }

  .tw-ach-slide-panel.is-open {
    max-height: 860px;
  }

  .tw-ach-panel-wrap {
    max-width: 100%;
    border-left: 0;
    border-right: 0;
  }

  .tw-ach-panel-summary {
    grid-template-columns: 1fr;
  }

  .tw-ach-panel-filters {
    width: 100%;
  }

  .tw-ach-filter-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .tw-ach-panel-badges {
    grid-template-columns: 1fr;
  }

  .tw-ach-panel-progress-list {
    grid-template-columns: 1fr;
  }

  /*
   * Friends + fixed mobil-header: sticky XP-rad (top:0) krockar visuellt med shout/top-util.
   * Låt raden scrolla med innehållet — social-first utan extra lager.
   */
  body.has-mobile-nav.tw-page-friends:not(.builder-edit-mode) .tw-xp-hero-shell {
    position: relative;
    top: auto;
    z-index: 1;
    margin: 0 0 6px;
  }

  body.has-mobile-nav.tw-page-friends:not(.builder-edit-mode) .tw-xp-row {
    margin-top: 0;
    min-height: 44px;
  }
}

/* -------------------------------------------------------------------------- */
/* XP HERO REDESIGN (data-driven stat cards)                                  */
/* -------------------------------------------------------------------------- */
.tw-xp-hero-shell {
  --xp-card-bg: linear-gradient(180deg, rgba(22,22,22,0.98) 0%, rgba(16,16,16,0.98) 100%);
  --xp-card-border: rgba(39,150,242,0.22);
  --xp-card-shadow: 0 10px 24px rgba(0,0,0,0.42);
  --xp-card-gap: 10px;
  --xp-card-radius: 0;
  --xp-live-glow: 0 0 12px rgba(52,211,153,0.26);
  --xp-count-glow: 0 0 12px rgba(39,150,242,0.34);
}

.tw-xp-hero-shell .tw-xp-row {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 2.2fr 1.15fr 0.9fr;
  gap: var(--xp-card-gap);
  align-items: stretch;
  min-height: 0;
  padding: 10px;
  background: linear-gradient(180deg, rgba(18,18,18,0.98) 0%, rgba(14,14,14,0.98) 100%);
  border-left: 1px solid rgba(255,255,255,0.03);
  border-right: 1px solid rgba(255,255,255,0.03);
  overflow: visible;
}

.tw-xp-hero-shell .tw-xp-cell.tw-xp-card {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--xp-card-border);
  background: var(--xp-card-bg);
  box-shadow: var(--xp-card-shadow);
  border-radius: var(--xp-card-radius);
}

.tw-xp-hero-shell .tw-xp-row.is-legacy-markup .tw-xp-divider {
  display: none;
}

.tw-xp-hero-shell .tw-xp-row.is-legacy-markup .tw-xp-cell.tw-xp-card .tw-xp-section-inner {
  height: 100%;
  justify-content: space-between;
  gap: 7px;
}

.tw-xp-hero-shell .tw-xp-row.is-legacy-markup .tw-xp-cell.tw-xp-card .tw-xp-title {
  font-size: 10px;
  font-weight: 800;
  color: rgba(241,248,255,0.96);
}

.tw-xp-hero-shell .tw-xp-row.is-legacy-markup .tw-xp-cell.tw-xp-card .tw-xp-subvalue {
  font-size: 11px;
  color: rgba(255,255,255,0.82);
}

.tw-xp-hero-shell .tw-xp-row.is-legacy-markup .tw-xp-cell.tw-xp-card .tw-xp-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.78);
}

.tw-xp-hero-shell .tw-xp-row.is-legacy-markup .tw-xp-cell.tw-xp-card .tw-xp-rank-badge {
  min-height: 20px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tw-xp-hero-shell .tw-xp-row.is-legacy-markup .tw-xp-cell.tw-xp-card .tw-xp-latest-head {
  font-size: 12px;
}

.tw-xp-card-head {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(241,248,255,0.96);
}

.tw-xp-card-head i {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(39,150,242,0.42);
}

.tw-xp-card-value {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px rgba(255,255,255,0.14);
}

.tw-xp-card--rank .tw-xp-card-value {
  color: var(--tw-xp-rank-color, #fff);
  text-shadow: 0 0 12px rgba(var(--tw-xp-rank-rgb, 39,150,242), 0.38);
}

.tw-xp-card-sub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.82);
}

.tw-xp-card-sub span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tw-xp-card--online .tw-xp-card-head {
  color: #f8fbff;
  text-shadow: 0 0 10px rgba(39,150,242,0.30);
}

.tw-xp-card--online .tw-xp-online-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tw-xp-card--online .tw-xp-online-col {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 7px;
}

.tw-xp-card--online .tw-xp-online-col-head {
  font-size: 9px;
  letter-spacing: 0.11em;
}

.tw-xp-card--online .tw-xp-online-count {
  box-shadow: var(--xp-count-glow);
}

.tw-xp-card--online .tw-xp-online-popover {
  border: 1px solid rgba(39,150,242,0.46);
  background: linear-gradient(180deg, rgba(13,13,13,0.99) 0%, rgba(17,17,17,0.99) 100%);
  box-shadow: 0 18px 32px rgba(0,0,0,0.56), 0 0 18px rgba(39,150,242,0.16);
}

.tw-xp-card--online .tw-xp-online-name {
  color: #fcfdff;
}

.tw-xp-card--online .tw-xp-online-item-detail {
  color: rgba(255,255,255,0.84);
}

.tw-xp-card--online .tw-xp-online-badge.is-live {
  box-shadow: var(--xp-live-glow);
}

.tw-xp-card--online .tw-xp-online-now {
  text-shadow: 0 0 12px rgba(52,211,153,0.90), 0 0 20px rgba(52,211,153,0.50);
}

.tw-xp-card--latest .tw-xp-card-value {
  color: #ff9c9c;
  text-shadow: 0 0 12px rgba(239,68,68,0.34);
}

.tw-xp-latest-meta-line {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tw-xp-card--status {
  border-color: rgba(34,197,94,0.34);
}

.tw-xp-card--status .tw-fort-status-cta {
  max-width: none;
}

@media (max-width: 1200px) {
  .tw-xp-hero-shell .tw-xp-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tw-xp-card--online {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .tw-xp-hero-shell .tw-xp-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .tw-xp-hero-shell .tw-xp-cell.tw-xp-card {
    min-height: 0;
    padding: 9px 10px;
  }

  .tw-xp-card-value {
    font-size: 20px;
  }

  .tw-xp-card--online .tw-xp-online-grid {
    grid-template-columns: 1fr;
  }
}