/* First course at the Scoresasboard (first-course.html): a phone-sized walk through the board.
   The board's own styles (dashboard.css, portrait phone layout) draw the cards; this adds the
   steps around them. On a computer the page shows itself in a phone frame (first-course-app.js). */

:root { --ok: #4cc38a; --warn: #ff8a4b; }

.fc { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; font-size: 1.15rem; line-height: 1.4; }
.fc-loading { margin: auto; color: var(--muted); }
.fc a { color: var(--accent); }
:where(.fc) :where(button) { font: inherit; color: inherit; } /* no weight: the board's own button styles (a card's pins) win */

/* A step: scrolls on its own, its buttons stay at the bottom. */
.fc-step { flex: 1; min-height: 0; overflow-y: auto; padding: 1.4rem 1.2rem 1rem; display: flex; flex-direction: column; gap: 0.9rem; }
.fc-step h1 { font-size: 2rem; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
.fc-step h2 { font-size: 1.45rem; margin: 0; }
.fc-step h3 { font-size: 1.1rem; margin: 0.6rem 0 0; color: var(--ink-2); }
.fc-step p { margin: 0; color: var(--ink-2); }
.fc-kicker { color: var(--fav); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.fc-actions { flex: none; display: flex; gap: 0.6rem; padding: 0.8rem 1.2rem calc(0.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.fc-actions .fc-btn { flex: 1; }
.fc-btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 0.6rem; padding: 0.75rem 1rem; cursor: pointer; font-weight: 600; }
.fc-btn.primary { background: var(--accent); border-color: var(--accent); color: #06101e; }
.fc-btn:disabled { opacity: 0.4; cursor: default; }
.fc-btn.small { padding: 0.35rem 0.7rem; font-size: 0.9rem; font-weight: 500; }
.fc-shot { width: 100%; border-radius: 0.6rem; border: 1px solid var(--line); box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.5); }
.fc-points { margin: 0; padding-left: 1.2rem; color: var(--ink-2); display: grid; gap: 0.4rem; }
.fc-note { font-size: 0.9rem; color: var(--muted) !important; }


/* Your teams: the config page's Teams editor (teams-ui.js renderTeams), its rules from config.css scoped
   here in em, as config.css draws it on a phone (short names, tier buttons on their own line). */
.fc-teams { font-size: 0.9em; }
.fc-teams h3 { font-size: 1.05em; margin: 0.9em 0 0.4em; }
.fc-teams h3 small { display: block; font-weight: 400; font-size: 0.8em; color: var(--muted); margin-top: 0.15em; }
.fc-teams .btn { display: inline-block; border: 1px solid var(--line); background: var(--panel-2); border-radius: 0.5em; padding: 0.45em 0.9em; cursor: pointer; white-space: nowrap; }
.fc-teams .btn.small { padding: 0.2em 0.55em; font-size: 0.85em; }
.fc-teams .icon { border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 0.35em; min-width: 2em; min-height: 2em; display: inline-grid; place-items: center; font-size: 1em; flex: none; }
.fc-teams .icon:disabled { opacity: 0.25; cursor: default; }
.fc-teams .rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 0.6em; overflow: hidden; }
.fc-teams .rows:empty::after { content: attr(data-empty); display: block; padding: 0.7em 0.9em; color: var(--muted); font-size: 0.9em; }
.fc-teams .rows li { display: flex; align-items: center; gap: 0.3em; padding: 0.3em 0.4em 0.3em 0.6em; background: var(--panel-2); border-top: 1px solid var(--line); min-height: 2.75em; }
.fc-teams .rows li:first-child { border-top: 0; }
.fc-teams .rows li.dragging { opacity: 0.5; outline: 2px dashed var(--accent); }
.fc-teams .rows .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-teams .rows .weight { display: none; }
.fc-teams .name .long { display: none; }
.fc-teams .handle { cursor: grab; touch-action: none; color: var(--muted); user-select: none; }
.fc-teams .logo { width: 1.6em; height: 1.6em; object-fit: contain; flex: none; }
.fc-teams .tag { font-size: 0.7em; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line); border-radius: 0.3em; padding: 0.05em 0.3em; flex: none; }
.fc-teams .tier-fav .rows li { background: var(--fav-bg); }
.fc-teams .rows li:has(.pick) { flex-wrap: wrap; padding-bottom: 0.45em; }
.fc-teams .pick { display: flex; flex-basis: 100%; border: 1px solid var(--line); border-radius: 0.45em; overflow: hidden; }
.fc-teams .pick button { flex: 1; border: 0; background: none; padding: 0.35em 0.4em; font-size: 0.85em; cursor: pointer; color: var(--ink-2); }
.fc-teams .pick button + button { border-left: 1px solid var(--line); }
.fc-teams .pick button.on { background: var(--accent); color: #06101e; font-weight: 700; }
.fc-teams .pick button.on.fav { background: var(--fav); }
.fc-teams .search { width: 100%; padding: 0.6em 0.8em; border-radius: 0.5em; border: 1px solid var(--line); background: var(--panel); margin: 0.2em 0 0.6em; font: inherit; color: inherit; }
.fc-teams .results .rows li { background: transparent; }
.fc-teams .muted { color: var(--muted); }
.fc-teams details.browse { margin-top: 0.8em; }
.fc-teams .league-tabs { display: flex; flex-wrap: wrap; gap: 0.35em; margin: 0.6em 0; }
.fc-teams .league-tabs button.on { background: var(--accent); color: #06101e; border-color: var(--accent); font-weight: 700; }
.fc-teams .group-name { font-size: 0.8em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0.8em 0 0.3em; }
.fc details > summary { cursor: pointer; color: var(--accent); padding: 0.3rem 0; }
/* Golfers and tennis players: the config page's Golf and tennis editor (teams-ui.js renderPlayers), scoped as above. */
.fc-players { font-size: 0.9em; }
.fc-players h3 { font-size: 1.05em; margin: 0.9em 0 0.4em; }
.fc-players .muted { color: var(--muted); }
.fc-players .btn { display: inline-block; border: 1px solid var(--line); background: var(--panel-2); border-radius: 0.5em; padding: 0.45em 0.9em; cursor: pointer; white-space: nowrap; }
.fc-players .btn.small { padding: 0.2em 0.55em; font-size: 0.85em; }
.fc-players .btn.ghost { background: transparent; color: var(--ink-2); }
.fc-players .icon { border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 0.35em; min-width: 1.6em; min-height: 1.6em; display: inline-grid; place-items: center; font-size: 1em; }
.fc-players .chips { display: flex; flex-wrap: wrap; gap: 0.4em; margin: 0.3em 0 0.6em; }
.fc-players .chip { display: inline-flex; align-items: center; gap: 0.2em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 0.15em 0.2em 0.15em 0.7em; }
.fc-players .add-row { display: flex; gap: 0.5em; }
.fc-players .add-row input { flex: 1; min-width: 0; padding: 0.45em 0.7em; border-radius: 0.5em; border: 1px solid var(--line); background: var(--panel); font: inherit; color: inherit; }
.fc-players .did-you-mean { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em; margin: 0.5em 0 0.2em; }
.fc-players .did-you-mean small { color: var(--muted); }
.fc-players .rows { list-style: none; margin: 0.3em 0 0.6em; padding: 0; border: 1px solid var(--line); border-radius: 0.6em; overflow: hidden; }
.fc-players .rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em; padding: 0.3em 0.4em 0.45em 0.6em; background: var(--panel-2); border-top: 1px solid var(--line); }
.fc-players .rows li:first-child { border-top: 0; }
.fc-players .rows .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-players .pick { display: flex; order: 3; flex-basis: 100%; border: 1px solid var(--line); border-radius: 0.45em; overflow: hidden; }
.fc-players .pick button { flex: 1; border: 0; background: none; padding: 0.35em 0.4em; font-size: 0.85em; cursor: pointer; color: var(--ink-2); }
.fc-players .pick button + button { border-left: 1px solid var(--line); }
.fc-players .pick button.on { background: var(--accent); color: #06101e; font-weight: 700; }
.fc-players .pick button.on.fav { background: var(--fav); }
.fc-players .add-row select { padding: 0.45em 0.4em; border-radius: 0.5em; border: 1px solid var(--line); background: var(--panel); font: inherit; color: inherit; }

/* The swipe game: a two-card phone board with the question on top */
.fc-game { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.6rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom)); }
.fc-ask { flex: none; display: flex; align-items: center; gap: 0.6rem; }
.fc-ask b { flex: 1; font-size: 1.05rem; line-height: 1.25; }
.fc-meter { flex: none; width: 6.5rem; text-align: right; font-size: 0.75rem; color: var(--muted); }
.fc-meter i { display: block; height: 0.35rem; border-radius: 999px; background: var(--panel-2); margin-top: 0.2rem; overflow: hidden; }
.fc-meter i::after { content: ''; display: block; height: 100%; width: var(--known, 0%); background: linear-gradient(90deg, var(--accent), var(--ok)); transition: width 0.5s ease; }
.fc-game .top { flex: 1; min-height: 0; touch-action: pan-y; padding-top: 0.5rem; } /* room for a card's ‹ Back */
.fc-game .slot { touch-action: pan-y; cursor: grab; }
.fc-game .slot.dragging { transition: none; cursor: grabbing; }
.fc-game .slot.fly-left { transition: transform 0.28s ease-in, opacity 0.28s ease-in; transform: translateX(-120%) rotate(-8deg) !important; opacity: 0; }
.fc-game .slot.shake { animation: fc-shake 0.35s ease; }
@keyframes fc-shake { 25% { transform: translateX(-0.6rem); } 75% { transform: translateX(0.6rem); } }
.fc-caption { position: absolute; left: 0.6rem; right: 0.6rem; bottom: 0.6rem; z-index: 3; padding: 0.35rem 0.6rem; border-radius: 0.45rem; background: rgba(10, 14, 21, 0.88); border: 1px solid var(--line); color: var(--ink-2); font-size: 0.85rem; pointer-events: none; }
.fc-final { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(10, 14, 21, 0.7); border-radius: var(--radius); font-size: 1.5rem; font-weight: 800; letter-spacing: 0.05em; animation: fade-in 0.3s ease; }
.fc-tip { flex: none; padding: 0.6rem 0.75rem; border-radius: 0.6rem; background: rgba(90, 169, 255, 0.12); border: 1px solid rgba(90, 169, 255, 0.45); font-size: 0.95rem; line-height: 1.35; animation: fade-in 0.4s ease; }
.fc-tip.board { background: rgba(243, 180, 44, 0.1); border-color: var(--fav-line); }
.fc-tip:empty { display: none; }
.fc-bar { flex: none; display: flex; gap: 0.4rem; }
.fc-bar .fc-btn { flex: 1; padding: 0.55rem 0.5rem; font-size: 0.95rem; }

/* Results */
.fc-persona { padding: 1rem; border-radius: 0.8rem; background: linear-gradient(135deg, rgba(90, 169, 255, 0.16), rgba(243, 180, 44, 0.12)); border: 1px solid var(--line); }
.fc-persona b { display: block; font-size: 1.5rem; }
.fc-persona span { color: var(--ink-2); }
.fc-suggest { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.fc-suggest label { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; align-items: start; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--panel); cursor: pointer; }
.fc-suggest label:has(input:checked) { border-color: var(--accent); }
.fc-suggest input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; }
.fc-suggest small { grid-column: 2; color: var(--muted); font-size: 0.85rem; }
.fc-replay { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.95rem; }
.fc-replay li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.5rem; padding: 0.45rem 0.6rem; border-radius: 0.5rem; background: var(--panel); border: 1px solid var(--line); }
.fc-replay time { color: var(--muted); font-size: 0.85rem; }
.fc-replay s { color: var(--muted); }
.fc-replay em { color: var(--ink); font-style: normal; font-weight: 600; }
.fc-link { display: block; word-break: break-all; padding: 0.6rem 0.7rem; border-radius: 0.5rem; background: var(--panel); border: 1px solid var(--line); font-family: ui-monospace, monospace; font-size: 0.9rem; }

