/* =================================================================
   Rankings Page Specific Styles
   ================================================================= */


/* =================================================================
   Raid Nav Sidebar
   ================================================================= */
.raid-nav {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  align-self: start;
  padding: 1rem 0;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 17, 23, 0.5);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.raid-nav::-webkit-scrollbar {
  display: none;
}

/* Tier tabs */
.tier-tabs {
  display: flex;
  padding: 0 1rem 1rem;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.5rem;
}

.tier-tab {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.tier-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.tier-tab.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
}

/* Raid section headers (accordion) */
.raid-section {
  margin-bottom: 2px;
}

.raid-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  padding: 0;
  border: none;
  height: 72px;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  border-radius: 0;
  transition: filter 0.2s ease;
}

.raid-header:hover {
  filter: brightness(1.15);
}

.raid-header.active {
  filter: brightness(1.05);
}

.raid-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}

.raid-header-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  width: 100%;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.raid-header-arrow {
  font-size: 0.75rem;
  line-height: 1;
  opacity: 0.7;
}

/* Boss list */
.boss-list {
  padding-bottom: 4px;
}

.boss-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 14px 9px 14px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.boss-nav-item:hover {
  background: rgba(124, 58, 237, 0.06);
  color: var(--text-primary);
}

.boss-nav-item.active {
  background: rgba(124, 58, 237, 0.12);
  border-left-color: var(--accent-color);
  color: #ffffff;
  font-weight: 600;
}

.boss-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.boss-nav-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =================================================================
   Toolbar (search + sort)
   ================================================================= */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.toolbar-search {
  position: relative;
  flex: 0 1 220px;
  max-width: 220px;
}

.toolbar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.toolbar-search-input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(15, 17, 23, 0.6);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.toolbar-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.toolbar-search-input:focus {
  border-color: var(--accent-color);
  background: rgba(15, 17, 23, 0.8);
}

.toolbar-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 4px;
  font-family: inherit;
  border-radius: 4px;
  transition: color 0.2s ease;
  line-height: 1;
}

.toolbar-search-clear:hover {
  color: var(--text-primary);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.toolbar .last-updated {
  margin: 0 auto;
  text-align: center;
  white-space: nowrap;
  flex: 1 1 auto;
}

.last-updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.last-updated-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
}

.last-updated-label {
  font-weight: 500;
}

.last-updated-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
}

.last-updated-time {
  font-weight: 600;
  color: var(--text-secondary);
}

.toolbar-result-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.toolbar-sort {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--secondary-bg);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.toolbar-sort:focus {
  border-color: var(--accent-color);
}

.toolbar-sort option {
  background: var(--secondary-bg);
  color: var(--text-secondary);
}

/* =================================================================
   Page Grid Layout
   ================================================================= */
.page-grid {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 0;
  width: 100%;
}

/* Content area */
.content-area {
  width: 100%;
  min-width: 0;
  padding: 1rem 2.5rem 2rem;
}

/* Talent sidebar */
.talent-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  align-self: start;
  padding: 1rem 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.talent-sidebar::-webkit-scrollbar {
  display: none;
}

.talent-sidebar h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Neutralize Wowhead injected styles */
a.wowhead ins,
a.wowhead del {
  text-decoration: none !important;
  border: 0 !important;
}

/* =================================================================
   Rankings & Talent Display
   ================================================================= */
#rankings {
  --cols: 36px 1fr 52px 76px 68px 72px 170px 68px;
  margin-top: 0;
  min-height: 400px;
}

/* Talent Summary */
.talent-summary,
.talent-summary-content {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  border: none;
  box-shadow: none;
}

.talent-summary .talent-row,
.talent-summary-content .talent-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.talent-summary .talent-row:last-child,
.talent-summary-content .talent-row:last-child {
  margin-bottom: 0;
}

.talent-summary .talent-icon-img,
.talent-summary-content .talent-icon-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  will-change: transform, filter;
}

