/* =========================================================
   LUHVH — Bedwars / Skywars HvH Tournament Bracket
   Pure front-end visual system. No external assets.
   ========================================================= */

:root {
  --bg: #030711;
  --ink: #ecf8ff;
  --ink-soft: #b9cedd;
  --muted: #7f9bb0;
  --dim: #4d6679;
  --faint: #2c4152;
  --cyan: #3ddcff;
  --cyan-soft: #96efff;
  --blue: #3f8cff;
  --violet: #8e7bff;
  --magenta: #ff54b5;
  --magenta-soft: #ff9bd5;
  --gold: #ffd27a;
  --gold-deep: #f3a83e;
  --left: #3ddcff;
  --right: #ff54b5;
  --line: rgba(112, 190, 232, 0.16);
  --line-soft: rgba(112, 190, 232, 0.08);
  --panel: rgba(4, 13, 28, 0.7);
  --panel-deep: rgba(3, 9, 21, 0.9);
  --display: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Courier New", monospace;
  --col-gap: clamp(22px, 2.8vw, 44px);
  --bracket-min: 1120px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(ellipse 70% 60% at 10% 45%, rgba(0, 118, 190, 0.16), transparent 62%),
    radial-gradient(ellipse 62% 58% at 90% 44%, rgba(194, 0, 108, 0.13), transparent 62%),
    linear-gradient(180deg, #02050d 0%, #040a17 42%, #030711 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(61, 220, 255, 0.24);
  color: #ffffff;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

svg {
  display: block;
}

/* =========================================================
   Ambient background
   ========================================================= */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora--left {
  left: -15%;
  top: 18%;
  width: 52vw;
  height: 62vh;
  background: radial-gradient(circle, rgba(0, 146, 255, 0.28), rgba(0, 64, 155, 0.09) 52%, transparent 72%);
  animation: auroraLeft 26s ease-in-out infinite alternate;
}

.aurora--right {
  right: -16%;
  top: 18%;
  width: 54vw;
  height: 64vh;
  background: radial-gradient(circle, rgba(255, 33, 146, 0.22), rgba(120, 0, 98, 0.08) 52%, transparent 72%);
  animation: auroraRight 31s ease-in-out infinite alternate;
}

.aurora--core {
  left: 50%;
  top: 42%;
  width: 40vw;
  height: 50vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(87, 99, 255, 0.16), rgba(29, 41, 100, 0.06) 55%, transparent 74%);
  animation: auroraCore 19s ease-in-out infinite alternate;
}

.energy-beam {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 3%, rgba(80, 220, 255, 0.32) 38%, rgba(80, 220, 255, 0.06) 72%, transparent 98%);
  box-shadow: 0 0 24px rgba(61, 220, 255, 0.2);
  opacity: 0.5;
}

.energy-beam--left {
  left: 27%;
}

.energy-beam--right {
  right: 27%;
  background: linear-gradient(180deg, transparent 3%, rgba(255, 84, 181, 0.28) 38%, rgba(255, 84, 181, 0.05) 72%, transparent 98%);
  box-shadow: 0 0 24px rgba(255, 84, 181, 0.16);
}

.grid-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -11vh;
  height: 46vh;
  background-image:
    linear-gradient(rgba(72, 166, 230, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 166, 230, 0.09) 1px, transparent 1px);
  background-size: 54px 38px;
  transform: perspective(420px) rotateX(64deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 82%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 82%);
  opacity: 0.65;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.7;
  mix-blend-mode: overlay;
  animation: scanDrift 14s linear infinite;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 88% 76% at 50% 47%, transparent 44%, rgba(0, 2, 8, 0.5) 100%),
    linear-gradient(180deg, rgba(0, 2, 8, 0.55), transparent 18%, transparent 82%, rgba(0, 2, 8, 0.55));
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

/* =========================================================
   HUD frame
   ========================================================= */

.frame {
  position: fixed;
  inset: 16px;
  z-index: 40;
  pointer-events: none;
  border: 1px solid rgba(111, 192, 233, 0.06);
}

.frame-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(110, 215, 255, 0.38);
  border-style: solid;
  border-width: 0;
}

.frame-corner--tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.frame-corner--tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.frame-corner--bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.frame-corner--br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.frame-code {
  position: absolute;
  top: 50%;
  color: rgba(129, 190, 219, 0.36);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.frame-code--left { left: 4px; }
.frame-code--right { right: 4px; transform: translateY(-50%) rotate(180deg); }

/* =========================================================
   Page rhythm
   ========================================================= */

.page {
  position: relative;
  z-index: 2;
  width: min(1540px, calc(100% - 64px));
  margin: 0 auto;
  padding: 14px 0 20px;
}

/* =========================================================
   Header
   ========================================================= */

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding-bottom: 10px;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74, 201, 255, 0.32) 12%, rgba(74, 201, 255, 0.09) 52%, rgba(255, 84, 181, 0.26) 88%, transparent);
}

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

