/* ============================================================================
   First Cutt — game surfaces.
   Loaded after fc.css on /games/ and every individual game page.
   ========================================================================== */

/* ================================================================ layout === */

/* Game pages open ON the game: tight top padding, compact one-row header.
   (The old shell spent ~400px of hero copy before the stage appeared.) */
.fc-section--game { padding-block: var(--sp-4) var(--sp-6); }

.fc-gamehead {
  display: flex; align-items: center; gap: var(--sp-3);
  flex-wrap: wrap; margin-bottom: var(--sp-3);
}
.fc-gamehead__back {
  font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  color: var(--fc-muted); text-decoration: none; white-space: nowrap;
}
.fc-gamehead__back:hover { color: var(--fc-lime); }
.fc-gamehead__title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.fc-gamehead h1 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin: 0; letter-spacing: -.02em; }
.fc-gamehead__tag { font-size: .82rem; font-weight: 600; color: var(--fc-muted); }
.fc-gamehead__metric { margin-left: auto; }
@media (max-width: 600px) {
  /* On a phone the header is title + back link only — every pixel above the
     stage is a pixel the game does not get. */
  .fc-gamehead { margin-bottom: var(--sp-2); }
  .fc-gamehead__tag, .fc-gamehead__metric { display: none; }
}

.fc-game {
  display: grid; gap: var(--sp-4);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 1000px) {
  .fc-game { grid-template-columns: minmax(0, 1fr) 330px; }
}

/* Stage → meter → data → coach → summary flow down one column, one eye line. */
.fc-game__main > * + * { margin-top: var(--sp-3); }

/* The rail keeps itself in reach on tall pages. max-height + overflow so a
   long scorecard (8 putters) scrolls inside the rail instead of un-sticking. */
@media (min-width: 1000px) {
  .fc-panel { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; overscroll-behavior: contain; }
}

.fc-stage {
  position: relative;
  background: #061011;
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  overflow: hidden;
}
.fc-stage canvas { width: 100%; height: auto; aspect-ratio: 16 / 10; touch-action: manipulation; }
@media (max-width: 600px) {
  /* A screen, not a strip. The old 4:3-on-342px stage measured 257 CSS px tall;
     this gives the game ~52% of the viewport while leaving the meter's GO
     button reachable without a scroll on an 844px phone. */
  .fc-stage canvas { aspect-ratio: auto; height: clamp(300px, 52vh, 440px); }
}