.talent-summary .talent-percent,
.talent-summary-content .talent-percent {
  font-size: 0.8125rem;
  font-weight: 700;
  margin-top: 0.25rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  text-align: center;
  will-change: transform;
  transform: translateZ(0);
  color: var(--text-secondary);
}

/* =================================================================
   Grid Table Layout
   ================================================================= */
/* Header row */
.rank-table-header {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: center;
  gap: 0;
  padding: 8px 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin: 0 -2.5rem 2px;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
  position: sticky;
  top: 60px;
  z-index: 5;
  background: #0f1117;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.rank-table-header > span {
  padding: 0 8px;
}

.rank-table-header [data-sort] {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.rank-table-header [data-sort]:hover {
  color: var(--text-primary);
}

.rank-table-header [data-sort].active-sort {
  color: var(--accent-hover);
}

.rank-table-header .sort-arrow {
  font-size: 0.625rem;
  margin-left: 2px;
  opacity: 0.6;
}

.rank-table-header [data-sort].active-sort .sort-arrow {
  opacity: 1;
}

/* Player row */
.rank-entry {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: center;
  gap: 0;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
  contain: layout style paint;
}

.rank-entry:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}

.rank-entry:hover {
  background: rgba(124, 58, 237, 0.06);
}

.rank-entry.filtered-out {
  display: none !important;
}

/* Column cells */
.rank-entry > span,
.rank-entry > div {
  padding: 0 8px;
  min-width: 0;
}

/* Rank number */
.col-rank {
  font-weight: 700;
  font-size: 0.8125rem;
  text-align: center;
  padding-left: 4px !important;
}

.rank-entry[data-rank-tier="gold"] .col-rank {
  color: #e5cc80;
  border-left: 3px solid #e5cc80;
}

.rank-entry[data-rank-tier="pink"] .col-rank {
  color: #e268a8;
  border-left: 3px solid #e268a8;
}

.rank-entry[data-rank-tier="orange"] .col-rank {
  color: #ff8000;
  border-left: 3px solid #ff8000;
}

/* Player name */
.col-name {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.8125rem;
  min-width: 0;
}

