:root {
  --bg-0: #060d12;
  --bg-1: #0d1c26;
  --bg-2: #142f3f;
  --panel-bg: rgba(8, 16, 22, 0.78);
  --panel-bg-strong: rgba(11, 22, 32, 0.92);
  --line-soft: rgba(80, 206, 255, 0.42);
  --line-muted: rgba(90, 123, 143, 0.45);
  --text-main: #d9f5ff;
  --text-dim: #91a9b8;
  --accent-cyan: #52e0ff;
  --accent-blue: #4297ff;
  --accent-red: #ff5260;
  --accent-green: #5af6a0;
  --shadow: rgba(0, 0, 0, 0.45);
  --header-character-width: 547px;
  --head-character-height: 280px;
  --header-character-offset-x: 130px;
  --header-character-offset-y: -205px;
  --header-character-rotate: 0deg;
  --header-character-header-margin-top: 13rem;
}

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

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

body {
  color: var(--text-main);
  font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(65, 130, 182, 0.4), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(217, 74, 88, 0.26), transparent 30%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2) 100%);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #9af0ff;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, 100% - 2.4rem);
  margin: 1.2rem auto 2rem;
  display: grid;
  gap: 1rem;
}

.header-character-link {
  position: absolute;
  left: var(--header-character-offset-x);
  top: var(--header-character-offset-y);
  width: var(--header-character-width);
  height: var(--head-character-height);
  display: block;
  background: url("./benmols_header.png") center / contain no-repeat;
  transform: rotate(var(--header-character-rotate));
  transform-origin: center;
  z-index: 10;
  border-radius: 12px;
}

.header-character-link:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 4px;
}

.site-header.panel {
  position: relative;
  overflow: visible;
  display: grid;
  gap: 1rem;
  align-items: center;
  grid-template-columns: auto 1fr;
  margin-top: var(--header-character-header-margin-top);
}

.brand-block {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.1rem;
}

.brand-block h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-family: "Arial Narrow", "Bahnschrift", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--text-dim);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.site-nav {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.site-nav a {
  position: relative;
  z-index: 21;
  border: 1px solid var(--line-muted);
  color: var(--text-main);
  border-radius: 999px;
  font-size: 0.83rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(145deg, rgba(29, 45, 61, 0.72), rgba(8, 16, 24, 0.6));
  transition: border-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.site-header > .header-character-link {
  position: absolute;
  z-index: 10;
}

.site-header > .brand-block {
  position: relative;
  z-index: 2;
}

.site-header > .site-nav {
  position: relative;
  z-index: 20;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--line-soft);
  transform: translateY(-1px);
}

.site-nav a[data-active="true"] {
  border-color: var(--accent-cyan);
  color: #e8fbff;
  box-shadow: 0 0 18px rgba(82, 224, 255, 0.22);
}

.matcherino-header-strip {
  position: relative;
  z-index: 22;
  grid-column: 1 / -1;
  display: grid;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.matcherino-prize-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.34rem 0.7rem;
  border: 1px solid rgba(117, 248, 173, 0.38);
  background: linear-gradient(135deg, rgba(17, 33, 28, 0.86), rgba(9, 20, 17, 0.88));
  color: #ddffe8;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.matcherino-prize-link:hover,
.matcherino-prize-link:focus-visible {
  border-color: rgba(138, 255, 190, 0.65);
  color: #f0fff5;
}

.matcherino-prize-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: #a6dbc2;
}

#matcherino-prize-total {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.matcherino-donate-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.2rem;
  padding: 0.14rem 0.48rem;
  border: 1px solid rgba(255, 210, 120, 0.46);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(75, 51, 18, 0.9), rgba(50, 35, 12, 0.88));
  color: #ffe7b6;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.matcherino-prize-link:hover .matcherino-donate-chip,
.matcherino-prize-link:focus-visible .matcherino-donate-chip {
  border-color: rgba(255, 227, 163, 0.86);
  color: #fff3d4;
  transform: translateY(-1px);
}

.matcherino-activity {
  min-width: 0;
}

.matcherino-activity-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(117, 248, 173, 0.32);
  background: rgba(8, 18, 14, 0.82);
  padding: 0.28rem 0.5rem;
}

.matcherino-activity-track {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  width: max-content;
  transform: translateX(0);
}

.matcherino-activity-track.is-animated {
  animation: matcherinoTickerScroll var(--ticker-duration, 38s) linear infinite;
}

.matcherino-activity-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.73rem;
  color: #d8efe2;
  letter-spacing: 0.03em;
}

.matcherino-activity-item::after {
  content: "";
  width: 0.36rem;
  height: 0.36rem;
  margin-left: 1.8rem;
  border-radius: 50%;
  background: rgba(117, 248, 173, 0.4);
}

.matcherino-activity-item.is-empty::after {
  display: none;
}

@keyframes matcherinoTickerScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.site-main {
  display: grid;
  gap: 1rem;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid var(--line-soft);
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 8px 28px var(--shadow),
    0 0 20px rgba(63, 176, 243, 0.1);
  padding: 1rem;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 25%,
    transparent 40%
  );
  transform: translateX(-120%);
  animation: sheenSweep 8s linear infinite;
}

@keyframes sheenSweep {
  to {
    transform: translateX(130%);
  }
}

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

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

.vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  background: var(--panel-bg-strong);
}

.vs-side {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.95rem;
  min-height: 96px;
}

.vs-side img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(7, 10, 14, 0.6);
}

.vs-side strong {
  display: block;
  font-size: 1.05rem;
}

.vs-side .player-outcome {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f2fbff;
}

.vs-side small {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.series-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
}

.series-dots.is-inline {
  margin-left: 0.24rem;
}

.series-dots.is-compact {
  gap: 0.18rem;
}

.series-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  border: 1px solid rgba(157, 187, 207, 0.7);
  background: rgba(57, 79, 97, 0.72);
  box-shadow: 0 0 0 1px rgba(8, 16, 23, 0.46) inset;
}

.series-dot.win {
  border-color: rgba(90, 246, 160, 0.86);
  background: rgba(67, 206, 140, 0.98);
  box-shadow: 0 0 10px rgba(88, 241, 163, 0.34);
}

