:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #0d0d0f;
  --surface-2: #141418;
  --fg: #ffffff;
  --fg-soft: #d4d4db;
  --muted: #9a9aa3;
  --gold: #e6b84c;
  --green: #19b86b;
  --red: #e8453c;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.32);
  --font-ui: 'Segoe UI', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
  --font-display: 'Arial Black', 'Bahnschrift', 'Helvetica Neue', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }
}

.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
}

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

/* Stickers */
.sticker {
  display: inline-block;
  background: #ffffff;
  color: #050505;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 2px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.sticker-sm {
  padding: 4px 8px;
  font-size: 12px;
}

.tilt-left-2 {
  transform: rotate(-2deg);
}

.tilt-left-3 {
  transform: rotate(-3deg);
}

.tilt-left-6 {
  transform: rotate(-6deg);
}

/* Buttons */
.spring-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 9px 14px;
  border-radius: 2px;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 160ms ease,
              border-color 160ms ease,
              color 160ms ease;
}

.spring-btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.spring-btn:active {
  transform: translateY(0) scale(0.98);
}

.spring-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-pill {
  border-radius: 9999px;
  padding: 10px 18px;
}

.btn-primary {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
  font-weight: 900;
}

.btn-primary:hover {
  background: #ececf2;
  border-color: #ececf2;
}

.btn-gold {
  background: var(--gold);
  color: #050505;
  border-color: var(--gold);
  font-weight: 900;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-note {
  font-size: 12px;
  color: var(--muted);
  display: none;
}

@media (min-width: 768px) {
  .nav-note {
    display: inline-block;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-soft);
  transition: color 150ms ease;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-pill-date {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 44%, rgba(5, 5, 5, 0.72) 0%, rgba(5, 5, 5, 0.36) 55%, rgba(5, 5, 5, 0.86) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 0 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 84px 0 92px;
  }
}

.hero-50e-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  user-select: none;
  margin: 4px 0;
}

.num-50e {
  font-family: var(--font-display);
  font-weight: 900;
  color: #ffffff;
  line-height: 0.82;
  display: inline-block;
  filter: drop-shadow(0 14px 35px rgba(0, 0, 0, 0.9));
}

.num-5 {
  font-size: clamp(112px, 22vw, 220px);
  transform: rotate(-6deg);
  margin-right: -8px;
}

.num-0 {
  font-size: clamp(112px, 22vw, 220px);
  transform: rotate(5deg) translateY(20px);
}

.num-e {
  font-size: clamp(48px, 9vw, 92px);
  transform: rotate(-12deg) translateY(10px);
  margin-left: 4px;
}

.hero-fg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 4.2vw, 48px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
}

.hero-lead {
  margin: 0;
  max-width: 650px;
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 4px;
}

.hero-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: rgba(13, 13, 15, 0.92);
  font-size: 12px;
}

.hero-meta-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.22);
}

/* Marquee */
.marquee-bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  padding: 12px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-soft);
  animation: marqueeScroll 36s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-track span {
  padding-right: 32px;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 640px) {
  .marquee-track {
    animation-duration: 18s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
  .spring-btn {
    transition: none;
  }
}

/* Main Sections */
.main-wrap {
  padding: 48px 0 64px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-sub {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.section-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
}

/* Composer Grid */
.composer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 1024px) {
  .composer-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 640px) {
  .panel {
    padding: 24px;
  }
}

.fields-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .fields-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label > span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.input-ctrl {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
}

.input-ctrl:focus {
  outline: none;
  border-color: #ffffff;
}

.slot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slot-tab {
  padding: 7px 12px;
  font-size: 12px;
}

.slot-tab.is-active {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
}

.active-box {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.active-box-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  border-radius: 2px;
}

.pick-chip.is-joker {
  border-color: var(--gold);
  background: rgba(230, 184, 76, 0.12);
}

.joker-toggle {
  border: none;
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.joker-toggle.is-on {
  background: var(--gold);
  color: #050505;
}

.chip-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
}

.chip-remove:hover {
  color: #ffffff;
}

.search-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 640px) {
  .search-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 9999px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 410px;
  overflow-y: auto;
  padding-right: 2px;
}

@media (min-width: 640px) {
  .catalog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.artist-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  border-radius: 2px;
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 150ms ease,
              background-color 150ms ease;
}

.artist-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.artist-btn.is-picked {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
}

.artist-btn.is-elsewhere {
  opacity: 0.45;
}

.artist-meta {
  min-width: 0;
}

.artist-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-genre {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-btn.is-picked .artist-genre {
  color: rgba(5, 5, 5, 0.72);
}

.artist-pop {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
}

/* Poster 9:16 */
.poster-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.stats-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.stat-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.poster-wrap {
  display: flex;
  justify-content: center;
}

.poster-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 16;
  background: #000000;
  color: #ffffff;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  user-select: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.poster-bubbles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.poster-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.poster-watermark-inner {
  display: flex;
  align-items: flex-start;
  opacity: 0.14;
}

.poster-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.72) 25%, rgba(0, 0, 0, 0.28) 100%);
}

.poster-cartouche {
  position: relative;
  z-index: 10;
  background: rgba(5, 5, 5, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  padding: 10px 12px;
}

.poster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.poster-body {
  position: relative;
  z-index: 10;
  margin: auto 0;
  padding: 8px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poster-slot-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.82);
}

.poster-slot-kicker.gold {
  color: var(--gold);
}

.poster-list {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 8px;
}

.poster-list.lg {
  font-size: 19px;
  line-height: 1.08;
}

.poster-list.md {
  font-size: 15px;
  line-height: 1.15;
}

.poster-list.sm {
  font-size: 13px;
  line-height: 1.2;
}

.poster-bottom-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 4px;
}

.poster-box {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(5, 5, 5, 0.88);
  border-radius: 2px;
}

/* Barometer */
.baro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 1024px) {
  .baro-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.baro-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.bar-track {
  width: 100%;
  height: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 300ms ease;
}

/* Rankings Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

table.rank-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

table.rank-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

table.rank-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

table.rank-table tr.is-self {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.origin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
}

/* Team Cards */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.team-member-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Timeline & Values */
.timeline-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  background: var(--surface);
}

@media (min-width: 640px) {
  .timeline-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .timeline-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.timeline-cell {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 640px) {
  .timeline-cell {
    border-right: 1px solid var(--line);
  }
}

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

@media (min-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.value-card {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 32px 0;
  font-size: 12px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 5, 5, 0.84);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 80;
  padding: 11px 16px;
  background: #ffffff;
  color: #050505;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
}

.alert-banner {
  padding: 12px 14px;
  border: 1px solid var(--gold);
  background: rgba(230, 184, 76, 0.1);
  color: #ffffff;
  font-size: 13px;
}

.error-text {
  color: #ff8a84;
  font-size: 12px;
  font-weight: 600;
}
