.tourhub-page {
  padding-bottom: 2rem;
}

.tourhub-topbar {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr;
  gap: 1rem;
  padding: 0 3rem 1.5rem;
}

.tourhub-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tourhub-filter-group label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--muted);
}

.tourhub-sim-btn {
  padding: 0.8rem 1.1rem;
  font-size: var(--fs-xl);
  width: auto;
  min-width: 240px;
}

.tourhub-hero {
  display: grid;
  grid-template-columns: 1.8fr 0.9fr;
  gap: 1.5rem;
  padding: 0 3rem 2rem;
}

.tourhub-hero-copy,
.tourhub-hero-photo {
  background: var(--surface);
  border: 1px solid var(--border);
}

.tourhub-hero-copy {
  padding: 1.4rem 1.5rem;
}

.tourhub-kicker {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.tourhub-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}

.tourhub-meta-card {
  background: var(--surface2);
  border: 1px solid #16161e;
  padding: 0.85rem;
}

.tourhub-meta-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.tourhub-meta-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-lg);
  color: var(--text);
  text-transform: uppercase;
  line-height: 1.1;
}

.tourhub-description {
  margin-top: 1rem;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.55;
  max-width: 72ch;
}

.tourhub-hero-photo {
  min-height: 250px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.tourhub-photo-placeholder {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: pre-line;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-lg);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(200,240,0,0.08), rgba(0,229,255,0.05)),
    linear-gradient(135deg, rgba(10,10,15,0.28), rgba(10,10,15,0.82));
  background-size: cover;
  background-position: center bottom;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.tourhub-photo-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
      -45deg,
      transparent 0,
      transparent 18px,
      rgba(255,255,255,0.03) 18px,
      rgba(255,255,255,0.03) 20px
    );
  opacity: 0.9;
}

.tourhub-photo-placeholder > * {
  position: relative;
  z-index: 2;
}

.tourhub-photo-placeholder:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 45px rgba(0,0,0,0.28);
}

.tourhub-photo-placeholder.is-expanded {
  position: fixed;
  top: 5vh;
  left: 50%;
  width: min(90vw, 1400px);
  height: 82vh;
  min-height: 0;
  transform: translateX(-50%);
  z-index: 1400;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 40px 100px rgba(0,0,0,0.62);
  background-position: center center;
}

.tourhub-photo-placeholder.is-expanded::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(6,6,10,0.72);
  backdrop-filter: blur(8px);
}


.tourhub-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0 3rem 2rem;
}

.tourhub-sidebar,
.tourhub-main {
  min-width: 0;
}

.tourhub-sidebar-note {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
  margin-bottom: 0.8rem;
}

.tourhub-sidebar-filter {
  margin-bottom: 0.9rem;
}

.tourhub-player-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 1180px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.tourhub-player-list::-webkit-scrollbar {
  width: 4px;
}

.tourhub-player-list::-webkit-scrollbar-thumb {
  background: var(--border);
}

.tourhub-player-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.tourhub-player-item:hover {
  border-color: var(--muted);
  background: var(--surface2);
}

.tourhub-player-item.assigned {
  border-color: rgba(200,240,0,0.35);
}

.tourhub-player-item.selected {
  border-color: var(--accent2);
  background: rgba(0,229,255,0.07);
}

.tourhub-player-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-md);
  font-weight: 700;
  text-transform: uppercase;
}

.tourhub-player-meta,
.tourhub-player-gs,
.tourhub-slot-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
}

.tourhub-player-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.tourhub-slot-tag {
  color: var(--accent);
}

.tourhub-stagebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tourhub-stage-note {
  color: var(--muted);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-md);
  letter-spacing: var(--ls-wide);
}

.tourhub-stage-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tourhub-view-switch {
  display: none;
  gap: 0.4rem;
}

.tourhub-bracket-wrap {
  position: relative;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-behavior: smooth;
  isolation: isolate;
}