.fc-stage__hud {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--sp-3);
}
.fc-stage__top, .fc-stage__bottom { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: flex-start; }
.fc-stage__bottom { align-items: flex-end; }
.fc-chip {
  background: rgba(6,16,17,.78); border: 1px solid var(--fc-line-2);
  border-radius: 999px; padding: 5px 13px;
  font-size: .78rem; font-weight: 700; color: var(--fc-text);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.fc-chip b { color: var(--fc-lime); }
.fc-chip--lime { border-color: rgba(162,230,26,.4); color: var(--fc-lime); }

/* Big centred call-out over the stage (result of a shot). */
.fc-flash {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.fc-flash[data-show="true"] { opacity: 1; }
.fc-flash__inner {
  background: rgba(6,16,17,.9); border: 1px solid var(--fc-lime);
  border-radius: var(--fc-radius); padding: var(--sp-3) var(--sp-5);
  text-align: center; box-shadow: var(--fc-glow);
  transform: translateY(8px); transition: transform .25s ease;
}
.fc-flash[data-show="true"] .fc-flash__inner { transform: none; }
.fc-flash__big { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; color: var(--fc-lime); line-height: 1; }
.fc-flash__sub { font-size: .9rem; color: var(--fc-muted); margin-top: 6px; }

/* ============================================================ side panel === */
.fc-panel { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ================================================================= meter === */
.fc-meter {
  background: var(--fc-surface); border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius); padding: var(--sp-3);
}
.fc-meter__row { display: grid; grid-template-columns: 52px 1fr 62px; gap: 9px; align-items: center; margin-bottom: 9px; }
.fc-meter__lab { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fc-muted); }
.fc-meter__val { font-size: .8rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.fc-meter__track {
  position: relative; height: 15px; border-radius: 999px;
  background: var(--fc-bg); border: 1px solid var(--fc-line-2); overflow: hidden;
}
.fc-meter__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #4B7A0E 0%, var(--fc-lime) 74%, var(--fc-orange) 100%);
}
/* the "aim for here" marker on the power bar */
.fc-meter__ideal {
  position: absolute; top: -2px; bottom: -2px; left: 92%; width: 2px;
  background: rgba(250,250,250,.55);
}
.fc-meter__track--strike { background: linear-gradient(90deg, #6E2B12 0%, #123122 46%, #123122 54%, #6E2B12 100%); }
.fc-meter__zone {
  position: absolute; left: 46%; right: 46%; top: 0; bottom: 0;
  background: rgba(162,230,26,.34); border-inline: 1px solid var(--fc-lime);
}
.fc-meter__needle {
  position: absolute; top: -3px; bottom: -3px; left: 50%; width: 3px;
  background: #FAFAFA; border-radius: 2px; transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(250,250,250,.7);
}
.fc-meter__go { width: 100%; margin-top: var(--sp-2); }
.fc-meter__hint { font-size: .76rem; color: var(--fc-muted); margin: 8px 0 0; text-align: center; }
.fc-meter__hint kbd {
  background: var(--fc-bg); border: 1px solid var(--fc-line-2); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; font-size: .72rem; font-family: inherit;
}

/* ============================================================ shot panel === */
.fc-shotpanel {
  background: var(--fc-surface); border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius); padding: var(--sp-3);
}
.fc-shotpanel__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--fc-line); }
@media (min-width: 420px) { .fc-shotpanel__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .fc-shotpanel__grid { grid-template-columns: repeat(5, 1fr); } }
.fc-stat { background: var(--fc-surface); padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; }
.fc-stat__k { font-size: .62rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fc-muted); }
.fc-stat__v { font-size: 1.02rem; font-weight: 700; color: var(--fc-text); font-variant-numeric: tabular-nums; }
.fc-stat__v i { font-style: normal; font-size: .68rem; color: var(--fc-muted); font-weight: 600; margin-left: 1px; }
.fc-stat__v.is-fresh { animation: fc-freshen .5s ease; }
@keyframes fc-freshen { 0% { color: var(--fc-lime); } 100% { color: var(--fc-text); } }

/* ============================================================== controls === */
.fc-controls {
  background: var(--fc-surface); border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius); padding: var(--sp-3);
}
.fc-controls h3 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fc-muted); margin-bottom: var(--sp-2); }
.fc-clubs { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-club {
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  background: var(--fc-bg); border: 1px solid var(--fc-line-2); color: var(--fc-muted);
  font-size: .8rem; font-weight: 700; transition: all .15s ease;
}
.fc-club:hover { color: var(--fc-text); border-color: var(--fc-muted); }
.fc-club[aria-pressed="true"] { background: var(--fc-lime); border-color: var(--fc-lime); color: #071110; }

.fc-scorelist { list-style: none; margin: 0; padding: 0; }
.fc-scorelist li {
  display: flex; justify-content: space-between; gap: var(--sp-2);
  padding: 8px 0; border-bottom: 1px solid var(--fc-line); font-size: .9rem;
}
.fc-scorelist li:last-child { border-bottom: 0; }
.fc-scorelist li[data-active="true"] { color: var(--fc-lime); font-weight: 700; }
.fc-scorelist b { font-variant-numeric: tabular-nums; }

/* ============================================================= game cards === */
.fc-gamecard {
  position: relative; display: flex; flex-direction: column;
  background: var(--fc-surface); border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius); overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.fc-gamecard:hover { transform: translateY(-4px); border-color: var(--fc-lime); box-shadow: var(--fc-shadow-2); color: inherit; }
.fc-gamecard__art { aspect-ratio: 16 / 9; position: relative; overflow: hidden; background: #06110F; }
.fc-gamecard__art canvas, .fc-gamecard__art svg { width: 100%; height: 100%; display: block; }
.fc-gamecard__body { padding: var(--sp-3) var(--sp-4) var(--sp-4); display: flex; flex-direction: column; flex: 1; }
.fc-gamecard__body h3 { margin-bottom: 4px; }
.fc-gamecard__tag { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fc-lime); margin-bottom: 8px; }
.fc-gamecard__body p { color: var(--fc-muted); font-size: .92rem; flex: 1; }
.fc-gamecard__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-3); }
.fc-gamecard__play { font-weight: 700; color: var(--fc-lime); font-size: .9rem; }
.fc-gamecard[data-soon="true"] { opacity: .92; }
.fc-gamecard[data-soon="true"]:hover { transform: none; border-color: var(--fc-line); box-shadow: none; }

