/* RatedTracker Analytics - matches in-addon palette (#74D06C, gold headers, WoW dark chrome) */

:root {
  --rt-green: #74d06c;
  --rt-green-bright: #8ae082;
  --rt-green-dim: rgba(116, 208, 108, 0.18);
  --rt-green-glow: rgba(116, 208, 108, 0.45);
  --rt-gold: #ffd100;
  --rt-gold-dim: rgba(255, 209, 0, 0.85);
  --rt-bg: #050505;
  --rt-bg-panel: #0f0f0f;
  --rt-bg-elevated: #161616;
  --rt-border: #454545;
  --rt-border-light: #5c5c5c;
  --rt-text: #ececec;
  --rt-muted: #9a9a9a;
  --rt-win: #00ff00;
  --rt-loss: #ff4040;
  --rt-draw: #ffff00;
  --rt-btn-red-top: #8b0000;
  --rt-btn-red-bot: #4a0000;
  --radius: 4px;
  --font-ui: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-brand: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-mono: Consolas, "Lucida Console", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 13px;
  background: var(--rt-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' fill='%23ffffff' fill-opacity='0.02'/%3E%3C/svg%3E");
  color: var(--rt-text);
  line-height: 1.45;
}

.combat-match-rows { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.75rem; }
.combat-match-row {
  display: grid; grid-template-columns: 1.2fr 1.4fr 0.6fr 0.7fr auto;
  gap: 0.75rem; align-items: center; width: 100%;
  padding: 0.55rem 0.75rem; text-align: left;
  background: var(--rt-bg-elevated); border: 1px solid var(--rt-border);
  border-radius: var(--radius); color: var(--rt-text); font: inherit; cursor: pointer;
}
.combat-match-row:hover { border-color: var(--rt-green); background: #121812; }
.combat-linked { color: var(--rt-green); font-size: 0.85em; }
.combat-log-file { margin-bottom: 1rem; }
.combat-log-file h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--rt-gold-dim); }


.skip-link {
  position: absolute; left: -9999px; z-index: 999;
  padding: 0.5rem 1rem; background: var(--rt-green); color: #000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Brand / logo */
.logo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: inherit;
}
.logo-icon { border-radius: 50%; image-rendering: auto; }
.logo-text {
  font-family: var(--font-brand);
  font-size: 1.15rem; font-weight: 700;
  color: var(--rt-green);
  text-shadow: 0 0 14px var(--rt-green-glow), 0 1px 0 #000;
  letter-spacing: 0.02em;
}
.logo-muted {
  font-family: var(--font-ui);
  font-size: 0.85rem; font-weight: 400;
  color: var(--rt-muted);
  text-shadow: none;
}

.brand-title {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--rt-green);
  text-shadow: 0 0 20px var(--rt-green-glow), 0 2px 4px #000;
  letter-spacing: 0.03em;
}
.brand-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rt-muted);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, #121212 0%, #080808 100%);
  border-bottom: 1px solid var(--rt-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
body.app-shell-active .site-header { display: none; }

.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.header-inner .logo { margin-right: auto; }

.nav { display: flex; flex-wrap: wrap; gap: 0.15rem; }

.nav-link, .sidebar-link, .settings-tab, .chip {
  font-family: inherit; font-size: 12px;
  padding: 0.4rem 0.7rem; border-radius: 2px;
  border: 1px solid transparent; background: transparent;
  color: var(--rt-gold-dim); cursor: pointer; text-align: left;
}
.nav-link:hover, .sidebar-link:hover { color: var(--rt-gold); }
.nav-link.is-active {
  color: #fff;
  border-color: var(--rt-border-light);
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.nav-link:focus-visible, .sidebar-link:focus-visible, .btn:focus-visible {
  outline: 1px solid var(--rt-green); outline-offset: 2px;
}

/* Views / app shell */
.view { display: none; }
.view.view-active { display: block; }
body.app-shell-active .view[data-view="home"] { display: none !important; }
body.app-shell-active .app-shell { display: flex; }
body.app-shell-active #site-footer { display: none; }
.app-shell { display: none; min-height: 100vh; }

/* Sidebar (filters-panel vibe) */
.sidebar {
  width: 220px; flex-shrink: 0;
  background: linear-gradient(180deg, #141414 0%, #0a0a0a 100%);
  border-right: 1px solid var(--rt-border);
  padding: 1rem 0.65rem;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
}
.sidebar-logo { margin-bottom: 0.15rem; }
.sidebar-sub {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--rt-muted); margin: 0 0 1rem 0.35rem;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.45rem;
  width: 100%; color: var(--rt-muted); border-radius: 2px;
}
.sidebar-link.is-active {
  color: var(--rt-green);
  background: var(--rt-green-dim);
  border-color: rgba(116, 208, 108, 0.25);
}
.sidebar-icon { opacity: 0.7; font-size: 11px; }
.sidebar-foot {
  padding-top: 0.85rem; border-top: 1px solid var(--rt-border);
  font-size: 11px;
}
.sidebar-char { margin: 0; font-weight: 600; color: var(--rt-green); }
.sidebar-meta { margin: 0.15rem 0 0; color: var(--rt-muted); }

/* App main */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--rt-border);
  background: linear-gradient(180deg, #121212 0%, #0c0c0c 100%);
}
.topbar-left { display: flex; align-items: center; gap: 0.65rem; }
.page-title {
  margin: 0; font-family: var(--font-brand);
  font-size: 1.25rem; font-weight: 700;
  color: var(--rt-green);
  text-shadow: 0 0 10px var(--rt-green-glow);
}
.demo-badge,
.status-badge {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.2rem 0.45rem;
  border: 1px solid var(--rt-border);
  color: var(--rt-muted); background: #0a0a0a;
}
.topbar-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }

.scope-banner {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.35rem 0.65rem;
  padding: 0.45rem 1.25rem;
  border-bottom: 1px solid var(--rt-border);
  background: rgba(202, 168, 74, 0.08);
  font-size: 12px;
  color: var(--rt-text);
}
.scope-banner-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--rt-gold);
}
.scope-banner-value { font-weight: 600; color: var(--rt-green); display: inline-flex; align-items: center; gap: 0.3rem; }
.scope-banner-scope { color: var(--rt-green); }
.scope-banner-detail { color: var(--rt-muted); font-size: 11px; }

.sidebar-spec {
  margin: 0.1rem 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--rt-gold);
}

.block-title-note {
  font-size: 11px;
  font-weight: 400;
  color: var(--rt-muted);
  margin-left: 0.35rem;
}

.app-content {
  flex: 1; padding: 1rem 1.25rem 2rem;
  overflow-y: auto;
  background: radial-gradient(ellipse at top, #101010 0%, #050505 55%);
}
.app-content .view.view-active { display: block; }

/* WoW panels */
.wow-panel,
.panel-card,
.kpi-card,
.spec-card,
.situation-card,
.insight-card,
.feature-card {
  border: 1px solid var(--rt-border);
  background: linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 4px 16px rgba(0,0,0,0.45);
}

.panel-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rt-border);
}
.panel-head h2 {
  margin: 0; font-size: 13px; font-weight: 600;
  color: var(--rt-gold);
  text-transform: none;
}
.panel-meta { font-size: 11px; color: var(--rt-muted); }

.block-title {
  font-size: 13px; color: var(--rt-gold);
  margin: 0.25rem 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #333;
}

/* Home / hero */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--rt-border);
  background: radial-gradient(ellipse at center top, #141414 0%, #050505 70%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }

.hero-brand-row {
  display: flex; align-items: center; justify-content: center;
  gap: 1.25rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.hero-logo { filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6)); }
.hero-brand-text { text-align: center; }

.lede {
  margin: 0 auto 1.5rem; font-size: 14px;
  color: var(--rt-muted); max-width: 52ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: center; }

.pill {
  display: inline-block; margin: 0 0 0.75rem;
  padding: 0.2rem 0.55rem; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--rt-gold); border: 1px solid #5a4a20;
  background: rgba(255, 209, 0, 0.06);
}

h1, h2, h3 { letter-spacing: 0.01em; }
.subhead { margin: 0 0 0.85rem; color: var(--rt-muted); font-size: 12px; }

.feature-section { padding: 2rem 0; }
.section-title {
  font-family: var(--font-brand);
  font-size: 1.35rem; color: var(--rt-gold);
  margin-bottom: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}
.feature-card {
  padding: 1rem; border-radius: var(--radius);
}
.feature-num {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--rt-gold); display: block; margin-bottom: 0.35rem;
}
.feature-card h3 { color: var(--rt-green); font-size: 13px; margin-bottom: 0.35rem; }
.feature-card p { margin: 0; font-size: 12px; color: var(--rt-muted); }