/* On a computer: the page in a phone frame */
html.fc-framed, html.fc-framed body { height: 100%; overflow: hidden; }
.fc-frame-page { height: 100vh; display: grid; place-items: center; gap: 0.8rem; grid-auto-flow: row; align-content: center; background: radial-gradient(circle at 50% 30%, #162236, var(--bg) 70%); }
.fc-frame { border: 0.75rem solid #1d2533; border-radius: 2.6rem; overflow: hidden; box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.6), inset 0 0 0 1px #2c3648; background: var(--bg); }
.fc-frame iframe { display: block; border: 0; width: 100%; height: 100%; }
.fc-frame-note { color: var(--muted); font-size: 14px; }
.fc-step > * { flex: none; } /* the step scrolls; nothing in it squeezes */
.fc-meter span { white-space: nowrap; }

/* The splash's four kinds of cards (the board's score boxes) and every card's kind on its caption */
.fc-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.fc-kinds figure { margin: 0; display: grid; gap: 0.35rem; align-content: start; }
.fc-kinds .mini { pointer-events: none; }
.fc-kinds figcaption { font-size: 0.85rem; color: var(--ink-2); line-height: 1.3; }
.fc-kinds figcaption b, .fc-caption b { display: inline; color: var(--ink); }
.fc-kinds b.in, .fc-caption b.in { color: var(--live); }
.fc-kinds b.pre, .fc-caption b.pre { color: var(--accent); }
.fc-caption b.info { color: var(--fav); }
.fc-other { display: flex; flex-wrap: wrap; gap: 0.3rem; align-content: center; min-height: 100%; padding: 0.5rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.fc-other span { font-size: 0.8rem; padding: 0.1rem 0.45rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.fc-caption { right: auto; max-width: calc(100% - 1.2rem); }
/* An expanded card (first-course-app.js setWide): both slots' room; the expand pill shows for a mouse. */
.fc-game .top.has-wide .slot:not(.wide) { display: none; }
.fc-game .top .slot.wide { grid-row: 1 / -1; }
@media (hover: hover) and (pointer: fine) { .fc-game .wide-pill { display: inline-flex; } }

/* Your sports: the config page's Leagues editor (leagues-ui.js), its rules from config.css scoped here,
   in em (this page's rem is the board's, sized to the screen), as config.css draws it on a phone. */
.fc-leagues { font-size: 0.9em; }
.fc-leagues .board-tag { padding: 0.45em 0; }
.fc-leagues .btn { text-decoration: none; display: inline-block; border: 1px solid var(--line); background: var(--panel-2); border-radius: 0.5em; padding: 0.45em 0.9em; cursor: pointer; white-space: nowrap; }
.fc-leagues .btn:hover { border-color: var(--accent); }
.fc-leagues .btn.primary { background: var(--accent); border-color: var(--accent); color: #06101e; font-weight: 700; }
.fc-leagues .btn.danger { border-color: var(--warn); color: var(--warn); }
.fc-leagues .btn.small { padding: 0.2em 0.55em; font-size: 0.85em; }
.fc-leagues .icon { border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 0.35em; min-width: 2em; min-height: 2em; display: inline-grid; place-items: center; font-size: 1em; }
.fc-leagues .icon:hover { background: var(--panel-2); color: var(--ink); }
.fc-leagues .icon:disabled { opacity: 0.25; cursor: default; background: none; }
.fc-leagues .rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 0.6em; overflow: hidden; }
.fc-leagues .rows:empty::after { content: attr(data-empty); display: block; padding: 0.7em 0.9em; color: var(--muted); font-size: 0.9em; }
.fc-leagues .rows li { display: flex; align-items: center; gap: 0.5em; padding: 0.3em 0.4em 0.3em 0.6em; background: var(--panel-2); border-top: 1px solid var(--line); min-height: 2.75em; }
.fc-leagues .rows li:first-child { border-top: 0; }
.fc-leagues .rows li.off { background: transparent; color: var(--muted); }
.fc-leagues .rows li.tray { display: block; min-height: 0; padding: 0 0.6em 0 2.2em; border-top: 0; }
.fc-leagues .tray summary { cursor: pointer; padding: 0.3em 0; color: var(--ink-2); font-size: 0.9em; }
.fc-leagues .tray summary small { color: var(--muted); margin-left: 0.4em; }
.fc-leagues .tray p.muted { margin: 0.2em 0 0.5em; font-size: 0.82em; }
.fc-leagues .tray .prio-row { padding: 0.4em 0 0.6em; }
.fc-leagues .tray .prio-row input[type='number'] { width: 4.5em; padding: 0.35em 0.5em; border-radius: 0.4em; border: 1px solid var(--line); background: var(--bg); color: inherit; }
.fc-leagues .tray-order { list-style: none; margin: 0 0 0.5em; padding: 0; border: 1px solid var(--line); border-radius: 0.5em; overflow: hidden; }
.fc-leagues .tray-order li { display: flex; align-items: center; gap: 0.4em; padding: 0.15em 0.3em 0.15em 0.4em; border-top: 1px solid var(--line); font-size: 0.9em; min-height: 2.4em; }
.fc-leagues .tray-order li:first-child { border-top: 0; }
.fc-leagues .tray-rest { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em; margin-bottom: 0.5em; }
.fc-leagues .tray-rest small { color: var(--muted); margin-right: 0.2em; }
.fc-leagues .rows li.dragging { opacity: 0.5; outline: 2px dashed var(--accent); }
.fc-leagues .rows .rank { width: 1.6em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85em; }
.fc-leagues .rows .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-leagues .rows .weight { color: var(--muted); font-size: 0.8em; font-variant-numeric: tabular-nums; }
.fc-leagues .rows .tie { min-width: 2em; font-weight: 700; }
.fc-leagues .rows .tie:not(.on) { color: var(--muted); background: transparent; }
.fc-leagues .rows .tie-space { width: 2em; flex: none; }
.fc-leagues .tray-order .big:not(.on) { color: var(--muted); background: transparent; }
.fc-leagues .prio-row { display: flex; align-items: center; gap: 0.8em; padding: 0.45em 0; border-top: 1px solid var(--line); }
.fc-leagues .prio-row > div:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fc-leagues .prio-row small { color: var(--muted); font-size: 0.8em; }
.fc-leagues .prio-row.knob b { font-weight: 600; font-size: 0.92em; }
.fc-leagues .steps { display: inline-flex; border: 1px solid var(--line); border-radius: 0.45em; overflow: hidden; flex: none; }
.fc-leagues .steps button { border: 0; background: none; padding: 0.3em 0.5em; font-size: 0.78em; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.fc-leagues .steps button + button { border-left: 1px solid var(--line); }
.fc-leagues .steps button.on { background: var(--accent); color: #06101e; font-weight: 700; }
.fc-leagues .steps button[data-v="off"].on { background: var(--warn); }
.fc-leagues .rows .tie.on, .fc-leagues .tray-order .big.on { background: var(--accent); border-color: var(--accent); color: #06101e; }
.fc-leagues .tray-order .name { white-space: normal; line-height: 1.2; }
/* Its weight beside its name; its buttons together, below the name when a phone hasn't room for both. */
.fc-leagues .tray-order li { flex-wrap: wrap; }
.fc-leagues .tray-order .name { flex: 1 1 7em; }
.fc-leagues .tray-order .tray-ctl { display: flex; align-items: center; gap: 0.4em; margin-left: auto; }
.fc-leagues .rows li { flex-wrap: nowrap; }
.fc-leagues .prio-row { flex-direction: column; align-items: stretch; gap: 0.35em; }
.fc-leagues .steps { display: flex; }
.fc-leagues .step-stack { display: flex; flex-direction: column; gap: 0.35em; }
.fc-leagues .step-stack .steps button, .fc-leagues .steps[data-kind="bigDrama"] button { white-space: normal; line-height: 1.15; }
.fc-leagues .steps button { flex: 1; padding: 0.35em 0.2em; }
.fc-leagues .rows .weight { display: none; }
.fc-leagues .rows li { gap: 0.3em; }
.fc-leagues details > summary { color: var(--ink-2); }

/* Share your teams (results): the config page's share control (share-ui.js renderShare), its rules from
   config.css scoped here in em, as config.css draws it on a phone (the picture over its text). */
.fc-share { font-size: 0.9em; }
.fc-share .muted { color: var(--muted); }
.fc-share .btn { display: inline-block; border: 1px solid var(--line); background: var(--panel-2); border-radius: 0.5em; padding: 0.45em 0.9em; cursor: pointer; white-space: nowrap; color: var(--ink); text-decoration: none; }
.fc-share .pv-screens { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em; margin: 0.2em 0 0.4em; }
.fc-share .pv-screens button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 0.25em 0.7em; cursor: pointer; font-size: 0.9em; }
.fc-share .pv-screens button.on { background: var(--accent); border-color: var(--accent); color: #06101e; font-weight: 700; }
.fc-share label.toggle { display: flex; align-items: center; gap: 0.5em; margin-top: 0.6em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 0.8em; padding: 0.45em 0.9em; cursor: pointer; font-size: 0.9em; }
.fc-share label.toggle:has(input:checked) { border-color: var(--accent); background: rgba(90, 169, 255, 0.14); }
.fc-share label.toggle input { flex: none; }
.fc-share .share-out { display: grid; gap: 0.8em; margin-top: 0.6em; }
.fc-share .share-img { width: 100%; aspect-ratio: 1080 / 1350; border-radius: 0.5em; border: 1px solid var(--line); background: var(--bg); }
.fc-share .share-side { display: grid; gap: 0.6em; min-width: 0; }
.fc-share .share-btns { display: flex; flex-wrap: wrap; gap: 0.5em; }
.fc-share .share-text { width: 100%; resize: vertical; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 0.5em; padding: 0.6em; font: 0.9em/1.4 system-ui, sans-serif; }