.fc-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(6,16,17,.85); border: 1px solid rgba(162,230,26,.45);
  color: var(--fc-lime); border-radius: 999px; padding: 4px 11px;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.fc-badge--plain { border-color: var(--fc-line-2); color: var(--fc-muted); }

/* =============================================================== results === */
.fc-result {
  background: var(--fc-surface-2); border: 1px solid var(--fc-line);
  border-left: 4px solid var(--fc-lime);
  border-radius: var(--fc-radius-sm); padding: var(--sp-3);
}
.fc-result h4 { margin: 0 0 4px; font-size: 1rem; }
.fc-result p { margin: 0; font-size: .88rem; color: var(--fc-muted); }
.fc-result--poor { border-left-color: var(--fc-orange); }

/* AI coach note attached to a shot */
.fc-coach {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(162,230,26,.07); border: 1px solid rgba(162,230,26,.22);
  border-radius: var(--fc-radius-sm); padding: 11px 13px; font-size: .88rem;
}
.fc-coach__icon {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--fc-lime); color: #071110;
  display: grid; place-items: center; font-weight: 800; font-size: .74rem;
}
.fc-coach p { margin: 0; color: var(--fc-text); }
.fc-coach--thinking p { color: var(--fc-muted); font-style: italic; }

/* ======================================================= round summary === */
.fc-summary {
  background: linear-gradient(160deg, var(--fc-surface-2) 0%, var(--fc-surface) 100%);
  border: 1px solid rgba(162,230,26,.28);
  border-radius: var(--fc-radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--fc-shadow-2);
}
.fc-summary__head {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  align-items: center; justify-content: space-between;
  padding-bottom: var(--sp-3); border-bottom: 1px solid var(--fc-line);
}
.fc-summary__head h3 { margin: 0; }
.fc-summary__rings { display: flex; gap: var(--sp-4); }

.fc-ring { position: relative; width: 74px; text-align: center; }
.fc-ring svg { width: 64px; height: 64px; display: block; margin: 0 auto; }
.fc-ring__v {
  position: absolute; top: 20px; left: 0; right: 0;
  font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.fc-ring__l {
  display: block; font-size: .64rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--fc-muted); margin-top: 2px;
}

.fc-summary__stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--fc-line); margin: var(--sp-3) 0; border-radius: var(--fc-radius-sm); overflow: hidden;
}
@media (min-width: 560px) { .fc-summary__stats { grid-template-columns: repeat(4, 1fr); } }
.fc-sumstat { background: var(--fc-surface); padding: 11px 12px; display: flex; flex-direction: column; gap: 1px; }
.fc-sumstat__k { font-size: .62rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fc-muted); }
.fc-sumstat__v { font-size: 1.16rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fc-sumstat__v i { font-style: normal; font-size: .66rem; color: var(--fc-muted); font-weight: 600; }
.fc-sumstat__s { font-size: .7rem; color: var(--fc-muted); }

.fc-summary__tips { display: grid; gap: var(--sp-2); }
.fc-tip {
  background: rgba(162,230,26,.06); border: 1px solid rgba(162,230,26,.18);
  border-left: 3px solid var(--fc-lime);
  border-radius: var(--fc-radius-sm); padding: 11px 14px;
}
.fc-tip h4 { margin: 0 0 3px; font-size: .95rem; color: var(--fc-lime); }
.fc-tip p { margin: 0; font-size: .88rem; color: var(--fc-text); line-height: 1.55; }
.fc-summary__foot { margin: var(--sp-3) 0 0; font-size: .76rem; color: var(--fc-muted); }

/* round-length picker */
.fc-rounds { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===================================================== round card + dots === */
/* The reset button lost its inline styles when the shell was reworked. */
.fc-round #reset { width: 100%; margin-top: var(--sp-3); }

/* One dot per shot/hole — the round visibly builds toward the coach's card. */
.fc-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-2); }
.fc-dots:empty { display: none; }
.fc-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--fc-bg); border: 1px solid var(--fc-line-2);
}
.fc-dot[data-state="done"]   { background: var(--fc-lime); border-color: var(--fc-lime); }
.fc-dot[data-state="active"] { border-color: var(--fc-lime); box-shadow: 0 0 6px rgba(162,230,26,.55); }

