:root {
  color-scheme: dark;
  --bg: #0c1117;
  --panel: #151b23;
  --panel-2: #1c2430;
  --line: #2f3b4b;
  --text: #edf2f7;
  --muted: #9aa9b8;
  --accent: #d7a84f;
  --accent-2: #69b3a2;
  --danger: #ef7d7d;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.25s ease;
}

.sidebar-toggle {
  display: none;
}

.sidebar-collapse {
  position: absolute;
  top: 24px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  z-index: 1;
  transition: background 0.15s;
}

.sidebar-collapse:hover {
  background: var(--panel-2);
  color: var(--text);
}

.sidebar-open {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sidebar-open:hover {
  color: var(--text);
  background: var(--panel-2);
}

.sidebar-toggle:checked ~ .shell {
  grid-template-columns: 0fr minmax(0, 1fr);
}

.sidebar-toggle:checked ~ .shell .sidebar {
  overflow: hidden;
  padding: 0;
  border-right: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar-toggle:checked ~ .shell .sidebar-open {
  display: flex;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #101720;
  transition: opacity 0.2s ease, padding 0.25s ease;
}

.brand p,
.eyebrow,
label span,
.summary,
.stats span,
.option-meta,
.winner-copy p,
.trend-copy p,
.insight-card span,
.history-item small {
  color: var(--muted);
}

.brand p,
.eyebrow,
label span {
  margin: 0 0 6px;
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.95;
}

h3 {
  margin: 0;
}

input,
select {
  appearance: none;
  min-width: 0;
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  padding: 0 40px 0 12px;
  font: inherit;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.filter-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 27, 35, 0.46);
  padding: 0;
}

.filter-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.filter-panel summary::-webkit-details-marker {
  display: none;
}

.filter-panel summary span,
.filter-panel summary strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-panel summary strong::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(225deg) translateY(-1px);
}

.filter-panel:not([open]) summary strong {
  font-size: 0;
}

.filter-panel:not([open]) summary strong::before {
  content: "Show";
  font-size: 12px;
}

.filter-panel:not([open]) summary strong::after {
  transform: rotate(45deg) translateY(-3px);
}

.filter-body {
  display: grid;
  gap: 18px;
  padding: 0 12px 12px;
}

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

.controls label {
  min-width: 0;
}

.controls label:last-child {
  grid-column: 1 / -1;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 12px;
}

.summary strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.champion-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  padding-right: 6px;
}

.champion-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.champion-button:hover,
.champion-button.active {
  border-color: var(--line);
  background: var(--panel);
}

.champion-button small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.vote-pill {
  border-radius: 999px;
  background: rgba(215, 168, 79, 0.14);
  color: var(--accent);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.vote-pill.large,
.sample-badge.large {
  background: rgba(105, 179, 162, 0.16);
  color: var(--accent-2);
}

.vote-pill.solid,
.sample-badge.solid {
  background: rgba(215, 168, 79, 0.14);
  color: var(--accent);
}

.vote-pill.thin,
.sample-badge.thin {
  background: rgba(255, 187, 90, 0.13);
  color: #ffcd82;
}

.vote-pill.low,
.sample-badge.low {
  background: rgba(239, 125, 125, 0.13);
  color: var(--danger);
}

.detail {
  min-width: 0;
  padding: 34px;
}

.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  border-color: rgba(105, 179, 162, 0.7);
  background: var(--accent-2);
  color: #07110f;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 28px 0;
}

.stats div,
.winner-panel,
.option-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stats div {
  padding: 16px;
}

.stats strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.winner-panel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.winner-splash {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: top center;
}

.winner-panel .no-image {
  width: 100%;
  aspect-ratio: 21 / 9;
  border: 1px dashed var(--line);
  border-radius: 0;
  background: var(--panel-2);
}

.winner-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 22px 18px;
  background: linear-gradient(to top, rgba(12, 17, 23, 0.95) 0%, rgba(12, 17, 23, 0.6) 60%, transparent 100%);
}

