:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-strong: #121931;
  --panel: rgba(15, 23, 42, 0.92);
  --panel-soft: rgba(30, 41, 59, 0.8);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(148, 163, 184, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, 0.16);
  --green: #22c55e;
  --yellow: #facc15;
  --red: #f87171;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at top, rgba(124, 58, 237, 0.18), transparent 26%),
    linear-gradient(180deg, #11172b 0%, #0b1020 100%);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
}

.site-header {
  width: min(1120px, calc(100vw - 32px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.site-brand-mark {
  display: grid;
  width: auto;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  place-items: center;
  border: 1px solid rgba(167, 139, 250, 0.48);
  border-radius: 6px;
  background: var(--accent-soft);
  color: #ddd6fe;
  font-size: 11px;
}

.site-nav,
.site-footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a,
.site-footer-links a {
  color: #cbd5e1;
  font-size: 13px;
}

.site-nav a:hover,
.site-footer-links a:hover {
  color: #ffffff;
}

button,
input,
select {
  font: inherit;
}

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

.page {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.initial-insights {
  display: grid;
  gap: 22px;
  margin-top: 16px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
}

.initial-insights[hidden] {
  display: none;
}

.initial-insights-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.initial-insights-heading h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}

.initial-insights-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.metric-glossary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  border-block: 1px solid var(--line);
}

.metric-glossary > div {
  display: grid;
  gap: 5px;
  padding: 15px 12px;
  text-align: center;
}

.metric-glossary > div + div {
  border-left: 1px solid var(--line);
}

.metric-glossary dt {
  color: #c4b5fd;
  font-size: 17px;
  font-weight: 850;
}

.metric-glossary dd {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.mode-result-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mode-result-guide > div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.mode-result-guide strong {
  color: #e2e8f0;
  font-size: 12px;
}

.mode-result-guide span {
  color: var(--muted);
  font-size: 11px;
}

.service-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 36px;
  align-items: center;
  margin-top: 20px;
  padding: 28px 4px 8px;
  border-top: 1px solid var(--line);
}

.service-guide-copy h2 {
  margin: 5px 0 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.service-guide-copy p:last-child,
.site-footer-summary p,
.copyright-notice {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.service-facts {
  margin: 0;
  display: grid;
  gap: 10px;
}

.service-facts > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.service-facts dt {
  color: #a78bfa;
  font-size: 12px;
  font-weight: 800;
}

.service-facts dd {
  margin: 0;
  color: #e2e8f0;
  font-size: 13px;
}

.site-footer {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  background: rgba(5, 9, 20, 0.58);
}

.site-footer-inner {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(340px, 1.2fr);
  gap: 18px 32px;
}

.site-footer-summary {
  display: grid;
  gap: 6px;
}

.site-footer-summary strong {
  font-size: 14px;
}

.site-footer-links {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.copyright-notice {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.hero,
.panel-stack,
.summary-card,
.match-card,
.team-card,
.empty-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

.hero {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.site-notices {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.site-notices[hidden] {
  display: none;
}

.site-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(45, 212, 191, 0.36);
  border-left-width: 4px;
  border-radius: 8px;
  background: rgba(13, 38, 43, 0.94);
}

.site-notice.is-warning {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(47, 40, 15, 0.94);
}

.site-notice.is-maintenance {
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(51, 23, 29, 0.95);
}

.site-notice-type {
  min-width: 38px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(45, 212, 191, 0.16);
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.site-notice.is-warning .site-notice-type {
  background: rgba(250, 204, 21, 0.14);
  color: #fde047;
}

.site-notice.is-maintenance .site-notice-type {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.site-notice-content {
  display: grid;
  gap: 4px;
}

.site-notice-heading {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.site-notice-heading strong {
  font-size: 14px;
}

.site-notice-content p {
  color: #dbe5f3;
  font-size: 13px;
  line-height: 1.45;
}

.site-notice-schedule {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: #f8fafc;
  font-size: 12px;
}

.site-notice-schedule strong {
  flex: 0 0 auto;
  color: #fca5a5;
  font-size: 11px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.hero-text,
.section-note,
.section-subtitle,
.summary-extra,
.detail-head p,
.detail-player-meta,
.match-time {
  color: var(--muted);
}

.hero-text {
  margin-top: 10px;
  max-width: 700px;
  line-height: 1.6;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 180px minmax(320px, 1.7fr) minmax(260px, 1.3fr);
  gap: 14px;
  align-items: start;
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field > span {
  font-size: 13px;
  font-weight: 700;
  color: #dbe3f4;
}

.season-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}

.season-control select:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.season-info {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 800;
  cursor: help;
  outline: none;
}

.season-info:focus-visible {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.season-tooltip {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(220px, calc(100vw - 40px));
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111827;
  color: #e2e8f0;
  font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.season-info:hover .season-tooltip,
.season-info:focus .season-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

input,
select,
.search-button,
.mode-toggle {
  min-height: 52px;
  border-radius: 14px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

input:focus,
select:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.frequent-nicknames {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  overflow: hidden;
}

.frequent-nicknames[hidden] {
  display: none;
}

.frequent-nicknames > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.frequent-nicknames button {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.56);
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.frequent-nicknames button:hover {
  border-color: rgba(167, 139, 250, 0.58);
  color: #f5f3ff;
}

.mode-toggle-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: stretch;
}

.mode-toggle {
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.5);
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.mode-toggle.is-active {
  border-color: rgba(167, 139, 250, 0.65);
  background: rgba(124, 58, 237, 0.2);
  color: #f5f3ff;
}

.action-card {
  align-self: stretch;
  grid-template-rows: auto minmax(52px, auto) minmax(16px, auto);
}

.action-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: stretch;
}

.action-card-body-single {
  grid-template-columns: minmax(0, 1fr);
}

.search-limit-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.game-limit-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.game-limit-control > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.game-limit-control select {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.detail-tier-option {
  min-height: 52px;
  height: 52px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
}

.detail-option-list {
  min-height: 52px;
  height: 52px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
}

.detail-option-list .detail-tier-option {
  min-height: 19px;
  height: 19px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 11px;
  white-space: nowrap;
}

.detail-tier-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #8b5cf6;
  min-height: auto;
}

.field-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  align-self: start;
}

.search-notice {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.tier-option-field > .tier-option-notice {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.search-limit-messages {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.full-search-notice {
  margin: 0;
  color: #fbbf24;
  font-size: 10px;
  line-height: 1.35;
}

.full-search-notice[hidden] {
  display: none;
}

.cache-refresh-status {
  margin: 2px 0 0;
  color: #93c5fd;
  font-size: 10px;
  line-height: 1.35;
}

.cache-refresh-status[hidden] {
  display: none;
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.search-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.status-message {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.status-message[data-type="error"] {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}

.status-message[data-type="loading"] {
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.35);
}

.search-progress-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-progress-spinner {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(147, 197, 253, 0.28);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: search-spin 0.8s linear infinite;
}

.search-progress-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.search-progress-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-progress-dots {
  display: inline-flex;
  gap: 3px;
}

.search-progress-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #93c5fd;
  animation: search-dot 1.1s ease-in-out infinite;
}

.search-progress-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.search-progress-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

.search-progress-count {
  margin-left: auto;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.search-progress-eta {
  display: block;
  min-height: 15px;
  margin-top: 6px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 15px;
}

.search-progress-eta.is-busy {
  color: #fde68a;
}

.search-progress-track {
  display: block;
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.12);
}

.search-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #8b5cf6);
  transition: width 0.35s ease;
}

@keyframes search-spin {
  to { transform: rotate(360deg); }
}

@keyframes search-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .search-progress-spinner,
  .search-progress-dots i,
  .detail-loading:not(.is-error)::before {
    animation: none;
  }
}

.panel-stack {
  margin-top: 18px;
  padding: 18px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.inline-header {
  margin-top: 18px;
}

.recent-game-character-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.recent-game-character-control > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.section-heading-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-subtitle {
  margin-top: 4px;
}

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

.summary-card {
  padding: 14px;
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.summary-label-note {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.summary-card strong {
  display: block;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1;
}

.player-performance {
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.player-performance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.player-performance-head h3 {
  font-size: 14px;
}

.player-performance-scope {
  margin-left: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.player-performance-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.performance-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.performance-visibility-toggle {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.performance-visibility-toggle:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: #f8fafc;
}

.player-performance.is-collapsed > :not(.player-performance-head),
.duo-performance.is-collapsed > :not(.duo-performance-head) {
  display: none !important;
}

.player-performance.is-collapsed .player-performance-head,
.duo-performance.is-collapsed .duo-performance-head {
  margin-bottom: 0;
}

.player-character-filter {
  width: auto;
  max-width: 180px;
  min-height: 30px;
  height: 30px;
  padding: 0 28px 0 10px;
  border-radius: 6px;
  font-size: 11px;
}

.player-performance-controls > span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.player-performance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.player-performance-item {
  --duo-stat-color: #22d3ee;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.32);
}

.player-performance-item dt {
  color: var(--muted);
  font-size: 11px;
}

.player-performance-item dd {
  margin: 0;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.player-death-areas {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.player-death-areas[hidden] {
  display: none;
}

.player-death-area-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.player-death-area-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.32);
}

.player-death-area-item strong {
  overflow: hidden;
  color: #e2e8f0;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-death-area-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.player-death-area-bar {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.player-death-area-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f87171;
}

.player-elimination-areas .player-death-area-bar i {
  background: #34d399;
}

.player-death-area-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.2);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.player-matchups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.player-matchups[hidden] {
  display: none;
}

.player-matchup-group {
  min-width: 0;
  padding: 0 14px;
}

.player-matchup-group:first-child {
  padding-left: 0;
  border-right: 1px solid var(--line);
}

.player-matchup-group:last-child {
  padding-right: 0;
}

.player-matchup-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.player-matchup-title h4 {
  font-size: 12px;
}

.player-matchup-title span {
  color: var(--muted);
  font-size: 10px;
}

.player-list-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.player-list-toggle {
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(30, 41, 59, 0.55);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.player-list-toggle:hover {
  border-color: rgba(147, 197, 253, 0.5);
  color: #f8fafc;
}

.player-list-toggle[hidden] {
  display: none;
}

.player-matchup-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.player-matchup-list.is-expanded {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.player-matchup-list.is-expanded .player-matchup-item strong {
  white-space: normal;
}

.player-matchup-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.32);
}

.player-matchup-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 48px;
  margin: 0;
  padding: 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.2);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.player-matchup-item img,
.player-matchup-fallback {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  object-fit: cover;
}

.player-matchup-fallback {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
}

.player-matchup-item > span:last-child {
  min-width: 0;
}

.player-matchup-item strong,
.player-matchup-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-matchup-item strong {
  font-size: 10px;
}

.player-matchup-item small {
  margin-top: 2px;
  overflow: visible;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  text-overflow: clip;
  white-space: nowrap;
}

.duo-performance {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.duo-performance-head,
.duo-performance-title,
.duo-stat-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.duo-performance-head {
  margin-bottom: 10px;
}

.duo-performance-head h3 {
  font-size: 14px;
}

.duo-performance-head span,
.duo-performance-title span {
  color: var(--muted);
  font-size: 11px;
}

.duo-performance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.duo-performance-column {
  --duo-stat-color: #a78bfa;
  padding: 4px 16px 2px;
}

.duo-performance-column.is-other-first {
  --duo-stat-color: #22d3ee;
}

.duo-performance-column.is-other-second {
  --duo-stat-color: #34d399;
}

.duo-performance-column + .duo-performance-column {
  border-left: 1px solid var(--line);
}

.duo-performance-column:first-child {
  padding-left: 0;
}

.duo-performance-column:last-child {
  padding-right: 0;
}

.duo-performance-title {
  margin-bottom: 8px;
}

.duo-performance-title strong {
  font-size: 13px;
}

.duo-stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 0;
}

.duo-stat-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  min-height: 24px;
}

.duo-stat-list dt {
  color: var(--muted);
  font-size: 11px;
}

.duo-stat-list dd {
  margin: 0;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.duo-stat-meter {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.duo-stat-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--duo-stat-color);
  transition: width 300ms ease;
}

.duo-dual-meter {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
}

.duo-dual-meter > span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
}

.duo-dual-meter b {
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
}

.duo-dual-meter .duo-stat-meter {
  grid-column: auto;
}

.summary-extra {
  margin-top: 6px;
  line-height: 1.35;
  font-size: 12px;
}

.summary-character-list {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.summary-character-item {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 36px;
}

.summary-character-image,
.summary-character-fallback {
  width: 36px;
  height: 36px;
  border-radius: 7px;
}

.summary-character-image {
  display: block;
  object-fit: cover;
}

.summary-character-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 9px;
  text-align: center;
  overflow: hidden;
}

.summary-character-games,
.summary-character-empty {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.rank-card-body,
.dual-metric-card,
.detail-player-main,
.player-chip {
  display: flex;
  gap: 14px;
}

.rank-card-body {
  align-items: stretch;
}

.rank-copy,
.dual-metric-card > div,
.player-chip-copy {
  flex: 1;
}

.rank-title {
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 800;
  line-height: 1.1;
}

.rank-score {
  margin-top: 4px;
  font-size: clamp(28px, 3.3vw, 42px);
}

.rank-previous-season {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.rank-season-source {
  margin-left: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.rank-previous-season strong {
  font-size: 10px;
  font-weight: 700;
}

.rank-image {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex: 0 0 auto;
  align-self: center;
}

.dual-metric-card {
  flex-direction: column;
  justify-content: space-between;
  min-height: 124px;
}

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

.result-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 2px;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagination-arrow,
.pagination-page {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.62);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.pagination-arrow {
  font-size: 22px;
  line-height: 1;
}

.pagination-page.is-active {
  border-color: rgba(167, 139, 250, 0.72);
  background: rgba(124, 58, 237, 0.24);
  color: #f5f3ff;
}

.pagination-arrow:disabled {
  cursor: default;
  opacity: 0.35;
}

.match-card,
.empty-card {
  padding: 14px;
}

.match-card {
  cursor: pointer;
}

.match-card.is-same-team-match {
  background: rgba(15, 23, 42, 0.92);
}

.match-card.is-opponent-match {
  background: rgba(17, 24, 39, 0.92);
  border-color: rgba(96, 165, 250, 0.24);
}

.match-card-header,
.match-title-row,
.match-card-actions,
.detail-head,
.team-card-head,
.detail-player-top,
.stat-bar-row {
  display: flex;
  align-items: center;
}

.match-card-header,
.detail-head,
.team-card-head {
  justify-content: space-between;
  gap: 12px;
}

.match-title-row {
  gap: 8px;
  margin-bottom: 0;
}

.match-card h3,
.detail-head h4,
.team-card-head strong {
  font-size: 15px;
  line-height: 1.15;
}

.mode-pill,
.placement-badge,
.rp-pill,
.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.mode-pill {
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
}

.placement-badge {
  background: rgba(148, 163, 184, 0.16);
}

.placement-badge.is-win {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.placement-badge.is-top {
  background: rgba(250, 204, 21, 0.18);
  color: #fde68a;
}

.placement-badge.is-loss {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.rp-pill {
  background: rgba(124, 58, 237, 0.18);
  color: #ddd6fe;
}

.detail-button {
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.5);
  color: var(--text);
  cursor: pointer;
}

.match-player-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.match-player-list.single {
  grid-template-columns: 1fr;
}

.player-chip {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.56);
  border: 1px solid transparent;
  align-items: center;
}

.player-chip.is-highlighted,
.detail-player.is-highlighted {
  border-color: rgba(167, 139, 250, 0.58);
  background: rgba(124, 58, 237, 0.12);
}

.player-chip.is-opponent-a {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.34);
}

.player-chip.is-opponent-b {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.34);
}

.player-chip img,
.detail-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}

.player-chip-top,
.detail-player-top {
  justify-content: space-between;
  gap: 8px;
}

.player-name,
.detail-player-link {
  font-weight: 800;
  font-size: 13px;
}

.player-character {
  color: var(--muted);
  font-size: 12px;
}

.player-chip-stats {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.stat-part {
  white-space: nowrap;
}

.stat-label {
  font-weight: 800;
}

.stat-part.is-terminate {
  color: #93c5fd;
}

.stat-part.is-clutch {
  color: #86efac;
}

.stat-sep {
  display: inline-block;
  margin: 0 4px;
  color: rgba(148, 163, 184, 0.6);
}

.player-chip-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  margin-left: auto;
  text-align: right;
  flex: 0 0 auto;
}

.player-chip-rank-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  width: 100%;
}

.player-chip-rank {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.player-chip-escape {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.player-chip-escape.is-escape-success {
  color: #86efac;
  background: rgba(34, 197, 94, 0.16);
}

.player-chip-escape.is-escape-fail {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
}

.player-chip-rp {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.player-chip-tier,
.player-chip-current-rp {
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.player-chip-rank.is-win {
  color: #86efac;
}

.player-name.is-win {
  color: #86efac;
}

.player-chip-rank.is-top {
  color: #fde68a;
}

.player-name.is-top {
  color: #fde68a;
}

.player-chip-rank.is-loss {
  color: #fca5a5;
}

.player-name.is-loss {
  color: #fca5a5;
}

.detail-slot {
  margin-top: 10px;
  min-width: 0;
}

.detail-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.detail-loading:not(.is-error)::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(147, 197, 253, 0.24);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: search-spin 0.8s linear infinite;
}

.detail-loading.is-error {
  color: #fecaca;
}

.detail-panel {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}

.detail-team-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  gap: 6px;
  margin-top: 8px;
}

.team-card {
  min-width: 0;
  padding: 6px 8px;
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.detail-team-placement {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.detail-team-placement.is-win {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.detail-team-placement.is-top {
  background: rgba(234, 179, 8, 0.14);
  color: #fde047;
}

.detail-team-placement.is-loss {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.team-player-list {
  display: grid;
  min-width: 0;
  gap: 4px;
  margin-top: 0;
}

.detail-player {
  display: block;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.detail-player:hover {
  background: rgba(51, 65, 85, 0.62);
}

.detail-player-copy {
  flex: 1;
  min-width: 0;
}

.detail-player-identity {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.detail-premade {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.detail-premade svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-player-main {
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.detail-player-side {
  margin-left: auto;
  flex: 0 0 240px;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 6px;
}

.detail-player-side-top {
  display: grid;
  gap: 2px;
  width: 100%;
}

.detail-side-character-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: 8px;
  width: 100%;
}

.detail-side-character {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-player-meta {
  font-size: 11px;
  line-height: 1.2;
}

.detail-rank-score {
  color: #ddd6fe;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.detail-rank-tier {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.detail-rank-source {
  padding: 1px 4px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.detail-rank-meta {
  color: #ddd6fe;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  word-break: keep-all;
  line-height: 1.2;
}

.rp-row {
  margin-top: 2px;
}

.stat-bar-block {
  display: grid;
  gap: 3px;
}

.stat-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.stat-bar-row > span {
  color: var(--muted);
  font-size: 11px;
}

.stat-bar-row > strong {
  font-size: 12px;
  color: #cbd5e1;
  justify-self: end;
}

.stat-bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.14);
}

@media (max-width: 720px) {
  .site-header {
    width: min(100vw - 20px, 1120px);
    min-height: 56px;
    gap: 12px;
  }

  .site-brand > span:last-child {
    display: none;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav a {
    font-size: 12px;
  }

  .service-guide {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-inline: 0;
  }

  .initial-insights {
    padding: 18px 16px;
  }

  .initial-insights-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .metric-glossary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-glossary > div:nth-child(4) {
    border-left: 0;
  }

  .metric-glossary > div:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .mode-result-guide {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .site-footer-inner {
    width: min(100vw - 20px, 1120px);
    grid-template-columns: 1fr;
  }

  .site-footer-links {
    justify-content: flex-start;
    gap: 10px 14px;
  }

  .copyright-notice {
    grid-column: auto;
  }

  .detail-panel {
    padding: 8px;
  }

  .team-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .detail-player {
    padding: 6px;
  }

  .detail-player-main {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 6px 8px;
  }

  .detail-avatar {
    grid-column: 1;
    grid-row: 1;
  }

  .detail-player-copy {
    grid-column: 2;
    grid-row: 1;
  }

  .detail-player-side {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: none;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    margin-left: 0;
    align-self: auto;
  }

  .detail-side-character-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3px 8px;
  }

  .detail-side-character {
    flex: 1 1 auto;
  }

  .detail-rank-meta {
    flex: 0 0 auto;
    max-width: 100%;
    margin-left: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
  }
}

.detail-head h4 {
  font-size: 14px;
}

.detail-head p {
  font-size: 11px;
}

.stat-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
}

@media (max-width: 980px) {
  .search-panel,
  .summary-grid,
  .player-summary-grid,
  .match-player-list {
    grid-template-columns: 1fr 1fr;
  }

  .action-card-body {
    grid-template-columns: 1fr;
  }

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

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

}

@media (max-width: 720px) {
  .player-performance-head {
    flex-wrap: wrap;
  }

  .player-performance-controls {
    width: 100%;
    justify-content: space-between;
  }

  .player-character-filter {
    max-width: min(190px, 60vw);
  }

  .page {
    width: min(100vw - 20px, 1120px);
    padding-top: 18px;
  }

  .hero,
  .panel-stack,
  .match-card,
  .empty-card {
    padding: 16px;
  }

  .search-panel,
  .summary-grid,
  .player-summary-grid,
  .match-player-list,
  .detail-team-grid {
    grid-template-columns: 1fr;
  }

  .duo-performance-grid,
  .duo-stat-list {
    grid-template-columns: 1fr;
  }

  .duo-performance-column {
    padding: 10px 0;
  }

  .duo-performance-column + .duo-performance-column {
    border-left: 0;
  }

  .duo-performance-column:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .player-matchups {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .player-matchup-group {
    padding: 0;
  }

  .player-matchup-group:first-child {
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .player-death-area-list {
    grid-template-columns: 1fr;
  }

  .section-header,
  .match-card-header,
  .match-card-actions,
  .section-heading-line,
  .rank-card-body,
  .detail-head,
  .detail-player-top,
  .player-chip-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-image {
    width: 96px;
    height: 96px;
  }

  .recent-game-character-control {
    width: 100%;
    justify-content: space-between;
  }
}