/* =========================================================== accordions === */
/* Native <details> — keyboard-operable and focusable for free. Set-and-forget
   controls (difficulty, round length, rules) live here so a first-time player
   sees power/strike and nothing else. */
.fc-acc {
  background: var(--fc-surface); border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius); overflow: hidden;
}
.fc-acc > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 12px var(--sp-3);
  font-size: .78rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fc-muted);
  -webkit-user-select: none; user-select: none;
}
.fc-acc > summary::-webkit-details-marker { display: none; }
.fc-acc > summary::after {
  content: "+"; margin-left: auto; font-size: 1rem; font-weight: 700;
  color: var(--fc-muted); line-height: 1;
}
.fc-acc[open] > summary::after { content: "\2013"; }
.fc-acc > summary:hover { color: var(--fc-text); }
.fc-acc > summary:focus-visible { outline: 2px solid var(--fc-focus); outline-offset: -2px; }
/* the current value, echoed in the summary so a closed panel still informs */
.fc-acc__cur { color: var(--fc-lime); text-transform: none; letter-spacing: 0; margin-left: 2px; }
.fc-acc__body { padding: 0 var(--sp-3) var(--sp-3); }

/* ==================================================== challenge + boards === */
/* A live challenge is a live state — the one legitimate use of the orange. */
.fc-challenge {
  display: flex; align-items: baseline; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap;
  background: var(--fc-surface); border: 1px solid rgba(249,122,31,.38);
  border-left: 4px solid var(--fc-orange);
  border-radius: var(--fc-radius); padding: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.fc-challenge__label {
  font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--fc-orange); white-space: nowrap;
}
.fc-challenge__text { font-size: .92rem; margin: 0; }
.fc-challenge__text b { color: var(--fc-lime); }
.fc-challenge__terms { flex-basis: 100%; font-size: .78rem; color: var(--fc-muted); margin: 0; }

/* Host for the server leaderboard the competition layer mounts. */
.fc-boardhost {
  background: var(--fc-surface); border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius); padding: var(--sp-3);
}

.fc-localnote { font-size: .78rem; margin: 0; }

/* ================================================= summary actions/rank === */
.fc-summary__rank { margin: var(--sp-3) 0 0; font-size: .92rem; font-weight: 700; color: var(--fc-lime); }
.fc-summary__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }

/* ================================================== putt final scorecard === */
/* End-of-round card for the two mini-golf games: every player, every hole.
   Wide with 8 players — it scrolls inside its own wrapper, never the page. */
.fc-scorecard-wrap { overflow-x: auto; margin-top: var(--sp-3); }
.fc-scorecard {
  width: 100%; border-collapse: collapse;
  font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.fc-scorecard th, .fc-scorecard td {
  padding: 7px 10px; text-align: center; border-bottom: 1px solid var(--fc-line);
}
.fc-scorecard th {
  font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fc-muted);
}
.fc-scorecard th:first-child, .fc-scorecard td:first-child { text-align: left; }
.fc-scorecard tr[data-win="true"] td { color: var(--fc-lime); font-weight: 700; }
.fc-scorecard td.is-under { color: var(--fc-lime); }
.fc-scorecard td.is-over  { color: var(--fc-orange); }