.tourhub-bracket-art {
  position: absolute;
  top: 6.5rem;
  left: 50%;
  width: clamp(624px, 67.2%, 1032px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background-image: none;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  filter: brightness(1.18) saturate(1.05);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.tourhub-bracket {
  min-width: 1560px;
  display: grid;
  grid-template-columns: repeat(9, minmax(156px, 1fr));
  gap: 0.75rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.tourhub-round {
  min-width: 0;
}

.tourhub-round-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tourhub-round-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tourhub-depth-0 .tourhub-round-list { padding-top: 0; }
.tourhub-depth-1 .tourhub-round-list { padding-top: 1.45rem; }
.tourhub-depth-2 .tourhub-round-list { padding-top: 4.05rem; }
.tourhub-depth-3 .tourhub-round-list { padding-top: 9.15rem; }
.tourhub-round-final .tourhub-round-list { padding-top: 18.55rem; }

.tourhub-match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.45rem;
  min-height: 128px;
}

.tourhub-side-right .tourhub-round-title,
.tourhub-side-right .tourhub-match-footer,
.tourhub-side-right .tourhub-slot-seed,
.tourhub-side-right .tourhub-slot-meta {
  text-align: right;
}

.tourhub-side-right .tourhub-slot {
  text-align: right;
}

.tourhub-side-right .tourhub-slot::before {
  background-position: right top;
}

.tourhub-round-final .tourhub-round-title,
.tourhub-round-final .tourhub-match-footer {
  text-align: center;
}

.tourhub-sim-btn-mobile {
  display: none;
}

.tourhub-match-card.done {
  border-color: rgba(200,240,0,0.35);
}

.tourhub-slot {
  position: relative;
  overflow: hidden;
  width: 100%;
  text-align: left;
  background: var(--surface2);
  border: 1px solid #16161e;
  color: var(--text);
  padding: 0.55rem 0.6rem;
  min-height: 56px;
  margin-bottom: 0.3rem;
  cursor: pointer;
  transition: all 0.15s;
}

.tourhub-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--winner-bg, none);
  background-size: cover;
  background-position: center top;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

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

.tourhub-slot:last-child {
  margin-bottom: 0;
}

.tourhub-slot:hover:not(:disabled) {
  border-color: var(--muted);
}

.tourhub-slot:disabled {
  cursor: default;
}

.tourhub-slot.empty {
  color: var(--muted);
}

.tourhub-slot.active {
  border-color: var(--accent2);
  box-shadow: inset 0 0 0 1px rgba(0,229,255,0.35);
}

.tourhub-slot.winner {
  border-color: rgba(200,240,0,0.6);
  background: rgba(200,240,0,0.08);
}

.tourhub-slot.winner::before {
  opacity: 1;
}

.tourhub-slot-seed {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.tourhub-slot-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
}

.tourhub-slot-meta,
.tourhub-match-footer {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
}

.tourhub-match-footer {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid #16161e;
}

.tourhub-match-card.champion {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.7rem;
  border-color: rgba(200,240,0,0.45);
  background: linear-gradient(180deg, rgba(200,240,0,0.08), rgba(10,10,15,0.96));
}

.tourhub-match-card.champion::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--champion-bg, none);
  background-size: cover;
  background-position: center top;
  opacity: 0.42;
  filter: saturate(0.9);
  pointer-events: none;
}

.tourhub-champion-inside {
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0.4rem;
}

.tourhub-champion-kicker,
.tourhub-champion-score {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
}

.tourhub-champion-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0.2rem 0;
}

.tourhub-champion {
  margin-top: 1.5rem;
}