.winner-copy h3 {
  font-size: clamp(24px, 3.5vw, 44px);
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.winner-copy p {
  margin: 8px 0 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.sample-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin-top: 14px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.insights {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.insight-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121a24;
  padding: 12px;
}

.insight-card span {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.insight-card.large {
  border-color: rgba(105, 179, 162, 0.45);
}

.insight-card.thin,
.insight-card.low {
  border-color: rgba(239, 125, 125, 0.45);
}

.trend-panel {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121a24;
}

.trend-copy h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.trend-copy p {
  margin: 10px 0 0;
}

.trend-bars {
  display: grid;
  gap: 8px;
}

.trend-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 70px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
  text-align: left;
  cursor: pointer;
}

.trend-row > * {
  position: relative;
  z-index: 1;
}

.trend-row i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--width);
  background: linear-gradient(90deg, rgba(215, 168, 79, 0.3), rgba(105, 179, 162, 0.16));
}

.trend-row span,
.trend-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.history-item {
  display: grid;
  min-width: 180px;
  flex: 1;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.history-item:hover,
.history-item.active {
  background: var(--panel);
  border-color: rgba(215, 168, 79, 0.75);
}

.history-item span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.option-card:hover {
  border-color: var(--accent);
}

.option-card img:not(.rarity-gem),
.no-image.small {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--panel-2);
}

.no-image.small {
  aspect-ratio: auto;
}

.option-card:first-child {
  border-color: rgba(215, 168, 79, 0.8);
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #273140;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--width);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.option-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  font-size: 13px;
}

.empty {
  margin-top: 20px;
  color: var(--danger);
}

.legal-footer {
  border-top: 1px solid var(--line);
  background: #0a0f15;
  color: var(--muted);
  padding: 14px 24px;
  font-size: 12px;
}

.legal-footer p {
  max-width: 1180px;
  margin: 0 auto;
}

@media (max-width: 880px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar-toggle:checked ~ .shell {
    grid-template-columns: 1fr;
  }

  .sidebar-toggle:checked ~ .shell .sidebar {
    display: none;
  }

  .sidebar-collapse svg {
    transform: rotate(-90deg);
  }

  .sidebar-toggle:checked ~ .shell .sidebar-collapse svg {
    transform: rotate(90deg);
  }

  .sidebar-open {
    position: fixed;
    top: 12px;
    left: 12px;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .champion-list {
    max-height: 360px;
  }

  .detail {
    padding: 22px;
  }

  .detail-top,
  .winner-panel,
  .trend-panel,
  .insights {
    grid-template-columns: 1fr;
  }

  .detail-top {
    display: grid;
  }

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

@media (max-width: 1120px) and (min-width: 881px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .controls label:last-child {
    grid-column: auto;
  }

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

@media (max-width: 520px) {
  .controls,
  .summary,
  .insights,
  .stats {
    grid-template-columns: 1fr;
  }

  .controls label:last-child {
    grid-column: auto;
  }
}


.rarity-gem {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.winner-panel > .rarity-gem {
  width: 36px;
  height: 36px;
  top: 14px;
  right: 14px;
}

.eyebrow .rarity-gem {
  position: static;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-left: 4px;
}

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

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

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

.skin-modal-content {
  position: relative;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.skin-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skin-modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.skin-modal-splash {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px 10px 0 0;
}

.skin-modal-body {
  padding: 18px;
}

.skin-modal-body h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.skin-modal-body .modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.skin-modal-body .modal-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.skin-modal-body .modal-tag img {
  width: 14px;
  height: 14px;
}

.skin-modal-body .modal-desc {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}


.skin-modal-body .modal-trend {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.modal-trend-row {
  display: grid;
  grid-template-columns: 50px 40px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.modal-trend-row span:first-child {
  color: var(--accent);
  font-weight: 800;
}

.modal-trend-row strong {
  color: var(--text);
}
