:root {
  color-scheme: dark;
  --bg: #09090b;
  --fg: #f6f3ec;
  --muted: #a39e94;
  --line: rgba(255, 255, 255, .14);
  --font: Outfit, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}
a { color: inherit; }
::selection { background: #f4f1ea; color: #111; }

.pyth-ribbon {
  display: flex;
  align-items: stretch;
  min-height: 46px;
  background: #07060e;
  border-bottom: 1px solid rgba(109, 94, 252, .5);
  color: #c9b8ff;
  text-decoration: none;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
}
.pyth-ribbon:hover { border-bottom-color: #6d5efc; }
.pyth-ribbon:focus-visible { outline: 2px solid #6d5efc; outline-offset: -2px; }
.pyth-mark,
.pyth-go {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  background: #6d5efc;
  color: #fff;
}
.pyth-mark { gap: 8px; padding: 0 14px 0 16px; }
.pyth-mark b {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.pyth-mark i {
  font-style: normal;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .8;
}
.pyth-marquee {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}
.pyth-track {
  display: flex;
  flex: 0 0 auto;
  animation: pyth-scroll 32s linear infinite;
}
.pyth-ribbon:hover .pyth-track { animation-play-state: paused; }
.pyth-track span {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-right: 22px;
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pyth-track span::after {
  content: "";
  width: 5px;
  height: 5px;
  background: #6d5efc;
  box-shadow: 0 0 8px #6d5efc;
}
.pyth-line {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pyth-go {
  padding: 0 16px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.pyth-ribbon:hover .pyth-go { background: #7c6cff; }
@keyframes pyth-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  background: rgba(9, 9, 11, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.bar-nav {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.bar-nav a {
  color: inherit;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bar-nav a:hover { color: #fff; }
.bar-discord,
.join-discord {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  background: #f4f1ea;
  color: #111 !important;
  text-decoration: none;
}
.join-discord { margin-right: 14px; }
.host-ask { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 18px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.brand picture { display: block; line-height: 0; }
.brand img { height: 96px; width: auto; display: block; }

.intro {
  max-width: 38rem;
  margin: 0 auto;
  padding: 36px 20px 28px;
  text-align: center;
}
.kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .92;
}
.lead {
  margin: 14px auto 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.host-ask { margin: 22px 0 0; }
.host-ask a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .22em;
}
.host-ask .join-discord {
  color: #111 !important;
  font-weight: 700;
  text-decoration: none;
}
.bar-discord.is-user,
.host-ask .join-discord.is-user {
  gap: 8px;
  padding-left: 4px;
  padding-right: 10px;
  background: transparent;
  color: var(--fg) !important;
  letter-spacing: 0;
  text-transform: none;
  font-size: 15px;
  font-weight: 650;
}
.bar-discord.is-user img,
.join-discord.is-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #16161a;
}
.host-ask a:hover { color: #fff; }

.board-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 28px;
}
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}
.tile::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent, #fff);
}
.tile:hover,
.tile:focus-visible {
  border-color: var(--accent, #fff);
  transform: translateY(-2px);
}
.tile:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 3px; }
.tile.is-open { border-color: rgba(255, 255, 255, .34); }

.stage {
  display: grid;
  place-items: center;
  min-height: 168px;
  padding: 18px 16px 8px;
}
.stage img {
  width: 100%;
  height: 128px;
  object-fit: contain;
}
.word {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.word b {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 800;
  letter-spacing: .03em;
  line-height: .95;
  text-transform: uppercase;
  color: var(--accent);
}
.word i {
  font-style: normal;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .68);
}
.name {
  display: block;
  padding: 4px 14px 0;
  text-align: center;
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.tile[href="/games/magic/"] .stage,
.tile[href="/tourney/?game=magic"] .stage {
  background: radial-gradient(ellipse at center, #323232 0%, #000 72%);
}
.tile[href="/games/yugioh/"] .stage img,
.tile[href="/tourney/?game=yugioh"] .stage img {
  width: 76%;
  height: 96px;
}
.logo-stroke { filter: url("#logo-stroke"); }
.meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 16px;
  color: rgba(255, 255, 255, .62);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.meta b { color: #c6f59a; }

.pulse { animation: pulse 3.6s ease-in-out infinite; transform-origin: center; }
.board li:nth-child(3n+2) .pulse { animation-delay: .45s; }
.board li:nth-child(3n) .pulse { animation-delay: .9s; }

@keyframes pulse {
  0%, 100% { opacity: .82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.035); }
}

.foot {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 18px 20px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted);
  font-size: .85rem;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.foot nav { display: flex; gap: 14px; flex-wrap: wrap; }
.legal {
  max-width: 42rem;
  margin: 0 auto;
  padding: 28px 20px 12px;
}
.legal h1 { margin: 0 0 10px; }
.legal h2 { margin: 28px 0 8px; font-size: 1.2rem; }
.legal p, .legal li { color: var(--muted); }
.legal a { color: var(--fg); }
.legal .updated { font-size: .85rem; }
@media (prefers-reduced-motion: reduce) {
  .legal, .legal a, .foot a { transition: none; }
}
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--fg); }
.foot p { margin: 10px 0 0; }

.board-heading {
  max-width: 38rem;
  margin: 0 auto 18px;
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.home-more {
  max-width: 38rem;
  margin: 0 auto;
  padding: 8px 20px 36px;
}
.home-more h2 {
  margin: 28px 0 12px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.home-more p,
.home-more li {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}
.home-more ol {
  margin: 0;
  padding-left: 1.25rem;
}
.home-more li + li { margin-top: 10px; }
.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
}
.home-links a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .22em;
}
.home-links a:hover { color: #fff; }

@media (max-width: 900px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .brand img { height: 72px; }
  .board { grid-template-columns: 1fr; }
  .stage { min-height: 150px; }
  .kicker,
  .meta,
  .word i,
  .bar-nav a {
    font-size: 12px;
  }
  .pyth-marquee { display: none; }
  .pyth-line { display: flex; }
  .pyth-mark { gap: 0; padding: 0 12px; }
  .pyth-mark i { display: none; }
  .pyth-mark b,
  .pyth-go {
    font-size: 12px;
    letter-spacing: .06em;
  }
  .pyth-go { padding: 0 12px; }
}
@media (max-width: 420px) {
  .bar { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; opacity: 1; }
  .tile { transition: none; }
  .tile:hover, .tile:focus-visible { transform: none; }
  .pyth-track { animation: none; }
  .pyth-track[aria-hidden="true"] { display: none; }
  .intro, .board, .tile, .bar { opacity: 1; }
}
