/* CPS tournament cards and details modal */
.cps-program-card {
  position: relative;
  cursor: pointer;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.cps-program-card:hover {
  transform: translateY(-3px);
  border-color: rgba(226, 201, 133, .3);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

.cps-program-card:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 4px;
}

.cps-program-card .program-poster {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 5;
  align-self: start;
  background: #070706;
}

.cps-program-card .program-poster img {
  object-fit: contain;
  transition: filter .42s ease;
}

.cps-program-card:hover .program-poster img {
  filter: brightness(.96);
}

.cps-card-action {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--gold-soft);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cps-card-action::after {
  content: '→';
  font-size: 1rem;
  line-height: 1;
  transition: transform .2s ease;
}

.cps-program-card:hover .cps-card-action::after { transform: translateX(3px); }

.cps-tournament-dialog {
  width: min(calc(100% - 36px), 780px);
  max-height: min(88svh, 820px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(226, 201, 133, .22);
  border-radius: 28px;
  overflow: hidden;
  color: var(--ink);
  background: #0c0b09;
  box-shadow: 0 38px 120px rgba(0, 0, 0, .68);
}

.cps-tournament-dialog::backdrop {
  background: rgba(2, 2, 2, .78);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.cps-dialog-shell {
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 201, 133, .34) transparent;
}

.cps-dialog-head {
  padding: 30px 72px 26px 30px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
  background:
    radial-gradient(circle at 88% 0%, rgba(199, 162, 88, .18), transparent 22rem),
    linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01));
}

.cps-dialog-kicker {
  margin: 0 0 8px;
  color: var(--gold-soft);
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.cps-dialog-title {
  margin: 0;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: .98;
}

.cps-dialog-summary {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cps-dialog-pill {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(226, 201, 133, .16);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(199, 162, 88, .055);
  color: #d8d0c4;
  font-size: .72rem;
  font-weight: 700;
}

.cps-dialog-pill strong {
  margin-left: 5px;
  color: var(--gold-soft);
}

.cps-dialog-close {
  width: 42px;
  height: 42px;
  padding: 0;
  position: absolute;
  top: 20px;
  right: 20px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .24);
  color: #f3eee5;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.cps-dialog-close:hover {
  transform: rotate(4deg);
  border-color: rgba(226, 201, 133, .45);
  background: rgba(226, 201, 133, .08);
}

.cps-dialog-content { padding: 26px 30px 30px; }

.cps-detail-section + .cps-detail-section {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .075);
}

.cps-detail-title {
  margin: 0 0 14px;
  color: #8f887f;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.cps-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cps-detail-item {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
}

.cps-detail-item.wide { grid-column: 1 / -1; }

.cps-detail-item span {
  display: block;
  margin-bottom: 4px;
  color: #857f76;
  font-size: .59rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cps-detail-item strong {
  display: block;
  color: #f5f0e7;
  font-size: .9rem;
  line-height: 1.42;
}

.cps-detail-item strong em {
  color: var(--gold-soft);
  font-style: normal;
  font-weight: 700;
}

.cps-detail-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.6;
}

.cps-dialog-footer {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .075);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cps-dialog-footer p {
  margin: 0;
  max-width: 430px;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.55;
}

body.cps-dialog-open { overflow: hidden; }

@media (max-width: 699px) {
  .cps-program-card:hover { transform: none; }

  .cps-card-action {
    margin-top: 15px;
    padding-top: 13px;
    font-size: .61rem;
  }

  .cps-tournament-dialog {
    width: calc(100% - 16px);
    max-height: calc(100svh - 18px);
    border-radius: 22px;
  }

  .cps-tournament-dialog::backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .cps-dialog-head { padding: 25px 62px 22px 20px; }
  .cps-dialog-close { width: 40px; height: 40px; top: 14px; right: 14px; }
  .cps-dialog-title { font-size: clamp(1.75rem, 9vw, 2.35rem); }
  .cps-dialog-summary { margin-top: 15px; gap: 7px; }
  .cps-dialog-pill { min-height: 31px; padding-inline: 10px; font-size: .65rem; }
  .cps-dialog-content { padding: 20px; }
  .cps-detail-section + .cps-detail-section { margin-top: 20px; padding-top: 20px; }
  .cps-detail-grid { grid-template-columns: 1fr; gap: 8px; }
  .cps-detail-item.wide { grid-column: auto; }
  .cps-detail-item { padding: 13px 14px; border-radius: 14px; }
  .cps-detail-item strong { font-size: .84rem; }
  .cps-dialog-footer { margin-top: 21px; padding-top: 18px; align-items: stretch; flex-direction: column; }
  .cps-dialog-footer .btn { width: 100%; }
}
