body.portal { line-height: 1.6; }
.fc-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.fc-shell { max-width: 860px; margin: 0 auto; padding: 24px 16px 56px; }
.fc-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fc-intro h1 { margin-bottom: 12px; }
.fc-h1-sub { display: block; margin-top: 4px; color: var(--muted); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.fc-intro .lead { margin-bottom: 16px; font-size: 17px; }
.fc-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }

.fc-tool { margin: 22px 0 36px; padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fc-label { display: block; margin: 0 0 8px; color: var(--text); font-size: 15px; font-weight: 750; }
.fc-label span { color: var(--muted); font-weight: 600; }
.fc-row { display: flex; gap: 8px; }
.fc-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fc-row input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fc-row input[aria-invalid="true"] { border-color: #b3261e; }
.fc-solve { flex: none; min-width: 108px; font-size: 16px; }
.fc-quick, .fc-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-quick { margin-top: 12px; }
.fc-chip { min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.fc-chip:hover:not(:disabled) { border-color: var(--accent); }
.fc-chip:disabled { opacity: .45; cursor: default; }
.fc-chip-strong { background: var(--accent); border-color: var(--accent); color: #fff; }
.fc-status { min-height: 1.6em; margin: 12px 0 0; color: var(--text); font-size: 14px; }
.fc-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-soft); }
.fc-progress p { flex: 1; min-width: 12em; margin: 0; color: var(--text); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fc-spinner { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: fc-spin .8s linear infinite; }
@keyframes fc-spin { to { transform: rotate(360deg); } }

.fc-result { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.fc-result:focus { outline: none; }
.fc-result-title { margin: 0 0 8px; font-size: 22px; }
.fc-note { margin: 0 0 12px; font-size: 14px; }
.fc-result-ctas { margin-bottom: 6px; }
.fc-copy-status { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.fc-copy-status:empty { display: none; }

/* The table: eight columns across whatever width the result has. --w is the card width. */
.fc-felt { container-type: inline-size; padding: 8px; border-radius: 14px; background: radial-gradient(130% 100% at 50% 0%, #24805a 0%, #1d6a48 45%, #114431 100%); box-shadow: inset 0 0 0 1px #ffffff14, inset 0 8px 30px #0003; }
.fc-board { --gap: max(3px, 1.4cqw); --w: min(calc((100cqw - 7 * var(--gap)) / 8), 78px); --h: calc(var(--w) * 1.4); --r: calc(var(--w) * .1); display: block; min-height: calc(var(--h) * 4); color: #fff; }
.fc-top, .fc-cols { display: grid; grid-template-columns: repeat(8, var(--w)); justify-content: center; gap: var(--gap); }
.fc-slot { position: relative; display: grid; place-items: center; width: var(--w); height: var(--h); border: 2px solid #ffffff2e; border-radius: var(--r); background: #0000001a; }
.fc-cell { border-style: dashed; background: #00000026; }
.fc-slot > svg { width: 46%; height: 46%; fill: #ffffff38; }
.fc-slot > .fc-card { position: absolute; inset: -2px; }
.fc-from { box-shadow: 0 0 0 2px #ff9f7a; border-radius: var(--r); }
.fc-homed { border-color: #e7c25a; box-shadow: 0 0 0 3px #e7c25a99; }
.fc-cols { margin-top: calc(var(--w) * .18); align-items: start; }
.fc-col { display: flex; flex-direction: column; align-items: center; min-height: var(--h); }
.fc-colnum { margin-bottom: 2px; color: #ffffffb3; font-size: max(10px, calc(var(--w) * .22)); font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.fc-col.fc-from { box-shadow: none; }
.fc-col.fc-from .fc-colnum { color: #ffc4ae; }
.fc-pile { display: flex; flex-direction: column; min-height: var(--h); width: var(--w); border-radius: var(--r); }
.fc-pile:empty { border: 2px solid #ffffff2e; background: #0000001a; }
.fc-pile .fc-card + .fc-card { margin-top: calc(var(--h) * -.74); }

.fc-card { position: relative; display: block; flex: none; width: var(--w); height: var(--h); border-radius: var(--r); background: #fffdf8; box-shadow: 0 1px 2px #0005, 0 0 0 1px #00000026; overflow: hidden; font-family: 'Manrope', system-ui, sans-serif; font-weight: 800; line-height: 1; }
.fc-card.red { color: #c8312b; fill: #c8312b; }
.fc-card.black { color: #1f2430; fill: #1f2430; }
.fc-card .ix { position: absolute; left: calc(var(--w) * .07); top: calc(var(--w) * .04); display: flex; align-items: center; gap: calc(var(--w) * .02); }
.fc-card .ix b { font-size: calc(var(--w) * .32); letter-spacing: -.04em; }
.fc-card .ix svg { width: calc(var(--w) * .27); height: calc(var(--w) * .27); }
.fc-card .mid { position: absolute; left: 0; right: 0; bottom: calc(var(--h) * .08); display: grid; place-items: center; }
.fc-card .mid svg { width: calc(var(--w) * .58); height: calc(var(--w) * .58); }
.fc-card.ace .mid svg { width: calc(var(--w) * .66); height: calc(var(--w) * .66); }
.fc-card.court .mid { grid-template-columns: auto auto; gap: calc(var(--w) * .02); align-items: center; justify-content: center; }
.fc-card.court .mid b { font-size: calc(var(--w) * .5); letter-spacing: -.04em; }
.fc-card.court .mid svg { width: calc(var(--w) * .34); height: calc(var(--w) * .34); }
.fc-card.court { background: linear-gradient(180deg, #fffdf8 52%, #f3ead2 52%); }
.fc-card.fc-moved { box-shadow: 0 0 0 3px #e7c25a, 0 0 12px #e7c25a; }
.fc-board[data-won="true"] .fc-found { border-color: #e7c25a; }

.fc-caption { min-height: 3.2em; margin: 10px 0; color: var(--text); font-size: 15px; font-weight: 600; }
.fc-controls { margin-bottom: 14px; }
.fc-controls { display: grid; grid-template-columns: auto 1fr 1fr 1fr auto; gap: 6px; max-width: 460px; }
.fc-controls .fc-chip { padding: 8px 10px; white-space: nowrap; }
.fc-moves { display: grid; grid-template-columns: 1fr; gap: 6px; max-height: 26rem; margin: 0; padding: 0 4px 0 0; overflow-y: auto; list-style: none; }
.fc-move { display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 14px; font-weight: 650; text-align: left; cursor: pointer; }
.fc-move[data-done="true"] { color: var(--muted); }
.fc-move[aria-current="step"] { border-color: var(--accent); background: #e2f0e9; }
.fc-move-n { min-width: 26px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fc-move-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.fc-article h2 { margin: 30px 0 12px; font-size: 24px; }
.fc-article li { margin-bottom: 8px; color: var(--muted); }
.fc-article li strong { color: var(--text); }
.fc-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fc-faq summary { color: var(--text); font-weight: 750; cursor: pointer; }
.fc-faq details p { margin: 8px 0 0; }
.fc-cta { margin-top: 32px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.fc-cta h2 { margin-top: 0; }
.fc-cta .text-link { color: var(--accent-strong); }
.fc-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .fc-spinner { animation-duration: 3s; }
}
@media (min-width: 640px) {
  .fc-shell { padding: 36px 24px 64px; }
  .fc-tool { padding: 22px; }
  .fc-felt { padding: 12px; }
  .fc-moves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