@media (max-width: 1180px) {
  .tourhub-topbar,
  .tourhub-hero,
  .tourhub-layout {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .tourhub-topbar {
    grid-template-columns: 1fr;
  }

  .tourhub-hero {
    grid-template-columns: 1fr;
  }

  .tourhub-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tourhub-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

}

@media (max-width: 820px) {
  .tourhub-topbar,
  .tourhub-hero,
  .tourhub-layout {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tourhub-layout {
    grid-template-columns: 1fr;
  }

  .tourhub-filter-group .rankhub-btn-row {
    width: 100%;
  }

  .tourhub-filter-group .rankhub-btn {
    flex: 1 1 120px;
  }

  .tourhub-player-list {
    max-height: 360px;
  }

  .tourhub-stagebar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tourhub-sim-btn {
    width: 100%;
    min-width: 0;
  }

  .tourhub-stage-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tourhub-round-final .tourhub-round-list {
    position: relative;
  }

  .tourhub-bracket {
    min-width: 1020px;
    grid-template-columns: repeat(9, minmax(120px, 1fr));
    gap: 0.6rem;
  }

  .tourhub-bracket-art {
    width: clamp(504px, 72%, 744px);
    top: 6rem;
  }

  .tourhub-match-card {
    min-height: 116px;
  }

  .tourhub-slot {
    min-height: 52px;
  }

  .tourhub-depth-1 .tourhub-round-list { padding-top: 1.3rem; }
  .tourhub-depth-2 .tourhub-round-list { padding-top: 3.55rem; }
  .tourhub-depth-3 .tourhub-round-list { padding-top: 8rem; }
  .tourhub-round-final .tourhub-round-list { padding-top: 16.25rem; }
}

@media (max-width: 600px) {
  .tourhub-view-switch {
    display: inline-flex;
  }

  .tourhub-topbar .tourhub-filter-group:last-child {
    display: none;
  }

  .tourhub-stage-actions {
    align-items: center;
  }

  .tourhub-bracket-wrap {
    position: relative;
    overflow: auto;
    border: 1px solid rgba(255,255,255,0.06);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
      var(--bg);
    max-height: 70vh;
    padding: 0.65rem 0.65rem 1rem;
    touch-action: pan-x pan-y pinch-zoom;
  }

  .tourhub-bracket-art {
    width: 504px;
    top: 5.25rem;
    opacity: 1;
  }

  .tourhub-meta-grid {
    grid-template-columns: 1fr;
  }

  .tourhub-bracket {
    min-width: 980px;
    transform-origin: top left;
    transition: transform 0.2s ease;
    grid-template-columns: repeat(9, minmax(102px, 1fr));
    gap: 0.45rem;
  }

  .tourhub-bracket-wrap[data-view="overview"] .tourhub-bracket {
    transform: scale(0.62);
  }

  .tourhub-bracket-wrap[data-view="overview"] {
    min-height: 690px;
  }

  .tourhub-bracket-wrap[data-view="focus"] .tourhub-bracket {
    transform: scale(1);
  }

  .tourhub-player-item {
    padding: 0.7rem 0.8rem;
  }

  .tourhub-hero-copy {
    padding: 1rem;
  }

  .tourhub-hero-photo,
  .tourhub-photo-placeholder {
    min-height: 180px;
  }

  .tourhub-match-card {
    padding: 0.28rem;
    min-height: 84px;
  }

  .tourhub-slot {
    padding: 0.34rem 0.38rem;
    min-height: 38px;
    margin-bottom: 0.18rem;
  }

  .tourhub-slot-name {
    font-size: 0.72rem;
    line-height: 1;
  }

  .tourhub-slot-seed,
  .tourhub-slot-meta,
  .tourhub-match-footer,
  .tourhub-round-title,
  .tourhub-champion-kicker,
  .tourhub-champion-score {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
  }

  .tourhub-match-footer {
    margin-top: 0.28rem;
    padding-top: 0.28rem;
  }

  .tourhub-match-card.champion {
    min-height: 84px;
    margin-top: 0.45rem;
  }

  .tourhub-champion-name {
    font-size: 0.86rem;
    margin: 0.12rem 0;
  }

  .tourhub-depth-1 .tourhub-round-list { padding-top: 1rem; }
  .tourhub-depth-2 .tourhub-round-list { padding-top: 2.7rem; }
  .tourhub-depth-3 .tourhub-round-list { padding-top: 6rem; }
  .tourhub-round-final .tourhub-round-list { padding-top: 12.15rem; }

  .tourhub-sim-btn-mobile {
    display: block;
    width: 100%;
    min-width: 0;
    margin-bottom: 0.45rem;
    padding: 0.5rem 0.55rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
  }

  .tourhub-photo-placeholder.is-expanded {
    top: 8vh;
    width: 90vw;
    height: auto;
    aspect-ratio: 1 / 1.12;
  }

  .tourhub-photo-placeholder.is-expanded:hover {
    transform: translateX(-50%);
  }
}