.brand-glyph {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(74, 217, 255, 0.38);
  background: linear-gradient(135deg, rgba(61, 220, 255, 0.16), rgba(61, 220, 255, 0.015));
  color: var(--cyan);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  box-shadow: inset 0 0 16px rgba(61, 220, 255, 0.08), 0 0 16px rgba(61, 220, 255, 0.06);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy b {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1;
}

.brand-copy span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.24em;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #7894a8;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.topbar-divider {
  width: 1px;
  height: 11px;
  background: rgba(123, 181, 211, 0.2);
}

.topbar-id {
  color: #52768d;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a0c9dc;
}

.live-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(61, 220, 255, 0.9);
  animation: livePulse 2.1s ease-in-out infinite;
}

/* Hero */

.hero {
  padding-top: 16px;
}

.hero-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 11px;
  color: #73a3bc;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.26em;
  animation: riseIn 0.8s 0.03s both;
}

.eyebrow-index {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 16px;
  border: 1px solid rgba(61, 220, 255, 0.26);
  color: var(--cyan);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.eyebrow-line {
  width: clamp(24px, 4vw, 62px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61, 220, 255, 0.46), transparent);
}

.hero-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(5px, 0.7vw, 11px);
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 3.45vw, 55px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  white-space: nowrap;
  text-shadow: 0 0 34px rgba(86, 193, 255, 0.14);
  animation: riseIn 0.9s 0.09s both;
}

.t-pre {
  align-self: center;
  margin-right: 0.1em;
  color: #9bb1c0;
  font-size: 0.36em;
  font-weight: 600;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.t-cn {
  color: #f4fbff;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.t-cn--right {
  color: #f7f1ff;
}

.t-en {
  display: inline-block;
  transform: skewX(-9deg);
  color: var(--cyan);
  font-family: var(--display);
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 0 22px rgba(61, 220, 255, 0.4);
}

.t-en--right {
  color: var(--magenta);
  text-shadow: 0 0 22px rgba(255, 84, 181, 0.35);
}

.t-slash {
  color: #49677b;
  font-size: 0.72em;
  font-weight: 300;
}

.t-tail {
  align-self: center;
  margin-left: 0.2em;
  padding-left: 0.6em;
  border-left: 1px solid rgba(137, 189, 218, 0.36);
  color: #88a4b5;
  font-family: var(--body);
  font-size: 0.34em;
  font-weight: 500;
  letter-spacing: 0.26em;
  white-space: nowrap;
}

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 7px 14px;
  border: 1px solid rgba(103, 176, 214, 0.12);
  background: linear-gradient(90deg, rgba(5, 18, 36, 0.18), rgba(9, 22, 44, 0.52), rgba(5, 18, 36, 0.18));
  color: #8da8ba;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  animation: riseIn 0.85s 0.16s both;
}

.sub-label {
  padding: 1px 5px;
  border: 1px solid rgba(61, 220, 255, 0.22);
  color: #82cddd;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.sub-en {
  color: #a9c3d2;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.035em;
}

.sub-pipe {
  color: rgba(61, 220, 255, 0.5);
  font-family: var(--mono);
  font-size: 9px;
}

.sub-cn {
  color: #c0d3de;
}

.sub-aside {
  color: #678195;
  font-size: 10px;
}

.hero-ruler {
  display: flex;
  gap: 5px;
  justify-content: center;
  width: min(760px, 72%);
  margin: 12px auto 0;
  opacity: 0.55;
  animation: riseIn 0.8s 0.2s both;
}

.hero-ruler span {
  position: relative;
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 195, 240, 0.25), transparent);
}

.hero-ruler span::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 1px;
  height: 3px;
  background: rgba(126, 222, 255, 0.55);
}

.hero-ruler span:nth-child(3n)::after {
  background: rgba(255, 84, 181, 0.35);
}

/* =========================================================
   Section header / controls
   ========================================================= */

.bracket-section {
  margin-top: 10px;
  animation: riseIn 0.85s 0.24s both;
}

.section-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border: 1px solid rgba(61, 220, 255, 0.22);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 8px;
}

.section-index--gold {
  border-color: rgba(255, 210, 122, 0.28);
  color: var(--gold);
}

.section-heading h2,
.prize-heading h2 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: #e9f7ff;
  font-family: var(--body);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.06em;
}

.section-heading h2 em,
.prize-heading h2 em {
  color: #5b7d91;
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.19em;
}

.cn-sep {
  color: #3d5b6c;
  font-weight: 300;
}

.section-sub {
  margin: 5px 0 0;
  color: #5f7a8c;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.bracket-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-counter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 74px;
  margin-right: 5px;
  line-height: 1;
}

.match-counter span {
  color: #dbeeff;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.match-counter span small {
  margin-left: 1px;
  color: #54778d;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.match-counter em {
  margin-top: 3px;
  color: #4f6d80;
  font-family: var(--mono);
  font-size: 6.5px;
  font-style: normal;
  letter-spacing: 0.24em;
}

.ctrl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  padding: 0 11px;
  border: 1px solid rgba(103, 170, 204, 0.18);
  background: rgba(5, 16, 31, 0.44);
  color: #85a4b7;
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.ctrl-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ctrl-btn--play svg {
  fill: currentColor;
  stroke: none;
}

