/* boardgames.css — BoardGames on top of the shared product skin.
 *
 * Every BoardGames page loads the featureboard.ai product-front-door stack
 * first (/products/story.css, family.css, /mobile.css, story-mobile.css), the
 * same skin /featureboard/, /nativecad/ and /slopradar/ use, then this file.
 * Only BoardGames-specific components live here; layout, type, buttons,
 * cards, stats, chapters and the reveal motion all come from story.css.
 *
 * Accent: purple, the one hue the product family does not use yet
 * (FeatureBoard and SlopRadar are cyan, NativeCAD is blue). #c678dd is the
 * site's existing --purple token; the light-theme value is darkened so text
 * in the accent keeps >= 4.5:1 on white (5.9:1; the dark value is 6.4:1 on
 * the dark paper).
 */
:root { --accent: #c678dd; --on-accent: #1a0b21; --story-top: 80px; }
html[data-theme="light"] { --accent: #8e44ad; --on-accent: #ffffff; }

/* ---- hero art motion ---------------------------------------------------- */
/* story.css animates the strokes of every shape inside .hero-art (the draw-in),
   so movement goes on wrapping <g> elements, never on the shapes themselves. */
.hero-art .bg-mover { animation: bg-move 10s var(--ease) infinite; }
@keyframes bg-move {
  0%, 10%  { transform: translate(0, 0); }
  20%, 30% { transform: translate(59px, 0); }
  40%, 50% { transform: translate(118px, 0); }
  60%, 70% { transform: translate(177px, 0); }
  80%, 100% { transform: translate(236px, 0); }
}
.hero-art .bg-chip { animation: bg-chip 3.2s var(--ease-out) infinite; }
@keyframes bg-chip { 0% { transform: translateY(-40px); opacity: 0; } 20% { opacity: 1; } 55%, 100% { transform: none; opacity: 1; } }
.hero-art .bg-lit { fill: var(--glow); stroke: none; opacity: 0; animation: bg-lit 10s var(--ease) infinite; }
.hero-art .bg-lit.l2 { animation-delay: 2s; } .hero-art .bg-lit.l3 { animation-delay: 4s; } .hero-art .bg-lit.l4 { animation-delay: 6s; }
@keyframes bg-lit { 0%, 8% { opacity: 0; } 14%, 100% { opacity: 1; } }
.hero-art .bg-rocket { animation: bg-float 6s ease-in-out infinite; }
@keyframes bg-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6px, -8px); } }
/* the front-door board fills its top-left with the vote chips, so its two
   pills sit under the board instead of the skin's default corners */
.bg-home-art .tag.t1 { left: 2%; top: auto; bottom: 1%; }
.bg-home-art .tag.t2 { right: 2%; bottom: 1%; }
@media (prefers-reduced-motion: reduce) {
  .hero-art .bg-mover { transform: translate(236px, 0); }
  .hero-art .bg-chip { transform: none; opacity: 1; }
  .hero-art .bg-lit { opacity: 1; }
}

/* ---- small type ------------------------------------------------------------ */
.bg-note { font: 600 .68rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); vertical-align: middle; white-space: nowrap; }
.bg-fine { font-size: .8rem !important; color: var(--muted); }
.bg-ref { font-size: .7rem; white-space: nowrap; }

/* ---- stage + status pills ---------------------------------------------- */
.bg-stage { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 700 .64rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.bg-stage.is-building { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--glow); }
.bg-stage.is-building::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.bg-stage.is-next { color: var(--ink); }
.bg-stage.is-requested { border-style: dashed; }
.bg-status { font: 700 .62rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.bg-status.is-design { color: var(--muted); }

/* ---- game cards (front door) --------------------------------------------- */
.bg-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bg-game-ico { font-size: 1.7rem; line-height: 1; }
.bg-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 600 .74rem/1.4 var(--mono); color: var(--muted); }
.bg-facts b { color: var(--ink); }
.bg-ask-card { border-style: dashed; background: none; }

