/* watch.css — public spectator page ("track a race" by code). Loaded after
   landing.css on watch.html, so it reuses landing.css's :root tokens
   (--bg, --panel, --border, --accent, --amber, --text, --muted, --radius,
   --radius-lg, etc.) rather than redeclaring them — same dark nautical
   palette, just new layout for this page's own content (code entry + live
   race/day view). Updated 2026-09-10 alongside landing.css's "clean,
   Apple-like" pass — no structural changes here, just following the same
   softer/neutral tone and slightly more generous spacing landing.css's
   tokens now carry automatically, plus a few of this page's own rules
   (card radius, focus ring, spacing) brought in line. */

.watch-intro {
  padding-bottom: clamp(24px, 5vw, 40px);
}

.watch-form {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watch-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
}

.watch-input-row {
  display: flex;
  gap: 10px;
}

.watch-input-row input {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.watch-input-row input::placeholder {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--muted);
}

/* Soft focus ring rather than just a border-color swap — a restrained,
   low-opacity halo (not a glow) is a small, common "considered" detail on
   its own, and doesn't rely on hover (this page is used on phones as often
   as desktops, where hover states don't apply). */
.watch-input-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 191, 166, 0.16);
}

.watch-hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.watch-result-section {
  padding-top: 0;
}

.watch-status {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.watch-status.is-error {
  color: var(--amber);
}

.watch-result {
  max-width: 720px;
  margin: 0 auto;
}

.watch-day-head {
  text-align: center;
  margin-bottom: 24px;
}

.watch-day-head h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-top: 10px;
}

.watch-day-head p {
  margin-top: 8px;
  color: var(--muted);
}

/* Calendar-date label for a race day (`dayDate`) - display/grouping only,
   never a start time, so it's styled like the plain metadata line below it
   rather than anything that reads as "when this starts." */
.watch-day-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.race-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.race-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.race-card.is-cancelled {
  opacity: 0.62;
  border-style: dashed;
}

.race-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.race-card-head h3 {
  font-size: 1.1rem;
}

.race-card.is-cancelled .race-card-head h3 {
  text-decoration: line-through;
  text-decoration-color: var(--muted);
}

.race-seq {
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
}

.race-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.92rem;
}

.race-meta-row .label {
  color: var(--muted);
}

.source-pill {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(47, 191, 166, 0.14);
  color: var(--accent);
}
/* Cancelled-race variant — was an inline style in watch.js (hardcoded to
   the old accent's rgb triplet), which would have silently drifted out of
   sync with --amber the moment either token's value changed. Moved here as
   a real class so it always follows the current --amber, same as every
   other themed color in this file. */
.source-pill.is-cancelled { background: rgba(226, 165, 80, 0.14); color: var(--amber); }

.source-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* `hostStale` note - informational only (this read-only page never acts on
   it), so it's a quiet amber note rather than a pill/badge, and only ever
   rendered when true on a not-yet-started race (see watch.js) - no "host is
   fine" clutter on every row. */
.host-stale-note {
  margin-top: 8px;
  color: var(--amber);
  font-size: 0.78rem;
  line-height: 1.5;
}

.race-participants {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.race-participants .label {
  color: var(--muted);
  font-size: 0.85rem;
}

.race-participants ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.race-participants li {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.85rem;
}

.race-participants .empty {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.watch-refresh-note {
  text-align: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.78rem;
}