.ctrl-btn:hover {
  border-color: rgba(61, 220, 255, 0.42);
  background: rgba(9, 29, 50, 0.72);
  color: #d7f7ff;
}

.ctrl-btn--play {
  border-color: rgba(61, 220, 255, 0.28);
  color: #8fe6f8;
}

.ctrl-btn--play.is-running {
  border-color: rgba(255, 84, 181, 0.38);
  color: var(--magenta-soft);
}

.ctrl-btn:focus-visible,
.copy-btn:focus-visible,
.more-btn:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 2px;
}

.ctrl-btn--ini {
  border-color: rgba(142, 123, 255, 0.25);
  color: #b9abff;
}

.ctrl-btn--ini:hover {
  border-color: rgba(142, 123, 255, 0.5);
  background: rgba(29, 22, 62, 0.55);
  color: #e0d9ff;
}

.config-file {
  display: none;
}

.debug-only {
  display: none !important;
}

html.debug-ini .debug-only {
  display: inline-flex !important;
}

.ctrl-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.progress-rail {
  display: flex;
  gap: 4px;
  height: 3px;
  margin: 9px 0 10px;
}

.progress-rail span {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: rgba(75, 124, 154, 0.16);
  transform: skewX(-22deg);
}

.progress-rail span::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-102%);
  background: linear-gradient(90deg, rgba(61, 220, 255, 0.4), var(--cyan));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-rail span[data-side="right"]::after {
  background: linear-gradient(90deg, rgba(255, 84, 181, 0.35), var(--magenta));
}

.progress-rail span[data-side="final"]::after {
  background: linear-gradient(90deg, rgba(255, 210, 122, 0.35), var(--gold));
}

.progress-rail span.is-filled::after {
  transform: translateX(0);
}

/* =========================================================
   Bracket
   ========================================================= */

.bracket-shell {
  position: relative;
}

.bracket-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(76, 186, 224, 0.4) rgba(8, 21, 38, 0.6);
  overscroll-behavior-x: contain;
}

.bracket-scroll::-webkit-scrollbar {
  height: 6px;
}

.bracket-scroll::-webkit-scrollbar-track {
  background: rgba(8, 21, 38, 0.6);
}

.bracket-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(61, 220, 255, 0.45), rgba(255, 84, 181, 0.4));
}

.bracket {
  min-width: var(--bracket-min);
  padding: 1px 0 0;
}

.round-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.18fr 1fr 1fr 1fr;
  column-gap: var(--col-gap);
  align-items: end;
  margin-bottom: 5px;
}

.round-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 19px;
  padding-bottom: 5px;
  color: #6d8b9f;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-align: center;
  white-space: nowrap;
}

.round-label em {
  color: #405c6d;
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.round-label::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.32;
}

.round-label--final {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.round-label--final em {
  color: rgba(255, 210, 122, 0.5);
}

.bracket-canvas {
  position: relative;
  height: clamp(340px, 34vh, 440px);
  isolation: isolate;
}

.is-loading .bracket-canvas {
  opacity: 0;
}

.bracket-canvas {
  animation: bracketReveal 0.9s 0.32s both;
}

.bracket-watermark {
  position: absolute;
  top: 50%;
  z-index: 0;
  color: transparent;
  font-family: var(--body);
  font-size: clamp(82px, 7.4vw, 126px);
  font-weight: 900;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  -webkit-text-stroke: 1px rgba(111, 197, 235, 0.14);
  opacity: 0.5;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}

.bracket-watermark--left {
  left: 0.6%;
}

.bracket-watermark--right {
  right: 0.6%;
  -webkit-text-stroke-color: rgba(255, 84, 181, 0.12);
  transform: translateY(-50%) rotate(180deg);
}

.final-pressure {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 430px;
  height: 310px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(255, 188, 91, 0.12), rgba(255, 188, 91, 0.035) 36%, transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.final-pressure::before,
.final-pressure::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 210, 122, 0.09);
}

.final-pressure::before {
  inset: 32px 60px;
}

.final-pressure::after {
  inset: 58px 90px;
  border-color: rgba(255, 210, 122, 0.06);
}

.final-emblem {
  position: absolute;
  left: 50%;
  top: calc(50% - 66px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transform: translate(-50%, -100%);
  color: rgba(255, 210, 122, 0.48);
  pointer-events: none;
  animation: emblemGlow 5s ease-in-out infinite;
}

.final-emblem svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(255, 197, 92, 0.14));
}

.final-emblem span {
  font-family: var(--mono);
  font-size: 5.5px;
  letter-spacing: 0.28em;
  opacity: 0.6;
}

.columns {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.18fr 1fr 1fr 1fr;
  column-gap: var(--col-gap);
}

.round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 0;
  height: 100%;
}

/* Match cards */

.match {
  --accent: var(--left);
  position: relative;
  height: 78px;
  padding: 5px 6px 6px;
  overflow: hidden;
  border: 1px solid rgba(87, 166, 203, 0.19);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(10, 28, 49, 0.86), rgba(4, 13, 27, 0.9) 58%, rgba(4, 10, 22, 0.94)),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(179, 232, 255, 0.035),
    0 5px 16px rgba(0, 0, 0, 0.2);
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease, background 0.24s ease;
  animation: cardIn 0.55s calc(0.34s + var(--i, 0) * 0.026s) both;
}