.series-dot.loss {
  border-color: rgba(157, 187, 207, 0.68);
  background: rgba(57, 79, 97, 0.72);
  box-shadow: 0 0 0 1px rgba(8, 16, 23, 0.46) inset;
}

.series-dot.pending {
  border-color: rgba(157, 187, 207, 0.68);
  background: rgba(57, 79, 97, 0.72);
}

.series-dots.is-compact .series-dot {
  width: 0.47rem;
  height: 0.47rem;
}

.vs-side .series-dots {
  margin-top: 0.34rem;
}

.vs-side.red .series-dots {
  justify-content: flex-end;
}

.vs-winner-tag {
  border: 1px solid rgba(90, 246, 160, 0.56);
  background: rgba(27, 104, 71, 0.48);
  color: #dcffef;
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.vs-end-hp {
  display: grid;
  gap: 0.08rem;
  min-width: 72px;
}

.vs-end-hp small {
  font-size: 0.62rem;
  color: rgba(236, 246, 255, 0.78);
}

.vs-end-hp strong {
  font-size: 1.05rem;
  line-height: 1;
}

.vs-end-hp.blue {
  margin-left: auto;
  text-align: right;
}

.vs-end-hp.red {
  margin-right: auto;
  text-align: left;
}

.vs-side.blue {
  background: linear-gradient(120deg, rgba(32, 79, 138, 0.95), rgba(15, 41, 72, 0.9));
}

.vs-side.red {
  justify-content: flex-end;
  text-align: right;
  background: linear-gradient(240deg, rgba(150, 28, 42, 0.95), rgba(78, 15, 26, 0.92));
}

.vs-center {
  display: grid;
  place-items: center;
  padding: 0 0.9rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-family: "Arial Narrow", "Bahnschrift", sans-serif;
  font-weight: 700;
  color: #c6f5ff;
  text-shadow:
    0 0 10px rgba(130, 230, 255, 0.5),
    0 0 26px rgba(72, 142, 255, 0.3);
  animation: pulseVs 1.8s ease-in-out infinite;
}

@keyframes pulseVs {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1;
  padding: 0.33rem 0.65rem;
}

.badge.badge-scheduled {
  color: #d7dee6;
  border-color: rgba(181, 194, 208, 0.42);
  background: rgba(66, 78, 92, 0.35);
}

.badge-live {
  color: #ffd8dd;
  border-color: rgba(255, 82, 96, 0.6);
  background: rgba(122, 28, 40, 0.45);
  animation: pulseLive 1.2s ease-in-out infinite;
}

.badge-completed {
  color: #d4ffe9;
  border-color: rgba(90, 246, 160, 0.5);
  background: rgba(24, 97, 62, 0.4);
}

@keyframes pulseLive {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 82, 96, 0.45);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 82, 96, 0);
  }
}

.tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  max-width: 360px;
  color: var(--text-main);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(10, 20, 30, 0.94);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  padding: 0.6rem 0.7rem;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 120ms ease, transform 120ms ease;
}

.tooltip.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.tooltip-title {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b4ecff;
}

.tooltip-body {
  margin: 0.35rem 0 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.matrix-detail-card {
  display: grid;
  gap: 0.42rem;
  min-width: 300px;
}

.matrix-detail-bar {
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.52rem;
}

.matrix-detail-bar.blue {
  background: linear-gradient(120deg, rgba(56, 76, 196, 0.95), rgba(47, 65, 151, 0.9));
}

.matrix-detail-bar.red {
  background: linear-gradient(120deg, rgba(247, 24, 44, 0.95), rgba(169, 13, 27, 0.9));
}

.matrix-detail-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}

.matrix-detail-name {
  color: #f2fbff;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-detail-hp {
  color: #f4fcff;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.matrix-detail-rift {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  background: rgba(5, 12, 18, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.14rem 0.32rem;
}

.matrix-rift-detail {
  appearance: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.matrix-rift-detail:focus-visible {
  outline: 2px solid rgba(82, 224, 255, 0.9);
  outline-offset: 2px;
}

.matrix-detail-rift .rift-icon-stack,
.matrix-detail-rift-placeholder {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(4, 8, 12, 0.65);
}

.matrix-detail-rift .rift-icon-stack {
  overflow: hidden;
}

.matrix-detail-rift-placeholder {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #c3d7e2;
}

.matrix-detail-rift-label {
  color: #edf8ff;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  max-width: 86px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-wrap {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
}

.matrix-grid {
  display: grid;
  gap: 0.42rem;
  grid-template-columns: 160px repeat(4, minmax(72px, 1fr));
  align-items: stretch;
}

.matrix-head,
.matrix-player {
  border-radius: 11px;
  border: 1px solid rgba(82, 224, 255, 0.22);
  background: rgba(13, 28, 39, 0.68);
  padding: 0.35rem 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 50px;
}

.matrix-head.is-match-focus,
.matrix-player.is-match-focus {
  border-color: rgba(153, 230, 255, 0.9);
  background: rgba(30, 62, 84, 0.85);
  box-shadow: 0 0 0 1px rgba(153, 230, 255, 0.32) inset, 0 0 16px rgba(77, 197, 245, 0.3);
}

.matrix-head img,
.matrix-player img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  object-fit: cover;
}

.matrix-head {
  justify-content: center;
  text-align: center;
}

.matrix-head img {
  width: 24px;
  height: 24px;
}

.matrix-cell {
  border: 1px solid rgba(113, 149, 171, 0.35);
  border-radius: 11px;
  background: rgba(13, 26, 38, 0.72);
  color: var(--text-main);
  min-height: 50px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

button.matrix-cell {
  cursor: pointer;
}

.matrix-cell.win {
  color: var(--accent-green);
  border-color: rgba(90, 246, 160, 0.4);
}

.matrix-cell.loss {
  color: #ff8f9a;
  border-color: rgba(255, 82, 96, 0.5);
}

.matrix-cell.pending {
  color: var(--text-dim);
}

.matrix-cell.live {
  color: #ffdce0;
  border-color: rgba(255, 82, 96, 0.58);
}

.matrix-diagonal {
  opacity: 0.25;
  pointer-events: none;
}

.leaderboard {
  display: grid;
  gap: 0.55rem;
}

.leaderboard table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.leaderboard th {
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(98, 135, 157, 0.42);
  padding-bottom: 0.35rem;
}

.leaderboard td {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(78, 115, 138, 0.28);
}

.leaderboard th.hp-diff-col,
.leaderboard td.hp-diff-col {
  text-align: right;
}

.player-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.player-name img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.player-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-profile img {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  object-fit: cover;
}

.matchup-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.matchup-inline-player {
  display: inline-flex;
  align-items: center;
}

.matchup-inline.with-avatars img {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.36);
  object-fit: cover;
}

