/* Face-off pages — match cards, fan tug-of-war, dashboard, contest, banter. */
:root {
  --fo-a: #d9581f;
  --fo-a-soft: #fbe3d6;
  --fo-b: #2453a6;
  --fo-b-soft: #dce6f7;
  --fo-draw: #9a8f7f;
}

.fo-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.fo-note { color: var(--text-soft); margin: 4px 0 14px; }
.fo-empty { text-align: center; padding: 40px 0; }
.fo-a-ink { color: var(--fo-a); }
.fo-b-ink { color: var(--fo-b); }
.small { font-size: 13px; }

/* ---------- List ---------- */
.fo-hero { text-align: center; padding: 32px 16px 20px; }
.fo-hero h1 { font-family: Fraunces, serif; font-size: clamp(26px, 4vw, 40px); margin: 6px 0; }
.fo-hero p { color: var(--text-soft); margin: 0 0 14px; }
.fo-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); max-width: 1100px; margin: 0 auto 40px; padding: 0 12px; }
.fo-card { display: block; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.fo-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); text-decoration: none; }
.fo-card.is-settled { opacity: .8; }
.fo-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.fo-card-title { font-weight: 600; color: var(--text-soft); }
.fo-card-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 14px 0 10px; }
.fo-card-player { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.fo-card-player.fo-right { text-align: right; align-items: flex-end; }
.fo-flag { font-size: 26px; line-height: 1; }
.fo-card-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.fo-card-cta { color: var(--accent); font-weight: 600; }
.fo-mini-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--border); }