.preview-strip {
  padding: 1.5rem 1.25rem 3rem; text-align: center;
}
.preview-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--rt-gold-dim); margin-bottom: 0.85rem;
}
.addon-screenshot-frame {
  margin: 0 auto 1rem; max-width: 920px;
  border: 2px solid var(--rt-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(255,255,255,0.04);
  background: #000;
}
.addon-screenshot-frame img {
  display: block; width: 100%; height: auto;
}
.addon-screenshot-frame figcaption {
  padding: 0.5rem 0.75rem; font-size: 11px;
  color: var(--rt-muted); text-align: left;
  border-top: 1px solid var(--rt-border);
  background: #0a0a0a;
}

/* Buttons (WoW red + green accent) */
.btn {
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 0.45rem 0.9rem; border-radius: 2px;
  border: 1px solid #6a5a30; cursor: pointer;
  text-shadow: 0 1px 1px rgba(0,0,0,0.8);
}
.btn-wow, .btn-primary {
  color: #ffe8a0;
  border-color: #8a7020;
  background: linear-gradient(180deg, #9a2020 0%, #5a1010 50%, #3a0808 100%);
  box-shadow: inset 0 1px 0 rgba(255,200,100,0.25), 0 2px 4px rgba(0,0,0,0.5);
}
.btn-wow:hover, .btn-primary:hover { filter: brightness(1.12); }
.btn-ghost {
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  color: var(--rt-gold-dim); border-color: var(--rt-border);
}
.btn-ghost:hover { color: var(--rt-gold); border-color: var(--rt-border-light); }
.btn-lg { padding: 0.55rem 1.2rem; font-size: 13px; }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 11px; }

.select, .input {
  font-family: inherit; font-size: 12px;
  padding: 0.35rem 0.6rem; border-radius: 2px;
  border: 1px solid var(--rt-border);
  background: #0a0a0a; color: var(--rt-text);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}
.input { min-width: 160px; }

/* KPIs */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem; margin-bottom: 1rem;
}
.kpi-card { padding: 0.85rem; border-radius: var(--radius); }
.kpi-label {
  display: block; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--rt-gold-dim); margin-bottom: 0.3rem;
}
.kpi-value {
  font-family: var(--font-mono); font-size: 1.35rem; font-weight: 600;
  color: var(--rt-text);
}
.kpi-accent { color: var(--rt-win); text-shadow: 0 0 8px rgba(0,255,0,0.3); }
.kpi-sub {
  display: block; margin-top: 0.25rem;
  font-size: 10px; color: var(--rt-muted); letter-spacing: 0.02em;
}
.kpi-sub-gold {
  color: var(--rt-gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.form-row { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.form-pill {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  width: 1.25rem; height: 1.25rem; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #333;
}
.form-w { color: var(--rt-win); background: rgba(0,255,0,0.08); border-color: #004400; }
.form-l { color: var(--rt-loss); background: rgba(255,0,0,0.08); border-color: #440000; }
.form-d { color: var(--rt-draw); background: rgba(255,255,255,0.05); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}
.grid-2 .panel-card { margin-bottom: 0; }

/* Charts / bars */
.chart-area {
  display: flex; align-items: flex-end; gap: 0.25rem;
  height: 140px; padding-top: 0.35rem;
}
.trend-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; height: 100%; justify-content: flex-end;
}
.trend-bar {
  width: 100%; max-width: 22px; border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, #3a6a35 0%, var(--rt-green) 100%);
  min-height: 6px;
  box-shadow: 0 0 6px var(--rt-green-dim);
}
.trend-label { font-size: 9px; color: var(--rt-muted); margin-top: 0.2rem; }

.bar-track {
  height: 5px; border-radius: 1px;
  background: #1a1a1a; border: 1px solid #333; overflow: hidden;
}
.bar-sm { flex: 1; min-width: 50px; }
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3a6a35, var(--rt-green));
}

.map-list { display: flex; flex-direction: column; gap: 0.55rem; }
.map-row {
  display: grid; grid-template-columns: 1fr auto 1fr auto;
  align-items: center; gap: 0.5rem; font-size: 12px;
}
.map-name { color: var(--rt-text); }
.map-stat { color: var(--rt-muted); font-size: 10px; }
.map-wr { font-family: var(--font-mono); font-size: 12px; min-width: 2.2rem; text-align: right; color: var(--rt-green); }
.map-row.is-clickable { cursor: pointer; border-radius: 2px; padding: 0.15rem 0.25rem; margin: 0 -0.25rem; }
.map-row.is-clickable:hover { background: rgba(255,255,255,0.05); }
.map-row.is-clickable .map-name { color: var(--rt-gold); }

.match-filter-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-bottom: 0.65rem; padding: 0.65rem 0.75rem; border-radius: 2px;
  border: 1px solid var(--rt-border);
  background: linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
}
.hidden { display: none !important; }

.match-filter-panel.hidden { display: none; }
.match-filter-panel .input { flex: 1 1 180px; min-width: 140px; }

.match-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.match-columns-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.65rem;
  padding: 0.75rem;
  border-radius: 2px;
  border: 1px solid var(--rt-border);
  background: linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
}
@media (max-width: 720px) {
  .match-columns-panel { grid-template-columns: 1fr; }
}
.match-columns-panel.hidden { display: none; }
.match-columns-heading {
  margin: 0 0 0.5rem;
  font-size: 11px;
  font-weight: 600;
  color: var(--rt-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.match-columns-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.5rem;
}
.match-col-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  color: var(--rt-text);
  cursor: pointer;
}
.match-col-check input { accent-color: var(--rt-gold); }
.match-columns-check-actions,
.match-columns-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.match-columns-order {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--rt-border);
  border-radius: 2px;
  background: #0a0a0a;
}
.match-columns-order li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.match-columns-order li:last-child { border-bottom: none; }
.match-columns-order li.is-selected {
  background: rgba(201, 162, 39, 0.12);
  color: var(--rt-gold);
}
.match-col-order-vis {
  font-size: 10px;
  color: var(--rt-muted);
  text-transform: uppercase;
}
.delta-pos { color: var(--rt-win); }
.delta-neg { color: var(--rt-loss); }
.delta-zero { color: var(--rt-muted); }

.match-filter-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.6rem; padding: 0.5rem 0.75rem; border-radius: 2px;
  border: 1px solid var(--rt-border);
  background: linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
  font-size: 12px; color: var(--rt-text);
}
.match-filter-banner strong { color: var(--rt-gold); }

/* Bracket cards */
.bracket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem; margin-bottom: 1rem;
}
.bracket-card { padding: 0.85rem; border-radius: var(--radius); cursor: pointer; transition: border-color 0.12s ease; }
.bracket-card:hover { border-color: var(--rt-gold-dim); }
.bracket-card-active { border-color: var(--rt-gold); box-shadow: inset 0 0 0 1px var(--rt-gold), 0 0 10px rgba(202,168,74,0.18); }
.bracket-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.25rem;
}
.bracket-name { font-weight: 600; font-size: 12px; color: var(--rt-gold-dim); }
.bracket-cr { font-family: var(--font-mono); font-size: 1rem; color: var(--rt-green); }
.bracket-meta { font-size: 10px; color: var(--rt-muted); margin-bottom: 0.25rem; }
.bracket-delta { font-size: 10px; margin-bottom: 0.4rem; }
.delta-up { color: var(--rt-win); }
.delta-down { color: var(--rt-loss); }
.delta-flat { color: var(--rt-muted); }

/* Match history table (addon-style) */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rt-border);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.table-scroll { max-height: 480px; overflow-y: auto; }

.data-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  background: #080808;
}
.data-table th, .data-table td {
  padding: 0.4rem 0.55rem; text-align: center;
  border-bottom: 1px solid #222; white-space: nowrap;
}
.data-table th {
  background: linear-gradient(180deg, #1e1e1e 0%, #121212 100%);
  font-size: 11px; font-weight: 600;
  color: var(--rt-gold);
  position: sticky; top: 0; z-index: 1;
  border-bottom: 1px solid var(--rt-border);
}
.data-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.data-table tbody tr:hover td { background: rgba(116, 208, 108, 0.06); }
.data-table .num { font-family: var(--font-mono); font-size: 11px; }
.data-table .win { color: var(--rt-win); font-weight: 600; }
.data-table .loss { color: var(--rt-loss); font-weight: 600; }
.table-foot { font-size: 10px; color: var(--rt-muted); margin-top: 0.5rem; }

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table th.sortable:hover { color: var(--rt-gold); }
.data-table th.sort-asc,
.data-table th.sort-desc { color: var(--rt-gold); }
.data-table th.sortable::after {
  display: inline-block;
  width: 0.85em;
  margin-left: 0.25em;
  opacity: 0.85;
  font-size: 9px;
}
.data-table th.sortable.sort-asc::after { content: "▲"; }
.data-table th.sortable.sort-desc::after { content: "▼"; }
.data-table th.sortable:not(.sort-asc):not(.sort-desc)::after { content: ""; }

.rt-spec-cell { display: inline-flex; align-items: center; gap: 0.35rem; }

.spec-chip {
  font-size: 11px; color: var(--rt-green);
  text-shadow: 0 0 6px var(--rt-green-dim);
}
.result-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.result-win { color: var(--rt-win); }
.result-loss { color: var(--rt-loss); }
.result-draw { color: var(--rt-draw); }
.delta-cell { color: var(--rt-muted); font-size: 10px !important; }
#match-history-table tbody td { font-family: Verdana, Geneva, sans-serif; font-size: 14px; }
#match-history-table tbody td.delta-cell { font-size: 14px !important; font-weight: 700; }
#match-history-table tbody td.delta-cell * { font-weight: 700; }
#match-history-table thead th { font-family: Verdana, Geneva, sans-serif; font-size: 14px; color: var(--rt-muted); }
#match-history-table thead th.sortable:hover,
#match-history-table thead th.sort-asc,
#match-history-table thead th.sort-desc { color: var(--rt-gold); }
#match-history-table tbody td .result-badge { font-size: 14px; }
#match-history-table tbody td .result-badge.result-draw { color: var(--rt-muted); }
#match-history-table thead th.sortable { position: relative; }
#match-history-table thead th.sortable::after {
  position: absolute; right: 0.35em; top: 50%; transform: translateY(-50%);
  width: auto; margin-left: 0;
}

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 0.85rem; align-items: center;
  padding: 0.65rem; border: 1px solid var(--rt-border);
  background: #0c0c0c;
}

/* Meta / insights */
.meta-hero h2 { color: var(--rt-gold); margin-top: 0; }
.meta-hero p { margin: 0; color: var(--rt-muted); font-size: 12px; }
.meta-bottom { margin-top: 0.85rem; }

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem; margin-bottom: 0.85rem;
}
.insight-card { padding: 1rem; border-radius: var(--radius); }
.insight-tag {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--rt-gold);
}
.insight-card h3 { margin: 0.5rem 0 0.3rem; font-size: 13px; color: var(--rt-green); }
.insight-card p { margin: 0; font-size: 12px; color: var(--rt-muted); }
.insight-note { margin-top: 0.5rem !important; font-size: 10px !important; font-style: italic; }

/* Situational stats */
.situations-teaser { margin-bottom: 1rem; }
.situation-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}
.situation-teaser-card {
  font-family: inherit; text-align: left;
  padding: 0.85rem; border-radius: var(--radius);
  border: 1px solid var(--rt-border);
  background: #0a0a0a; cursor: pointer; color: var(--rt-text);
}
.situation-teaser-card:hover {
  border-color: rgba(116, 208, 108, 0.4);
  background: var(--rt-green-dim);
}
.situation-teaser-card strong {
  display: block; font-size: 12px; margin: 0.3rem 0;
  color: var(--rt-gold-dim);
}
.situation-teaser-stat {
  font-family: var(--font-mono); font-size: 13px; color: var(--rt-win);
}

.situations-hero h2 { color: var(--rt-gold); margin-top: 0; }
.situations-hero p { margin: 0 0 0.4rem; color: var(--rt-muted); font-size: 12px; }

.situation-filters { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.85rem; }
.chip.is-active {
  color: var(--rt-green); border-color: rgba(116, 208, 108, 0.35);
  background: var(--rt-green-dim);
}

.situation-list { display: flex; flex-direction: column; gap: 0.85rem; }
.situation-card { padding: 1rem 1.1rem; border-radius: var(--radius); }
.situation-card h3 { margin: 0.3rem 0 0.2rem; font-size: 13px; color: var(--rt-gold); }
.sit-category {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--rt-green);
}
.sit-detail { margin: 0 0 0.85rem; font-size: 11px; color: var(--rt-muted); }

.sit-bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.2rem 0.6rem;
  margin-bottom: 0.65rem;
}
.sit-bar-row.is-clickable {
  cursor: pointer;
  padding: 0.35rem 0.4rem;
  margin-left: -0.4rem;
  margin-right: -0.4rem;
  border-radius: 2px;
  transition: background 0.12s ease;
}
.sit-bar-row.is-clickable:hover { background: rgba(255,255,255,0.05); }
.sit-bar-row.is-clickable:hover .sit-bar-label { color: var(--rt-gold); }
.sit-bar-label { font-size: 12px; font-weight: 500; color: var(--rt-text); }
.sit-bar-meta { font-size: 10px; color: var(--rt-muted); font-weight: 400; }
.sit-bar-wr {
  grid-column: 2; grid-row: 1 / 3;
  font-family: var(--font-mono); font-size: 1.05rem;
  color: var(--rt-green); align-self: center;
}
.sit-bar-track {
  grid-column: 1; height: 6px;
  background: #111; border: 1px solid #333;
}
.sit-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3a6a35, var(--rt-green));
}
.sit-baseline {
  margin-top: 0.35rem; padding-top: 0.55rem;
  border-top: 1px solid #333; font-size: 11px; color: var(--rt-muted);
}
.sit-foot {
  margin: 0.65rem 0 0; padding-top: 0.55rem;
  border-top: 1px dashed #333; font-size: 10px;
  color: var(--rt-muted); font-style: italic;
}

