/* 分档约打 */
:root {
  --m-bg: #0a1628;
  --m-surface: rgba(20, 45, 36, 0.85);
  --m-border: rgba(255, 255, 255, 0.1);
  --m-text: #f0fdf4;
  --m-muted: #92c9a8;
  --m-gold: #d4a853;
}

body.match-body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", system-ui, sans-serif;
  color: var(--m-text);
  background: var(--m-bg);
  background-image: linear-gradient(180deg, #0a1628 0%, #064e3b 50%, #0a1628 100%);
}

.match-shell {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem 1rem 3.5rem;
}

.match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.match-top a {
  color: var(--m-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.match-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.match-filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.match-filters label {
  font-size: 0.72rem;
  color: var(--m-muted);
  display: block;
  margin-bottom: 0.2rem;
}

.match-filters select,
.match-filters input {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--m-border);
  background: var(--m-surface);
  color: inherit;
  font-size: 0.85rem;
  -webkit-appearance: menulist;
  appearance: menulist;
}

.match-filters select option,
.match-form select option {
  background: #0f1f18;
  color: var(--m-text);
}

.match-kind-tabs,
.match-scope-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.match-kind-tabs button,
.match-scope-tabs button {
  flex: 1;
  min-width: 4.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--m-border);
  background: transparent;
  color: var(--m-muted);
  font-size: 0.82rem;
  cursor: pointer;
}

.match-kind-tabs button.active,
.match-scope-tabs button.active {
  border-color: var(--m-gold);
  color: var(--m-gold);
  background: rgba(212, 168, 83, 0.12);
}

.match-scope-tabs button.scope-locked,
.match-scope-tabs button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.match-tag--scope {
  border-color: rgba(212, 168, 83, 0.45);
  color: var(--m-gold);
}

.pub-eligibility {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(12, 61, 46, 0.45);
  border: 1px solid var(--m-border);
}

.pub-eligibility--warn {
  color: #fcd34d;
}

.match-card {
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.match-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.match-card--link:hover,
.match-card--link:focus {
  border-color: rgba(212, 168, 83, 0.45);
  background: rgba(20, 55, 44, 0.95);
}

.match-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.match-card__main {
  flex: 1;
  min-width: 0;
}

.match-card__hall {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--m-text);
  line-height: 1.35;
}

.match-card__hours {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--m-gold);
}

.match-card__sub {
  margin-top: 0.35rem !important;
}

.match-card__dist {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #86efac;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.match-avatar--lg {
  width: 56px;
  height: 56px;
}

.match-host-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.match-host-link:hover strong {
  color: var(--m-gold);
}

.match-detail-host {
  margin-bottom: 0.75rem;
}

.match-card__head {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.match-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a2e24;
  border: 2px solid var(--m-border);
}

.match-tier {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  color: #042f2a;
}

.match-meta {
  font-size: 0.82rem;
  color: var(--m-muted);
  margin: 0.35rem 0 0;
  line-height: 1.45;
}

.match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.match-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--m-border);
}

.match-tag--fee {
  color: var(--m-gold);
  border-color: rgba(212, 168, 83, 0.35);
}

.match-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.btn-match {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-match-primary {
  background: var(--m-gold);
  color: #1a1208;
}

.btn-match-ghost {
  background: transparent;
  color: var(--m-muted);
  border: 1px solid var(--m-border);
}

.match-form .field {
  margin-bottom: 0.75rem;
}

.match-form label {
  display: block;
  font-size: 0.8rem;
  color: var(--m-muted);
  margin-bottom: 0.25rem;
}

.match-form input,
.match-form select,
.match-form textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--m-border);
  background: var(--m-surface);
  color: inherit;
  box-sizing: border-box;
}

.level-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.level-pick {
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--m-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
}

.level-pick.active {
  border-color: var(--m-gold);
  background: rgba(212, 168, 83, 0.15);
}

.fee-radio {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.match-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.match-tabs--scope {
  margin-top: -0.35rem;
  margin-bottom: 0.65rem;
}

.match-tabs--scope .match-tab {
  font-size: 0.78rem;
  padding: 0.28rem 0.6rem;
  opacity: 0.92;
}

.match-tab {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--m-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.82rem;
}

.match-tab.active {
  background: var(--m-gold);
  color: #1a1208;
  border-color: transparent;
}

.match-pay-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.match-pay-modal.hidden {
  display: none;
}

.match-pay-sheet {
  width: 100%;
  max-width: 42rem;
  background: #0f1f18;
  border-radius: 16px 16px 0 0;
  padding: 1.25rem;
  border: 1px solid var(--m-border);
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--m-muted);
}

.error-banner {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fecaca;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
}