.vs-word {
  color: var(--text-dim);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.winner-name {
  color: #ffd86b;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 216, 107, 0.34);
}

.player-outcome {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  flex-wrap: wrap;
}

.player-outcome[data-player-detail] {
  cursor: pointer;
}

.twitch-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1em 0.42em;
  border-radius: 999px;
  border: 1px solid rgba(138, 92, 255, 0.62);
  background: rgba(84, 39, 146, 0.34);
  color: #e9dcff;
  text-decoration: none;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  box-shadow: 0 0 8px rgba(138, 92, 255, 0.24);
}

.twitch-live-badge.is-bilibili {
  border-color: rgba(43, 198, 255, 0.72);
  background: rgba(20, 126, 198, 0.34);
  color: #dff7ff;
  box-shadow: 0 0 8px rgba(43, 198, 255, 0.28);
}

.twitch-live-icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
}

.twitch-live-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.loser-name {
  color: inherit;
  text-decoration: none;
}

.player-detail-card {
  display: grid;
  gap: 0.45rem;
  min-width: 260px;
}

.player-detail-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-detail-head img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.player-detail-name {
  margin: 0;
  color: var(--text-main);
  font-size: 0.9rem;
}

.player-detail-stream {
  margin: 0.12rem 0 0;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.leaderboard-rifts-row[hidden] {
  display: none;
}

.rift-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(35px, 1fr));
  gap: 0.35rem;
}

.rift-icon-stack {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.rift-icon-base,
.rift-icon-overlay {
  display: block;
  width: 100%;
  height: 100%;
}

.rift-icon-base {
  object-fit: cover;
}

.rift-icon-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.55));
}

.rift-item {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(98, 132, 153, 0.38);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(7, 15, 22, 0.9);
  padding: 0.18rem;
  position: relative;
  cursor: pointer;
}

.rift-item .rift-icon-stack {
  display: block;
  width: 100%;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
}

.rift-item span {
  display: block;
  text-align: center;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rift-item.used {
  border-color: #ff2a3e;
  box-shadow:
    0 0 0 3px rgba(255, 42, 62, 0.95) inset,
    0 0 12px rgba(255, 42, 62, 0.45);
}

.rift-item.used .rift-icon-base {
  filter: saturate(0.68) brightness(0.82) contrast(1.05);
}

.rift-item.used::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 3;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 58, 76, 0.32) 0 2px,
      rgba(255, 58, 76, 0.06) 2px 6px
    ),
    linear-gradient(
      120deg,
      rgba(255, 58, 76, 0) 0%,
      rgba(255, 58, 76, 0.24) 40%,
      rgba(255, 58, 76, 0.54) 50%,
      rgba(255, 58, 76, 0.2) 60%,
      rgba(255, 58, 76, 0) 100%
    );
  background-size: 100% 16px, 220% 100%;
  mix-blend-mode: screen;
  animation:
    riftUsedScanShift 920ms linear infinite,
    riftUsedScanFlicker 1300ms steps(2, end) infinite;
}

.rift-item.used::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 56, 78, 0.15), rgba(255, 56, 78, 0) 70%);
  animation: riftUsedScanGlow 1800ms ease-in-out infinite alternate;
}

@keyframes riftUsedScanShift {
  from {
    background-position: 0 0, -160% 0;
  }

  to {
    background-position: 0 16px, 160% 0;
  }
}

@keyframes riftUsedScanFlicker {
  0%,
  100% {
    opacity: 0.92;
  }

  35% {
    opacity: 0.62;
  }

  37% {
    opacity: 0.35;
  }

  40% {
    opacity: 0.8;
  }

  74% {
    opacity: 0.48;
  }

  76% {
    opacity: 0.28;
  }
}

@keyframes riftUsedScanGlow {
  from {
    opacity: 0.35;
  }

  to {
    opacity: 0.85;
  }
}