.col-name .player-link {
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.col-name .player-server {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
}

.rank-entry[data-rank-tier="gold"] .col-name .player-link { color: #e5cc80; }
.rank-entry[data-rank-tier="pink"] .col-name .player-link { color: #e268a8; }
.rank-entry[data-rank-tier="orange"] .col-name .player-link { color: #ff8000; }

.col-name .player-link:hover {
  text-decoration: underline;
  filter: brightness(1.3);
}

/* DPS */
.col-dps {
  font-weight: 700;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: #e6ff00;
}

/* Time, iLvl, Date */
.col-time,
.col-ilvl,
.col-date {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-ilvl {
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.col-time {
  font-variant-numeric: tabular-nums;
}

/* Gear Strip Display */
.gear-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 0;
}

.gear-strip-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.15s ease;
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
}

.gear-strip-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gear-strip-icon:hover {
  transform: scale(1.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.gear-strip-icon.epic { border-color: #a335ee; }
.gear-strip-icon.rare { border-color: #0070dd; }
.gear-strip-icon.uncommon { border-color: #1eff00; }
.gear-strip-icon.legendary { border-color: #ff8000; }
.gear-strip-icon.common { border-color: #9d9d9d; }

/* Trinkets column */
.gear-trinkets {
  gap: 2px;
}

.gear-strip-icon.is-trinket {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.no-gear {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem;
  background: var(--secondary-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

/* Talent icons in table rows */
.rank-entry .talent-row {
  display: flex;
  gap: 2px;
}

.rank-entry .talent-icon-img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  transition: all 0.15s ease;
}

.rank-entry .talent-link:not(.is-meta) .talent-icon-img {
  opacity: 0.45;
}

.talent-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.talent-link:hover .talent-icon-img {
  transform: scale(1.1);
  filter: brightness(1.15);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.talent-summary .talent-link.is-meta .talent-icon-img,
.talent-summary-content .talent-link.is-meta .talent-icon-img {
  border-color: var(--gold-color);
  box-shadow: 0 0 0 2px var(--gold-color), 0 4px 16px rgba(251, 191, 36, 0.3);
}

.talent-summary .talent-link.is-top .talent-icon-img,
.talent-summary-content .talent-link.is-top .talent-icon-img {
  box-shadow: 0 0 0 2px var(--success-color), 0 4px 20px rgba(16, 185, 129, 0.4);
  border-color: var(--success-color);
}

.talent-summary .talent-link.is-top .talent-percent,
.talent-summary-content .talent-link.is-top .talent-percent {
  color: var(--success-color);
  font-weight: 800;
}

/* Trinket Summary */
.trinket-summary-section {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
}

.trinket-summary-section h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trinket-summary-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trinket-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.trinket-summary-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.trinket-summary-item .gear-strip-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
}

.trinket-summary-item .gear-strip-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.trinket-summary-info {
  flex: 1;
  min-width: 0;
}

.trinket-summary-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.trinket-summary-name.epic { color: #a335ee; }
.trinket-summary-name.rare { color: #0070dd; }
.trinket-summary-name.legendary { color: #ff8000; }

.trinket-summary-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  overflow: hidden;
}

.trinket-summary-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent-color);
}

.trinket-summary-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 38px;
  text-align: right;
}

/* =================================================================
   Parsing Rules Box
   ================================================================= */
.parsing-rules-box {
  margin-bottom: 10px;
}

.parsing-rules-box:empty {
  display: none;
}

.parsing-pill {
  display: none;
}

.parsing-pill.has-rules {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--warning-color);
  background: rgba(245, 158, 11, 0.06);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}

.parsing-pill.has-rules::before {
  content: "\26A0\FE0F";
  flex-shrink: 0;
}

.parsing-sep {
  color: var(--text-muted);
  margin: 0 3px;
  font-size: 0.625rem;
  vertical-align: middle;
}

/* =================================================================
   Loading / Error / Empty States
   ================================================================= */
.loader {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-message {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 2rem;
  font-size: 1rem;
  font-weight: 500;
}

.loading-message p {
  margin: 1rem 0;
}

.error-message {
  text-align: center;
  color: #ef4444;
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  font-weight: 500;
}

/* =================================================================
   Responsive Design
   ================================================================= */
/* ----- Tablet (≤1024px): single column stacked layout ----- */
@media (max-width: 1024px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  /* Raid nav: horizontal collapsed */
  .raid-nav {
    position: static;
    height: auto;
    padding: 0.75rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: visible;
  }

  .tier-tabs {
    padding: 0 0 0.75rem;
  }

  .raid-header {
    height: 52px;
    border-radius: 8px;
    font-size: 0.8125rem;
  }

  .raid-header-content {
    padding: 8px 14px;
  }

  .boss-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 0 4px;
  }

  .boss-nav-item {
    white-space: nowrap;
    padding: 8px 12px;
    border-left: none;
    border-radius: 8px;
    font-size: 1.016rem;
  }

  .boss-nav-item.active {
    border-left-color: transparent;
  }

  .boss-nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 5px;
  }

  /* Content + sidebar: stacked, no sticky */
  .content-area {
    padding: 1.5rem 2rem;
  }

  .talent-sidebar {
    position: static;
    height: auto;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 2rem;
  }

  .rank-table-header {
    margin: 0 -2rem 2px;
    padding-left: 2rem;
    padding-right: 2rem;
    top: 60px;
  }
}

/* ----- Mobile (≤768px): compact layout ----- */
@media (max-width: 768px) {
  .content-area {
    padding: 1.25rem 0.75rem;
  }

  .talent-sidebar {
    padding: 1.25rem 0.75rem;
  }

  /* Toolbar stacks vertically */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .toolbar-search {
    max-width: none;
    flex: none;
  }

  .toolbar-sort {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .toolbar .last-updated {
    text-align: left;
    font-size: 0.75rem;
  }

  .toolbar-right {
    margin-left: 0;
    flex-direction: column;
    gap: 8px;
  }

  .toolbar-right .toolbar-sort {
    width: 100%;
  }

  /* Grid: only show #, Player, DPS, Talents */
  #rankings {
    --cols: 22px 1fr 60px 130px;
  }

  .col-ilvl,
  .col-date,
  .col-time,
  .col-trinkets {
    display: none;
  }

  .col-name .player-server {
    display: none;
  }

  .col-rank { grid-column: 1; }
  .col-name { grid-column: 2; }
  .col-dps { grid-column: 3; }
  .col-talents { grid-column: 4; }

  .rank-entry > span,
  .rank-entry > div,
  .rank-table-header > span {
    padding: 0 2px;
  }

  .col-dps {
    font-size: 0.75rem;
  }

  .rank-entry .talent-icon-img {
    width: 20px;
    height: 20px;
  }

  .rank-entry .talent-row {
    gap: 1px;
  }

  .rank-table-header {
    margin: 0 -0.75rem 2px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    top: 60px;
  }

  /* Raid nav: tighter on mobile */
  .raid-header {
    height: 48px;
    font-size: 0.75rem;
  }

  .boss-nav-item {
    padding: 6px 10px;
    font-size: 0.938rem;
    gap: 8px;
  }

  .boss-nav-icon {
    width: 28px;
    height: 28px;
  }

  /* Talent sidebar: smaller icons */
  .talent-summary .talent-icon-img,
  .talent-summary-content .talent-icon-img {
    width: 42px;
    height: 42px;
  }

  .talent-summary .talent-row,
  .talent-summary-content .talent-row {
    gap: 0.5rem;
  }

  /* Trinket summary: compact */
  .trinket-summary-item .gear-strip-icon {
    width: 28px;
    height: 28px;
  }

  .trinket-summary-name {
    font-size: 0.75rem;
  }

  .trinket-summary-pct {
    font-size: 0.6875rem;
    min-width: 34px;
  }
}

/* ----- Small mobile (≤480px): minimal layout ----- */
@media (max-width: 480px) {
  .content-area {
    padding: 1rem 0.5rem;
  }

  .talent-sidebar {
    padding: 1rem 0.5rem;
  }

  .talent-summary .talent-row,
  .talent-summary-content .talent-row {
    gap: 0.375rem;
  }

  .talent-summary .talent-icon-img,
  .talent-summary-content .talent-icon-img {
    width: 36px;
    height: 36px;
  }

  .talent-summary .talent-percent,
  .talent-summary-content .talent-percent {
    font-size: 0.6875rem;
  }

  /* Tighter grid */
  #rankings {
    --cols: 20px 1fr 52px 108px;
  }

  .rank-entry > span,
  .rank-entry > div,
  .rank-table-header > span {
    padding: 0 2px;
  }

  .rank-entry .talent-icon-img {
    width: 17px;
    height: 17px;
  }

  .rank-table-header {
    margin: 0 -0.5rem 2px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    top: 60px;
    font-size: 0.6875rem;
  }

  .col-rank {
    font-size: 0.6875rem;
  }

  .col-name {
    font-size: 0.6875rem;
  }

  .col-dps {
    font-size: 0.6875rem;
  }

  /* Raid nav: minimal */
  .tier-tab {
    padding: 8px;
    font-size: 0.8125rem;
  }

  .raid-header {
    height: 44px;
    font-size: 0.6875rem;
  }

  .raid-header-content {
    padding: 6px 10px;
  }

  .boss-nav-item {
    padding: 5px 8px;
    font-size: 0.859rem;
    gap: 5px;
  }

  .boss-nav-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
  }

  /* Trinket summary: minimal */
  .trinket-summary-item {
    padding: 4px 6px;
    gap: 8px;
  }

  .trinket-summary-item .gear-strip-icon {
    width: 24px;
    height: 24px;
  }

  .trinket-summary-name {
    font-size: 0.6875rem;
  }

  .trinket-summary-pct {
    font-size: 0.625rem;
    min-width: 30px;
  }

  .trinket-summary-section h3 {
    font-size: 0.875rem;
  }
}