.match[data-side="right"] {
  --accent: var(--right);
}

.match::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.match::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 14px;
  height: 14px;
  background: linear-gradient(225deg, var(--accent) 0 1px, transparent 1.4px);
  opacity: 0.45;
  pointer-events: none;
}

.match:hover,
.match:focus-within {
  border-color: rgba(118, 211, 242, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(179, 232, 255, 0.06),
    0 8px 26px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(61, 220, 255, 0.035);
}

.match.is-decided {
  border-color: color-mix(in srgb, var(--accent) 33%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(179, 232, 255, 0.05),
    0 0 18px color-mix(in srgb, var(--accent) 7%, transparent);
}

.match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 13px;
  margin-bottom: 2px;
  padding: 0 2px 3px;
  border-bottom: 1px solid rgba(116, 181, 211, 0.09);
  color: #587487;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.11em;
  line-height: 1;
}

.match-code {
  overflow: hidden;
  color: color-mix(in srgb, var(--accent) 60%, #8ca7b8);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-format {
  flex: none;
  margin-left: 5px;
  padding: 1px 3px;
  border: 1px solid rgba(123, 180, 208, 0.14);
  color: #587588;
  font-size: 6px;
  letter-spacing: 0.08em;
}

.slots {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.slot {
  position: relative;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) 9px;
  align-items: center;
  width: 100%;
  height: 25px;
  padding: 0 3px;
  border: 0;
  border-radius: 1px;
  background: transparent;
  color: #c3d7e3;
  text-align: left;
  cursor: default;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.slot .seed {
  color: #4b6b80;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.01em;
  transition: color 0.18s ease;
}

.slot .slot-name {
  overflow: hidden;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot .slot-mark {
  justify-self: end;
  width: 4px;
  height: 4px;
  border: 1px solid rgba(107, 160, 187, 0.25);
  transform: rotate(45deg);
  transition: all 0.2s ease;
}

.slot:hover:not(.is-empty) {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 84%);
  color: #ffffff;
}

.slot:hover:not(.is-empty) .seed {
  color: color-mix(in srgb, var(--accent) 70%, #6d8999);
}

.slot:hover:not(.is-empty) .slot-mark {
  border-color: var(--accent);
}

.slot:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 84%);
  color: #ffffff;
}

.slot:focus-visible .seed {
  color: color-mix(in srgb, var(--accent) 74%, #b7d9e8);
}

.slot:focus-visible .slot-mark {
  border-color: var(--accent);
}

.slot.is-winner {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 19%, transparent), color-mix(in srgb, var(--accent) 2%, transparent) 82%);
  color: #ffffff;
}

.slot.is-winner .slot-name {
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent);
}

.slot.is-winner .seed {
  color: color-mix(in srgb, var(--accent) 76%, #b7d9e8);
}

.slot.is-winner .slot-mark {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 7px var(--accent);
}

.slot.is-loser {
  opacity: 0.38;
}

.slot.is-empty {
  cursor: default;
}

.slot.is-empty .slot-name {
  color: #4e6b7e;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.2em;
}

.slot.is-empty .seed,
.slot.is-empty .slot-mark {
  opacity: 0.35;
}

.slot.just-picked {
  animation: slotPicked 0.48s ease;
}

.match--sf {
  height: 88px;
  background:
    linear-gradient(135deg, rgba(12, 32, 57, 0.9), rgba(5, 14, 29, 0.92) 58%, rgba(4, 10, 22, 0.96)),
    var(--panel);
}

.match--sf .slot {
  height: 29px;
}

.match--sf .slot .slot-name {
  font-size: 13px;
}

.match--final {
  --accent: var(--gold);
  height: 104px;
  padding: 7px 8px 8px;
  border-color: rgba(255, 199, 104, 0.34);
  background:
    linear-gradient(145deg, rgba(44, 31, 14, 0.84), rgba(10, 17, 29, 0.95) 55%, rgba(5, 11, 22, 0.98)),
    var(--panel-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 200, 0.08),
    0 0 32px rgba(255, 183, 78, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.38);
}

.match--final::before {
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 10px rgba(255, 210, 122, 0.35);
}

.match--final::after {
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, var(--gold) 0 1px, transparent 1.4px);
  opacity: 0.7;
}

.match--final .match-head {
  height: 16px;
  border-bottom-color: rgba(255, 210, 122, 0.13);
  color: rgba(255, 220, 156, 0.65);
}