.rift-catalog-icon {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.rift-catalog-icon .rift-icon-stack {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(111, 159, 187, 0.42);
  overflow: hidden;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.button {
  border-radius: 10px;
  border: 1px solid rgba(98, 148, 179, 0.42);
  color: var(--text-main);
  background: linear-gradient(140deg, rgba(27, 45, 60, 0.84), rgba(8, 16, 24, 0.7));
  cursor: pointer;
  padding: 0.4rem 0.72rem;
  font-size: 0.79rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button.is-active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(82, 224, 255, 0.22);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toggle input {
  accent-color: var(--accent-cyan);
}

.table-wrap {
  overflow-x: auto;
}

table.schedule-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.schedule-table th {
  text-align: left;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(95, 136, 161, 0.5);
  padding: 0.5rem 0.6rem;
}

.schedule-table td {
  border-bottom: 1px solid rgba(72, 108, 128, 0.3);
  padding: 0.56rem 0.6rem;
}

.schedule-day-separator-row td {
  padding: 0.52rem 0.6rem 0.4rem;
  border-bottom: 1px solid rgba(95, 136, 161, 0.36);
  background: rgba(10, 22, 31, 0.88);
}

.schedule-day-separator-label {
  display: inline-flex;
  align-items: center;
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule-time-cell {
  min-width: 106px;
}

.schedule-time-main {
  display: block;
  color: var(--text-main);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.schedule-time-sub {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-dim);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.schedule-status-cell .schedule-status-badge {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.rules-prize-note {
  margin: 0.8rem 0 0.55rem;
}

.rules-prize-note strong {
  color: var(--text-main);
  letter-spacing: 0.02em;
}

table.rules-prize-table {
  min-width: 420px;
  table-layout: fixed;
}

.rules-prize-table th:nth-child(1),
.rules-prize-table td:nth-child(1) {
  width: 25%;
}

.rules-prize-table th:nth-child(2),
.rules-prize-table td:nth-child(2) {
  width: 37.5%;
}

.rules-prize-table th:nth-child(3),
.rules-prize-table td:nth-child(3) {
  width: 37.5%;
}

.rules-prize-table th:nth-child(2),
.rules-prize-table th:nth-child(3),
.rules-prize-table td:nth-child(2),
.rules-prize-table td:nth-child(3) {
  text-align: right;
}

.rules-prize-table .prize-place {
  font-weight: 700;
  color: var(--text-main);
}

.rules-prize-table tfoot .is-total td,
.rules-prize-table tfoot tr.is-total td {
  border-top: 1px solid rgba(95, 136, 161, 0.5);
  border-bottom: 0;
  font-weight: 700;
  color: var(--text-main);
}

.cards {
  display: grid;
  gap: 0.8rem;
}

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

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

.game-card {
  border: 1px solid rgba(95, 137, 163, 0.4);
  border-radius: 12px;
  background: rgba(9, 18, 25, 0.82);
  padding: 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.match-game-detail-card {
  gap: 0.6rem;
}

.match-game-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.match-game-head .tooltip-title {
  margin: 0;
}

.match-game-meta {
  display: grid;
  gap: 0.28rem;
}

.match-game-line {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.match-game-line > span:last-child {
  color: var(--text-main);
  text-align: right;
}

.match-game-detail-card .matrix-detail-bar {
  padding: 0.55rem 0.62rem;
}

.match-game-detail-card .matrix-detail-name {
  font-size: 0.98rem;
}

.match-game-detail-card .matrix-detail-hp {
  font-size: 0.87rem;
}

.match-game-detail-card .matrix-detail-rift {
  gap: 0.42rem;
  padding: 0.18rem 0.38rem;
}

.match-game-detail-card .matrix-detail-rift .rift-icon-stack,
.match-game-detail-card .matrix-detail-rift-placeholder {
  width: 40px;
  height: 40px;
}

.match-game-detail-card .matrix-detail-rift-label {
  max-width: 130px;
  font-size: 0.78rem;
}

.meta-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.28rem;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-dim);
}

.meta-list strong {
  color: var(--text-main);
}

.meta-value {
  display: inline-flex;
  justify-content: flex-end;
  text-align: right;
}

.rift-pick-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.rift-inline-detail .rift-icon-stack {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  overflow: hidden;
}

.game-card .rift-inline-detail .rift-icon-stack {
  width: 18px;
  height: 18px;
  border-radius: 10px;
}

.rift-pick-name {
  color: var(--text-main);
  font-size: 0.78rem;
}

.rift-inline-detail {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: inherit;
}

.bracket-match-id {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.playoff-tree {
  --tree-card-ratio: 0.6;
  --tree-gap-x: 1rem;
  --tree-gap-y: 0.85rem;
  --tree-col-width: calc((100% - (2 * var(--tree-gap-x))) / 3);
  --tree-card-width: calc(100% * var(--tree-card-ratio));
  --tree-col1-right: calc(var(--tree-col-width) * var(--tree-card-ratio));
  --tree-col2-start: calc(var(--tree-col-width) + var(--tree-gap-x));
  --tree-col2-right: calc(var(--tree-col2-start) + (var(--tree-col-width) * var(--tree-card-ratio)));
  --tree-col3-start: calc((var(--tree-col-width) * 2) + (var(--tree-gap-x) * 2));
  --tree-spine-x: calc(var(--tree-col3-start) - (var(--tree-gap-x) * 0.35));
  --tree-semi-bridge: calc(var(--tree-col2-start) - var(--tree-col1-right));
  --tree-right-bridge: calc(var(--tree-spine-x) - var(--tree-col2-right));
  --tree-grand-bridge: calc(var(--tree-col3-start) - var(--tree-spine-x));
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(98px, 1fr));
  gap: var(--tree-gap-y) var(--tree-gap-x);
  min-height: 270px;
}

.tree-stage {
  display: grid;
  gap: 0.35rem;
  align-items: start;
}

.tree-stage-title {
  margin: 0;
  width: var(--tree-card-width);
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #dceff8;
  background: rgba(255, 255, 255, 0.08);
}

.tree-lower-semi {
  grid-column: 1;
  grid-row: 2;
}

.tree-upper-final {
  grid-column: 2;
  grid-row: 1;
}

.tree-lower-final {
  grid-column: 2;
  grid-row: 2;
}

.tree-grand-final {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
}

.tree-match {
  display: grid;
  gap: 0.22rem;
  min-height: 72px;
  width: var(--tree-card-width);
  border-radius: 8px;
  border: 1px solid rgba(98, 138, 162, 0.42);
  background: rgba(10, 18, 26, 0.88);
  padding: 0.5rem 0.6rem;
  color: var(--text-main);
}

a.tree-match:hover,
a.tree-match:focus-visible {
  border-color: rgba(82, 224, 255, 0.72);
  box-shadow: 0 0 12px rgba(82, 224, 255, 0.16);
}

.tree-match-row {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.8rem;
  line-height: 1.2;
  min-width: 0;
}

.tree-match-row img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  object-fit: cover;
  flex: 0 0 auto;
}

.tree-match-row .player-outcome {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-match-row .series-dots.is-tree {
  margin-left: 0.24rem;
}

.tree-match-row .series-dots.is-tree .series-dot {
  width: 0.4rem;
  height: 0.4rem;
}

.tree-match-meta {
  margin-top: 0.18rem;
  color: var(--text-dim);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tree-link {
  position: absolute;
  pointer-events: none;
  border-color: rgba(163, 204, 226, 0.65);
}

.tree-link-semi {
  left: var(--tree-col1-right);
  top: 77%;
  width: var(--tree-semi-bridge);
  border-top: 2px solid rgba(163, 204, 226, 0.65);
}

.tree-link-upper {
  left: var(--tree-col2-right);
  top: 27%;
  width: var(--tree-right-bridge);
  border-top: 2px solid rgba(163, 204, 226, 0.65);
}

.tree-link-lower {
  left: var(--tree-col2-right);
  top: 77%;
  width: var(--tree-right-bridge);
  border-top: 2px solid rgba(163, 204, 226, 0.65);
}

.tree-link-vertical {
  left: var(--tree-spine-x);
  top: 27%;
  height: 50%;
  border-left: 2px solid rgba(163, 204, 226, 0.65);
}

.tree-link-grand {
  left: var(--tree-spine-x);
  top: 52%;
  width: var(--tree-grand-bridge);
  border-top: 2px solid rgba(163, 204, 226, 0.65);
}

.stage-link {
  color: #9ee9ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.stage-link-pill {
  color: var(--text-main);
  text-decoration: none;
}

.stage-link-pill:hover,
.stage-link-pill:focus-visible {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(82, 224, 255, 0.2);
}

.list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-inline li {
  border: 1px solid rgba(100, 142, 166, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.58rem;
  font-size: 0.74rem;
}

.small {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.alert {
  border-radius: 10px;
  border: 1px solid rgba(255, 82, 96, 0.5);
  background: rgba(120, 21, 32, 0.35);
  color: #ffdbe0;
  padding: 0.65rem 0.8rem;
  font-size: 0.82rem;
}

.pill-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pill {
  border-radius: 999px;
  border: 1px solid rgba(95, 137, 161, 0.38);
  padding: 0.28rem 0.58rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 8, 12, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal {
  width: min(480px, 100%);
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(10, 20, 29, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.52);
  padding: 0.95rem;
}

.modal header {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.modal h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.modal button {
  border: 1px solid rgba(120, 168, 192, 0.4);
  border-radius: 8px;
  color: var(--text-main);
  background: rgba(21, 38, 50, 0.88);
  cursor: pointer;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.58rem;
}

.modal .content {
  margin-top: 0.7rem;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.modal .content p {
  margin: 0 0 0.55rem;
}

.modal .matrix-detail-card {
  min-width: 0;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.13;
  background: repeating-linear-gradient(
    to bottom,
    rgba(194, 255, 255, 0.13) 0 1px,
    transparent 1px 4px
  );
  animation: scanMove 9s linear infinite;
}

@keyframes scanMove {
  from {
    transform: translateY(-3px);
  }

  to {
    transform: translateY(3px);
  }
}

.noscript {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 90;
  border: 1px solid rgba(255, 82, 96, 0.65);
  border-radius: 8px;
  background: rgba(114, 18, 32, 0.92);
  color: #ffe1e5;
  padding: 0.55rem 0.8rem;
}

/* Terminal theme (site + overlays) */
body.terminal-theme {
  --terminal-bg-0: #030604;
  --terminal-bg-1: #07110b;
  --terminal-bg-2: #101b14;
  --terminal-line-soft: rgba(117, 248, 173, 0.32);
  --terminal-line-strong: rgba(117, 248, 173, 0.64);
  --terminal-text-main: #d7ffe8;
  --terminal-text-dim: #8ab79d;
  --terminal-accent: #75f8ad;
  --terminal-side-blue-start: rgba(18, 58, 126, 0.92);
  --terminal-side-blue-end: rgba(8, 22, 50, 0.95);
  --terminal-side-red-start: rgba(48, 20, 27, 0.92);
  --terminal-side-red-end: rgba(19, 8, 12, 0.95);
  --panel-bg: rgba(4, 10, 7, 0.9);
  --panel-bg-strong: rgba(8, 16, 12, 0.94);
  --line-soft: rgba(117, 248, 173, 0.38);
  --line-muted: rgba(91, 149, 121, 0.44);
  --text-main: #d7ffe8;
  --text-dim: #8ab79d;
  --accent-cyan: #75f8ad;
  --accent-blue: #6bcf9b;
  --shadow: rgba(0, 0, 0, 0.52);
  color: var(--terminal-text-main);
  font-family: "JetBrains Mono", "Cascadia Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;
  background:
    radial-gradient(circle at 11% 4%, rgba(35, 95, 64, 0.42), transparent 34%),
    radial-gradient(circle at 86% -6%, rgba(28, 75, 52, 0.4), transparent 30%),
    linear-gradient(180deg, var(--terminal-bg-0), var(--terminal-bg-1) 42%, var(--terminal-bg-2) 100%);
}

body.terminal-theme a {
  color: #a9ffd0;
}

body.terminal-theme a:hover,
body.terminal-theme a:focus-visible {
  color: #d2ffe6;
}

body.terminal-theme .scanlines {
  opacity: 0.22;
  background: repeating-linear-gradient(
    to bottom,
    rgba(94, 216, 146, 0.14) 0 1px,
    transparent 1px 3px
  );
}

body.terminal-theme .home-hologram-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

body.terminal-theme .home-hologram-sprite {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--holo-size, 140px);
  max-width: none;
  user-select: none;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity, filter;
  filter:
    blur(var(--holo-blur, 0px))
    saturate(0.78)
    brightness(1.26)
    contrast(1.28)
    hue-rotate(var(--holo-hue, 168deg))
    drop-shadow(0 0 10px rgba(117, 248, 173, 0.42));
  animation:
    homeHologramDrift var(--holo-drift-duration, 28s) linear forwards,
    homeHologramFlicker var(--holo-flicker-duration, 0.64s) steps(2, end) infinite,
    homeHologramPulse var(--holo-pulse-duration, 2.5s) ease-in-out infinite alternate;
}

body.terminal-theme .home-hologram-sprite.is-avatar {
  height: var(--holo-size, 140px);
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 61%, transparent 62%);
  mask-image: radial-gradient(circle at 50% 50%, #000 61%, transparent 62%);
  filter:
    blur(var(--holo-blur, 0px))
    saturate(0.84)
    brightness(1.2)
    contrast(1.26)
    hue-rotate(var(--holo-hue, 168deg));
  border: 1px solid rgba(117, 248, 173, 0.34);
  box-shadow:
    0 0 0 1px rgba(5, 14, 10, 0.54) inset,
    0 0 10px rgba(117, 248, 173, 0.34),
    0 0 18px rgba(117, 248, 173, 0.16);
}

@keyframes homeHologramDrift {
  from {
    transform: translate3d(var(--holo-from-x), var(--holo-y), 0) scale(var(--holo-scale-start)) rotate(var(--holo-rotate-start));
  }

  to {
    transform: translate3d(var(--holo-to-x), calc(var(--holo-y) + var(--holo-y-drift)), 0) scale(var(--holo-scale-end)) rotate(var(--holo-rotate-end));
  }
}

@keyframes homeHologramFlicker {
  0%,
  100% {
    opacity: var(--holo-flicker-high);
  }

  9% {
    opacity: var(--holo-flicker-low);
  }

  12% {
    opacity: var(--holo-flicker-mid);
  }

  35% {
    opacity: var(--holo-flicker-high);
  }

  36% {
    opacity: var(--holo-flicker-low);
  }

  42% {
    opacity: var(--holo-flicker-mid);
  }

  68% {
    opacity: var(--holo-flicker-high);
  }

  71% {
    opacity: var(--holo-flicker-low);
  }
}

@keyframes homeHologramPulse {
  from {
    filter:
      blur(var(--holo-blur, 0px))
      saturate(0.58)
      brightness(1.05)
      contrast(1.12)
      hue-rotate(var(--holo-hue, 168deg))
      drop-shadow(0 0 5px rgba(117, 248, 173, 0.2));
  }

  to {
    filter:
      blur(var(--holo-blur, 0px))
      saturate(0.9)
      brightness(1.35)
      contrast(1.3)
      hue-rotate(var(--holo-hue, 168deg))
      drop-shadow(0 0 14px rgba(117, 248, 173, 0.48));
  }
}

body.terminal-theme .site-shell {
  width: min(1280px, 100% - 1.3rem);
  margin-top: 0.8rem;
  gap: 0.85rem;
  z-index: 2;
}

body.terminal-theme .panel {
  border-radius: 10px;
  border-color: var(--line-soft);
  background: rgba(4, 10, 7, 0.9);
  box-shadow:
    0 0 0 1px rgba(117, 248, 173, 0.1) inset,
    0 10px 26px rgba(0, 0, 0, 0.45);
}

body.terminal-theme .panel::before {
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(117, 248, 173, 0.14) 24%,
    transparent 40%
  );
}

body.terminal-theme .matrix-head,
body.terminal-theme .matrix-player {
  border-color: rgba(117, 248, 173, 0.24);
  background: rgba(12, 26, 18, 0.72);
}

body.terminal-theme .matrix-cell {
  border-color: rgba(117, 248, 173, 0.28);
  background: rgba(10, 22, 15, 0.76);
}

body.terminal-theme .matrix-detail-bar {
  border: 1px solid rgba(117, 248, 173, 0.26);
  box-shadow: 0 0 0 1px rgba(117, 248, 173, 0.08) inset;
}

body.terminal-theme .matrix-detail-bar.blue {
  background: linear-gradient(120deg, var(--terminal-side-blue-start), var(--terminal-side-blue-end));
}

body.terminal-theme .matrix-detail-bar.red {
  background: linear-gradient(240deg, var(--terminal-side-red-start), var(--terminal-side-red-end));
}

body.terminal-theme .matrix-detail-name,
body.terminal-theme .matrix-detail-hp {
  color: #e9fff4;
}

body.terminal-theme .matrix-detail-rift {
  background: rgba(4, 11, 8, 0.72);
  border-color: rgba(117, 248, 173, 0.4);
}

body.terminal-theme .matrix-detail-rift .rift-icon-stack,
body.terminal-theme .matrix-detail-rift-placeholder {
  border-color: rgba(117, 248, 173, 0.5);
  background: rgba(2, 8, 6, 0.74);
}

body.terminal-theme .matrix-detail-rift-placeholder {
  color: #d6fbe7;
}

body.terminal-theme .matrix-detail-rift-label {
  color: #dffded;
}

body.terminal-theme .matrix-rift-detail:focus-visible {
  outline-color: rgba(117, 248, 173, 0.92);
}

body.terminal-theme .game-card,
body.terminal-theme .tree-match {
  border-color: rgba(117, 248, 173, 0.3);
  background: rgba(8, 18, 12, 0.86);
}

body.terminal-theme .header-character-link {
  display: block;
  width: calc(var(--header-character-width) * 0.86);
  height: calc(var(--head-character-height) * 0.86);
  left: calc(var(--header-character-offset-x) * 0.72);
  top: calc(var(--header-character-offset-y) + 18px);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.48));
  z-index: 18;
}

body.terminal-theme .site-header.panel {
  margin-top: calc(var(--header-character-header-margin-top) * 0.78);
  grid-template-columns: 1fr;
  gap: 0.75rem;
  border-color: var(--terminal-line-soft);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(14, 23, 17, 0.96) 0 2.45rem, rgba(5, 11, 8, 0.95) 2.45rem 100%);
  box-shadow:
    0 0 0 1px rgba(117, 248, 173, 0.14) inset,
    0 12px 30px rgba(0, 0, 0, 0.46);
  padding: 0.52rem 0.85rem 0.95rem;
}

body.terminal-theme .site-header.panel::before {
  display: none;
}

body.terminal-theme .site-header.panel::after {
  content: "editor: navigation.ts";
  position: absolute;
  left: 3.8rem;
  top: 0.58rem;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terminal-text-dim);
  pointer-events: none;
}

body.terminal-theme .brand-block {
  display: flex;
  align-items: baseline;
  gap: 0.72rem;
  padding-top: 1.9rem;
}

body.terminal-theme .brand-block h1 {
  font-family: inherit;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  letter-spacing: 0.04em;
  text-transform: none;
}

body.terminal-theme .brand-block .eyebrow {
  color: var(--terminal-text-dim);
  letter-spacing: 0.18em;
  font-size: 0.67rem;
}

body.terminal-theme .brand-block .eyebrow::before {
  content: "$ ";
  color: var(--terminal-accent);
}

body.terminal-theme .site-nav {
  justify-content: flex-start;
  gap: 0.35rem;
  border-top: 1px solid rgba(117, 248, 173, 0.18);
  padding-top: 0.58rem;
}

body.terminal-theme .site-nav a {
  border-radius: 5px 5px 0 0;
  border-color: rgba(117, 248, 173, 0.3);
  border-bottom-color: transparent;
  background: linear-gradient(180deg, rgba(17, 35, 25, 0.95), rgba(8, 15, 11, 0.95));
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--terminal-text-dim);
  padding: 0.34rem 0.62rem 0.37rem;
}

body.terminal-theme .site-nav a::before {
  content: "./";
  color: rgba(117, 248, 173, 0.65);
}

body.terminal-theme .site-nav a:hover,
body.terminal-theme .site-nav a:focus-visible {
  border-color: var(--terminal-line-strong);
  color: var(--terminal-text-main);
}

body.terminal-theme .site-nav a[data-active="true"] {
  color: var(--terminal-text-main);
  border-color: var(--terminal-line-strong);
  box-shadow:
    0 -1px 0 rgba(117, 248, 173, 0.68) inset,
    0 0 12px rgba(117, 248, 173, 0.14);
}

body.terminal-theme .site-main {
  gap: 0.85rem;
}

body.terminal-theme .terminal-console {
  border-color: var(--terminal-line-soft);
  background: rgba(4, 10, 7, 0.93);
  border-radius: 10px;
  padding: 0;
  box-shadow:
    0 0 0 1px rgba(117, 248, 173, 0.12) inset,
    0 10px 26px rgba(0, 0, 0, 0.42);
}

body.terminal-theme .terminal-console::before {
  display: none;
}

body.terminal-theme .terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 2.3rem;
  padding: 0.52rem 0.7rem;
  border-bottom: 1px solid rgba(117, 248, 173, 0.22);
  background: linear-gradient(180deg, rgba(12, 25, 18, 0.98), rgba(7, 14, 10, 0.96));
}

body.terminal-theme .terminal-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.42) inset;
}

body.terminal-theme .terminal-dot.red {
  background: #f56f6f;
}

body.terminal-theme .terminal-dot.amber {
  background: #f3c76f;
}

body.terminal-theme .terminal-dot.green {
  background: #70f39f;
}

body.terminal-theme .terminal-tab {
  margin-left: 0.42rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terminal-text-dim);
}

body.terminal-theme .terminal-path {
  margin-left: auto;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.7rem;
  color: rgba(137, 182, 157, 0.9);
}

body.terminal-theme .terminal-body {
  display: grid;
  gap: 0.52rem;
  padding: 0.85rem;
}

body.terminal-theme .terminal-line {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.48rem;
  font-size: 0.76rem;
  color: var(--terminal-text-dim);
}

body.terminal-theme .terminal-prompt {
  color: var(--terminal-accent);
  font-weight: 700;
}

body.terminal-theme .terminal-command {
  color: #cdfbe0;
}

body.terminal-theme .terminal-cursor {
  display: inline-block;
  width: 0.5rem;
  height: 1.05em;
  border-radius: 1px;
  background: var(--terminal-accent);
  animation: terminalCursorBlink 1.1s step-start infinite;
  vertical-align: middle;
}

@keyframes terminalCursorBlink {
  50% {
    opacity: 0;
  }
}

body.terminal-theme .home-intro-panel h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.terminal-theme .home-intro-panel .terminal-body {
  grid-template-columns: minmax(0, 1fr);
}

body.terminal-theme .home-video-embed {
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  justify-self: center;
  margin-inline: auto;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(118, 247, 176, 0.34);
  background: rgba(6, 14, 11, 0.9);
}

body.terminal-theme .home-video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

body.terminal-theme .home-intro-panel .small {
  color: var(--terminal-text-dim);
}

body.terminal-theme .terminal-meta-line {
  margin: 0.18rem 0 0;
}

body.terminal-theme .terminal-updated {
  margin: 0;
  color: var(--terminal-text-dim);
}

body.terminal-theme .terminal-focus {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

body.terminal-theme .home-live-panel .terminal-toolbar {
  gap: 0.36rem;
}

body.terminal-theme .terminal-toggle {
  margin-left: auto;
  color: var(--terminal-text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

body.terminal-theme .terminal-toggle input {
  accent-color: var(--terminal-accent);
}

body.terminal-theme .home-match-pills {
  margin-top: 0.7rem;
}

body.terminal-theme .home-focus-priority {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
}

body.terminal-theme .home-focus-priority-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
}

body.terminal-theme .home-priority-status {
  font-size: 0.75rem;
  letter-spacing: 0.07em;
}

body.terminal-theme .home-focus-time {
  color: #d9ffe8;
  font-size: clamp(1.5rem, 5.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  text-shadow: 0 0 14px rgba(117, 248, 173, 0.22);
}

body.terminal-theme .home-focus-priority-meta {
  margin: 0;
  color: var(--terminal-text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

body.terminal-theme .terminal-focus .vs {
  border-radius: 8px;
  border-color: rgba(117, 248, 173, 0.3);
  background: rgba(6, 13, 10, 0.95);
}

body.terminal-theme .terminal-focus .vs-side {
  min-height: 88px;
  padding: 0.8rem;
}

body.terminal-theme .vs-side.blue {
  background: linear-gradient(120deg, var(--terminal-side-blue-start), var(--terminal-side-blue-end));
}

body.terminal-theme .vs-side.red {
  background: linear-gradient(240deg, var(--terminal-side-red-start), var(--terminal-side-red-end));
}

body.terminal-theme .terminal-focus .vs-center {
  color: #c4ffe0;
  text-shadow: 0 0 10px rgba(117, 248, 173, 0.28);
  animation: pulseVs 2.3s ease-in-out infinite;
}

body.terminal-theme .badge,
body.terminal-theme .pill {
  border-radius: 4px;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}

body.terminal-theme .pill {
  color: #c9f8dd;
  border-color: rgba(117, 248, 173, 0.3);
  background: rgba(14, 28, 20, 0.84);
}

body.terminal-theme .badge.badge-scheduled {
  color: #d8e0e9;
  border-color: rgba(166, 180, 196, 0.35);
  background: rgba(45, 55, 67, 0.5);
}

body.terminal-theme .badge-live {
  color: #ffd6d6;
  border-color: rgba(255, 126, 126, 0.62);
  background: rgba(102, 26, 33, 0.48);
}

body.terminal-theme .badge-completed {
  color: #d9ffe8;
  border-color: rgba(117, 248, 173, 0.48);
  background: rgba(15, 60, 37, 0.5);
}

body.terminal-theme .alert {
  border-color: rgba(255, 125, 125, 0.55);
  background: rgba(75, 22, 30, 0.55);
}

@media (max-width: 1050px) {
  .matrix-wrap {
    grid-template-columns: 1fr;
  }

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

  .playoff-tree {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    min-height: 0;
  }

  .tree-lower-semi,
  .tree-upper-final,
  .tree-lower-final,
  .tree-grand-final {
    grid-column: auto;
    grid-row: auto;
  }

  .tree-link {
    display: none;
  }

  .tree-stage-title {
    width: 100%;
  }

  .tree-match {
    width: 100%;
  }
}

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

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-shell {
    width: min(1200px, 100% - 1rem);
    margin-top: 0.65rem;
  }

  .header-character-link,
  .site-header > .header-character-link,
  body.terminal-theme .header-character-link {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    background: none !important;
    pointer-events: none !important;
  }

  .site-header {
    grid-template-columns: 1fr;
    margin-top: 0.75rem;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .site-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    padding: 0.44rem 0.78rem;
  }

  .button {
    min-height: 2.35rem;
  }

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

  .vs-center {
    padding: 0.4rem 0;
  }

  .cards.cols-2,
  .cards.cols-3 {
    grid-template-columns: 1fr;
  }

  .matrix-grid {
    grid-template-columns: 56px repeat(4, minmax(44px, 1fr));
    gap: 0.3rem;
  }

  .matrix-head,
  .matrix-player {
    min-height: 44px;
    padding: 0.26rem 0.34rem;
  }

  .matrix-head {
    justify-content: center;
  }

  .matrix-head .matrix-name {
    display: none;
  }

  .matrix-head img,
  .matrix-player img {
    width: 22px;
    height: 22px;
  }

  .matrix-player {
    gap: 0.28rem;
  }

  .matrix-player .matrix-name {
    min-width: 0;
    font-size: 0.66rem;
    letter-spacing: 0.02em;
  }

  .matrix-player .matrix-name .player-outcome {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .matrix-cell {
    min-height: 44px;
    font-size: 0.74rem;
    letter-spacing: 0.05em;
  }

  .table-wrap.is-mobile-cards {
    overflow: visible;
  }

  table.schedule-table.is-mobile-cards {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 0.48rem;
  }

  table.schedule-table.is-mobile-cards thead {
    display: none;
  }

  table.schedule-table.is-mobile-cards tbody,
  table.schedule-table.is-mobile-cards tr,
  table.schedule-table.is-mobile-cards td {
    display: block;
    width: 100%;
  }

  table.schedule-table.is-mobile-cards tr {
    border: 1px solid rgba(95, 136, 161, 0.34);
    border-radius: 10px;
    background: rgba(8, 18, 26, 0.78);
    overflow: hidden;
  }

  table.schedule-table.is-mobile-cards tr.schedule-day-separator-row {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    margin-top: 0.15rem;
  }

  table.schedule-table.is-mobile-cards td {
    border-bottom: 1px solid rgba(72, 108, 128, 0.26);
    padding: 0.44rem 0.56rem;
    display: grid;
    grid-template-columns: minmax(88px, 42%) 1fr;
    gap: 0.42rem;
    align-items: start;
    font-size: 0.81rem;
  }

  table.schedule-table.is-mobile-cards td:last-child {
    border-bottom: 0;
  }

  table.schedule-table.is-mobile-cards tr.schedule-day-separator-row td {
    border-bottom: 0;
    padding: 0.28rem 0.32rem 0.06rem;
    display: block;
  }

  table.schedule-table.is-mobile-cards td::before {
    content: attr(data-label);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.64rem;
    line-height: 1.3;
    padding-top: 0.08rem;
  }

  table.schedule-table.is-mobile-cards td[colspan],
  table.schedule-table.is-mobile-cards td:not([data-label]) {
    grid-template-columns: 1fr;
  }

  table.schedule-table.is-mobile-cards td[colspan]::before,
  table.schedule-table.is-mobile-cards td:not([data-label])::before {
    display: none;
  }

  table.schedule-table.is-mobile-cards td.schedule-time-cell {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  table.schedule-table.is-mobile-cards td.schedule-time-cell::before {
    padding-top: 0;
  }

  table.schedule-table.is-mobile-cards .schedule-time-main {
    font-size: 1.2rem;
  }

  .table-wrap.is-mobile-cards .matchup-inline {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  body.terminal-theme .home-hologram-layer {
    display: none;
  }

  .playoff-tree {
    grid-template-columns: 1fr;
  }

  body.terminal-theme .site-shell {
    width: min(1280px, 100% - 0.8rem);
  }

  body.terminal-theme .site-header.panel {
    margin-top: 0.75rem;
    padding: 0.5rem 0.62rem 0.75rem;
  }

  body.terminal-theme .site-header.panel::after {
    left: 3.1rem;
    font-size: 0.6rem;
  }

  body.terminal-theme .brand-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding-top: 0.5rem;
  }

  body.terminal-theme .site-nav a {
    border-radius: 4px;
    border-bottom-color: rgba(117, 248, 173, 0.3);
  }

  body.terminal-theme .terminal-toolbar {
    flex-wrap: wrap;
    row-gap: 0.3rem;
  }

  body.terminal-theme .terminal-path {
    margin-left: 0;
    max-width: 100%;
    width: 100%;
  }

  body.terminal-theme .terminal-toggle {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .matrix-grid {
    grid-template-columns: 44px repeat(4, minmax(38px, 1fr));
  }

  .matrix-player {
    justify-content: center;
  }

  .matrix-player .matrix-name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .scanlines {
    animation: none;
  }

  .panel::before {
    display: none;
  }

  body.terminal-theme .home-hologram-sprite {
    animation:
      homeHologramDrift var(--holo-drift-duration, 28s) linear forwards,
      homeHologramFlicker var(--holo-flicker-duration, 0.64s) steps(2, end) infinite,
      homeHologramPulse var(--holo-pulse-duration, 2.5s) ease-in-out infinite alternate !important;
  }

  .matcherino-activity-track.is-animated {
    animation: matcherinoTickerScroll var(--ticker-duration, 38s) linear infinite !important;
  }
}
