/* BackgammonX v1.0.0 — 25-v1-progress.css (new in v1.0.0)
   Owns: the look of My Progress — the Achievements section and the large view of a badge (js/40), the badges line of the winner
   card, the winner certificate dialog (js/41), Players on This Device, the Winner Archive & Career Stats and Data Management
   (js/42), and My Account (js/43).
   v1.0.1: section 5 — the test-facility note (js/39, js/42, js/44), the Guest Play & Accounts section (js/44) and the guest's note
   in the recovery list (js/34). Still presentation only.

   PRESENTATION ONLY and override-only: it sits after css/01–24 and edits none of them; it touches no board, checker, rail,
   hit-target or dice selector. Its values are the X-family ones of css/16 and css/22 (--x-* tokens), so both appearances and
   every colourway follow. */

:root { --bgx-css-25: 1; }

/* ═══ 1. Achievements ═══════════════════════════════════════════════════════════════════════════════════════════════ */
.bgx-badges { padding: 12px 16px 18px; }
.bgx-badges-intro,
.bgx-badges-note,
.bgx-badges-foot { margin: 0 0 12px; color: var(--x-text-dim); font-size: 14px; line-height: 1.5; }
.bgx-badges-note { padding: 10px 12px; border: 1px dashed var(--x-gold-dim); border-radius: var(--x-radius-sm); }
.bgx-badges-foot { margin: 14px 0 0; font-size: 13px; color: var(--x-text-faint); }
.bgx-badges-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.bgx-badges-picker { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--x-text); }
.bgx-badges-select { min-height: 44px; padding: 6px 10px; border: 1px solid var(--x-line); border-radius: var(--x-radius-sm); background: var(--x-panel-2); color: var(--x-text); font: inherit; }
.bgx-badges-summary { color: var(--x-gold-bright); font-size: 14px; }
.bgx-badge-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.bgx-badge-cat {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--x-line);
  border-radius: 22px;
  background: var(--x-panel-2);
  color: var(--x-text-dim);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bgx-badge-cat[aria-pressed="true"] { background: var(--x-gold); border-color: var(--x-gold); color: #10130e; }
.bgx-badge-cat:focus-visible { outline: 3px solid var(--x-focus); outline-offset: 2px; }
.bgx-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bgx-badge-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius);
  background: var(--x-panel-2);
  color: var(--x-text);
}
.bgx-badge-card[data-state="earned"] { border-color: var(--x-gold); box-shadow: 0 0 0 1px var(--x-gold-dim) inset; }
.bgx-badge-art { display: block; width: 84px; height: 84px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.bgx-badge-art:focus-visible { outline: 3px solid var(--x-focus); outline-offset: 3px; }
.bgx-badge-img { display: block; width: 84px; height: 84px; object-fit: contain; }
.bgx-badge-card:not([data-state="earned"]) .bgx-badge-img { filter: grayscale(0.85) brightness(0.62); }
.bgx-badge-body { min-width: 0; }
.bgx-badge-name { display: block; font-size: 16px; line-height: 1.3; color: var(--x-gold-bright); }
.bgx-badge-tag { margin: 2px 0 6px; font: italic 14px/1.4 var(--x-font-serif); color: var(--x-text-dim); }
.bgx-badge-how { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--x-text-faint); }
.bgx-badge-status { display: inline-block; font-size: 13px; font-weight: 600; color: var(--x-text-dim); }
.bgx-badge-card[data-state="earned"] .bgx-badge-status { color: var(--x-gold-bright); }
.bgx-badge-progress { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--x-panel-3); overflow: hidden; }
.bgx-badge-progress-fill { display: block; height: 100%; border-radius: 3px; background: var(--x-gold); }
.bgx-badge-big { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: 18px; align-items: center; }
.bgx-badge-big-img { display: block; width: 100%; max-width: 260px; height: auto; }
.bgx-badge-big-tag { margin: 0 0 10px; font: italic 18px/1.4 var(--x-font-serif); color: var(--x-gold-bright); }
.bgx-badge-big-how,
.bgx-badge-big-status { margin: 0 0 10px; line-height: 1.5; }
@media (max-width: 560px) { .bgx-badge-big { grid-template-columns: 1fr; justify-items: center; text-align: center; } .bgx-badge-big-img { max-width: 200px; } }