.match--final .match-code {
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.match--final .match-format {
  border-color: rgba(255, 210, 122, 0.18);
  color: rgba(255, 210, 122, 0.58);
  font-size: 6.5px;
}

.match--final .slot {
  height: 33px;
  padding: 0 4px;
}

.match--final .slot .slot-name {
  font-size: 15px;
  letter-spacing: 0.09em;
}

.match--final .slot .seed {
  color: rgba(255, 210, 122, 0.42);
  font-size: 7px;
}

.match--final .slot.is-winner {
  background: linear-gradient(90deg, rgba(255, 210, 122, 0.18), rgba(255, 210, 122, 0.015) 84%);
}

.match--final .slot.is-winner .slot-name {
  color: #fff8e8;
  text-shadow: 0 0 18px rgba(255, 210, 122, 0.48);
}

.match--final .slot.is-winner .seed {
  color: var(--gold);
}

/* Connectors */

.links {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.link-base {
  fill: none;
  stroke: rgba(82, 164, 204, 0.28);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}

.link-glow {
  fill: none;
  stroke: var(--left);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 3 12;
  opacity: 0;
  filter: drop-shadow(0 0 3px currentColor);
  transition: opacity 0.35s ease;
}

.link--right .link-base {
  stroke: rgba(205, 80, 152, 0.19);
}

.link--right .link-glow {
  stroke: var(--right);
}

.link--final .link-base {
  stroke: rgba(236, 178, 90, 0.2);
}

.link--final .link-glow {
  stroke: var(--gold);
}

.link.is-active .link-base {
  stroke: color-mix(in srgb, var(--link-color, var(--left)) 55%, transparent);
}

.link.is-active .link-glow {
  opacity: 0.78;
  animation: dashFlow 1.15s linear infinite;
}

.link--left.is-active { --link-color: var(--left); }
.link--right.is-active { --link-color: var(--right); }
.link--final.is-active { --link-color: var(--gold); }

/* Champion reveal */

.champion {
  position: absolute;
  left: 50%;
  top: calc(50% + 68px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 260px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  animation: championIn 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.champion[hidden] {
  display: none;
}

.champion::before {
  content: "";
  width: 150px;
  height: 1px;
  margin-bottom: 7px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 122, 0.62), transparent);
  box-shadow: 0 0 10px rgba(255, 210, 122, 0.2);
}

.champion-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 210, 122, 0.72);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.34em;
}

.champion-kicker i {
  width: 8px;
  height: 1px;
  background: rgba(255, 210, 122, 0.45);
}

.champion strong {
  margin-top: 1px;
  background: linear-gradient(180deg, #fff6dd, #ffd27a 55%, #e8a23e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-shadow: 0 0 26px rgba(255, 195, 98, 0.2);
  filter: drop-shadow(0 0 14px rgba(255, 195, 98, 0.15));
}

.champion-sub {
  margin-top: 3px;
  color: #7d7768;
  font-size: 8px;
  letter-spacing: 0.08em;
}

/* Bracket footer meta */

.bracket-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(100, 164, 195, 0.09);
}

.format-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #728c9e;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.flow-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.flow-node b {
  color: #a8c2d1;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
}

.flow-node--gold b {
  color: var(--gold);
}

.flow-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.flow-dot--cyan { background: var(--cyan); box-shadow: 0 0 6px rgba(61, 220, 255, 0.7); }
.flow-dot--violet { background: var(--violet); box-shadow: 0 0 6px rgba(142, 123, 255, 0.7); }
.flow-dot--gold { background: var(--gold); box-shadow: 0 0 6px rgba(255, 210, 122, 0.7); }

.flow-arrow {
  position: relative;
  width: 22px;
  height: 1px;
  background: rgba(105, 162, 188, 0.22);
}

.flow-arrow::after {
  content: "";
  position: absolute;
  top: -2.5px;
  right: 0;
  width: 5px;
  height: 5px;
  border-top: 1px solid rgba(139, 196, 219, 0.4);
  border-right: 1px solid rgba(139, 196, 219, 0.4);
  transform: rotate(45deg);
}

.meta-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

html:not(.debug-ini) .meta-side {
  display: none;
}

.config-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #776b57;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.config-state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 7px rgba(255, 210, 122, 0.55);
}

.config-state.is-loaded {
  color: #72a8b9;
}

.config-state.is-loaded i {
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(61, 220, 255, 0.7);
}

