/* predictor.css — page shell, opponent header/strip, situation + result cards. */

.main { position: relative; }
.page { max-width: 1120px; margin: 0 auto; padding: 40px 24px 72px; }
.view-in { animation: fadeUp .5s var(--ease-out) both; }

.tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--label-2); font-size: 11px; font-weight: 600;
  letter-spacing: 0; text-transform: none; vertical-align: 1px;
}

/* ── Team logo (ESPN), with an initials fallback ─────────────────────── */
.team-logo {
  width: var(--sz); height: var(--sz); flex-shrink: 0; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.team-logo img { width: 100%; height: 100%; object-fit: contain; }
.team-logo-fallback { display: none; }
.team-logo.is-fallback { border-radius: 28%; background: var(--surface-3); color: var(--label-2); }
.team-logo.is-fallback .team-logo-fallback { display: block; font-size: calc(var(--sz) * 0.32); font-weight: 700; }

/* ── Opponent hero + strip ──────────────────────────────────────────── */
.opp-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.opp-hero-title { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin-top: 4px; }
.opp-hero-title .muted { font-weight: 600; }

.opp-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; margin: 0 -2px 22px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.opp-strip::-webkit-scrollbar { display: none; }
.opp-chip {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0; scroll-snap-align: start;
  padding: 7px 14px 7px 9px; border-radius: var(--r-full); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-2); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.opp-chip:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.opp-chip.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.opp-chip:disabled { cursor: default; opacity: .45; box-shadow: none; background: transparent; }
.opp-chip-text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.opp-chip-name { font-size: 13.5px; font-weight: 600; }
.opp-chip-date { font-size: 11.5px; color: var(--label-2); }

/* ── Two-card grid ──────────────────────────────────────────────────── */
.predict-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sit-card, .result-card { padding: 28px; }
.result-card { position: sticky; top: calc(var(--nav-h) + 20px); min-height: 200px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }

/* ── Situation ──────────────────────────────────────────────────────── */
.field-wrap { margin-bottom: 24px; }
.field-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.field-foot .stepper { width: 170px; }

.sit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.sit-grid--2 { margin-top: 14px; }
.fld { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fld--wide { grid-column: 1 / -1; }
.fld-label { font-size: 13px; font-weight: 600; color: var(--label-2); }
.fld-inline { height: 40px; display: flex; align-items: center; }
.stepper--static { justify-content: center; font-size: 14px; color: var(--label-2); }

.score-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.score-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.score-team { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--label-3); text-align: center; }
.score-side .stepper-btn { width: 30px; }

.more { margin-top: 24px; border-top: 1px solid var(--border-2); padding-top: 18px; }
.more summary {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; list-style: none; font-size: 15px; font-weight: 600;
}
.more summary::-webkit-details-marker { display: none; }
.more summary .muted { margin-left: auto; font-size: 13px; font-weight: 500; }
.more summary::after {
  content: ''; width: 7px; height: 7px; flex-shrink: 0;
  border-right: 2px solid var(--label-3); border-bottom: 2px solid var(--label-3);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease);
}
.more[open] summary::after { transform: rotate(-135deg) translateY(-1px); }

/* ── Result ─────────────────────────────────────────────────────────── */
.busy {
  position: absolute; top: 22px; right: 22px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
.is-stale { opacity: .5; transition: opacity .2s; }

.swatch { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.swatch--run  { background: var(--run); }
.swatch--pass { background: var(--pass); }

.call { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.call-label { font-size: 17px; font-weight: 600; color: var(--label-2); }
.call-num { font-size: 80px; font-weight: 700; letter-spacing: -0.045em; line-height: .95; }

.split-bar { display: flex; gap: 2px; height: 6px; }
.split-bar span { display: block; height: 100%; min-width: 3px; transition: width .5s var(--ease-out); }
.split-run  { background: var(--run);  border-radius: 3px 1px 1px 3px; }
.split-pass { background: var(--pass); border-radius: 1px 3px 3px 1px; }
.split-legend {
  display: flex; justify-content: space-between; margin: 10px 0 28px;
  font-size: 14px; color: var(--label-2);
}
.split-legend span, .top-pick span:last-child { display: inline-flex; align-items: center; gap: 7px; }
.split-legend b, .top-pick b { color: var(--label); font-weight: 600; }

.top-pick {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-2);
  font-size: 15px;
}
.top-pick span:last-child { font-weight: 500; }

.result-skeleton { display: flex; flex-direction: column; gap: 16px; }
.result-skeleton div {
  height: 90px; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite;
}
.result-skeleton div:nth-child(2) { height: 230px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ── Empty / error state ────────────────────────────────────────────── */
.empty { max-width: 460px; margin: 80px auto; padding: 44px 32px; text-align: center; }
.empty-ic { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--label-3); }
.empty-ic svg { width: 100%; height: 100%; }
.empty-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.empty-body { color: var(--label-2); margin: 8px 0 20px; font-size: 14.5px; }