.data-badge {
  display: inline-block; margin-left: 0.35rem;
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.12rem 0.35rem;
  border-radius: 2px; vertical-align: middle;
}
.data-badge-live {
  color: var(--rt-green); border: 1px solid rgba(116, 208, 108, 0.35);
  background: rgba(116, 208, 108, 0.1);
}
.data-badge-future {
  color: var(--rt-gold-dim); border: 1px solid #5a4a20;
  background: rgba(255, 209, 0, 0.06);
}

.situation-card-future { opacity: 0.72; }
.situation-list-future { margin-top: 0.5rem; }

.query-engine-panel h2 { color: var(--rt-gold); margin-top: 0; }
.query-ask-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.65rem 0; }
.query-ask-input { flex: 1 1 220px; min-width: 180px; }
.query-quick-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.query-advanced { margin-top: 0.65rem; font-size: 12px; color: var(--rt-muted); }
.query-advanced summary { cursor: pointer; color: var(--rt-gold); margin-bottom: 0.5rem; }
.query-filter-builder { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.5rem 0; }
.query-filter-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.query-filter-remove { min-width: 28px; padding: 0.15rem 0.4rem; line-height: 1; color: var(--rt-muted); }
.query-filter-remove:disabled { opacity: 0.35; cursor: default; }
.query-field-select { min-width: 140px; }
.query-op-select { width: 72px; }
.query-value-input { flex: 1 1 100px; min-width: 80px; }
.query-results-panel h2 { color: var(--rt-gold); margin: 0; }
.query-filter-text { font-size: 12px; color: var(--rt-muted); margin: 0 0 0.65rem; font-family: Consolas, monospace; }
.query-kpi-row, .query-compare-row { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 0.65rem; }
.query-summary-block { padding: 0.65rem; background: var(--rt-elevated); border: 1px solid var(--rt-border); border-radius: var(--radius); }
.query-summary-block h4 { margin: 0 0 0.35rem; color: var(--rt-gold); font-size: 12px; }
.query-kpi-grid { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; font-size: 12px; }
.query-results-actions { margin-top: 0.5rem; }
.query-pie-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.35rem;
}
.query-pie-svg { flex-shrink: 0; }
.query-pie-legend { display: flex; flex-direction: column; gap: 0.45rem; min-width: 180px; }
.query-pie-legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 0.45rem 0.55rem;
  align-items: center;
  font-size: 12px;
}
.query-pie-swatch { width: 12px; height: 12px; border-radius: 2px; }
.query-pie-legend-label { color: var(--rt-text); }
.query-pie-legend-meta { font-family: var(--font-mono); color: var(--rt-muted); white-space: nowrap; }
.query-pie-headline h4 { margin: 0 0 0.25rem; font-size: 1.05rem; color: var(--rt-gold); }
.sit-query-def { font-size: 11px; color: var(--rt-muted); font-family: Consolas, monospace; margin: 0 0 0.5rem; }
.sit-query-label { color: var(--rt-gold); }
.sit-view-btn { margin-top: 0.25rem; font-size: 11px; padding: 0.15rem 0.45rem; }