.fo-pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.fo-pill-live { background: #fde2e2; color: #c0262d; animation: fo-blink 1.6s infinite; }
.fo-pill-done { background: var(--bg-hover); color: var(--text-muted); }
@keyframes fo-blink { 50% { opacity: .55; } }

.fo-vs-badge { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .05em; }
.fo-vs-big { width: 46px; height: 46px; font-size: 15px; margin-top: 8px; }

.fo-side-a { background: var(--fo-a); color: #fff; }
.fo-side-b { background: var(--fo-b); color: #fff; }
.fo-draw { background: var(--fo-draw); color: #fff; }

/* ---------- Detail ---------- */
.fo-page { max-width: 1040px; margin: 0 auto; padding: 0 12px 60px; }
.fo-match { position: relative; margin: 18px 0 0; padding: 20px; border-radius: 18px; color: #fff;
  background: linear-gradient(110deg, var(--fo-a) 0%, #7a2f13 48%, #142e63 52%, var(--fo-b) 100%); }
.fo-match .fo-eyebrow { color: rgba(255,255,255,.8); }
.fo-match-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
body.chesshome-zine .fo-match-title { text-align: center; font-family: Fraunces, serif; font-size: clamp(22px, 3.4vw, 32px); margin: 6px 0 14px; color: #fff; }
.fo-page [hidden] { display: none !important; }
.fo-match-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.fo-player { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.fo-player-flag { font-size: 44px; line-height: 1; }
.fo-player-name { font-size: clamp(18px, 2.6vw, 26px); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.fo-player-rating { font-size: 14px; opacity: .85; }
.fo-match-center { display: flex; flex-direction: column; align-items: center; }
.fo-model-ring { --a: 50; width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; text-align: center; position: relative;
  background: conic-gradient(var(--fo-a-soft) calc(var(--a) * 1%), #c7d6f2 0); }
.fo-model-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: rgba(20, 20, 30, .82); }
.fo-model-ring > span { position: relative; line-height: 1.1; }
.fo-model-ring-a { font-weight: 800; font-size: 20px; color: #ffc6a6; }
.fo-model-ring-b { font-weight: 800; font-size: 20px; color: #b8cdf5; }
.fo-model-ring-k { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.fo-final { text-align: center; margin-top: 12px; font-size: 18px; }
.fo-admin-link { position: absolute; right: 12px; bottom: 10px; color: #fff; }

.fo-form { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 4px; }
.fo-form > span { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.fo-form-W { background: #1f9d55; color: #fff; }
.fo-form-D { background: rgba(255,255,255,.35); color: #fff; }
.fo-form-L { background: #c0262d; color: #fff; }
.fo-section .fo-form-D { background: var(--fo-draw); }

.fo-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; background: var(--bg); }
.fo-tabs { scrollbar-width: none; }
.fo-tabs::-webkit-scrollbar { display: none; }
.fo-tabs a { padding: 7px 14px; border-radius: 99px; background: var(--bg-elev); border: 1px solid var(--border); white-space: nowrap; color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; }
.fo-tabs a:hover { background: var(--accent-soft); }

.fo-section { margin-top: 18px; scroll-margin-top: 60px; }
body.chesshome-zine .fo-section > h2 { font-family: Fraunces, serif; font-size: 24px; margin: 0 0 6px; }
.fo-panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
body.chesshome-zine .fo-panel h3 { margin: 0 0 10px; font-size: 16px; }
.fo-panel h4 { margin: 12px 0 6px; font-size: 14px; }
.fo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.fo-grid > .fo-panel { margin-bottom: 0; }
.fo-grid + .fo-panel, .fo-grid + .fo-grid, .fo-panel + .fo-grid { margin-top: 14px; }
.fo-big { font-size: 18px; margin: 0 0 4px; }

/* Support */
.fo-support { text-align: center; }
.fo-vote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.fo-vote { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: 14px; border: 2px solid transparent; font-size: 18px; font-weight: 800; cursor: pointer; transition: transform .1s; }
.fo-vote:active { transform: scale(.97); }
.fo-vote-a { background: var(--fo-a-soft); color: var(--fo-a); }
.fo-vote-b { background: var(--fo-b-soft); color: var(--fo-b); }
.fo-vote-a.is-mine { background: var(--fo-a); color: #fff; box-shadow: 0 0 0 4px var(--fo-a-soft); }
.fo-vote-b.is-mine { background: var(--fo-b); color: #fff; box-shadow: 0 0 0 4px var(--fo-b-soft); }
.fo-vote-flag { font-size: 28px; }
.fo-tug-bar { display: flex; height: 38px; border-radius: 99px; overflow: hidden; background: var(--border); }
.fo-tug-bar > span { display: flex; align-items: center; transition: width .6s cubic-bezier(.2,.9,.3,1.2); min-width: 44px; }
.fo-tug-bar > .fo-side-a { justify-content: flex-start; padding-left: 14px; }
.fo-tug-bar > .fo-side-b { justify-content: flex-end; padding-right: 14px; }
.fo-tug-counts { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-top: 6px; flex-wrap: wrap; }
.fo-me { margin-top: 12px; font-size: 15px; }
.fo-vs-math { margin-top: 10px; font-weight: 600; color: var(--text-soft); }
.fo-share { display: flex; gap: 8px; max-width: 620px; margin: 12px auto 0; }
.fo-share input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }

.fo-pop { animation: fo-pop .35s ease; }
@keyframes fo-pop { 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.fo-confetti { position: fixed; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; z-index: 1000;
  animation: fo-confetti 1s ease-out forwards; }
.fo-confetti-a { background: var(--fo-a); }
.fo-confetti-a:nth-child(3n) { background: #ffb347; }
.fo-confetti-b { background: var(--fo-b); }
.fo-confetti-b:nth-child(3n) { background: #6fa8ff; }
@keyframes fo-confetti {
  to { transform: translate(var(--dx), calc(var(--dy) + 120px)) rotate(var(--rot)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fo-confetti { display: none; }
  .fo-pop, .fo-pill-live { animation: none; }
}

/* Dashboard */
.fo-wdl { display: flex; height: 34px; border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.fo-wdl-legend { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-soft); margin-bottom: 12px; }
.fo-wdl > span { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; min-width: 0; padding: 0 4px; }
.fo-edges { list-style: none; padding: 0; margin: 0 0 8px; }
.fo-edges li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.fo-edge { font-weight: 700; }
.fo-edge.pos { color: var(--fo-a); }
.fo-edge.neg { color: var(--fo-b); }
.fo-h2h { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-bottom: 12px; }
.fo-h2h strong { display: block; font-size: 34px; font-family: Fraunces, serif; }
.fo-h2h span { font-size: 13px; color: var(--text-muted); }
.fo-table-wrap { overflow-x: auto; }
.fo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fo-table th, .fo-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.fo-res { padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.fo-res-W { background: var(--fo-a-soft); color: var(--fo-a); }
.fo-res-L { background: var(--fo-b-soft); color: var(--fo-b); }
.fo-res-D { background: var(--bg-hover); }
.fo-tape-row { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; gap: 10px; padding: 6px 0; }
.fo-tape-v { font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.fo-tape-row .fo-tape-v:last-child { text-align: right; }
.fo-tape-v.lead { color: var(--text); font-weight: 800; }
.fo-tape-label { display: block; text-align: center; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.fo-tape-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--border); }
.fo-open { margin-bottom: 12px; }
.fo-open-head { display: flex; justify-content: space-between; }
.fo-open-bar { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 4px 0; }
.fo-open-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--fo-a), var(--fo-b)); }
.fo-rep { list-style: none; padding: 0; margin: 0; }
.fo-rep li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 14px; }

/* Contest */
.fo-pick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); margin-bottom: 14px; }
.fo-pick[inert] { opacity: .6; }
.fo-pick-group { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 0; background: var(--bg-elev); display: flex; flex-direction: column; gap: 8px; }
.fo-pick-group legend { font-weight: 700; padding: 0 4px; }
.fo-pick-group input[type=number], .fo-pick-group select { width: 100%; max-width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.fo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fo-chip { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--border); cursor: pointer; background: var(--bg); font-weight: 600; }
.fo-chip:has(input:checked) { background: var(--accent); color: #fff; border-color: var(--accent); }
.fo-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fo-captain { font-size: 13px; color: var(--text-muted); display: inline-flex; gap: 6px; align-items: center; }
.fo-captain:has(input:checked) { color: #b7791f; font-weight: 700; }
.fo-pick-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.fo-pick-msg.ok { color: #1f9d55; font-weight: 600; }
.fo-pick-msg.err { color: #c0262d; }
.fo-contrarian { font-weight: 600; color: #b7791f; }
.fo-board-me { font-weight: 700; }
.fo-board-list { padding-left: 22px; margin: 0; }
.fo-board-list li { padding: 4px 0; }
.fo-board-list li > span, .fo-board-list li > strong { display: inline-block; }
.fo-board-list li > strong { float: right; }

/* Banter */
.fo-prompts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fo-prompt { padding: 6px 11px; border-radius: 99px; border: 1px dashed var(--border-strong); background: transparent; cursor: pointer; font-size: 13px; color: var(--text-soft); }
.fo-prompt:hover { background: var(--accent-soft); }
.fo-comment-form textarea, .fo-reply-form textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); font: inherit; resize: vertical; }
.fo-comment-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.fo-filters { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 14px 0 8px; }
.fo-filter { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg-elev); cursor: pointer; font-size: 13px; font-weight: 600; }
.fo-filter.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fo-comments, .fo-replies { list-style: none; padding: 0; margin: 0; }
.fo-replies { margin-top: 6px; }
.fo-comment { display: flex; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-left-width: 4px; }
.fo-comment-a { border-left-color: var(--fo-a); }
.fo-comment-b { border-left-color: var(--fo-b); }
.fo-replies .fo-comment { background: var(--bg); margin-bottom: 4px; }
.fo-comment.fo-new { animation: fo-new 1.6s ease; }
@keyframes fo-new { from { background: #fff4c2; } }
.fo-comment-main { flex: 1; min-width: 0; }
.fo-comment-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fo-comment-body { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fo-comment-actions-row { display: flex; gap: 12px; align-items: center; }
.fo-avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; object-fit: cover; }
.fo-badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.fo-badge-a { background: var(--fo-a-soft); color: var(--fo-a); }
.fo-badge-b { background: var(--fo-b-soft); color: var(--fo-b); }
.fo-badge-n { background: var(--bg-hover); color: var(--text-muted); }
.fo-fire { border: 1px solid var(--border); background: var(--bg); border-radius: 99px; padding: 2px 10px; cursor: pointer; font-size: 13px; }
.fo-fire.is-on { background: #fff1e6; border-color: #f6ad55; color: #c05621; font-weight: 700; }
.fo-reply-form { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; margin: 6px 0; }

/* Admin */
.fo-admin { max-width: 860px; margin: 20px auto 60px; padding: 0 12px; }
.fo-admin-form { display: flex; flex-direction: column; gap: 12px; }
.fo-admin-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.fo-admin-form input, .fo-admin-form select, .fo-admin-form textarea { padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev); font: inherit; font-weight: 400; }
.fo-admin-form textarea { font-family: ui-monospace, monospace; font-size: 12px; }
.fo-admin-form fieldset { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.fo-admin-form label.fo-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.fo-admin-form label.fo-check input { padding: 0; }
.fo-admin-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

@media (max-width: 640px) {
  .fo-page { padding: 0 0 40px; }
  .fo-match { padding: 14px 10px 16px; border-radius: 14px; margin-top: 4px; }
  .fo-match-meta { flex-wrap: wrap; }
  body.chesshome-zine .fo-match-title { font-size: 22px; margin: 6px 0 10px; }
  .fo-match-vs { gap: 6px; }
  .fo-model-ring { width: 84px; height: 84px; }
  .fo-model-ring::before { inset: 7px; }
  .fo-model-ring-a, .fo-model-ring-b { font-size: 14px; }
  .fo-model-ring-k { font-size: 8px; }
  .fo-vs-big { width: 32px; height: 32px; font-size: 11px; margin-top: 6px; }
  .fo-player-flag { font-size: 30px; }
  .fo-player-name { font-size: 16px; }
  .fo-player-rating { font-size: 13px; }
  .fo-form { max-width: 110px; }
  .fo-form > span { width: 15px; height: 15px; font-size: 9px; border-radius: 3px; }
  .fo-admin-link { position: static; display: block; text-align: center; margin-top: 8px; }

  .fo-tabs { position: static; margin: 0 -2px; }
  .fo-tabs a { padding: 6px 12px; font-size: 13px; }

  .fo-vote { flex-direction: column; gap: 4px; font-size: 15px; padding: 12px 8px; line-height: 1.2; }
  .fo-vote-flag { font-size: 26px; }
  .fo-tug-bar { height: 32px; }
  .fo-tug-counts { display: grid; grid-template-columns: 1fr 1fr; }
  .fo-tug-counts > span:last-child { text-align: right; }
  .fo-tug-counts > .muted { grid-column: 1 / -1; grid-row: 2; text-align: center; }
  .fo-share { flex-direction: column; }

  .fo-panel { padding: 12px; }
  .fo-h2h strong { font-size: 28px; }
  .fo-tape-row { grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 8px; }
  .fo-rep li { flex-direction: column; gap: 0; }
  .fo-wdl-legend { font-size: 12px; gap: 6px; }
  .fo-wdl-legend span:last-child { text-align: right; }

  .fo-prompts, .fo-filters .fo-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding: 2px; }
  .fo-prompts::-webkit-scrollbar, .fo-filters .fo-chips::-webkit-scrollbar { display: none; }
  .fo-prompt, .fo-filter { flex: none; white-space: nowrap; }
  .fo-filters { flex-direction: column; gap: 6px; }
  .fo-comment { padding: 10px; gap: 8px; }
  .fo-avatar { width: 28px; height: 28px; font-size: 11px; }
}