/* the badges line of the winner card */
.bgx-winner-badges { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--x-gold-dim); border-radius: var(--x-radius-sm); }
.bgx-winner-badges-title { margin: 0 0 8px; font-weight: 700; color: var(--x-gold-bright); }
.bgx-winner-badges-row { display: flex; flex-wrap: wrap; gap: 10px; }
.bgx-winner-badge { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 104px; min-height: 44px; padding: 6px; border: 1px solid transparent; border-radius: var(--x-radius-sm); background: none; color: var(--x-text); font: inherit; cursor: pointer; }
.bgx-winner-badge:hover { border-color: var(--x-gold-dim); }
.bgx-winner-badge:focus-visible { outline: 3px solid var(--x-focus); outline-offset: 2px; }
.bgx-winner-badge-img { width: 64px; height: 64px; object-fit: contain; }
.bgx-winner-badge-name { font-size: 12.5px; font-weight: 700; text-align: center; color: var(--x-gold-bright); }
.bgx-winner-badge-who { font-size: 12px; color: var(--x-text-faint); text-align: center; }

/* ═══ 2. The winner certificate ═══════════════════════════════════════════════════════════════════════════════════ */
.bgx-cert-dialog.bgx-ui-dialog { max-width: min(1040px, calc(100vw - 24px)); }
.bgx-cert-holder { max-height: min(70vh, 900px); overflow: auto; padding: 4px; border: 1px solid var(--x-line); border-radius: var(--x-radius-sm); background: #05070d; }
.bgx-cert-img { display: block; width: 100%; height: auto; }
.bgx-cert-status { margin: 8px 4px 4px; font-size: 13px; color: var(--x-text-faint); }
html[data-appearance="light"] .bgx-cert-holder { background: #1d1a15; }
/* v1.0.5 — the game's statistics inside the certificate dialog (js/41): Show / Hide under the picture, then every figure of Game
   Stats & Report, the cube's events and the moves; the picture stays above (a little shorter while they are shown) and the dialog
   scrolls as a whole */
.bgx-cert-holder.bgx-cert-holder-compact { max-height: min(42vh, 520px); }
.bgx-cert-stats-toggle-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.bgx-cert-stats-toggle, .bgx-cert-stats-copy { min-height: 44px; }
.bgx-cert-stats[hidden], .bgx-cert-stats-text[hidden] { display: none; }
.bgx-cert-stats { margin: 12px 0 0; padding: 12px; border: 1px solid var(--x-line); border-radius: var(--x-radius-sm); background: var(--x-panel-2); }
.bgx-cert-stats-title { margin: 0 0 6px; font-family: var(--x-font-serif); font-size: calc(1.0625rem * var(--text-scale, 1)); font-weight: 700; color: var(--x-gold-bright); }
.bgx-cert-stats-title:focus { outline: none; }
.bgx-cert-stats-title:focus-visible { outline: 2px solid var(--x-focus); outline-offset: 2px; }
.bgx-cert-stats-note, .bgx-cert-stats-missing, .bgx-cert-stats-none { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.bgx-cert-stats-sub { margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--text); }
.bgx-cert-stats-scroll { overflow-x: auto; }
.bgx-cert-stats-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.bgx-cert-stats-caption { caption-side: top; text-align: left; padding: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.bgx-cert-stats-table th, .bgx-cert-stats-table td { padding: 6px 8px; border-bottom: 1px solid var(--x-line-soft); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.bgx-cert-stats-table thead th { color: var(--x-gold-bright); font-weight: 700; }
.bgx-cert-stats-table tbody th { font-weight: 500; color: var(--text-muted); }
.bgx-cert-stats-table td { text-align: right; color: var(--text); }
.bgx-cert-stats-cube { margin: 0 0 8px; padding-left: 20px; font-size: 14px; }
.bgx-cert-stats-moves summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--text); }
.bgx-cert-stats-moves summary:focus-visible { outline: 2px solid var(--x-focus); outline-offset: 2px; }
.bgx-cert-stats-movelist { margin: 4px 0 8px; padding-left: 22px; font-size: 13px; line-height: 1.5; }
.bgx-cert-stats-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.bgx-cert-stats-text { width: 100%; margin: 8px 0 0; box-sizing: border-box; }
@media (max-width: 520px) {
  .bgx-cert-stats { padding: 10px 8px; }
  .bgx-cert-stats-table { font-size: 13px; }
  .bgx-cert-stats-table th, .bgx-cert-stats-table td { padding: 5px 4px; }
}
html[data-appearance="light"] .bgx-cert-stats-title,
html[data-appearance="light"] .bgx-cert-stats-table thead th { color: #6b4a00; }

/* ═══ 3. Players on This Device: "Who is playing?" in Players / Seats, and the three My Progress sections (js/42) ════ */
.bgx-seat-chooser { margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid rgba(232, 196, 123, 0.18); }
.bgx-seat-chooser-title { margin: 0 0 8px; font-weight: 700; font-size: 14px; letter-spacing: 0.03em; color: #e8c47b; }
.bgx-seat-pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0 0 8px; }
.bgx-seat-pick-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cdbf9f; }
.bgx-seat-dot { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.55); background: var(--bgx-p1-mid, #4a90d9); }
.bgx-seat-pick[data-side="P2"] .bgx-seat-dot { background: var(--bgx-p2-mid, #c0392b); }
.bgx-seat-select { width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid #705434; border-radius: 8px; background: #1c1712; color: #f4ead2; font: inherit; font-size: 15px; }
.bgx-seat-select:disabled { opacity: 0.6; cursor: not-allowed; }
.bgx-seat-select:focus-visible { outline: 3px solid #f6cd65; outline-offset: 2px; }
.bgx-seat-lock { margin: 2px 0 6px; font-size: 12.5px; font-weight: 600; color: #f0c674; }
.bgx-seat-note { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: #b9ab8c; }
html[data-appearance="light"] .bgx-seat-chooser-title { color: var(--x-gold-bright); }
html[data-appearance="light"] .bgx-seat-pick-label,
html[data-appearance="light"] .bgx-seat-note { color: var(--x-text-dim); }
html[data-appearance="light"] .bgx-seat-select { background: var(--x-panel-2); color: var(--x-text); border-color: var(--x-line); }

.bgx-progress { padding: 12px 16px 18px; }
.bgx-progress-intro,
.bgx-progress-note,
.bgx-progress-foot { margin: 0 0 12px; color: var(--x-text-dim); font-size: 14px; line-height: 1.5; }
.bgx-progress-note { font-size: 13px; color: var(--x-text-faint); }
.bgx-progress-foot { margin: 14px 0 0; font-size: 13px; color: var(--x-text-faint); }
.bgx-progress-empty { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--x-gold-dim); border-radius: var(--x-radius-sm); color: var(--x-text-dim); font-size: 14px; line-height: 1.5; }
.bgx-progress-status { margin: 10px 0 0; min-height: 1.4em; font-size: 13.5px; color: var(--x-gold-bright); }
.bgx-progress-status:empty { min-height: 0; margin: 0; }
.bgx-progress-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.bgx-progress-actions .bgx-btn { min-height: 44px; }
.bgx-progress-h { margin: 16px 0 8px; font-size: 15px; color: var(--x-gold-bright); }
.bgx-progress-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.bgx-progress-picker { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--x-text); }
.bgx-progress-select { min-height: 44px; padding: 6px 10px; border: 1px solid var(--x-line); border-radius: var(--x-radius-sm); background: var(--x-panel-2); color: var(--x-text); font: inherit; }
.bgx-profile-list { display: grid; gap: 8px; margin: 0 0 12px; }
.bgx-profile-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--x-line); border-radius: var(--x-radius-sm); background: var(--x-panel-2); }
.bgx-profile-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bgx-profile-name { font-size: 16px; color: var(--x-gold-bright); overflow-wrap: anywhere; }
.bgx-profile-figures { font-size: 13.5px; color: var(--x-text-dim); }
.bgx-profile-seat { font-size: 12.5px; color: var(--x-text-faint); }
.bgx-profile-actions { display: flex; gap: 4px; }
.bgx-profile-actions .bgx-btn { min-height: 44px; }
.bgx-career-table,
.bgx-h2h-table { width: 100%; max-width: 560px; border-collapse: collapse; font-size: 14px; }
.bgx-career-table th,
.bgx-career-table td,
.bgx-h2h-table th,
.bgx-h2h-table td { padding: 6px 8px; border-bottom: 1px solid var(--x-line); text-align: left; }
.bgx-career-table td,
.bgx-h2h-table td { color: var(--x-text); font-variant-numeric: tabular-nums; }
.bgx-career-table th { width: 60%; font-weight: 500; color: var(--x-text-dim); }
.bgx-h2h-table th { font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--x-text-faint); }
.bgx-games-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bgx-games-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 12px; border: 1px solid var(--x-line); border-left: 4px solid var(--x-line); border-radius: var(--x-radius-sm); background: var(--x-panel-2); }
.bgx-games-item[data-won="true"] { border-left-color: var(--x-gold); }
.bgx-games-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bgx-games-result { font-size: 14.5px; color: var(--x-text); overflow-wrap: anywhere; }
.bgx-games-meta { font-size: 12.5px; color: var(--x-text-faint); }
.bgx-games-item .bgx-btn { min-height: 44px; }

/* ═══ 4. My Account (js/43) ═══════════════════════════════════════════════════════════════════════════════════════ */
.bgx-account-lead { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--x-gold-bright); overflow-wrap: anywhere; }
.bgx-account-form { display: grid; gap: 4px; }
.bgx-account-intro { margin: 0 0 10px; color: var(--x-text-dim); font-size: 14px; line-height: 1.5; }
.bgx-account-field { margin: 0 0 8px; }
.bgx-account-field .bgx-ui-input { width: 100%; min-height: 44px; box-sizing: border-box; }
.bgx-account-password { display: flex; align-items: center; gap: 6px; }
.bgx-account-password .bgx-ui-input { flex: 1 1 auto; min-width: 0; }
.bgx-account-show { flex: none; min-height: 44px; }
.bgx-account-hint { margin: 4px 0 0; font-size: 12.5px; color: var(--x-text-faint); }
.bgx-account-captcha { min-height: 70px; margin: 4px 0; }
.bgx-account-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; }
.bgx-account-links .bgx-btn { min-height: 44px; padding-left: 0; padding-right: 0; }
.bgx-account-saves { display: grid; gap: 8px; max-height: min(60vh, 520px); overflow: auto; }
.bgx-account-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border: 1px solid var(--x-line); border-radius: var(--x-radius-sm); background: var(--x-panel-2); }
.bgx-account-save .bgx-games-text { flex: 1 1 200px; }
.bgx-account-save .bgx-btn { min-height: 44px; }

/* ═══ 5. v1.0.1: the guest / account boundary ═══════════════════════════════════════════════════════════════════════
   The test-facility note says plainly that a local facility is not an account; it uses the dashed gold frame the other notes
   of these sections use, with a solid gold rule on the left so that it reads as a notice. */
.bgx-facility-note { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--x-gold-dim); border-left: 3px solid var(--x-gold); border-radius: var(--x-radius-sm); color: var(--x-text-dim); font-size: 13.5px; line-height: 1.5; }
.bgx-facility-note[hidden] { display: none; }
.bgx-boundary { padding: 12px 16px 18px; }
.bgx-boundary .bgx-progress-h:first-child { margin-top: 0; }
.bgx-boundary-list { margin: 0 0 12px; padding-left: 20px; color: var(--x-text-dim); font-size: 14px; line-height: 1.5; }
.bgx-boundary-list li { margin: 0 0 6px; }
.bgx-saved-guest { color: var(--x-text-dim); }
html[data-appearance="light"] .bgx-facility-note { border-color: var(--x-line); border-left-color: var(--x-gold); color: var(--x-text-dim); }
