/* Season schedule (/schedule) — reuses app.css tokens. */

/* ---------- this-week hero ---------- */
.sched-hero { position: relative; overflow: hidden; padding: 26px 26px 20px; }
.sched-hero > * { position: relative; }
.sched-hero .sched-hero-crest {
  position: absolute; right: -36px; top: -30px; width: 260px; height: 260px;
  opacity: 0.07; pointer-events: none; filter: drop-shadow(0 0 30px rgba(215, 178, 93, 0.5));
}
.sched-hero-top .eyebrow { display: block; }
.sched-hero-course {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em;
  font-size: clamp(32px, 5vw, 50px); line-height: 1; margin-top: 10px;
}
.sched-hero-loc { margin-top: 6px; font-size: 15px; }

.sched-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px;
  border-top: 1px solid var(--gold-line); border-bottom: 1px solid var(--line);
}
.sched-fact { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 16px 0; min-width: 0; }
.sched-fact + .sched-fact { padding-left: 18px; border-left: 1px solid var(--line); }
.sched-fact-value {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 34px;
  font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.05;
}
.sched-fact-value .badge { font-family: var(--font-body); text-transform: none; font-size: 13px; padding: 5px 11px; }
.sched-fact .stat-sub { line-height: 1.35; }
.sched-sample { font-size: 10.5px; padding: 1px 7px; margin-left: 2px; vertical-align: 1px; }
.sched-strokes { font-size: 38px; color: var(--gold-strong); line-height: 0.9; }
.sched-hero-foot { border-top: 0; margin-top: 4px; padding-top: 16px; }

.tee-dot {
  display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--tee, var(--muted));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

/* ---------- season list ---------- */
.sched-legend { display: flex; gap: 6px; white-space: nowrap; }
.sched-legend span + span::before { content: "·"; margin-right: 6px; color: var(--faint); }

