@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Chakra+Petch:wght@400;500;600;700&display=swap');

:root {
  --bg: #09080f;
  --bg-soft: #151222;
  --panel: rgba(16, 15, 28, 0.9);
  --panel-strong: rgba(10, 9, 19, 0.96);
  --panel-light: rgba(27, 24, 41, 0.94);
  --text: #f7f6ff;
  --muted: #b8b0d4;
  --cyan: #1ce5ff;
  --pink: #ff4db8;
  --orange: #ff9b42;
  --lime: #c9ff57;
  --danger: #ff5f5f;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: rgba(0, 0, 0, 0.34);
  --shell-width: min(1180px, calc(100vw - 24px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Chakra Petch', sans-serif;
  background:
    linear-gradient(180deg, rgba(9, 8, 15, 0.94), rgba(9, 8, 15, 0.98)),
    radial-gradient(circle at top left, rgba(28, 229, 255, 0.2), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 77, 184, 0.18), transparent 28%),
    radial-gradient(circle at bottom center, rgba(255, 155, 66, 0.18), transparent 24%),
    url('/assets/8bitbar-hero.png') center top / cover no-repeat fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.14;
}

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  font-family: 'Bungee', cursive;
  line-height: 1.1;
}

p,
li {
  line-height: 1.6;
}

p {
  margin: 0 0 1rem;
}

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

small {
  display: block;
}

.shell {
  position: relative;
  width: var(--shell-width);
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(9, 8, 15, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(28, 229, 255, 0.18);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.nav-inner {
  width: var(--shell-width);
  margin: 0 auto;
  padding: 0.8rem 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}

.nav-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255, 77, 184, 0.35));
}

.logo-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-copy strong {
  font-family: 'Bungee', cursive;
  font-size: 1rem;
  color: #ffffff;
}

.logo-copy span {
  color: var(--cyan);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: thin;
}

.nav-links .is-active {
  box-shadow: 0 0 0 1px rgba(28, 229, 255, 0.18), 0 12px 24px rgba(0, 0, 0, 0.18);
}

.subnav-links {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0 0 0.15rem;
  scrollbar-width: thin;
}

.subnav-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.subnav-chip.is-active {
  background: rgba(28, 229, 255, 0.14);
  border-color: rgba(28, 229, 255, 0.32);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.28rem;
  padding: 0.72rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(28, 229, 255, 0.22);
  background: rgba(28, 229, 255, 0.08);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-toggle .nav-toggle-label {
  width: auto;
  height: auto;
  margin-left: 0.45rem;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
}

.btn,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.btn {
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: #160c16;
  box-shadow: 0 12px 28px rgba(255, 77, 184, 0.28);
}

.btn-secondary {
  background: rgba(28, 229, 255, 0.08);
  border-color: rgba(28, 229, 255, 0.24);
  color: var(--text);
  box-shadow: 0 10px 22px rgba(28, 229, 255, 0.1);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24, 21, 38, 0.94), rgba(12, 11, 20, 0.96));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.15rem;
  box-shadow: 0 20px 40px var(--shadow);
}

.card::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(28, 229, 255, 0.7), rgba(255, 77, 184, 0.8), transparent);
  opacity: 0.5;
}

.hero {
  display: grid;
  gap: 1rem;
}

.hero-home {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
}

.card-hero {
  padding: 1.35rem;
  background:
    linear-gradient(140deg, rgba(16, 15, 28, 0.9), rgba(16, 12, 26, 0.92)),
    radial-gradient(circle at top right, rgba(255, 77, 184, 0.22), transparent 34%),
    radial-gradient(circle at 18% 18%, rgba(28, 229, 255, 0.18), transparent 28%);
}

.hero-logo {
  width: min(240px, 56vw);
  display: block;
  margin: 0 0 1rem;
  filter: drop-shadow(0 0 22px rgba(28, 229, 255, 0.18));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(201, 255, 87, 0.55);
}

.title {
  font-size: clamp(2rem, 10vw, 4.15rem);
}

.accent {
  color: var(--orange);
}