.match-row { cursor: pointer; }
.data-table tbody tr.match-row:nth-child(odd) td { background: rgba(255, 255, 255, 0.015); }
.data-table tbody tr.match-row:nth-child(even) td { background: rgba(255, 255, 255, 0.11); }
.data-table tbody tr.match-row.match-row-expanded td { background: #141418; }
.data-table tbody tr.match-row:hover td { background: rgba(116, 208, 108, 0.12); }
.match-row-expanded { background: #141418; }
.match-row-expanded td:first-child { box-shadow: inset 3px 0 0 var(--rt-green); }
.match-detail-row > td {
  padding: 0;
  border-bottom: 1px solid var(--rt-border);
  background: #0e0e11;
}
.match-detail-inline {
  padding: 0.75rem 0.85rem 1rem;
  border-top: 1px solid var(--rt-border);
}
.match-detail-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rt-border);
}
.match-detail-inline-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}
.match-share-status {
  margin: 0;
  font-size: 11px;
  max-width: 14rem;
  text-align: right;
  word-break: break-all;
}
.match-detail-inline-title {
  margin: 0;
  font-size: 1rem;
  color: var(--rt-gold);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.sit-schedule-hint {
  margin: 0.5rem 0 0;
}
.match-detail-inline-body,
.match-detail-body {
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding-right: 0.25rem;
}
.match-row:focus { outline: 1px solid var(--rt-green); outline-offset: -1px; }

.matches-page.view-active {
  display: block;
  width: 100%;
  max-width: none;
}
.matches-page .matches-table-wrap {
  max-height: none;
  overflow: visible;
}
.matches-page #match-history-table {
  border-collapse: separate;
  border-spacing: 0;
}
.matches-page #match-history-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: linear-gradient(180deg, #1e1e1e 0%, #121212 100%);
  box-shadow: 0 1px 0 var(--rt-border), 0 4px 8px rgba(0, 0, 0, 0.35);
}
.matches-page .match-detail-row > td {
  position: relative;
  z-index: 1;
}
.matches-page .match-detail-inline {
  padding: 1rem 1.2rem 1.4rem;
}
.matches-page .match-detail-inline-body,
.matches-page .match-detail-body {
  max-height: none;
  overflow: visible;
}
.matches-page .match-detail-inline-title {
  font-size: 1.15rem;
}
.matches-page .detail-subhead {
  font-size: 13px;
  margin-bottom: 1rem;
}
.matches-page .stat-strip {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}
.matches-page .stat-item {
  padding: 0.55rem 0.7rem;
}
.matches-page .stat-k {
  font-size: 10px;
}
.matches-page .stat-v {
  font-size: 15px;
}
.matches-page .detail-section {
  margin-top: 1.25rem;
}
.matches-page .detail-section h3 {
  font-size: 12px;
  margin-bottom: 0.65rem;
  padding-bottom: 0.35rem;
}
.matches-page .detail-section-primary h3 {
  font-size: 13px;
}
.matches-page .score-line {
  font-size: 1.65rem;
}
.matches-page .data-table {
  font-size: 13px;
}
.matches-page .data-table th {
  font-size: 12px;
  padding: 0.5rem 0.65rem;
}
.matches-page .data-table td {
  padding: 0.45rem 0.65rem;
}
.matches-page .data-table .num {
  font-size: 12px;
}
.matches-page .data-table.scoreboard {
  font-size: 15px;
}
.matches-page .data-table.scoreboard .num {
  font-size: 14px;
}
.matches-page .data-table.scoreboard .rt-player-cell .rt-player-name {
  font-size: 15px;
}
.matches-page .data-table.scoreboard .rt-spec-icon-slot,
.matches-page .data-table.scoreboard .rt-spec-class-dot,
.matches-page .data-table.scoreboard .rt-spec-icon {
  width: 22px;
  height: 22px;
}
.matches-page .shuffle-round-grid {
  gap: 0.75rem;
}
.matches-page .shuffle-round-box {
  font-size: 12px;
  padding: 0.75rem 0.85rem;
}
.matches-page .shuffle-round-side-label {
  font-size: 10px;
}
@media (min-width: 1400px) {
  .matches-page .shuffle-round-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.rt-match-tooltip {
  position: fixed;
  z-index: 500;
  left: 0;
  top: 0;
  max-width: min(480px, calc(100vw - 16px));
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
  background: rgba(13, 13, 18, 0.97);
  border: 1px solid rgba(140, 140, 150, 0.85);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  will-change: transform;
}
.rt-match-tooltip.hidden { display: none; }
.rt-tt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.rt-tt-map {
  font-size: 18px;
  font-weight: 700;
  color: #ffd100;
  flex: 1;
  min-width: 0;
}
.rt-tt-result { font-size: 18px; font-weight: 700; white-space: nowrap; }
.rt-tt-stat { margin-top: 0.2rem; }
.rt-tt-stat-label { color: #c8c8c8; }
.rt-tt-val { color: #fff; }
.rt-tt-pr .rt-tt-val { color: var(--rt-gold); font-weight: 700; }
.rt-tt-pr-note { color: #fff; font-size: 10px; font-style: italic; }
.rt-tt-muted { color: #aaa; }
.rt-tt-dur { color: #ffddaa; }
.rt-tt-delta-pos { color: #44ff66; }
.rt-tt-delta-neg { color: #ff4444; }
.rt-tt-delta-neutral { color: #ccc; }
.rt-tt-kb { color: #88ddaa; }
.rt-tt-deaths { color: #ff8888; }
.rt-tt-carts { color: #ffbb77; }
.rt-tt-dmg-y { color: #ff9966; }
.rt-tt-dmg-e { color: #ff6666; }
.rt-tt-heal-y { color: #66eebb; }
.rt-tt-heal-e { color: #44cc99; }
.rt-tt-score { color: #ffcc66; }
.rt-tt-stat-row-pair {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}
.rt-tt-section { margin: 0.55rem 0 0.35rem; }
.rt-tt-divider {
  height: 1px;
  background: rgba(140, 140, 150, 0.55);
  margin: 0.25rem 0;
}
.rt-tt-section-title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #ffd100;
  letter-spacing: 0.04em;
  padding: 0.15rem 0;
}
.rt-tt-rounds { margin-top: 0.15rem; }
.rt-tt-round-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 26px;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(90, 90, 100, 0.35);
}
.rt-tt-round-row:last-child { border-bottom: none; }
.rt-tt-round-num {
  width: 1.35rem;
  text-align: right;
  font-weight: 700;
  flex-shrink: 0;
}
.rt-tt-round-win { color: #44ff66; }
.rt-tt-round-loss { color: #ff4444; }
.rt-tt-round-draw,
.rt-tt-round-unknown { color: #ffd200; }
.rt-tt-team {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.rt-tt-vs {
  color: #ffd100;
  font-size: 16px;
  font-weight: 700;
  width: 1.75rem;
  text-align: center;
  flex-shrink: 0;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 -1px 0 #000,
    0 1px 0 #000,
    -1px 0 0 #000,
    1px 0 0 #000;
}
.rt-tt-round-dur {
  margin-left: auto;
  color: #ffddaa;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  min-width: 2.5rem;
  text-align: right;
}
.rt-tt-teams-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0.15rem;
}
.rt-tt-teams-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin: 0.35rem 0 0.15rem;
}
.rt-tt-teams-stack .rt-tt-team-side-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--rt-tt-icon-gap, 6px);
}
.rt-tt-vs-stack {
  width: auto;
  text-align: center;
  padding: 0.1rem 0;
  font-size: 18px;
}
.rt-tt-team-side {
  display: inline-flex;
  align-items: center;
  gap: var(--rt-tt-icon-gap, 6px);
}
.rt-tt-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 2px;
  width: var(--rt-tt-icon, 40px);
  height: var(--rt-tt-icon, 40px);
}
.rt-match-tooltip .rt-tt-icon .rt-spec-icon,
.rt-match-tooltip .rt-tt-icon .rt-spec-class-dot,
.rt-match-tooltip .rt-tt-icon img.rt-spec-icon {
  width: var(--rt-tt-icon, 40px) !important;
  height: var(--rt-tt-icon, 40px) !important;
  max-width: none;
  max-height: none;
}
.rt-tt-icon-empty {
  width: var(--rt-tt-icon, 40px);
  height: var(--rt-tt-icon, 40px);
  opacity: 0.15;
  background: rgba(255, 255, 255, 0.08);
}
.rt-tt-icon-self {
  box-shadow: 0 0 0 2px rgba(218, 178, 76, 0.95);
  border-radius: 2px;
}
.rt-tt-icon-dead {
  position: relative;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(200, 24, 24, 0.98);
}
.rt-tt-icon-dead::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: rgba(170, 16, 16, 0.32);
  pointer-events: none;
}
.rt-tt-icon-dead .rt-spec-icon,
.rt-tt-icon-dead .rt-spec-class-dot {
  filter: saturate(0.45) brightness(0.92);
}
.rt-tt-icon-self.rt-tt-icon-dead {
  box-shadow: 0 0 0 2px rgba(200, 24, 24, 0.98), 0 0 0 4px rgba(218, 178, 76, 0.95);
}
.rt-tt-icon-self .rt-spec-icon,
.rt-tt-icon-self .rt-spec-class-dot {
  box-shadow: none;
}
.rt-tt-lobby { margin-top: 0.25rem; }
.rt-tt-lobby-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0;
}
.rt-tt-lobby-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.rt-tt-lobby-row .rt-player-cell { flex: 1; min-width: 0; }
.rt-tt-lobby-row .rt-player-cell .rt-player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-tt-lobby-stats { color: #ccc; font-family: var(--font-mono); font-size: 11px; flex-shrink: 0; }
.rt-tt-team-label {
  font-size: 11px;
  font-weight: 700;
  margin: 0.35rem 0 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rt-tt-team-yours { color: #66ff66; }
.rt-tt-team-enemy { color: #ff6666; }
.rt-tt-wins { margin-top: 0.35rem; font-weight: 700; }
.rt-tt-empty { color: #999; text-align: center; margin: 0.35rem 0; font-size: 11px; }
.rt-tt-foot-wrap { margin-top: 0.45rem; }
.rt-tt-foot {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 14px;
  color: #c8c8c8;
}
.rt-tt-foot-accent { color: #ffd100; font-weight: 600; }

.rt-dmg-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 520;
  min-width: min(560px, calc(100vw - 16px));
  max-width: min(700px, calc(100vw - 16px));
  max-height: min(78vh, 600px);
  overflow: auto;
  padding: 10px 12px;
  font-size: 12px;
  color: #fff;
  background: rgba(13, 13, 18, 0.98);
  border: 1px solid rgba(140, 140, 150, 0.85);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  will-change: transform;
}
.rt-dmg-tooltip.hidden { display: none; }

/* Tooltip header */
.rt-dmg-tt-head {
  margin-bottom: 6px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(140, 140, 150, 0.3);
}
.rt-dmg-tt-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.rt-dmg-tt-name-row .rt-spec-icon {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  flex-shrink: 0;
}
.rt-dmg-tt-title { font-size: 14px; font-weight: 700; }
.rt-dmg-tt-contrib-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rt-dmg-tt-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 6px;
  border-radius: 2px;
}
.rt-dmg-tt-badge-damage { background: rgba(46, 109, 179, 0.28); color: #7ab8e8; border: 1px solid rgba(74, 159, 216, 0.35); }
.rt-dmg-tt-badge-healing { background: rgba(42, 140, 80, 0.28); color: #6dcc88; border: 1px solid rgba(68, 194, 110, 0.35); }
.rt-dmg-tt-badge-hybrid { background: rgba(160, 100, 20, 0.28); color: #e0aa50; border: 1px solid rgba(200, 140, 40, 0.35); }
.rt-dmg-tt-top-source { font-size: 10px; color: rgba(255, 255, 255, 0.5); }
.rt-dmg-tt-duration { font-size: 10px; color: rgba(255, 255, 255, 0.3); margin-left: auto; }
/* Legacy meta line - kept for non-tooltip use */
.rt-dmg-tt-meta { font-size: 11px; color: #c8c8c8; font-family: var(--font-mono); }

.rt-dmg-tt-section-head {
  margin: 0.25rem 0 0.25rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rt-gold-dim);
}
.rt-dmg-tt-divider {
  margin: 0.65rem 0 0.45rem;
  border-top: 1px solid rgba(140, 140, 150, 0.45);
}
.rt-dmg-tt-empty,
.rt-dmg-tt-loading {
  margin: 0;
  font-size: 11px;
  color: var(--rt-muted);
}

/* Tab navigation */
.rt-cl-breakdown { margin-top: 4px; }
.rt-ns-stats { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.35rem 0; }
.rt-ns-stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 12px; }
.rt-ns-label { color: var(--rt-muted); }
.rt-ns-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-ns-pct { font-size: 11px; color: var(--rt-muted); font-weight: 400; margin-left: 0.25rem; }
.rt-cl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.rt-cl-tab {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s, background 0.1s;
}
.rt-cl-tab:hover {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}
.rt-cl-tab.active {
  color: #ffd100;
  border-bottom-color: #ffd100;
  background: rgba(255, 209, 0, 0.07);
}
.rt-cl-tab-panel { display: none; padding-top: 6px; }
.rt-cl-tab-panel.active { display: block; }

/* Profile summary - compact horizontal */
.rt-spell-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  padding: 4px 8px;
  margin-bottom: 5px;
}
.rt-spell-profile-item {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 3px;
}
.rt-spell-profile-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.32);
}
.rt-spell-profile-val { font-size: 10px; font-weight: 600; color: #d0d0d0; }

/* Performance cards */
.rt-spell-cards { display: flex; flex-direction: column; gap: 3px; }
.rt-spell-card {
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.022);
  border-radius: 3px;
  border-left: 2px solid transparent;
}
.rt-spell-card-top {
  background: rgba(255, 255, 255, 0.045);
  border-left-color: rgba(255, 209, 0, 0.2);
}
.rt-spell-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.rt-spell-card-name-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.rt-spell-card-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #e4e4e4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rt-spell-card-top .rt-spell-card-name { font-size: 11.5px; }
.rt-spell-card-pct {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffd100;
  margin-left: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.rt-spell-card-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}
.rt-spell-card-top .rt-spell-card-bar { height: 5px; }
.rt-spell-card-bar-fill { height: 100%; border-radius: 2px; }
.rt-spell-cards-damage .rt-spell-card-bar-fill { background: linear-gradient(90deg, #2b65a8, #4a96cc); }
.rt-spell-cards-heal .rt-spell-card-bar-fill { background: linear-gradient(90deg, #267a47, #42b866); }
.rt-spell-cards-taken .rt-spell-card-bar-fill { background: linear-gradient(90deg, #8c3218, #c84c28); }
.rt-spell-cards-utility .rt-spell-card-bar-fill { background: linear-gradient(90deg, #6a4aaa, #9870dd); }
/* Inline stats row */
.rt-spell-card-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1px 8px;
}
.rt-spell-card-amount {
  font-size: 10.5px;
  font-weight: 700;
  color: #c8c8c8;
  font-family: var(--font-mono);
}
.rt-spell-card-absorb { font-size: 9px; color: rgba(255, 255, 255, 0.32); }
.rt-spell-card-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
}
.rt-stat-dot { color: rgba(255, 255, 255, 0.22); margin: 0 1px; }
.rt-stat-pipe { color: rgba(255,255,255,0.18); margin: 0 4px; }
.rt-stat-label { color: rgba(255,255,255,0.45); font-size: 9.5px; font-weight: 400; }
.rt-stat-val { color: rgba(255,255,255,0.75); }
.rt-stat-max { color: #e8c97a; font-weight: 600; }

/* Target lists inside utility/interrupt cards */
.rt-spell-card-targets { margin-top: 6px; }
.rt-int-targets { display: flex; flex-direction: column; gap: 4px; }
.rt-int-spell-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #c8c8c8;
}
.rt-int-spell-name { flex: 1; }
.rt-int-count { font-size: 10px; color: rgba(255, 255, 255, 0.4); margin-left: 4px; }
.rt-int-victim-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 22px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
}
.rt-util-targets { display: flex; flex-direction: column; gap: 3px; }
.rt-util-target { display: flex; align-items: center; gap: 5px; font-size: 10.5px; }

/* Player reference (spec icon + class-colored name, used everywhere) */
.rt-player-ref {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
  min-width: 0;
}
.rt-player-ref .rt-spec-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  flex-shrink: 0;
}
.rt-player-ref-name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CC actor rows inside CC cards */
.rt-cc-actors { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.rt-cc-actor {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.rt-cc-actor-stats {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}
.rt-cc-targets-wrap { margin-top: 4px; }

.wcl-dmg-table col.wcl-col-absorb { width: 7%; }
.wcl-utility-table col.wcl-col-targets { width: 52%; }
.wcl-utility-targets { display: flex; flex-direction: column; gap: 0.2rem; text-align: left; }
.wcl-utility-target {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.wcl-utility-target .wcl-spell-icon { width: 18px; height: 18px; }
.wcl-utility-target-name { font-size: 12px; color: var(--rt-text); }

.wcl-interrupt-summary { margin: 0 0 0.5rem; font-size: 12px; color: var(--rt-muted); }
.wcl-utility-table col.wcl-col-used { width: 10%; }
.wcl-interrupt-targets { gap: 0.35rem; }
.wcl-interrupt-target { flex-wrap: wrap; }
.wcl-interrupt-victim { font-size: 12px; color: var(--rt-accent, #74d06c); font-weight: 600; }
.wcl-interrupt-arrow { font-size: 11px; color: var(--rt-muted); }
.wcl-interrupt-count { font-size: 11px; color: var(--rt-muted); }
.sb-kick-cell { cursor: help; text-decoration: underline dotted rgba(255, 255, 255, 0.25); }
.sb-kick-cell:hover { color: var(--rt-accent, #74d06c); }
.rt-interrupt-tooltip { max-width: min(520px, 92vw); }
.wcl-cc-summary {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 0.55rem;
  font-size: 11px;
  color: var(--rt-muted);
  font-family: var(--font-mono);
}
.wcl-cc-section-head {
  margin-top: 0.55rem;
}
.wcl-cc-section-head:first-child {
  margin-top: 0;
}
.wcl-cc-table col.wcl-col-time {
  width: 12%;
}
.wcl-cc-targets {
  gap: 0.25rem;
}
.wcl-cc-target {
  justify-content: space-between;
}

.match-detail { margin-top: 1rem; }
.detail-section h3 .detail-count {
  font-size: 10px;
  font-weight: normal;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rt-muted);
  margin-left: 0.35rem;
}
.detail-dl {
  display: grid; grid-template-columns: 140px 1fr;
  gap: 0.35rem 0.75rem; margin: 0; font-size: 12px;
}
.detail-dl dt { color: var(--rt-gold-dim); margin: 0; }
.detail-dl dd { margin: 0; color: var(--rt-text); font-family: var(--font-mono); font-size: 11px; }
.detail-note { margin: 0.85rem 0 0; font-size: 11px; color: var(--rt-muted); }

.faction-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}
.faction-block { --faction-color: var(--rt-green); }
.faction-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.25rem; }
.faction-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--faction-color);
  box-shadow: 0 0 6px var(--faction-color);
}
.faction-sub { display: block; font-size: 10px; color: var(--rt-muted); }
.faction-wr { font-family: var(--font-mono); font-size: 1.2rem; color: var(--rt-green); margin-bottom: 0.25rem; }
.faction-fill { background: var(--faction-color); opacity: 0.9; }
.faction-meta { font-size: 10px; color: var(--rt-muted); margin-top: 0.25rem; }

/* Upload / settings */
.upload-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0.85rem;
}
@media (max-width: 800px) {
  .upload-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
.upload-main-solo { max-width: 42rem; }
.view-title { color: var(--rt-gold); margin: 0 0 0.35rem; font-size: 1.15rem; }
.upload-path-list { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.upload-path-block { display: flex; flex-direction: column; gap: 0.35rem; }
.upload-path-row {
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: center;
}
.upload-path-label { font-size: 11px; font-weight: 600; color: var(--rt-muted); }
.upload-path-file { font-size: 11px; color: var(--rt-muted); }
.upload-path-file code { font-size: 10px; color: var(--rt-text); }
.upload-path-steps {
  margin: 0.35rem 0 0; padding-left: 1.15rem; font-size: 12px; line-height: 1.55; color: var(--rt-text);
}
.upload-path-steps li { margin-bottom: 0.35rem; }
.upload-path-steps li:last-child { margin-bottom: 0; }
.upload-path-steps code { font-size: 10px; }
.upload-path-code {
  font-size: 10px; word-break: break-all; user-select: all;
  padding: 0.35rem 0.5rem; background: #0a0a0a; border: 1px solid var(--rt-border); border-radius: var(--radius);
}
.upload-copy-btn { flex-shrink: 0; }
.upload-drag-note { font-size: 12px; color: var(--rt-muted); margin: 0 0 0.75rem; }
.upload-steps {
  margin: 0.75rem 0 0; padding-left: 1.25rem; font-size: 13px; line-height: 1.55; color: var(--rt-text);
}
.upload-steps li { margin-bottom: 0.65rem; }
.upload-steps li:last-child { margin-bottom: 0; }
.upload-steps code {
  display: inline-block; margin-top: 0.25rem; font-size: 11px; word-break: break-all;
}
.upload-main h2 { color: var(--rt-gold); margin-top: 0; }
.coming-soon-banner {
  padding: 0.55rem 0.75rem; margin-bottom: 0.85rem;
  border: 1px solid #3a5020;
  background: rgba(116, 208, 108, 0.08);
  font-size: 12px; color: var(--rt-green);
}
.dropzone {
  border: 2px dashed #444; padding: 2rem 1rem;
  text-align: center; margin: 0.85rem 0; background: #0a0a0a;
}
.dropzone-disabled { opacity: 0.45; cursor: not-allowed; }
.dropzone-active { border-color: var(--rt-green); background: var(--rt-green-dim); }
.feedback-form { display: flex; flex-direction: column; gap: 0.85rem; max-width: 32rem; }
.feedback-field { display: flex; flex-direction: column; gap: 0.35rem; }
.feedback-label { font-size: 11px; font-weight: 600; color: var(--rt-muted); }
.feedback-textarea {
  width: 100%; min-height: 6rem; padding: 0.5rem 0.65rem; font: inherit; font-size: 13px;
  background: #0a0a0a; border: 1px solid var(--rt-border); border-radius: var(--radius); color: var(--rt-text);
  resize: vertical;
}
.feedback-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.settings-tab.is-active { color: var(--rt-gold); border-color: var(--rt-gold); }

.upload-status { font-size: 12px; color: var(--rt-green); margin: 0.5rem 0 0; min-height: 1.2em; }
.upload-folder-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem;
  margin: 0.55rem 0 0;
}
.upload-folder-note { font-size: 11px; color: var(--rt-muted); }
.upload-status-err { color: var(--rt-loss); }
.dropzone-icon { display: block; font-size: 1.25rem; margin-bottom: 0.35rem; color: var(--rt-muted); }
.dropzone-title { display: block; font-weight: 600; color: var(--rt-gold-dim); }
.dropzone-hint { font-size: 11px; color: var(--rt-muted); }
.dropzone-sm { padding: 0.75rem 1rem; margin-top: 0.5rem; }
.combat-log-link-panel { margin-bottom: 0.65rem; }
.combat-log-link-lede { margin-top: 0; margin-bottom: 0.35rem; }
.combat-log-path { margin: 0 0 0.25rem; }
.combat-log-path code { font-size: 11px; word-break: break-all; color: var(--rt-green); }
.wow-logs-picker {
  position: fixed; inset: 0; z-index: 500; background: rgba(0, 0, 0, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.wow-logs-picker.hidden { display: none; }
.wow-logs-picker-inner { width: min(520px, 100%); max-height: min(70vh, 560px); display: flex; flex-direction: column; }
.wow-logs-picker-list {
  overflow: auto; flex: 1; min-height: 6rem; max-height: 320px;
  border: 1px solid var(--rt-border); background: #0a0a0a;
}
.wow-logs-picker-row {
  display: block; width: 100%; text-align: left; padding: 0.5rem 0.65rem;
  border: 0; border-bottom: 1px solid var(--rt-border); background: transparent;
  color: var(--rt-text); font-family: var(--font-mono); font-size: 12px; cursor: pointer;
}
.wow-logs-picker-row:hover { background: var(--rt-green-dim); color: var(--rt-gold-dim); }
.wow-logs-picker-empty { padding: 0.75rem; color: var(--rt-muted); font-size: 12px; margin: 0; }
.steps { margin: 0.35rem 0 0; padding-left: 1.1rem; color: var(--rt-muted); font-size: 12px; }
.muted-card p { margin: 0; font-size: 12px; color: var(--rt-muted); }
.store-line { margin: 0 0 0.15rem; font-size: 13px; }
.store-line strong { color: var(--rt-gold); font-size: 18px; }
.store-sub { margin: 0 0 0.6rem; font-size: 11px; color: var(--rt-muted); }

.settings-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.85rem;
}
@media (max-width: 640px) { .settings-layout { grid-template-columns: 1fr; } }
.settings-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.settings-tab.is-active { color: var(--rt-gold); border-color: var(--rt-border); background: #141414; }
.settings-panel h2 { color: var(--rt-gold); margin-top: 0; }
.schedule-window-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0;
}
.schedule-time-field { display: flex; flex-direction: column; gap: 0.25rem; }
.schedule-time-input {
  background: var(--rt-elevated);
  border: 1px solid var(--rt-border);
  color: var(--rt-text);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius);
  font-size: 13px;
}
.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.85rem; padding: 0.85rem 0; border-bottom: 1px solid #2a2a2a;
}
.setting-desc { margin: 0.2rem 0 0; font-size: 11px; color: var(--rt-muted); }

.cloud-heading { color: var(--rt-gold); margin-top: 1.5rem; border-top: 1px solid #2a2a2a; padding-top: 1.25rem; }
.cloud-provider-row { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0.75rem 0; }
.cloud-radio { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 13px; color: var(--rt-text); cursor: pointer; }
.cloud-fields { margin: 0.5rem 0 0.85rem; }
.cloud-fields.hidden { display: none; }
.setting-row-col { display: flex; flex-direction: column; gap: 0.3rem; }
.cloud-input {
  background: var(--rt-elevated);
  border: 1px solid var(--rt-border);
  color: var(--rt-text);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius);
  font-size: 13px;
  width: 100%;
  max-width: 520px;
  margin-top: 0.2rem;
}
.cloud-input:focus { outline: none; border-color: var(--rt-gold); }

.panel {
  padding: 0.75rem; border: 1px solid var(--rt-border);
  background: #0a0a0a; font-size: 12px; margin-top: 0.85rem;
}
.panel.highlight {
  border-color: rgba(116, 208, 108, 0.35);
  background: rgba(116, 208, 108, 0.06);
  color: var(--rt-muted);
}

/* Toggle */
.toggle-row {
  display: flex; align-items: flex-start; gap: 0.65rem;
  cursor: pointer; user-select: none;
}
.toggle-inline { margin: 0; }
.toggle-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-ui {
  flex-shrink: 0; width: 40px; height: 22px; border-radius: 2px;
  background: #1a1a1a; border: 1px solid var(--rt-border); position: relative;
}
.toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 1px;
  background: linear-gradient(180deg, #ccc 0%, #888 100%);
  transition: transform 0.15s;
}
.toggle-row input:checked + .toggle-ui {
  background: #1a3018; border-color: var(--rt-green);
}
.toggle-row input:checked + .toggle-ui .toggle-knob { transform: translateX(18px); }
.toggle-text { display: flex; flex-direction: column; gap: 0.1rem; }
.toggle-desc { font-size: 11px; color: var(--rt-muted); }

.live-sync-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(116, 208, 108, 0.35);
  background: rgba(116, 208, 108, 0.08);
  border-radius: var(--radius);
  font-size: 12px;
}
.live-sync-banner.hidden { display: none; }
.live-sync-banner.live-sync-err {
  border-color: rgba(255, 120, 120, 0.45);
  background: rgba(255, 80, 80, 0.08);
}
.live-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rt-green);
  flex-shrink: 0;
}
.live-sync-banner.live-sync-waiting .live-sync-dot { background: #c9a227; }
.live-sync-banner.live-sync-err .live-sync-dot { background: #ff6666; }
.live-sync-banner.live-sync-active .live-sync-dot {
  animation: live-sync-pulse 1.6s ease-in-out infinite;
}
.live-sync-banner.live-sync-busy .live-sync-dot {
  animation: live-sync-pulse 0.85s ease-in-out infinite;
  background: #c9a227;
}
.live-sync-banner.live-sync-busy #live-sync-sync-now {
  opacity: 0.55;
  pointer-events: none;
}
@keyframes live-sync-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.live-sync-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.live-sync-detail {
  font-size: 11px;
  color: var(--rt-muted);
}

/* Footer */
.site-footer {
  padding: 1.5rem 1.25rem; border-top: 1px solid var(--rt-border);
  background: #080808;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 0.35rem; font-size: 11px; color: var(--rt-muted);
}
.footer-note { opacity: 0.7; }

code { font-family: var(--font-mono); font-size: 0.92em; color: var(--rt-green); }

/* Stream widget (fixed, all views, muted autoplay) */
.stream-widget {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 400px;
  z-index: 200;
  border: 1px solid #333;
  background: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.stream-widget.is-minimized {
  width: auto;
  min-width: 10rem;
  max-width: calc(100vw - 2rem);
}

.stream-widget-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: linear-gradient(180deg, #161616 0%, #0a0a0a 100%);
  border-bottom: 1px solid #333;
}

.stream-widget.is-minimized .stream-widget-bar {
  border-bottom: none;
}

.stream-widget-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--rt-green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-widget-toggle {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--rt-border);
  border-radius: var(--radius);
  background: #1a1a1a;
  color: var(--rt-text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.stream-widget-toggle:hover {
  border-color: var(--rt-green);
  color: var(--rt-green);
}

.stream-widget.is-minimized .streamer-embed-wrap {
  display: none;
}

body.app-shell-active .stream-widget {
  display: block;
}

.streamer-embed-wrap {
  width: 400px;
  height: 300px;
  background: #000;
}

#stream-embed-host,
#stream-embed-host iframe {
  width: 400px !important;
  height: 300px !important;
  display: block;
  border: 0;
}

@media (max-width: 440px) {
  .stream-widget,
  .streamer-embed-wrap,
  #stream-embed-host,
  #stream-embed-host iframe {
    width: calc(100vw - 2rem);
    max-width: 400px;
    height: 300px;
  }
}

/* Bracket cards (richer) */
.bracket-sub { font-size: 10px; color: var(--rt-muted); margin-bottom: 0.4rem; min-height: 1em; }
.bracket-wr { font-size: 10px; color: var(--rt-gold-dim); margin-top: 0.3rem; }

/* Rating trend (SVG line) */
.rating-trend { width: 100%; }
.rating-svg { width: 100%; height: 116px; display: block; }
.rating-trend-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--rt-muted);
  margin-top: 0.35rem; padding-top: 0.3rem; border-top: 1px solid var(--rt-border);
}
.rating-trend-legend {
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.85rem;
  margin-top: 0.35rem; padding-top: 0.3rem; border-top: 1px solid var(--rt-border);
  font-family: var(--font-mono); font-size: 10px; color: var(--rt-muted);
}
.rating-trend-legend-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.rating-trend-swatch {
  width: 10px; height: 3px; border-radius: 1px; flex-shrink: 0;
}

/* Match detail (rich) */
#match-detail-title { display: flex; align-items: center; gap: 0.6rem; }
.detail-subhead { margin: 0 0 0.75rem; font-size: 12px; color: var(--rt-muted); }
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem; margin-bottom: 1rem;
}
.stat-item {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.45rem 0.55rem; background: #0a0a0a; border: 1px solid var(--rt-border);
  border-radius: var(--radius);
}
.stat-k { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rt-gold-dim); }
.stat-v { font-family: var(--font-mono); font-size: 13px; color: var(--rt-text); }
.detail-section { margin-top: 1rem; }
.detail-section h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--rt-gold-dim); margin: 0 0 0.5rem; border-bottom: 1px solid var(--rt-border);
  padding-bottom: 0.25rem;
}
.score-line { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 1.4rem; }
.score-red { color: #e05252; }
.score-blue { color: #4d8fd9; }
.score-sep { color: var(--rt-muted); }

.detail-section-primary { margin-top: 0.75rem; }
.detail-section-primary h3 { color: var(--rt-gold); font-size: 12px; }
.dmg-breakdown-panel {
  position: relative; overflow: hidden;
  background: #0a0a0a; border: 1px solid var(--rt-border); border-radius: var(--radius);
  padding: 0;
}
.dmg-class-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.dmg-breakdown-inner { padding: 0.65rem 0.75rem 0.75rem 0.85rem; }
.dmg-stat-strip { margin-bottom: 0.65rem; }
.dmg-hint { margin: 0 0 0.5rem; }
.dmg-player-label { display: block; font-size: 11px; color: var(--rt-muted); margin-bottom: 0.35rem; }
.dmg-player-row { margin-bottom: 0.65rem; }
.dmg-player-select-wrap {
  position: relative; max-width: 24rem;
}
.dmg-player-select-btn {
  display: flex; align-items: center; gap: 0.45rem; width: 100%;
  padding: 0.4rem 0.55rem; border: 1px solid var(--rt-border); border-radius: var(--radius);
  background: #0a0a0a; color: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.dmg-player-select-btn:hover { border-color: var(--rt-gold-dim); }
.dmg-player-select-btn .rt-player-cell { flex: 1; min-width: 0; }
.dmg-player-select-opt .rt-player-cell { flex: 1; min-width: 0; }
.rt-player-cell {
  display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; max-width: 100%;
}
.rt-player-cell .rt-player-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoreboard .sb-name .rt-player-cell { display: flex; }
.dmg-player-select-chevron { color: var(--rt-muted); font-size: 10px; flex-shrink: 0; }
.dmg-player-select-menu {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px);
  max-height: 16rem; overflow-y: auto;
  border: 1px solid var(--rt-border); border-radius: var(--radius);
  background: #0a0a0a; box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}
.dmg-player-select-opt {
  display: flex; align-items: center; gap: 0.45rem; width: 100%;
  padding: 0.38rem 0.55rem; border: none; background: transparent;
  color: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.dmg-player-select-opt:hover { background: rgba(255,255,255,0.06); }
.dmg-player-select-opt.selected { background: rgba(201,162,39,0.12); }
.dmg-player-select-opt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combat-match-stats { margin-bottom: 0.75rem; }
.rt-spec-icon-slot { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; }
.rt-spec-class-dot { width: 18px; height: 18px; border-radius: 2px; flex-shrink: 0; display: inline-block; }
.rt-spec-icon { display: inline-block; vertical-align: middle; border-radius: 2px; flex-shrink: 0; width: 18px; height: 18px; }

.wcl-table-wrap { overflow-x: auto; margin-top: 0.35rem; }
.wcl-dmg-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  table-layout: fixed;
}
.wcl-dmg-table thead th {
  padding: 0.35rem 0.4rem; text-align: center; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--rt-gold-dim);
  border-bottom: 1px solid var(--rt-border); font-weight: 600;
}
.wcl-dmg-table thead th.wcl-col-name { text-align: left; }
.wcl-dmg-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.wcl-dmg-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.045); }
.wcl-dmg-table tbody tr:nth-child(odd) td { background: rgba(0, 0, 0, 0.12); }
.wcl-dmg-table tbody tr:hover td { background: rgba(255, 255, 255, 0.08); }
.wcl-dmg-table td { padding: 0.28rem 0.4rem; vertical-align: middle; text-align: center; }
.wcl-dmg-table td.wcl-col-name { text-align: left; }
.wcl-dmg-table .num { text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--rt-text); }
.wcl-dmg-table col.wcl-col-name { width: 18%; }
.wcl-dmg-table col.wcl-col-amount { width: 18%; }
.wcl-dmg-table col.wcl-col-casts { width: 6%; }
.wcl-dmg-table col.wcl-col-avg { width: 8%; }
.wcl-dmg-table col.wcl-col-hits { width: 6%; }
.wcl-dmg-table col.wcl-col-hitpct { width: 6%; }
.wcl-dmg-table col.wcl-col-avghit { width: 8%; }
.wcl-dmg-table col.wcl-col-maxhit { width: 8%; }
.wcl-dmg-table col.wcl-col-crit { width: 6%; }
.wcl-dmg-table col.wcl-col-dps { width: 8%; }
.wcl-col-amount { overflow: hidden; }
.wcl-name-cell { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.wcl-spell-name {
  font-weight: 600; color: var(--rt-text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.wcl-spell-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  border: 1px solid #2a2a2a; border-radius: 2px; background: #0d0d0d;
  object-fit: cover;
}
.wcl-spell-icon-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--rt-muted);
}
.wcl-amount-cell {
  display: flex; align-items: center; justify-content: center; gap: 0.35rem; min-width: 0; max-width: 100%;
}
.wcl-pct { flex: 0 0 54px; font-family: var(--font-mono); font-size: 11px; color: var(--rt-muted); text-align: center; }
.wcl-amt { flex: 0 0 58px; font-family: var(--font-mono); font-size: 11px; color: var(--rt-text); text-align: center; }
.wcl-bar {
  flex: 1 1 auto; min-width: 36px; height: 14px; background: rgba(0,0,0,0.45);
  border: 1px solid rgba(0,0,0,0.35); border-radius: 1px; overflow: hidden;
}
.wcl-bar-fill { height: 100%; background: #c9a227; min-width: 1px; }
.wcl-rate { color: #74d06c; font-weight: 600; }
.wcl-total-row td { border-top: 1px solid var(--rt-border); padding-top: 0.45rem; font-weight: 600; }
.wcl-total-row .wcl-spell-name { font-weight: 700; }

.dmg-spell-head {
  display: grid; grid-template-columns: 28px 1fr 40px 72px 44px; gap: 0.45rem; align-items: center;
  padding: 0.2rem 0.45rem 0.35rem; font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--rt-gold-dim);
}
.dmg-spell-head-hits, .dmg-spell-hits { text-align: right; font-family: var(--font-mono); color: var(--rt-muted); font-size: 11px; }
.dmg-spell-head-amt, .dmg-spell-head-pct { text-align: right; font-family: var(--font-mono); }
.dmg-spell-list { display: flex; flex-direction: column; gap: 2px; }
.dmg-spell-row {
  display: grid; grid-template-columns: 28px 1fr; gap: 0.45rem; align-items: center;
  padding: 0.28rem 0.4rem 0.28rem 0.35rem;
  border: 1px solid rgba(255,255,255,0.05); border-left-width: 3px;
  border-radius: 2px;
}
.dmg-spell-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  border: 1px solid #2a2a2a; border-radius: 3px; background: #0d0d0d;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  image-rendering: auto; object-fit: cover;
}
.dmg-spell-icon-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.dmg-spell-body { min-width: 0; }
.dmg-spell-top {
  display: grid; grid-template-columns: 1fr 40px 72px 44px; gap: 0.45rem; align-items: baseline;
  margin-bottom: 0.2rem;
}
.dmg-spell-name { font-size: 12px; font-weight: 600; color: var(--rt-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmg-spell-amt { font-family: var(--font-mono); font-size: 12px; text-align: right; color: var(--rt-text); }
.dmg-spell-pct { font-family: var(--font-mono); font-size: 11px; text-align: right; color: var(--rt-muted); }
.dmg-bar {
  height: 5px; background: rgba(0,0,0,0.5); border: 1px solid rgba(0,0,0,0.35);
  border-radius: 1px; overflow: hidden;
}
.dmg-bar-fill { height: 100%; min-width: 1px; opacity: 0.95; }
.detail-collapsible { margin-top: 0.85rem; border: 1px solid var(--rt-border); border-radius: var(--radius); padding: 0.35rem 0.55rem; }
.detail-collapsible summary {
  cursor: pointer; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--rt-gold-dim); user-select: none;
}
.detail-collapsible[open] summary { margin-bottom: 0.35rem; }
.combat-linked-note { margin-top: 0.75rem; }

.scoreboard { width: 100%; font-size: 14px; }
.scoreboard .sb-name { font-weight: 600; text-align: left; }
.data-table.scoreboard th { font-size: 12px; }
.data-table.scoreboard th:first-child { text-align: left; }
.data-table.scoreboard th:not(:first-child) { text-align: center; }
.data-table.scoreboard td:not(.sb-name) { text-align: center; }
.data-table.scoreboard td.num { text-align: center; }
.data-table.scoreboard .num { font-size: 13px; }
.data-table.scoreboard tbody tr.sb-row:nth-child(even):not(.sb-owner) td {
  background: rgba(255, 255, 255, 0.035);
}
.data-table.scoreboard tbody tr.sb-row:nth-child(odd):not(.sb-owner) td {
  background: rgba(0, 0, 0, 0.18);
}
.data-table.scoreboard tbody tr.sb-row.sb-owner:nth-child(even) td {
  background: rgba(255, 209, 0, 0.16);
}
.data-table.scoreboard tbody tr.sb-row.sb-owner:nth-child(odd) td {
  background: rgba(255, 209, 0, 0.11);
}
.data-table.scoreboard .rt-player-cell .rt-player-name { font-size: 14px; }
.data-table.scoreboard .rt-spec-icon-slot,
.data-table.scoreboard .rt-spec-class-dot,
.data-table.scoreboard .rt-spec-icon { width: 20px; height: 20px; }
.data-table.scoreboard td.num .delta-up,
.data-table.scoreboard td.num .delta-down,
.data-table.scoreboard td.num .delta-flat {
  margin-left: 0.2em;
}
.data-table.scoreboard td.num {
  white-space: nowrap;
}

.data-table.scoreboard tbody tr.sb-row.sb-owner td {
  background: rgba(255, 209, 0, 0.14);
  box-shadow: inset 3px 0 0 rgba(255, 209, 0, 0.55);
}
.data-table.scoreboard tbody tr.sb-row.sb-player-selected td {
  background: rgba(116, 208, 108, 0.16);
  box-shadow: inset 3px 0 0 rgba(116, 208, 108, 0.9);
}
.data-table.scoreboard tbody tr.sb-row.sb-player-selected:hover td {
  background: rgba(116, 208, 108, 0.2);
}
.data-table.scoreboard tbody tr.sb-row-clickable { cursor: pointer; }
.data-table.scoreboard tbody tr.sb-row-clickable:not(.sb-player-selected):hover td {
  background: rgba(116, 208, 108, 0.08);
}

.match-drilldown-slot.drill-flash {
  outline: 2px solid rgba(116, 208, 108, 0.85);
  outline-offset: 2px;
  transition: outline-color 0.25s ease;
}

.match-cl-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.05rem 0.35rem;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: var(--rt-green);
  border-radius: 3px;
  vertical-align: middle;
}
.pr-cell {
  color: var(--rt-gold) !important;
  font-weight: 700;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.match-cl-badge-lg { font-size: 10px; padding: 0.1rem 0.45rem; }
.match-cl-badge-muted { background: rgba(116, 208, 108, 0.25); color: var(--rt-green); }
.match-row-has-log td:first-child { white-space: nowrap; }

.sb-row.sb-owner td { background: rgba(255, 209, 0, 0.07); }
.sb-row.sb-player-selected td { background: rgba(116, 208, 108, 0.12); box-shadow: inset 3px 0 0 rgba(116, 208, 108, 0.85); }
tr.sb-drill-row td {
  padding: 0.35rem 0.5rem 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--rt-border);
}
tr.sb-drill-row .sb-player-drill,
tr.sb-drill-row .sb-player-heal-drill {
  margin: 0;
  border: 1px solid var(--rt-border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
}
tr.sb-drill-row .sb-player-drill-inner { padding: 0.25rem 0.35rem 0.45rem; }
tr.sb-drill-row .sb-player-heal-drill { margin-top: 0.45rem; }
.sb-spec { color: var(--rt-muted); font-size: 11px; }
.sb-team-block { margin-bottom: 0.85rem; }
.sb-team-label {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.75rem 0 0.25rem;
  text-align: center;
}
.sb-team-mmr {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.sb-mine .sb-team-mmr { color: var(--rt-text); }
.sb-enemy .sb-team-mmr { color: var(--rt-text); }
.sb-team-totals {
  text-align: center;
  font-size: 14px;
  color: var(--rt-muted);
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
}
.sb-team-alliance .sb-team-label { color: #4d8fd9; }
.sb-team-horde .sb-team-label { color: #e05252; }

.round-list { display: flex; flex-direction: column; gap: 0.3rem; }
.round-row {
  display: grid; grid-template-columns: 32px 1fr 24px 1fr 48px 44px;
  align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.45rem; background: #0a0a0a; border: 1px solid var(--rt-border);
  border-radius: var(--radius); font-size: 11px;
}
.round-num { font-family: var(--font-mono); color: var(--rt-gold-dim); }
.round-team { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.round-spec { font-size: 10px; }
.round-vs { color: var(--rt-muted); text-align: center; }
.round-res { font-weight: 700; font-size: 10px; }
.round-dur { font-family: var(--font-mono); color: var(--rt-muted); text-align: right; }

/* Round-by-round: six boxes are a selectable timeline; one analysis panel below. */
.shuffle-round-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; align-items: stretch;
}
@media (max-width: 900px) {
  .shuffle-round-grid { grid-template-columns: repeat(2, 1fr); }
}
.shuffle-round-box {
  --sr-accent: var(--rt-gold-dim);
  --sr-radius: 14px;
  position: relative;
  display: flex; flex-direction: column; width: 100%; text-align: left;
  background:
    radial-gradient(130% 90% at 50% -15%, rgba(255,255,255,0.055), transparent 60%),
    linear-gradient(180deg, #1c1c20 0%, #111114 55%, #0a0a0c 100%);
  border: 1px solid rgba(255,255,255,0.085);
  border-radius: var(--sr-radius);
  font: inherit; font-size: 11px; color: inherit; padding: 0.85rem 0.75rem 0.65rem;
  cursor: pointer; outline: none;
  /* Unselected = raised, clickable, very slightly shrunk so the selected card reads as larger. */
  transform: scale(0.985);
  box-shadow: 0 5px 13px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.07);
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
}
/* Top accent strip: dim when inactive, full brightness when selected. */
.shuffle-round-box::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  border-top-left-radius: var(--sr-radius); border-top-right-radius: var(--sr-radius);
  background: linear-gradient(90deg, transparent, var(--sr-accent) 18%, var(--sr-accent) 82%, transparent);
  opacity: 0.3;
  transition: opacity 0.14s ease, height 0.14s ease, box-shadow 0.14s ease;
  pointer-events: none;
}
.shuffle-round-box:hover:not(.is-selected) {
  transform: scale(0.985) translateY(-3px);
  border-color: var(--sr-accent);
  box-shadow: 0 10px 20px rgba(0,0,0,0.55), 0 0 14px -3px var(--sr-accent), inset 0 1px 0 rgba(255,255,255,0.09);
}
.shuffle-round-box:hover:not(.is-selected)::before { opacity: 0.7; }
.shuffle-round-box:focus-visible { box-shadow: 0 5px 13px rgba(0,0,0,0.5), 0 0 0 2px var(--sr-accent); }
/* In-game style win/loss highlight: green for a won round, red for a lost round. */
.shuffle-round-box.sr-win {
  --sr-accent: #4ade80;
  border-color: rgba(74,222,128,0.4);
  background:
    radial-gradient(130% 95% at 50% -15%, rgba(74,222,128,0.2), transparent 62%),
    linear-gradient(180deg, rgba(28,68,45,0.6) 0%, #0d1410 58%, #0a0c0a 100%);
}
.shuffle-round-box.sr-loss {
  --sr-accent: #f87171;
  border-color: rgba(248,113,113,0.4);
  background:
    radial-gradient(130% 95% at 50% -15%, rgba(248,113,113,0.2), transparent 62%),
    linear-gradient(180deg, rgba(80,30,30,0.6) 0%, #150e0e 58%, #0c0a0a 100%);
}
.shuffle-round-box.sr-draw {
  --sr-accent: var(--rt-gold);
  border-color: rgba(255,209,0,0.32);
  background:
    radial-gradient(130% 95% at 50% -15%, rgba(255,209,0,0.16), transparent 62%),
    linear-gradient(180deg, rgba(72,60,26,0.55) 0%, #14120b 58%, #0c0b08 100%);
}
/* Selected = pressed in, focused, connected to the content below. Keeps win/loss color. */
.shuffle-round-box.is-selected {
  transform: scale(1);
  border-color: var(--sr-accent);
  box-shadow:
    inset 0 3px 11px rgba(0,0,0,0.82),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px var(--sr-accent),
    0 0 9px -3px var(--sr-accent);
}
.shuffle-round-box.is-selected::before {
  opacity: 1; height: 6px; box-shadow: 0 0 8px -1px var(--sr-accent);
}
/* Downward connector: signals this card controls the round detail section below. */
.shuffle-round-box.is-selected::after {
  content: ""; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-top: 7px solid var(--sr-accent);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.65));
  pointer-events: none;
}
/* Selected hover: stay pressed, never raise, only a slight brighten. */
.shuffle-round-box.is-selected:hover {
  transform: scale(1);
  box-shadow:
    inset 0 3px 11px rgba(0,0,0,0.78),
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 0 1px var(--sr-accent),
    0 0 12px -3px var(--sr-accent);
}
.shuffle-round-head {
  display: flex; flex-direction: column; align-items: center; gap: 0.18rem; margin-bottom: 0.6rem;
}
.shuffle-round-num {
  font-family: var(--font-mono); color: var(--rt-gold); font-weight: 800;
  font-size: 16px; letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.shuffle-round-box.is-selected .shuffle-round-num { color: var(--rt-gold); }
.shuffle-round-dur {
  font-family: var(--font-mono); color: var(--rt-text); font-size: 12px; font-weight: 700;
  padding: 0.05rem 0.5rem; border-radius: 999px;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08);
}
.shuffle-round-teams { display: flex; flex-direction: column; gap: 0.45rem; }
/* Divider between the two team rows inside a round box */
.shuffle-round-teams .srside-enemy {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent) 1;
  padding-top: 0.5rem;
}
.shuffle-round-side { display: flex; flex-direction: column; gap: 0.25rem; }
.shuffle-round-side-label { font-size: 9.5px; font-weight: 800; text-align: center; color: var(--rt-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.shuffle-round-side.srside-mine .shuffle-round-side-label { color: #b88cff; }
.shuffle-round-side.srside-enemy .shuffle-round-side-label { color: var(--rt-gold-dim); }
.shuffle-round-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 0.45rem; }
.shuffle-round-player { position: relative; display: inline-flex; align-items: center; gap: 0.25rem; }
.shuffle-round-player .srp-ic { display: inline-flex; }
.shuffle-round-player .srp-ic .rt-spec-icon,
.shuffle-round-player .srp-ic img {
  width: 30px; height: 30px; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.shuffle-round-player .srp-nm { font-size: 11px; }
.shuffle-round-grid .shuffle-round-player .srp-ic .rt-spec-icon,
.shuffle-round-grid .shuffle-round-player .srp-ic img {
  width: 40px; height: 40px;
}
.shuffle-round-player-self .srp-ic .rt-spec-icon,
.shuffle-round-player-self .srp-ic img {
  box-shadow: 0 0 0 2px var(--rt-gold), 0 1px 4px rgba(0,0,0,0.6);
}
.shuffle-round-player-dead .srp-nm { text-decoration: line-through; opacity: 0.75; }
.shuffle-round-player-dead .srp-ic { position: relative; border-radius: 8px; }
.shuffle-round-player-dead .srp-ic .rt-spec-icon,
.shuffle-round-player-dead .srp-ic img {
  box-shadow: 0 0 0 2px rgba(200, 24, 24, 0.98);
  filter: saturate(0.45) brightness(0.92);
}
.shuffle-round-player-dead .srp-ic::after {
  content: ""; position: absolute; inset: 0; border-radius: 8px;
  background: rgba(170, 16, 16, 0.32); pointer-events: none;
}
.shuffle-round-fd {
  display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
  margin-top: 0.55rem; padding-top: 0.5rem; font-size: 11px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent) 1;
}
.shuffle-round-fd .srfd-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--rt-muted); }
.shuffle-round-fd .srfd-none { font-size: 10px; color: var(--rt-muted); font-style: italic; }

/* Round by round is the focal point of a shuffle match - make its header and
   in-box labels read louder than the surrounding sections. */
.matches-page .detail-section.shuffle-rbr-section > h3,
.detail-section.shuffle-rbr-section > h3,
.ui-premium .pm-layout .shuffle-rbr-section > h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--rt-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85), 0 0 14px rgba(255,200,90,0.22);
}
.detail-section.shuffle-rbr-section .shuffle-round-num { font-size: 18px; font-weight: 800; }
.detail-section.shuffle-rbr-section .shuffle-round-side-label { font-size: 11px; }
.detail-section.shuffle-rbr-section .shuffle-round-fd { font-size: 12px; }
.detail-section.shuffle-rbr-section .shuffle-round-fd .srfd-label { font-size: 11px; }

/* Single analysis panel below the timeline; content swaps with the selected round. */
.shuffle-analysis-panel {
  position: relative;
  margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.85rem;
  border: 1px solid rgba(255,255,255,0.09); border-radius: 14px;
  background:
    radial-gradient(130% 60% at 50% -10%, rgba(255,209,0,0.06), transparent 58%),
    linear-gradient(180deg, #16161a 0%, #101013 55%, #0b0b0d 100%);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05);
}
/* Soft gold accent strip ties the panel to the selected round's connector above it. */
.shuffle-analysis-panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-top-left-radius: 14px; border-top-right-radius: 14px;
  background: linear-gradient(90deg, transparent, rgba(255,209,0,0.5) 20%, rgba(255,209,0,0.5) 80%, transparent);
  pointer-events: none;
}
.shuffle-an-title {
  text-align: center; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 16px; color: var(--rt-gold);
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);
  padding: 0.15rem 0 0.6rem; margin: 0;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(255,209,0,0.32), transparent) 1;
}
.shuffle-an-head { display: flex; align-items: center; gap: 0.65rem; }
.shuffle-an-round { font-family: var(--font-mono); font-weight: 700; color: var(--rt-gold); font-size: 14px; }
.shuffle-an-res { font-size: 12px; font-weight: 700; }
.shuffle-an-dur { margin-left: auto; font-family: var(--font-mono); color: var(--rt-muted); font-size: 12px; }
.shuffle-an-teams {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem;
}
@media (max-width: 720px) { .shuffle-an-teams { grid-template-columns: 1fr; } }
.shuffle-an-teams .shuffle-round-side {
  background: #0a0a0a; border: 1px solid var(--rt-border); border-radius: var(--radius); padding: 0.5rem 0.6rem;
}
.shuffle-an-teams .shuffle-round-player .srp-nm { font-size: 12px; }
.shuffle-an-block-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rt-muted);
  margin-bottom: 0.4rem; font-weight: 700;
}
.shuffle-an-fd-title { color: var(--rt-gold-dim); }
.shuffle-an-perf .shuffle-perf-table { width: 100%; }
.shuffle-perf-table th { font-size: 10px; color: var(--rt-muted); }
.shuffle-perf-table .srperf-name { white-space: nowrap; }
.srperf-player-link { display: inline-flex; max-width: 100%; cursor: help; }
.srperf-player-link:hover .rt-player-name { text-decoration: underline; }
.shuffle-perf-table tr:has(.srperf-player-link:hover) { background: rgba(116, 208, 108, 0.06); }
.shuffle-round-detail-note { font-size: 11px; color: var(--rt-muted); }
.shuffle-round-fd-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; font-size: 12px; }
.shuffle-round-fd-summary .srfds-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--rt-muted); }
.shuffle-round-fd-summary .srfds-tail { color: var(--rt-muted); }

/* Single collapsible scoreboard below the round analysis. */
.shuffle-scoreboard { }
.shuffle-scoreboard-summary {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none; outline: none;
}
.shuffle-scoreboard-summary::-webkit-details-marker { display: none; }
.shuffle-scoreboard-summary h3 { margin: 0; }
.shuffle-scoreboard-summary:focus-visible { box-shadow: inset 0 0 0 1px var(--rt-gold-dim); }
.shuffle-scoreboard-chev {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--rt-muted); transition: transform 0.15s ease;
}
.shuffle-scoreboard[open] .shuffle-scoreboard-chev { transform: rotate(180deg); }
.shuffle-scoreboard .shuffle-lobby-table { margin-top: 0.6rem; }
.pm-fd-round-nodata { font-size: 11px; color: var(--rt-muted); }
.round-spec-cell { display: inline-flex; margin: 0.1rem 0.2rem 0.1rem 0; }
.sb-player-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  max-width: 100%;
  cursor: pointer;
}
a.sb-player-link { cursor: alias; }
.sb-player-link:hover .rt-player-name { text-decoration: underline; }
.sb-row:has(.sb-player-link:hover) { background: rgba(116, 208, 108, 0.06); }
.scoreboard .sb-name .sb-player-link .rt-player-cell { display: flex; }

/* Situational list card */
.sit-list { display: flex; flex-direction: column; gap: 0.4rem; }
.sit-list-row {
  display: grid; grid-template-columns: 110px 1fr 52px 44px;
  align-items: center; gap: 0.5rem; font-size: 12px;
}
.sit-list-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sit-list-wr { font-family: var(--font-mono); color: var(--rt-text); text-align: right; }
.sit-list-games { font-size: 10px; color: var(--rt-muted); text-align: right; }

/* Situations and Meta hidden until ready */
[data-nav="situations"], [data-sidebar="situations"],
.view[data-view="situations"], .situations-teaser,
[data-nav="meta"], [data-sidebar="meta"],
.view[data-view="meta"] { display: none !important; }

/* Dashboard redesign */
.kpi-row-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.dash-top {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}
.dash-top-kpi { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.dash-top-specs { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.spec-card {
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.spec-card[role="button"]:hover,
.spec-card[role="button"]:focus-visible {
  border-color: var(--rt-gold-dim);
  outline: none;
}
.spec-card-summary {
  cursor: default;
  background: linear-gradient(180deg, #14130f 0%, #0c0b08 100%);
  border-color: var(--rt-gold-dim);
}
.spec-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rt-gold);
  margin-bottom: 0.55rem;
  letter-spacing: 0.01em;
}
.spec-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
}
.spec-card-stat {
  display: flex;
  flex-direction: column;
  min-width: 3rem;
}
.spec-card-stat span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rt-gold-dim);
}
.spec-card-stat b {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--rt-text);
}
.spec-card-foot {
  margin-top: 0.6rem;
  font-size: 10px;
  color: var(--rt-muted);
  letter-spacing: 0.02em;
}
.kpi-delta { font-family: var(--font-mono); }
.kpi-value.is-pos { color: var(--rt-win); text-shadow: 0 0 8px rgba(0, 255, 0, 0.25); }
.kpi-value.is-neg { color: var(--rt-loss); text-shadow: 0 0 8px rgba(255, 64, 64, 0.22); }
.kpi-value.is-flat { color: var(--rt-text); }
.kpi-range { font-family: var(--font-mono); color: var(--rt-muted); font-size: 11px; }
.kpi-sub-dim { color: var(--rt-gold-dim); opacity: 0.75; }

/* Scope banner: showing + date range */
.scope-banner { justify-content: space-between; align-items: center; }
.scope-banner-main, .scope-banner-range { display: flex; align-items: baseline; gap: 0.4rem; }
.scope-banner-range-value {
  font-family: var(--font-mono); font-weight: 600; color: var(--rt-text);
}

/* Custom date range picker */
.date-custom { display: inline-flex; align-items: center; gap: 0.35rem; }
.date-input { min-width: 8.5rem; }
.date-custom-sep { color: var(--rt-muted); font-size: 12px; }

/* Map performance CR */
.map-row { grid-template-columns: 1fr auto auto 1fr auto; }
.map-cr { font-family: var(--font-mono); font-size: 10px; color: var(--rt-muted); min-width: 3.5rem; text-align: right; }
.map-cr.is-pos { color: var(--rt-win); }
.map-cr.is-neg { color: var(--rt-loss); }

/* Rating trend net */
.trend-net {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 0.75rem;
  margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #2a2a2a;
}
.trend-net-range { font-family: var(--font-mono); font-size: 13px; color: var(--rt-text); }
.trend-net-delta { font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
.trend-net-delta.is-pos { color: var(--rt-win); }
.trend-net-delta.is-neg { color: var(--rt-loss); }
.trend-net-delta.is-flat { color: var(--rt-muted); }

/* Performance summary cards */
.perf-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem; margin-bottom: 1rem;
}
.perf-card {
  border: 1px solid var(--rt-border);
  background: linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  border-radius: var(--radius); padding: 0.85rem;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.perf-card.is-clickable { cursor: pointer; }
.perf-card.is-clickable:hover { border-color: var(--rt-gold-dim); }
.perf-card-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rt-gold-dim);
}
.perf-card-value { font-size: 1.05rem; font-weight: 600; color: var(--rt-text); }
.perf-card-value.is-pos { color: var(--rt-win); }
.perf-card-value.is-neg { color: var(--rt-loss); }
.perf-card-stat { font-size: 11px; color: var(--rt-muted); }
.perf-card-extra { font-family: var(--font-mono); font-size: 11px; color: var(--rt-muted); margin-top: 0.1rem; }
.perf-card-extra.is-pos { color: var(--rt-win); }
.perf-card-extra.is-neg { color: var(--rt-loss); }

/* Match history filtered summary bar */
.mh-summary {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 0.5rem 1rem; margin-bottom: 0.65rem; padding: 0.6rem 0.85rem;
  border: 1px solid var(--rt-border); border-radius: var(--radius);
  background: linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
}
.mh-summary-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.mh-summary-stat { display: flex; flex-direction: column; gap: 0.1rem; }
.mh-summary-stat-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rt-gold-dim);
}
.mh-summary-stat-value { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--rt-text); }
.mh-summary-stat-value .is-pos { color: var(--rt-win); }
.mh-summary-stat-value .is-neg { color: var(--rt-loss); }
.mh-summary-stat-value .is-flat { color: var(--rt-muted); }
.mh-summary-stat-sub { font-family: var(--font-mono); font-size: 10px; color: var(--rt-muted); }
.mh-summary-range { display: flex; flex-direction: column; gap: 0.1rem; text-align: right; }
.mh-summary-range-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rt-gold-dim);
}
.mh-summary-range span:last-child { font-family: var(--font-mono); font-size: 12px; color: var(--rt-text); }