.result-bar {
  display: grid;
  grid-template-columns: 0.72fr 1.08fr 1fr 0.92fr;
  margin-top: 7px;
  border: 1px solid rgba(100, 166, 197, 0.13);
  background:
    linear-gradient(90deg, rgba(6, 20, 38, 0.68), rgba(5, 15, 30, 0.5) 52%, rgba(4, 12, 25, 0.7)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(180, 230, 253, 0.025);
}

.result-cell {
  position: relative;
  min-width: 0;
  padding: 5px 11px 5px;
  border-left: 1px solid rgba(101, 164, 194, 0.09);
}

.result-cell:first-child {
  border-left: 0;
}

.result-en {
  display: block;
  overflow: hidden;
  color: #4b6c80;
  font-family: var(--mono);
  font-size: 5.5px;
  letter-spacing: 0.16em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-cell strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #cfe7f3;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-cell em {
  display: block;
  margin-top: 2px;
  color: #536f81;
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.result-cell--count strong {
  color: var(--cyan-soft);
  font-size: 17px;
  line-height: 1;
}

.result-cell--count strong small {
  margin-left: 2px;
  color: #58788b;
  font-family: var(--body);
  font-size: 7px;
  font-weight: 400;
}

.result-cell--final {
  background: linear-gradient(90deg, rgba(255, 196, 89, 0.035), transparent 78%);
}

.result-cell--final strong {
  color: var(--gold);
}

.result-cell--final em {
  color: rgba(255, 210, 122, 0.42);
}

.scroll-hint {
  display: none;
}

.mobile-bracket-nav {
  display: none;
  align-items: center;
  gap: 5px;
  margin: 2px 0 7px;
  padding: 3px;
  border: 1px solid rgba(94, 164, 198, 0.13);
  background: rgba(4, 13, 27, 0.48);
}

.bracket-shell.is-scrollable .mobile-bracket-nav {
  display: flex;
}

.bracket-shell.is-scrollable .bracket-scroll {
  mask-image: linear-gradient(90deg, transparent 0, #000 15px, #000 calc(100% - 15px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 15px, #000 calc(100% - 15px), transparent 100%);
}

.mobile-bracket-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  height: 27px;
  border: 1px solid transparent;
  background: transparent;
  color: #628196;
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.mobile-bracket-nav button span {
  color: #3f6175;
  font-family: var(--mono);
  font-size: 9px;
}

.mobile-bracket-nav button.is-active {
  border-color: rgba(255, 210, 122, 0.26);
  background: rgba(255, 190, 82, 0.075);
  color: var(--gold);
}

.mobile-bracket-nav button.is-active span {
  color: rgba(255, 210, 122, 0.62);
}

/* =========================================================
   Prizes
   ========================================================= */

.prize-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(100, 164, 195, 0.09);
  animation: riseIn 0.85s 0.34s both;
}

.prize-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}

.prize-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.prize-heading h2 {
  font-size: 17px;
}

.prize-heading h2 em {
  color: #75684f;
}

.title-colon {
  color: var(--gold);
  font-weight: 400;
}

.prize-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #6d6659;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.prize-note span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 210, 122, 0.65);
  box-shadow: 0 0 7px rgba(255, 210, 122, 0.4);
}

.prize-board {
  position: relative;
  border: 1px solid rgba(147, 177, 194, 0.12);
  background:
    linear-gradient(120deg, rgba(5, 17, 33, 0.78), rgba(8, 20, 38, 0.52) 45%, rgba(4, 12, 25, 0.82)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(182, 227, 247, 0.035), 0 10px 30px rgba(0, 0, 0, 0.16);
}

.prize-board::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 36%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 122, 0.6), transparent);
}

.prize-board::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 18px;
  height: 18px;
  border-right: 1px solid rgba(255, 210, 122, 0.32);
  border-bottom: 1px solid rgba(255, 210, 122, 0.32);
}

.prize-row {
  --row-accent: var(--silver, #a9c6d8);
  position: relative;
  display: grid;
  grid-template-columns: minmax(184px, 0.28fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 42px;
  padding: 6px 15px;
  border-top: 1px solid rgba(121, 169, 193, 0.08);
}

.prize-row:first-child {
  border-top: 0;
}

.prize-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--row-accent), transparent);
  opacity: 0.45;
}

.prize-row--champion {
  --row-accent: var(--gold);
  background: linear-gradient(90deg, rgba(255, 190, 84, 0.055), transparent 48%);
}

.prize-row--runner {
  --row-accent: #9fc8df;
  background: linear-gradient(90deg, rgba(116, 186, 222, 0.032), transparent 44%);
}

.prize-row--third {
  --row-accent: #d59362;
  background: linear-gradient(90deg, rgba(213, 147, 98, 0.025), transparent 40%);
}