.lead {
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.cta-stack {
  margin-top: 1.2rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.spotlight-card {
  min-height: 100%;
}

.comp-spotlight {
  display: grid;
  gap: 0.4rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

.home-sections {
  margin-top: 1rem;
}

.competition-list {
  display: grid;
  gap: 0.9rem;
}

.bracket-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.bracket-master-toggle {
  flex: 0 0 auto;
}

.round-jump-chips {
  display: flex;
  align-items: center;
  flex: 1 1 100%;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.9rem;
  scrollbar-width: thin;
}

.current-round-badge {
  flex: 0 0 auto;
}

.round-column-shell {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-self: flex-start;
}

.round-column-shell.is-collapsed {
  min-width: 88px;
}

.round-column-shell.is-collapsed .round-column {
  display: none;
}

.round-summary-card {
  display: none;
  width: 132px;
  min-height: 154px;
  padding: 0.7rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.round-column-shell.is-collapsed .round-summary-card {
  display: grid;
  gap: 0.5rem;
}

.round-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.round-summary-winners {
  display: grid;
  gap: 0.22rem;
  font-size: 0.7rem;
  color: rgba(247, 246, 255, 0.9);
}

.round-summary-winners span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-toggle-btn {
  min-height: 40px;
  padding: 0.55rem 0.7rem;
  border-radius: 16px;
  border: 1px solid rgba(28, 229, 255, 0.2);
  background: rgba(28, 229, 255, 0.07);
  color: var(--text);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compact-schedule-bar {
  margin-bottom: 0.85rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.schedule-strip {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-top: 0.25rem;
  scrollbar-width: thin;
}

.schedule-pill {
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.schedule-pill strong {
  font-size: 0.83rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.schedule-pill span {
  color: var(--muted);
  font-size: 0.88rem;
}

.round-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 229, 255, 0.24);
  background: rgba(28, 229, 255, 0.08);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.round-chip.is-current {
  background: linear-gradient(135deg, rgba(255, 77, 184, 0.26), rgba(28, 229, 255, 0.18));
  border-color: rgba(255, 155, 66, 0.5);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 155, 66, 0.2), 0 12px 24px rgba(0, 0, 0, 0.18);
}

.nested-card {
  background: linear-gradient(180deg, rgba(20, 18, 31, 0.96), rgba(12, 11, 20, 0.98));
  box-shadow: none;
}

.info-panel p {
  margin-bottom: 0;
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.flash.success {
  background: rgba(201, 255, 87, 0.1);
  border-color: rgba(201, 255, 87, 0.25);
}

.flash.error {
  background: rgba(255, 95, 95, 0.12);
  border-color: rgba(255, 95, 95, 0.24);
}

.flash.info {
  background: rgba(28, 229, 255, 0.09);
  border-color: rgba(28, 229, 255, 0.2);
}

.inline-flash {
  margin-top: 1rem;
  margin-bottom: 0;
}

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

.compact-form {
  margin-top: 1rem;
}

.field-span {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

select {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.05);
}

select option,
select optgroup {
  color: #111111;
  background: #f4f2ff;
}

input::placeholder,
textarea::placeholder {
  color: rgba(247, 246, 255, 0.45);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(28, 229, 255, 0.45);
  outline-offset: 0;
  border-color: rgba(28, 229, 255, 0.5);
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

label input[type='checkbox'] {
  width: auto;
  min-height: 0;
  margin-right: 0.5rem;
}

.field-help {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.minor-notice {
  animation: fadeSlide 0.2s ease;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

.competition-header-card p:last-of-type {
  margin-bottom: 0.55rem;
}

.competition-bracket-section {
  margin-top: 1rem;
}

.competition-bracket-title {
  margin-bottom: 0.55rem;
}

.table th,
.table td {
  padding: 0.75rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.toolbar:last-child {
  margin-bottom: 0;
}

.bracket {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.2rem 0 1rem;
  scroll-snap-type: x proximity;
}

.round-column {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-snap-align: start;
}

.match-card,
.calc-match {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 0.75rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.bracket-tree {
  --tree-round-gap: 42px;
  --tree-link-color: rgba(28, 229, 255, 0.3);
  gap: var(--tree-round-gap);
  align-items: flex-start;
  padding-right: 0.5rem;
}

.round-tree-column {
  min-width: 130px;
  gap: 0.6rem;
}

.round-stack {
  padding-top: var(--tree-top, 0px);
}

.tree-match {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--tree-card, 110px);
  height: var(--tree-card, 110px);
  margin-bottom: var(--tree-gap, 24px);
  overflow: visible;
}

.tree-match:last-child {
  margin-bottom: 0;
}

.bracket-tree .round-tree-column:not(:first-child) .tree-match::before {
  content: '';
  position: absolute;
  left: calc(var(--tree-round-gap) / -2);
  top: 50%;
  width: calc(var(--tree-round-gap) / 2);
  border-top: 2px solid var(--tree-link-color);
}

.bracket-tree .round-tree-column:not(:last-child) .tree-match::after {
  content: '';
  position: absolute;
  right: calc(var(--tree-round-gap) / -2);
  top: 50%;
  width: calc(var(--tree-round-gap) / 2);
  border-top: 2px solid var(--tree-link-color);
}

.tree-link-vertical {
  position: absolute;
  right: calc(var(--tree-round-gap) / -2);
  top: 50%;
  height: calc(var(--tree-card, 110px) + var(--tree-gap, 24px));
  border-right: 2px solid var(--tree-link-color);
  pointer-events: none;
}

.gm-tree .round-tree-column {
  min-width: 180px;
}

.match-title,
.calc-round-title,
.calc-match-tag {
  color: var(--cyan);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.match-title {
  margin-bottom: 0.6rem;
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.gm-player-form {
  margin: 0 0 0.4rem;
}

.gm-player-form:last-of-type {
  margin-bottom: 0;
}

.gm-hidden-form {
  display: none;
}

.gm-player-button {
  width: 100%;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
  user-select: none;
  -webkit-touch-callout: none;
}

.gm-player-form .player-row {
  margin-bottom: 0;
}

.gm-player-button:hover {
  background: rgba(28, 229, 255, 0.12);
}

.gm-player-action {
  color: var(--cyan);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.player-row .toolbar {
  margin-left: auto;
}

.player-row .btn-ghost {
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
}

.player-row:last-child {
  margin-bottom: 0;
}

.player-row.winner {
  background: rgba(201, 255, 87, 0.14);
}

.player-row.loser {
  background: rgba(255, 95, 95, 0.15);
}

.player-row.no-show::after {
  content: 'X';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-weight: 700;
  margin-left: 0.5rem;
}

.admin-layout .shell {
  width: min(1360px, calc(100vw - 20px));
}

.live-layout .shell {
  width: min(1600px, calc(100vw - 18px));
}

.live-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.gm-layout .shell {
  width: min(1600px, calc(100vw - 20px));
  padding-top: 1.2rem;
}

.gm-brandbar {
  margin-bottom: 1rem;
}

.gm-brandbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.gm-brandbar-actions {
  margin-bottom: 0;
  justify-content: flex-end;
}

.gm-login-wrap {
  min-height: calc(100vh - 3rem);
  display: grid;
  place-items: center;
}

.gm-login-card {
  width: min(520px, 100%);
}

.gm-zoom-stage {
  overflow: auto;
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
}

.gm-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.gm-modal[hidden] {
  display: none !important;
}

.gm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.72);
  backdrop-filter: blur(8px);
}

.gm-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 24px));
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(28, 229, 255, 0.24);
  background: linear-gradient(180deg, rgba(22, 19, 33, 0.98), rgba(11, 10, 18, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.gm-modal-dialog h2 {
  font-size: 1.35rem;
}

.gm-modal-dialog p {
  margin-bottom: 1rem;
}

.gm-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 75;
  min-width: min(320px, calc(100vw - 24px));
  max-width: min(420px, calc(100vw - 24px));
  padding: 0.8rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(201, 255, 87, 0.32);
  background: rgba(16, 22, 8, 0.96);
  color: #f7f6ff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  font-weight: 700;
}

.gm-toast.is-error {
  border-color: rgba(255, 95, 95, 0.34);
  background: rgba(34, 10, 10, 0.96);
}

body.gm-modal-open {
  overflow: hidden;
}

.gm-large-controls .gm-tree {
  --tree-round-gap: 52px;
}

.gm-large-controls .gm-tree .round-tree-column {
  min-width: 220px;
}

.gm-large-controls .tree-match {
  min-height: calc(var(--tree-card, 170px) + 44px);
  height: calc(var(--tree-card, 170px) + 44px);
}

.gm-large-controls .gm-player-button,
.gm-large-controls .player-row {
  padding: 0.9rem 0.95rem;
  font-size: 1rem;
}

.gm-large-controls .gm-player-action {
  font-size: 0.78rem;
}

.calc-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.calc-column {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-match {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.calc-match.play {
  border-color: rgba(201, 255, 87, 0.28);
  background: rgba(201, 255, 87, 0.1);
}

.calc-match.bye {
  border-color: rgba(255, 155, 66, 0.35);
  background: rgba(255, 155, 66, 0.12);
}

.build-version {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 30;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(6, 6, 12, 0.92);
  color: #ffffff;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border: 1px solid rgba(28, 229, 255, 0.22);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

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

@media (max-width: 960px) {
  .hero-home,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  :root {
    --shell-width: min(100vw - 16px, 1000px);
  }

  .shell {
    padding-top: 0.85rem;
  }

  .card {
    padding: 1rem;
    border-radius: 20px;
  }

  .title {
    font-size: clamp(1.8rem, 12vw, 3rem);
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  .nav-topbar {
    position: relative;
    display: block;
    padding-right: 62px;
    gap: 0.55rem;
  }

  .logo {
    gap: 0.55rem;
    width: 100%;
    max-width: 100%;
  }

  .logo-copy strong {
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo-copy span {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    padding: 0.68rem 0.78rem;
    flex: 0 0 auto;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }

  .nav-toggle .nav-toggle-label {
    display: none;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
    gap: 0.55rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links .btn,
  .nav-links .btn-secondary,
  .nav-links .btn-ghost,
  .nav-links form {
    width: 100%;
  }

  .nav-links form button {
    width: 100%;
  }

  .subnav-links {
    padding-top: 0.15rem;
    padding-bottom: 0.1rem;
  }

  .btn,
  .btn-secondary,
  .btn-ghost {
    min-height: 42px;
    padding: 0.68rem 0.92rem;
    font-size: 0.92rem;
  }

  .form-grid,
  .compact-form {
    grid-template-columns: 1fr;
  }

  .field-span,
  .form-grid > div[style*='grid-column'] {
    grid-column: auto !important;
  }

  .section-title {
    align-items: stretch;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar form,
  .toolbar a,
  .toolbar button {
    width: 100%;
  }

  .round-column {
    min-width: 170px;
  }

  .compact-schedule-bar {
    padding: 0.72rem;
    position: sticky;
    top: 76px;
    z-index: 12;
    backdrop-filter: blur(12px);
  }

  .competition-header-card {
    padding: 0.9rem;
  }

  .competition-header-card p {
    margin-bottom: 0.6rem;
  }

  .competition-bracket-section {
    margin-top: 0.75rem !important;
  }

  .competition-bracket-title {
    margin-bottom: 0.4rem;
    font-size: 1.15rem;
  }

  .schedule-pill {
    min-width: 132px;
    padding: 0.5rem 0.68rem;
  }

  .round-tree-column {
    min-width: 104px;
  }

  .round-summary-card {
    width: 112px;
    min-height: 142px;
    padding: 0.6rem;
  }

  .gm-tree .round-tree-column {
    min-width: 136px;
  }

  .gm-player-action {
    font-size: 0.58rem;
  }

  .gm-brandbar-inner {
    align-items: stretch;
  }

  .bracket-tree {
    --tree-round-gap: 22px;
    padding-right: 0.2rem;
  }

  .round-stack {
    padding-top: var(--tree-top-mobile, var(--tree-top, 0px));
  }

  .tree-match {
    min-height: var(--tree-card-mobile, var(--tree-card, 110px));
    height: var(--tree-card-mobile, var(--tree-card, 110px));
    margin-bottom: var(--tree-gap-mobile, var(--tree-gap, 24px));
  }

  .tree-link-vertical {
    height: calc(var(--tree-card-mobile, var(--tree-card, 110px)) + var(--tree-gap-mobile, var(--tree-gap, 24px)));
  }

  .match-card {
    padding: 0.48rem;
    border-radius: 14px;
  }

  .match-title,
  .calc-round-title,
  .calc-match-tag {
    font-size: 0.62rem;
  }

  .player-row {
    padding: 0.38rem 0.44rem;
    font-size: 0.72rem;
    border-radius: 10px;
    line-height: 1.25;
  }

  .player-row .btn-ghost {
    min-height: 28px;
    padding: 0.2rem 0.42rem;
    font-size: 0.62rem;
  }

  .admin-layout .table.responsive-cards thead {
    display: none;
  }

  .admin-layout .table.responsive-cards,
  .admin-layout .table.responsive-cards tbody,
  .admin-layout .table.responsive-cards tr,
  .admin-layout .table.responsive-cards td {
    display: block;
    width: 100%;
  }

  .admin-layout .table.responsive-cards tr {
    margin-bottom: 0.75rem;
    padding: 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
  }

  .admin-layout .table.responsive-cards tr:last-child {
    margin-bottom: 0;
  }

  .admin-layout .table.responsive-cards td,
  .admin-layout .table.responsive-cards th {
    border-bottom: 0;
    padding: 0.22rem 0;
    white-space: normal;
  }

  .admin-layout .table.responsive-cards td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    text-align: right;
  }

  .admin-layout .table.responsive-cards td::before {
    content: attr(data-label);
    color: var(--cyan);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    flex: 0 0 42%;
  }

  .admin-layout .table.responsive-cards td[data-label='Action'],
  .admin-layout .table.responsive-cards td[data-label='Select'] {
    justify-content: flex-start;
    text-align: left;
  }

  .admin-layout .table.responsive-cards td[data-label='Action']::before,
  .admin-layout .table.responsive-cards td[data-label='Select']::before {
    flex-basis: auto;
    margin-right: 0.55rem;
  }

  .admin-layout .table.responsive-cards td[data-label='Action'] a,
  .admin-layout .table.responsive-cards td[data-label='Action'] button {
    width: 100%;
  }
}