.sched-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sched-head, .sched-row {
  display: grid; align-items: center; column-gap: 16px;
  grid-template-columns: 64px 118px minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1.25fr) 112px 92px;
}
.sched-head {
  padding: 0 18px 2px; font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.sched-row {
  padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.sched-row.is-current {
  border-color: var(--gold-line); box-shadow: var(--shadow-gold);
  background: linear-gradient(90deg, rgba(215, 178, 93, 0.13), var(--surface) 55%);
}
.sched-row.is-final { background: var(--bg-elev); }
.sched-row.is-final .sched-course .title { color: var(--text-2); }
.sched-row.is-tbs { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.sched-row.is-tbs.is-now { border-style: solid; border-color: var(--gold-line); }

/* no-play (holiday) week: a slim row between league weeks */
.sched-off {
  display: grid; align-items: center; column-gap: 16px;
  grid-template-columns: 64px 118px minmax(0, 1fr) auto;
  padding: 10px 18px; border-radius: var(--radius); border: 1px dashed var(--line);
  color: var(--text-2); font-size: 14.5px;
}
.sched-off.is-now { border-style: solid; border-color: var(--gold-line); background: rgba(215, 178, 93, 0.07); }
.sched-off-mark { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.sched-off .sched-dates { color: var(--muted); }
.sched-off-label { min-width: 0; }

.sched-num { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.sched-num-label { font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.sched-num-value { font-family: var(--font-display); font-size: 36px; font-weight: 800; letter-spacing: 0.01em; margin-top: 3px; color: var(--text); }
.is-current .sched-num-value { color: var(--gold-strong); }
.is-final .sched-num-value, .is-tbs .sched-num-value { color: var(--muted); }
.is-current .sched-num-label { color: var(--gold); }

.sched-when { display: flex; flex-direction: column; gap: 2px; }
.sched-dates { font-weight: 600; white-space: nowrap; }
.sched-course, .sched-blank { min-width: 0; }
.sched-course .title { font-weight: 700; font-size: 16px; line-height: 1.25; }
.sched-course .sub, .sched-blank .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sched-blank { grid-column: 3 / span 3; }
.sched-blank .title { color: var(--muted); font-style: italic; }
.sched-blank-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sched-tee { display: flex; align-items: center; gap: 9px; font-size: 14.5px; min-width: 0; }
.sched-format { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sched-pot { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 600; }
.sched-pot .icon { width: 15px; height: 15px; }
.sched-status { display: flex; }
.sched-status .badge .icon { width: 13px; height: 13px; }
.sched-action { display: flex; justify-content: flex-end; }
.sched-link {
  display: inline-flex; align-items: center; gap: 2px; min-height: 40px; margin: -10px -8px; padding: 0 8px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.sched-link .icon { width: 15px; height: 15px; }

/* ---------- formats + week flow ---------- */
.sched-formats .list-item { align-items: flex-start; }
.sched-format-key { min-width: 104px; justify-content: center; margin-top: 2px; }
.sched-formats .title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.sched-flow { list-style: none; margin: 0; padding: 0; position: relative; }
.sched-flow li {
  position: relative; display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 12px;
  padding: 0 0 16px 22px; font-size: 14.5px; color: var(--text-2);
}
.sched-flow li:last-child { padding-bottom: 0; }
.sched-flow li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
.sched-flow li:not(:last-child)::after {
  content: ""; position: absolute; left: 4px; top: 17px; bottom: 2px; width: 1px; background: var(--gold-line);
}
.sched-flow-when { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-strong); }

.sched-admin { align-items: flex-start; }
.sched-soon { font-size: 11px; padding: 2px 8px; margin-left: 4px; vertical-align: 1px; }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .sched-head, .sched-row { grid-template-columns: 56px 108px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) 104px 84px; column-gap: 12px; }
  .sched-off { grid-template-columns: 56px 108px minmax(0, 1fr) auto; column-gap: 12px; }
}

/* ---------- phone: stacked week cards ---------- */
@media (max-width: 760px) {
  .sched-head { display: none; }
  .sched-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas:
      "num when status"
      "num course course"
      "num tee tee"
      "num format action";
    row-gap: 6px; column-gap: 14px; padding: 14px 14px 14px 12px; align-items: start;
  }
  .sched-num { grid-area: num; align-items: center; padding-top: 2px; }
  .sched-num-value { font-size: 32px; }
  .sched-when { grid-area: when; flex-direction: row; align-items: baseline; gap: 8px; }
  .sched-dates { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
  .is-final .sched-dates, .is-tbs .sched-dates { color: var(--muted); }
  .sched-days { display: none; }
  .sched-status { grid-area: status; justify-content: flex-end; }
  .sched-course { grid-area: course; }
  .sched-course .title { font-size: 17px; }
  .sched-blank { grid-area: course; }
  .sched-tee { grid-area: tee; font-size: 14px; }
  .sched-format { grid-area: format; }
  .sched-action { grid-area: action; align-self: center; }
  .sched-row.is-tbs { grid-template-areas: "num when status" "num course course"; }
  .sched-row.is-tbs .sched-action { display: none; }
  .sched-off {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: "mark when now" "mark label label";
    row-gap: 4px; column-gap: 14px; padding: 10px 14px 10px 12px;
  }
  .sched-off-mark { grid-area: mark; text-align: center; align-self: center; }
  .sched-off .sched-when { grid-area: when; }
  .sched-off .sched-dates { color: var(--muted); }
  .sched-off-label { grid-area: label; }
  .sched-off-now { grid-area: now; }
  .sched .section-title { flex-wrap: wrap; row-gap: 4px; }
  .sched .section-title .h2 { white-space: nowrap; }
}

@media (max-width: 640px) {
  .sched-hero { padding: 20px 16px 14px; }
  .sched-hero .sched-hero-crest { width: 190px; height: 190px; right: -40px; top: -26px; }
  .sched-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sched-fact { padding: 14px 12px 14px 0; }
  .sched-fact + .sched-fact { padding-left: 0; border-left: 0; }
  .sched-fact:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .sched-fact:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .sched-fact-value { font-size: 21px; }
  .sched-strokes { font-size: 32px; }
  .sched-hero-foot .btn { flex: 1 1 auto; }
  .sched-hero-foot .grow { flex-basis: 100%; }
  .sched-flow li { grid-template-columns: 1fr; gap: 2px; }
  .sched-format-key { min-width: 0; }
  .sched-formats .list-item { flex-direction: column; gap: 8px; }
}

/* a week's GSPro settings (routes/gspro.js), under its course; signed in only */
.sched-gspro { display: inline-flex; align-items: center; min-height: 32px; margin-top: 2px; color: var(--gold-strong); overflow-wrap: anywhere; }
@media (max-width: 640px) { .sched-gspro { min-height: 40px; } }