.prize-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rank-no {
  flex: none;
  width: 33px;
  background: linear-gradient(180deg, #f6f4ec, #95aaba);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
}

.prize-row--champion .rank-no {
  background: linear-gradient(180deg, #fff1c9, #f1ad47 72%, #bb7424);
  -webkit-background-clip: text;
  background-clip: text;
}

.prize-row--third .rank-no {
  background: linear-gradient(180deg, #f3c19b, #bb7442);
  -webkit-background-clip: text;
  background-clip: text;
}

.rank-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rank-copy b {
  color: #dcecf5;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.prize-row--champion .rank-copy b {
  color: #ffe2a5;
}

.rank-colon {
  color: rgba(255, 210, 122, 0.6);
  font-weight: 400;
}

.rank-copy em {
  color: #557183;
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.2em;
}

.rank-icon {
  flex: none;
  width: 19px;
  height: 19px;
  margin-left: auto;
  fill: none;
  stroke: var(--row-accent);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

.prize-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #b9cedb;
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

.prize-item {
  white-space: nowrap;
}

.prize-item--hero {
  color: #ffe1a4;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(255, 210, 122, 0.18);
}

.prize-sep {
  color: #405d70;
  font-family: var(--mono);
  font-size: 9px;
}

.prize-pick {
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 210, 122, 0.25);
  color: rgba(255, 210, 122, 0.72);
  font-size: 7px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  white-space: nowrap;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(100, 164, 195, 0.1);
  animation: riseIn 0.85s 0.42s both;
}

.footer-left {
  min-width: 0;
}

.qq-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.qq-label {
  color: #7d96a7;
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.qq-colon {
  color: #4e6c7f;
}

.qq-number {
  color: #dff7ff;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 16px rgba(61, 220, 255, 0.2);
  user-select: all;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 1px 6px 0;
  border: 1px solid rgba(99, 166, 198, 0.16);
  background: transparent;
  color: #5f8195;
  font-size: 8px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.copy-btn svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.copy-btn:hover {
  border-color: rgba(61, 220, 255, 0.38);
  color: var(--cyan-soft);
}

.footer-sign {
  margin: 5px 0 0;
  color: #3d596b;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.19em;
}

.more-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: none;
  height: 40px;
  padding: 0 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 210, 122, 0.4);
  background: linear-gradient(100deg, rgba(255, 194, 88, 0.11), rgba(255, 150, 48, 0.035));
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  transition: color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.more-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.28s ease;
}

.more-btn:hover {
  background: linear-gradient(100deg, #ffd27a, #f5a848);
  color: #171007;
  box-shadow: 0 0 28px rgba(255, 190, 80, 0.22);
}

.more-btn:hover svg {
  transform: translateX(3px);
}

.more-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.22) 48%, transparent 64%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.more-btn:hover .more-glow {
  transform: translateX(120%);
}

/* =========================================================
   Toast / confetti / noscript
   ========================================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 80;
  padding: 8px 14px;
  border: 1px solid rgba(61, 220, 255, 0.3);
  background: rgba(4, 17, 32, 0.94);
  color: #d9f8ff;
  font-size: 10px;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(61, 220, 255, 0.08);
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: 44%;
  left: 50%;
  width: 5px;
  height: 9px;
  background: var(--gold);
  opacity: 0;
  animation: confettiBurst 1.8s cubic-bezier(0.15, 0.6, 0.35, 1) forwards;
  animation-delay: var(--delay, 0s);
}

.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 90;
  padding: 12px 16px;
  border: 1px solid rgba(255, 84, 181, 0.4);
  background: #0a0610;
  color: #ffd6ee;
  text-align: center;
  font-size: 13px;
}

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

/* =========================================================
   Motion
   ========================================================= */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bracketReveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(7px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drawLink {
  to { stroke-dashoffset: 0; }
}

@keyframes dashFlow {
  to { stroke-dashoffset: -30; }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.38; transform: scale(0.72); }
}

@keyframes auroraLeft {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(5%, -3%, 0) scale(1.09); }
}

@keyframes auroraRight {
  from { transform: translate3d(0, 0, 0) scale(1.03); }
  to { transform: translate3d(-5%, 4%, 0) scale(1); }
}

@keyframes auroraCore {
  from { transform: translate(-50%, -50%) scale(0.95); opacity: 0.7; }
  to { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

@keyframes scanDrift {
  from { background-position-y: 0; }
  to { background-position-y: 4px; }
}

@keyframes slotPicked {
  0% { background: color-mix(in srgb, var(--accent) 34%, transparent); }
  100% { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 19%, transparent), transparent 82%); }
}

@keyframes championIn {
  from { opacity: 0; transform: translate(-50%, 12px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes emblemGlow {
  0%, 100% { color: rgba(255, 210, 122, 0.42); }
  50% { color: rgba(255, 220, 152, 0.64); }
}

@keyframes confettiBurst {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1280px) {
  .page { width: calc(100% - 42px); }
  .hero-title { font-size: clamp(31px, 3.35vw, 46px); }
  .bracket-watermark { opacity: 0.34; }
}

@media (max-width: 1180px) and (min-width: 761px) {
  .bracket {
    min-width: 0;
  }

  .round-label {
    gap: 3px;
    font-size: 7.5px;
    letter-spacing: 0.08em;
  }

  .round-label em {
    display: none;
  }

  .match .slot .slot-name {
    font-size: 11.5px;
  }

  .match--final .slot .slot-name {
    font-size: 14px;
  }
}

@media (max-width: 980px) {
  .page { width: calc(100% - 34px); padding-top: 14px; }
  .topbar-meta { gap: 9px; font-size: 7px; }
  .topbar-id { display: none; }
  .hero { padding-top: 20px; }
  .hero-title { white-space: normal; flex-wrap: wrap; row-gap: 2px; font-size: clamp(29px, 4.5vw, 41px); }
  .hero-sub { max-width: 760px; }
  .section-bar { align-items: flex-start; }
  .match-counter { min-width: 60px; }
  .match-counter span { font-size: 21px; }
  .prize-row { grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 760px) {
  .frame { display: none; }
  .page { width: calc(100% - 26px); padding: 12px 0 18px; }
  .brand-copy span { display: none; }
  .topbar { min-height: 41px; padding-bottom: 8px; }
  .topbar-meta .topbar-divider,
  .topbar-meta > span:nth-last-child(1) { display: none; }
  .live-chip { font-size: 7px; }
  .hero { padding-top: 18px; }
  .eyebrow { gap: 7px; font-size: 7px; letter-spacing: 0.17em; margin-bottom: 9px; }
  .eyebrow-line { width: 20px; }
  .hero-title {
    font-size: clamp(22px, 6.2vw, 34px);
    gap: 4px;
    line-height: 1.15;
    justify-content: center;
    max-width: 100%;
  }
  .t-pre { font-size: 0.4em; letter-spacing: 0.1em; }
  .t-tail {
    display: block;
    flex-basis: 100%;
    margin: 3px 0 0;
    padding: 0;
    border: 0;
    font-size: 0.4em;
    letter-spacing: 0.32em;
    text-align: center;
  }
  .t-slash { font-size: 0.62em; }
  .hero-sub {
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 11px;
    padding: 7px 9px;
    font-size: 9.5px;
    line-height: 1.65;
  }
  .sub-en { font-size: 9.5px; }
  .sub-cn { font-size: 9.5px; }
  .sub-aside { flex-basis: 100%; font-size: 8.5px; }
  .hero-ruler { width: 90%; margin-top: 13px; }
  .bracket-section { margin-top: 12px; }
  .section-bar { flex-direction: column; gap: 9px; }
  .section-heading { width: 100%; }
  .bracket-actions { width: 100%; justify-content: flex-end; }
  .match-counter { margin-right: auto; align-items: flex-start; }
  .section-sub { font-size: 8px; }
  .progress-rail { margin: 8px 0 8px; gap: 3px; }
  .bracket { min-width: 1020px; }
  .bracket-canvas { height: 300px; }
  .round-labels { grid-template-columns: 1fr 1fr 1fr 1.18fr 1fr 1fr 1fr; }
  .bracket-watermark { display: none; }
  .final-pressure { width: 300px; height: 240px; }
  .match {
    height: 66px;
    padding: 4px 5px 5px;
  }
  .match-head {
    height: 12px;
    margin-bottom: 1px;
    font-size: 6.5px;
  }
  .match-format { font-size: 5.5px; }
  .match .slot { height: 21px; }
  .match .slot .slot-name { font-size: 11px; }
  .match .slot .seed { font-size: 6px; }
  .match--sf { height: 72px; }
  .match--sf .slot { height: 23px; }
  .match--sf .slot .slot-name { font-size: 12px; }
  .match--final { height: 90px; padding: 6px 6px 7px; }
  .match--final .match-head { height: 15px; }
  .match--final .slot { height: 27px; }
  .match--final .slot .slot-name { font-size: 14px; }
  .champion { top: calc(50% + 58px); width: 220px; }
  .champion strong { font-size: 24px; }
  .champion-sub { font-size: 7px; }
  .bracket-meta { flex-wrap: wrap; gap: 7px; }
  .meta-side {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 7px;
    width: 100%;
  }
  .config-state { font-size: 7px; }
  .result-bar { grid-template-columns: 1fr 1fr; }
  .result-cell {
    padding: 7px 9px;
    border-top: 1px solid rgba(101, 164, 194, 0.09);
  }
  .result-cell:nth-child(1),
  .result-cell:nth-child(2) {
    border-top: 0;
  }
  .result-cell:nth-child(2n) {
    border-left: 1px solid rgba(101, 164, 194, 0.09);
  }
  .result-cell:nth-child(2n + 1) {
    border-left: 0;
  }
  .result-cell strong { font-size: 10.5px; }
  .result-cell--count strong { font-size: 16px; }
  .format-flow { gap: 7px; font-size: 8px; }
  .flow-arrow { width: 14px; }
  .scroll-hint {
    display: block;
    margin: 5px 0 -2px;
    color: #4d6a7c;
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.14em;
    text-align: center;
  }
  .prize-section { margin-top: 12px; padding-top: 10px; }
  .prize-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .prize-note { font-size: 7.5px; letter-spacing: 0.04em; }
  .prize-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 9px 11px;
  }
  .prize-rank { gap: 8px; }
  .rank-no { font-size: 24px; width: 30px; }
  .rank-icon { margin-left: 0; }
  .prize-items { font-size: 10.5px; gap: 4px 5px; }
  .prize-item { white-space: normal; }
  .prize-pick { margin-left: 1px; }
  .footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: 11px;
  }
  .more-btn { width: 100%; height: 38px; }
  .qq-number { font-size: 19px; }
  .copy-btn { margin-left: 2px; }
  .footer-sign { font-size: 5.5px; letter-spacing: 0.13em; }
}

@media (max-width: 420px) {
  .page { width: calc(100% - 22px); }
  .hero-title { font-size: clamp(21px, 6.15vw, 26px); }
  .t-cn { letter-spacing: -0.075em; }
  .match-counter span { font-size: 19px; }
  .ctrl-btn { padding: 0 8px; height: 29px; font-size: 9px; }
  .ctrl-btn svg { width: 10px; height: 10px; }
  .section-heading h2 { font-size: 16px; }
  .section-heading h2 em { font-size: 7px; }
  .prize-items { font-size: 10px; }
  .qq-block { flex-wrap: wrap; }
}

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

  .aurora,
  .scanlines {
    animation: none !important;
  }
}