/* ---- roadmap rows + the vote control ------------------------------------ */
.bg-roadmap { grid-template-columns: 1fr !important; }
.bg-feature { flex-direction: row; align-items: center; gap: 18px; padding: 18px 20px; }
.bg-feature:hover { transform: none; }
.bg-feature-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bg-feature h3 { font-size: 1.04rem; }
.bg-feature p { flex: none; }
.bg-feature-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bg-community { font-size: .72rem; color: var(--muted); }
.bg-feature-game { background: linear-gradient(160deg, var(--glow), var(--paper) 70%); }

.bg-vote { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--paper);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.bg-vote.has-votes { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.bg-vote-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--wash); color: var(--ink);
  font: 700 1.15rem/1 var(--sans); transition: background .15s var(--ease), color .15s var(--ease); }
.bg-vote-btn:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); }
.bg-vote-btn:disabled { opacity: .35; cursor: not-allowed; }
.bg-vote-n { min-width: 2.6ch; text-align: center; font: 700 1rem/1 var(--mono); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .bg-feature { flex-direction: column; align-items: stretch; }
  .bg-feature .bg-vote { align-self: flex-start; }
  .bg-vote-btn { width: 44px; height: 44px; }
}

/* ---- wallet: summary block + floating pill -------------------------------- */
.bg-wallet-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 18px 0 10px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--wash); max-width: 340px; }
.bg-wallet-sum b { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.bg-wallet-sum div:first-child b { color: var(--accent); }
.bg-wallet-sum div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 8px; }
.bg-wallet-sum div:last-child b { font-size: .95rem; }
.bg-wallet-sum span { font-size: .74rem; color: var(--muted); }

.bg-pill { position: fixed; right: 18px; bottom: 18px; z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--ink); text-decoration: none; font-size: .86rem;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .6); transition: transform .2s var(--ease); }
.bg-pill:hover { transform: translateY(-2px); }
.bg-pill b { color: var(--accent); font-variant-numeric: tabular-nums; }
.bg-pill-ico { font-size: 1rem; }
.bg-pill-tag { font: 700 .58rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; }
.bg-pill.is-empty { background: color-mix(in srgb, var(--accent) 22%, var(--paper)); }
@media (max-width: 560px) {
  .bg-pill { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); justify-content: center; }
  body.bg-has-pill { padding-bottom: 76px; }
}

/* ---- shipped list ------------------------------------------------------- */
.bg-shipped { list-style: none; padding: 0; }
.bg-shipped li { flex-direction: row; align-items: flex-start; gap: 12px; padding: 16px 18px; }
.bg-shipped li:hover { transform: none; }
.bg-shipped li p { color: var(--ink); font-size: .93rem; }
.bg-tick { color: var(--accent); font-weight: 800; line-height: 1.5; }

/* ---- utility pages (votes, request) -------------------------------------- */
.bg-pagehead { position: relative; padding: 52px 0 12px; overflow: hidden; isolation: isolate; }
.bg-pagehead::after { content: ''; position: absolute; z-index: -1; width: 48vmax; height: 48vmax; right: -20vmax; top: -24vmax;
  border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 62%); filter: blur(20px); pointer-events: none; }
.bg-pagehead h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1; letter-spacing: -.035em; font-weight: 800; margin: 0 0 16px; text-wrap: balance; }
.bg-pagehead h1 em { font-style: normal; color: var(--accent); }
.bg-notice { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px;
  padding: 12px 14px; background: var(--wash); font-size: .9rem; color: var(--muted); max-width: 760px; margin-top: 18px; }
.bg-notice b { color: var(--ink); }
.bg-panel { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--paper); }
.bg-panel h2 { font-size: 1.2rem; letter-spacing: -.015em; margin-bottom: 6px; }
.bg-panel > p { color: var(--muted); font-size: .93rem; }
.bg-split { display: grid; gap: 16px; margin-top: 26px; }
@media (min-width: 900px) { .bg-split { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.bg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.bg-bar-row { display: grid; gap: 6px; margin: 14px 0; }
.bg-bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: .93rem; }
.bg-bar-label a { color: var(--ink); font-weight: 700; text-decoration: none; }
.bg-bar-label a:hover { color: var(--accent); }
.bg-bar-label span { color: var(--muted); }
.bg-bar-label b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bg-bar { height: 10px; border-radius: 999px; background: var(--wash); border: 1px solid var(--line); overflow: hidden; }
.bg-bar i { display: block; height: 100%; width: var(--pct, 0%); background: var(--accent); transition: width .5s var(--ease-out); }

.bg-alloc-game { margin-top: 18px; }
.bg-alloc-game h3 { font-size: 1rem; margin-bottom: 6px; }
.bg-alloc-game h3 a { color: var(--ink); text-decoration: none; }
.bg-alloc-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }

.bg-empty { border: 1px dashed var(--line); border-radius: 16px; padding: 22px; color: var(--muted); font-size: .93rem; }
.bg-empty b { color: var(--ink); display: block; margin-bottom: 4px; font-size: 1rem; }
.bg-empty .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.bg-list { margin: 10px 0 0; padding-left: 1.1em; color: var(--muted); font-size: .93rem; }
.bg-list li { margin: 6px 0; }
.bg-list b { color: var(--ink); }

/* ---- request form ------------------------------------------------------- */
.bg-form { display: grid; gap: 16px; margin-top: 14px; }
.bg-field { display: grid; gap: 6px; }
.bg-field label { font-weight: 700; font-size: .92rem; color: var(--ink); }
.bg-field .hint { font-size: .78rem; color: var(--muted); }
.bg-field input, .bg-field select, .bg-field textarea {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; width: 100%; }
.bg-field textarea { min-height: 112px; resize: vertical; }
.bg-field :is(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.bg-req { color: var(--accent); }
.bg-done { border: 1px solid var(--accent); border-radius: 14px; padding: 16px; background: var(--glow); margin-top: 16px; }
.bg-done:focus { outline: none; }
.bg-done p { color: var(--ink); font-size: .93rem; margin-bottom: 10px; }
.bg-done textarea { width: 100%; min-height: 170px; font: .78rem/1.5 var(--mono); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }

/* ---- FAQ ------------------------------------------------------------------ */
.bg-faq details { border-top: 1px solid var(--line); padding: 14px 2px; }
.bg-faq details:last-child { border-bottom: 1px solid var(--line); }
.bg-faq summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none;
  display: flex; justify-content: space-between; gap: 14px; }
.bg-faq summary::-webkit-details-marker { display: none; }
.bg-faq summary::after { content: '+'; color: var(--accent); font-family: var(--mono); font-weight: 700; }
.bg-faq details[open] summary::after { content: '−'; }
.bg-faq details p { margin-top: 8px; color: var(--muted); font-size: .95rem; max-width: 70ch; }

/* ---- cycle countdown (BF-115) --------------------------------------------- */
.bg-countdown { display: grid; gap: 8px; margin-top: 20px; max-width: 560px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 14px; background: var(--wash); font-size: .9rem; color: var(--muted); }
.bg-countdown b { color: var(--ink); }
.bg-cd-head { font: 700 .66rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.bg-cd-units { display: flex; gap: 10px; }
.bg-cd-units > span { display: grid; justify-items: center; min-width: 58px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.bg-cd-units b { font-size: 1.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bg-cd-units i { font: 600 .6rem/1.4 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bg-cd-foot { font-size: .8rem; }
.bg-countdown.is-compact { margin: 16px 0 4px; }
.bg-countdown.is-compact .bg-cd-units b { font-size: 1.25rem; }
.bg-countdown.is-compact .bg-cd-units > span { min-width: 48px; padding: 6px 4px; }
@media (max-width: 420px) { .bg-cd-units { gap: 6px; } .bg-cd-units > span { min-width: 0; flex: 1; } }

/* ---- account + live wallet (BF-116) --------------------------------------- */
.bg-sync { font-size: .78rem; color: var(--muted); min-height: 1.2em; margin: 4px 0 0; }
.bg-carry { margin-top: 8px; }
.bg-account-card h2 { overflow-wrap: anywhere; }
.bg-email { color: var(--accent); }
.bg-account { max-width: 620px; margin-top: 22px; }
