:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #19201d;
  --muted: #68736e;
  --line: #d8ddd7;
  --accent: #b92035;
  --accent-ink: #ffffff;
  --vanguard: #3f6f9f;
  --duelist: #a33a3a;
  --strategist: #3c7b5a;
  --focus: #1d5fd1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 720px);
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.view-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1ee;
}

.view-tab {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
}

.view-tab.active {
  background: var(--ink);
  color: #ffffff;
}

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

.header-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
}

.header-actions .feedback-nav-action {
  width: auto;
  min-width: 92px;
  padding: 0 14px;
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.social-logo {
  display: block;
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.primary-action {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.support-action {
  background: #ffffff;
  border-color: var(--accent);
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.2;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-grid div {
  min-width: 0;
  padding: 10px 12px;
  background: #fbfcfa;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 800;
}

.updates-toggle {
  position: fixed;
  right: 0;
  top: 45vh;
  z-index: 30;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  box-shadow: 0 10px 24px rgb(25 32 29 / 12%);
}

.updates-panel {
  position: fixed;
  top: 96px;
  right: clamp(12px, 3vw, 28px);
  z-index: 40;
  width: min(390px, calc(100vw - 24px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  box-shadow: 0 18px 48px rgb(25 32 29 / 18%);
}

.updates-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.updates-heading h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.updates-version {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.updates-list {
  display: grid;
  gap: 10px;
}

.update-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.update-type {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfa;
  color: var(--ink);
  text-transform: uppercase;
}

.update-version {
  padding: 2px 7px;
  border: 1px solid #cbd8ca;
  border-radius: 999px;
  background: #f4fbf7;
  color: var(--strategist);
  font-weight: 900;
}

.update-type.feature {
  border-color: #b8d4c4;
  color: var(--strategist);
}

.update-type.fix {
  border-color: #e4b4aa;
  color: var(--accent);
}

.update-type.data {
  border-color: #b8c9dd;
  color: var(--vanguard);
}

.update-item h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.update-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.update-note {
  margin-top: 2px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.header-navigation-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.mini-game-quick-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 4px 4px 10px;
  border: 1px solid rgb(185 32 53 / 30%);
  border-radius: 6px;
  background: #fff8f8;
}

.mini-game-quick-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.mini-game-quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.mini-game-quick-link:hover,
.mini-game-quick-link:focus-visible {
  outline: 3px solid rgb(29 95 209 / 22%);
  outline-offset: 2px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(300px, 360px);
  min-height: calc(100vh - 142px);
}

.filters {
  border-right: 1px solid var(--line);
  background: #fbfcfa;
  padding: 20px;
}

.control-group + .control-group {
  margin-top: 22px;
}

.team-builder {
  padding: 20px;
}

.builder-view {
  padding: 20px clamp(16px, 4vw, 56px) 44px;
}

.maps-view {
  padding: 20px clamp(16px, 4vw, 56px) 44px;
}

.builder-view .team-builder {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(360px, 1fr);
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.builder-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.builder-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.builder-view .builder-heading {
  grid-column: 1 / -1;
}

.planner-workflows {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}

.planner-workflow {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.planner-workflow.active {
  border-color: rgba(41, 122, 95, 0.55);
  background: #f4fbf7;
  box-shadow: inset 0 0 0 1px rgba(41, 122, 95, 0.18);
}

.planner-workflow span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.planner-workflow strong {
  font-size: 18px;
  line-height: 1.15;
}

.planner-workflow small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.planner-callout {
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(41, 122, 95, 0.32);
  border-radius: 6px;
  background: #f4fbf7;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.builder-workspace {
  display: none;
}

.builder-workspace.active {
  display: contents;
}

.builder-left,
.builder-right {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.builder-left {
  grid-column: 1;
}

.builder-right {
  grid-column: 2;
}

.builder-heading h2 {
  margin-bottom: 0;
}

.builder-hero-search-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.builder-hero-picker {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.player-pools {
  grid-column: 1 / -1;
}

.player-pools.active {
  display: grid;
  gap: 14px;
}

.pool-toolbar,
.pool-panel,
.pool-results-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pool-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.pool-toolbar h3,
.pool-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.pool-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.pool-toolbar .pool-example {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

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

.pool-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pool-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.pool-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pool-panel-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pool-hero-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.pool-recommendations {
  display: grid;
  gap: 8px;
}

.pool-recommendation {
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.pool-recommendation.linked,
.pool-matrix-cell.linked {
  border-color: rgba(41, 122, 95, 0.35);
  background: #f4fbf7;
}

.pool-recommendation span {
  font-weight: 900;
}

.pool-recommendation strong {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.pool-recommendation small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.pool-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.pool-comps {
  display: grid;
  gap: 8px;
}

.pool-comps-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pool-comp-card {
  border-color: rgba(41, 122, 95, 0.24);
}

.pool-comp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pool-comp-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  background: #eef1ee;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.pool-matrix {
  overflow-x: auto;
}

.pool-matrix-table {
  display: grid;
  grid-template-columns: repeat(var(--pool-columns), minmax(128px, 1fr));
  gap: 6px;
  min-width: max-content;
}

.pool-matrix-table > strong {
  display: grid;
  align-items: center;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f8f6;
  font-size: 12px;
}

.pool-matrix-cell {
  display: grid;
  gap: 3px;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.pool-matrix-cell span {
  font-size: 12px;
  font-weight: 900;
}

.pool-matrix-cell small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.pool-matrix-cell em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.3;
}

.maps-panel {
  max-width: 1280px;
  margin: 0 auto;
}

.maps-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.maps-heading h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.maps-source a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.map-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.map-summary div {
  min-width: 0;
  padding: 12px;
  background: #ffffff;
}

.maps-controls {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.maps-controls .control-group + .control-group {
  margin-top: 0;
}

.maps-controls h3,
.map-definitions h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-filter {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.map-filter.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.map-definitions {
  margin-bottom: 24px;
}

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

.map-definition {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.map-definition h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.map-definition p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

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

.map-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.map-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.map-card-title h3 {
  margin: 0;
  font-size: 16px;
}

.map-card-title span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 50%;
  padding: 3px 7px;
  border-radius: 6px;
  background: #eef1ee;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.map-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.map-facts div {
  min-width: 0;
}

.map-facts dd {
  font-size: 13px;
  line-height: 1.35;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1ee;
}

.segment,
.hero-button,
.clear-chip,
.icon-button {
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.segment {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 36px;
  padding: 5px 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.segment strong {
  color: inherit;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.05;
}

.segment small {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.segment.active {
  background: var(--ink);
  color: #ffffff;
}

.mode-description {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.patch-summary-value {
  display: grid;
  gap: 4px;
}

.patch-select-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

#patch-select {
  width: 100%;
  min-width: 0;
  padding: 4px 22px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

#patch-select option:disabled {
  color: #9aa39f;
}

.teamup-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.teamup-toggle span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.teamup-toggle strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
}

.teamup-toggle small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.teamup-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--ink);
}

.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

label {
  font-size: 15px;
  font-weight: 800;
}

.icon-button {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border-color: var(--line);
  color: var(--muted);
  font-weight: 900;
}

input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.selected-heroes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  margin-top: 12px;
}

.filter-summary {
  display: grid;
  gap: 8px;
}

.filter-chip-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.filter-chip-label {
  min-width: 62px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.clear-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 8px;
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.clear-chip.Vanguard,
.clear-chip.Duelist,
.clear-chip.Strategist {
  color: #ffffff;
}

.exclude-chip {
  background: #fff5f2;
  border-color: #e4b4aa;
  color: #8b2f26;
}

.builder-selected {
  margin-top: 10px;
}

.builder-draft-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.builder-draft-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.builder-draft-heading h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.builder-draft-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.builder-mode-control {
  margin: 0;
}

.builder-status {
  min-height: 32px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.builder-reset-button {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.builder-block {
  min-width: 0;
}

.builder-block h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.saved-comps-block {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.saved-comps-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.saved-comps-heading h3 {
  margin-bottom: 0;
}

.saved-comps-count {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  background: #eef1ee;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.saved-comp-save,
.saved-comp-action {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.saved-comp-save {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.sample-pools-action {
  border-color: rgba(41, 122, 95, 0.35);
  background: #f4fbf7;
  color: var(--accent);
}

.team-effect-toggle-action[aria-pressed="true"] {
  border-color: rgba(31, 42, 36, 0.22);
  background: #eef1ee;
  color: var(--ink);
}

.saved-comp-save:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.saved-comps-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.saved-comps-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.saved-comp {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.saved-comp h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.saved-comp small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.saved-comp-heroes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.saved-comp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.saved-comp-action.danger {
  border-color: #e4b4aa;
  color: #8b2f26;
}

.share-card-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 42, 36, 0.72);
}

.share-card-modal[hidden] {
  display: none;
}

.share-card-dialog {
  width: min(960px, 100%);
  max-height: min(92vh, 840px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(31, 42, 36, 0.28);
}

.share-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.share-card-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

#share-card-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f2ea;
}

.share-card-status {
  min-height: 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.share-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.builder-current-status,
.builder-suggestions,
.builder-matches {
  display: grid;
  gap: 8px;
}

.builder-status-row {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 12px;
}

.builder-status-row strong {
  line-height: 1.25;
}

.builder-status-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.builder-status-row .inline-teamup-effect {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.builder-status-row.enhanced {
  border-left: 4px solid var(--strategist);
}

.builder-status-row.missing {
  border-left: 4px solid var(--accent);
}

.suggestion-row {
  display: grid;
  gap: 3px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.suggestion-row span {
  font-weight: 900;
}

.suggestion-row strong {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.suggestion-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.builder-hero-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.builder-hero-button {
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hero-groups {
  display: grid;
  gap: 18px;
}

.role-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.hero-filter-control {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.hero-button {
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
  text-align: left;
}

.hero-filter-action {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: #f5f7f4;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
}

.hero-filter-control.included {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.hero-filter-control.included .include-action {
  background: var(--accent);
  color: var(--accent-ink);
}

.hero-filter-control.excluded {
  border-color: #b85845;
  box-shadow: inset 3px 0 0 #b85845;
}

.hero-filter-control.excluded .exclude-action {
  background: #8b2f26;
  color: #ffffff;
}

.hero-filter-control.detail-active .hero-button {
  background: #eef1ee;
  font-weight: 900;
}

.results {
  min-width: 0;
  padding: 20px clamp(16px, 3vw, 40px) 40px;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.results-toolbar h2 {
  margin: 0;
  font-size: 28px;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.result-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.status-message {
  padding: 14px 0;
  color: var(--muted);
  font-weight: 700;
}

.team-list {
  display: grid;
  gap: 10px;
}

.team-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.team-number {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.team-content {
  min-width: 0;
}

.hero-line,
.paths {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: flex-start;
}

.role-group {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  min-width: min(100%, 210px);
}

.role-group-label {
  display: inline-block;
  flex: 0 0 auto;
  min-width: 58px;
  padding-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.team-row-actions {
  justify-content: flex-end;
}

.hero-chip,
.path-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

button.hero-chip {
  border: 0;
  cursor: pointer;
}

.path-chip {
  background: #eef1ee;
  color: var(--ink);
  font-weight: 700;
}

.teamup-trigger {
  display: grid;
  align-items: start;
  gap: 3px;
  min-width: min(100%, 260px);
  max-width: min(100%, 560px);
  color: var(--ink);
}

.teamup-trigger strong {
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
}

.teamup-trigger small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.teamup-path-compact {
  font-weight: 850;
}

.Vanguard {
  background: var(--vanguard);
}

.Duelist {
  background: var(--duelist);
}

.Strategist {
  background: var(--strategist);
}

.paths {
  margin-top: 10px;
}

.team-row .paths:has(.teamup-trigger) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 8px;
}

.hero-detail {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fbfcfa;
  padding: 20px;
}

.feedback-panel,
.footer-follow {
  scroll-margin-top: 132px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.feedback-panel {
  scroll-margin-top: 132px;
}

.feedback-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.feedback-content h2 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.15;
}

.feedback-content p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.feedback-form {
  display: grid;
  gap: 8px;
}

.feedback-grid,
.feedback-title-field,
.feedback-message-field,
.feedback-actions {
  grid-column: 1 / -1;
}

.feedback-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1.2fr);
  gap: 10px;
}

.feedback-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

.feedback-form input,
.feedback-form select {
  height: 38px;
  padding: 0 10px;
}

.feedback-form textarea {
  resize: vertical;
  min-height: 76px;
  padding: 9px 10px;
}

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

.feedback-actions button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.feedback-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.feedback-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.feedback-status.success {
  color: var(--strategist);
}

.feedback-status.error {
  color: var(--accent);
}

.feedback-honeypot,
#feedback-website {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  padding: 20px clamp(16px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #eef1ee;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(420px, 1.35fr);
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  align-items: stretch;
}

.footer-follow {
  display: grid;
  gap: 16px;
}

.footer-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.footer-social-links {
  display: grid;
  gap: 8px;
}

.footer-social-title {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.footer-social-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-social-group a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.footer-social-group .social-logo {
  width: 17px;
  height: 17px;
}

.primary-socials a {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 900;
}

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

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-header h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #383f3b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.muted-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #eef1ee;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.detail-stats div {
  min-width: 0;
  padding: 10px;
  background: #ffffff;
}

.detail-stats dd {
  font-size: 18px;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.detail-action,
.teammate-row {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.detail-action:first-child {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.detail-section {
  margin-top: 18px;
}

.detail-section h3,
.mini-team h3 {
  margin-bottom: 8px;
  font-size: 14px;
}

.detail-list,
.sample-list {
  display: grid;
  gap: 8px;
}

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

.teamup-effect-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.teamup-effect-card h4,
.teamup-effect-card p {
  margin: 0;
}

.teamup-effect-card h4 {
  font-size: 13px;
  line-height: 1.25;
}

.teamup-effect-card p,
.teamup-effect-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.teamup-effect-ability {
  color: var(--ink);
  font-weight: 900;
}

.official-details-section {
  display: grid;
  gap: 10px;
}

.official-source-link {
  width: fit-content;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.official-detail-block {
  display: grid;
  gap: 8px;
}

.official-detail-block h4,
.official-stat-columns h5 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

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

.official-ability-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.official-ability-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.official-ability-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.official-ability-heading span {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 6px;
  background: #eef1ee;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.official-ability-card p,
.official-effect-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.official-stat-grid {
  display: grid;
  gap: 5px;
  margin: 0;
}

.official-stat-grid div {
  display: grid;
  grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8f7f3;
}

.official-stat-grid dt,
.official-stat-grid dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
}

.official-stat-grid dt {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.official-stat-grid dd {
  color: var(--ink);
  font-weight: 800;
}

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

.teamup-number-columns {
  width: 100%;
  margin-top: 2px;
}

.official-stat-columns section {
  display: grid;
  align-content: start;
  gap: 6px;
}

.teammate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  text-align: left;
}

.mini-team {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

@media (max-width: 920px) {
  .site-header,
  .layout,
  .feedback-content,
  .footer-content,
  .maps-controls {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .builder-view .team-builder {
    grid-template-columns: 1fr;
  }

  .builder-left,
  .builder-right {
    grid-column: 1;
  }

  .pool-toolbar,
  .pool-panels {
    grid-template-columns: 1fr;
  }

  .pool-actions {
    justify-content: flex-start;
  }

  .builder-right {
    order: 1;
  }

  .builder-left {
    order: 2;
  }

  .map-summary,
  .map-definition-list,
  .maps-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters,
  .hero-detail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-detail {
    border-left: 0;
  }

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

@media (max-width: 700px) {
  .site-header {
    gap: 12px;
    align-items: start;
    padding: 12px clamp(12px, 4vw, 20px);
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions a {
    width: 36px;
    height: 36px;
  }

  .header-actions .feedback-nav-action {
    width: auto;
    min-width: 86px;
    padding: 0 12px;
  }

  .updates-toggle {
    top: auto;
    right: 12px;
    bottom: 12px;
    border-right: 1px solid var(--line);
    border-radius: 8px;
    writing-mode: horizontal-tb;
  }

  .updates-panel {
    top: 12px;
    right: 12px;
    max-height: calc(100vh - 24px);
  }

  .social-logo {
    width: 17px;
    height: 17px;
  }

  .filters,
  .results,
  .hero-detail,
  .feedback-panel,
  .builder-view,
  .maps-view {
    padding: 14px;
  }

  .header-navigation-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .builder-view .team-builder {
    gap: 14px;
    padding: 14px;
  }

  .results-toolbar h2,
  .maps-heading h2,
  .detail-header h2 {
    font-size: 22px;
    line-height: 1.1;
  }

  .team-row {
    gap: 10px;
    padding: 12px;
  }

  .maps-controls {
    gap: 14px;
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .site-header {
    position: static;
    gap: 10px;
  }

  .summary-grid,
  .feedback-grid,
  .map-summary,
  .map-definition-list,
  .maps-list,
  .planner-workflows {
    grid-template-columns: 1fr;
  }

  .builder-draft-heading {
    grid-template-columns: 1fr;
  }

  .builder-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .builder-heading-actions {
    justify-content: flex-start;
  }

  .builder-draft-actions {
    justify-content: flex-start;
  }

  .builder-hero-buttons,
  .pool-hero-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .view-tab {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 5px 10px;
    white-space: nowrap;
  }

  h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .summary-grid div {
    padding: 8px 10px;
  }

  .summary-grid dd {
    font-size: 16px;
  }

  .hero-filter-control {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
  }

  .hero-button,
  .hero-filter-action {
    min-height: 38px;
  }

  .result-actions {
    flex-wrap: wrap;
  }

  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .maps-heading,
  .map-card-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-card-title span {
    max-width: 100%;
  }

  .team-row {
    grid-template-columns: 1fr;
  }

  .official-stat-columns {
    grid-template-columns: 1fr;
  }

  .official-ability-heading {
    flex-direction: column;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .hero-buttons,
  .builder-hero-buttons {
    grid-template-columns: 1fr;
  }

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

  .footer-social-group a {
    width: 32px;
    height: 32px;
  }
}
