.team-search-field {
  position: relative;
  min-width: 0;
}

.team-search-field > span:first-child {
  display: block;
}

.team-search-results {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 30;
  width: 100%;
  max-height: min(420px, 62vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(24, 37, 70, .18);
}

.team-search-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.team-search-option:hover,
.team-search-option.active {
  background: var(--primary-soft);
  filter: none;
}

.team-search-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--muted);
}

.team-search-logo img {
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
}

.team-search-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-search-identity strong,
.team-search-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-search-identity small,
.team-search-empty {
  color: var(--muted);
  font-size: 12px;
}

.team-search-more {
  margin-top: 4px;
  background: var(--primary-soft);
  color: var(--primary);
}

.team-search-empty {
  margin: 0;
  padding: 14px 10px;
  line-height: 1.45;
}

.team-search-input {
  width: 100%;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.team-search-input::placeholder {
  color: #9aa5b5;
}

.team-search-input:hover {
  border-color: #b8c4d5;
}

.team-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 73, 216, .12);
}

.team-search-input:invalid:not(:placeholder-shown) {
  border-color: #b42318;
}

.team-form button:disabled {
  cursor: not-allowed;
  opacity: .48;
  filter: none;
}

.selector-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-error {
  margin-top: 14px;
}

.empty-prediction {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 38px 24px;
  text-align: center;
}

.empty-prediction h2,
.empty-prediction p {
  margin: 0;
}

.empty-prediction p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.65;
}

.empty-prediction-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 26px;
  font-weight: 800;
}

.global-team-form {
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) minmax(150px, .55fr) auto;
}

.venue-select select {
  width: 100%;
  min-height: 47px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
}

.candidate-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.candidate-card img,
.global-match-title img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.candidate-card span {
  display: grid;
  gap: 4px;
}

.candidate-card small {
  color: var(--muted);
}

.comparison-progress,
.result-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.comparison-progress span {
  color: var(--muted);
  font-size: 13px;
}

.result-tabs {
  position: sticky;
  top: 8px;
  z-index: 3;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.result-tabs a {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.big-stat {
  font-size: 32px;
  font-weight: 800;
}

.data-json {
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
}

@media (max-width: 900px) {
  .global-team-form {
    grid-template-columns: 1fr;
  }

  .global-team-form .versus {
    display: none;
  }
}
