/* Participants' board (لوحة النتائج) — phone first; grows into a centred column on big screens. */

body.board-page { min-height: 100dvh; font-size: 16px; line-height: 1.55; background-attachment: fixed; padding-bottom: env(safe-area-inset-bottom); }

/* ---------- header + tabs ---------- */
.bp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 14px 16px 6px; padding-top: calc(14px + env(safe-area-inset-top)); }
.bp-title { font-size: 34px; }
.bp-title .badge4 { width: 26px; height: 26px; font-size: 15px; margin-top: 10px; }
.bp-logo { width: 56px; height: 56px; flex: none; box-shadow: 0 4px 16px rgba(45,104,177,.12); }

.bp-tabs { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 760px; margin: 0 auto; padding: 8px 16px; background: rgba(237,242,250,.92); backdrop-filter: blur(6px); }
.bp-tabs button { min-height: 46px; border-radius: 999px; border: 2px solid var(--blue); background: var(--white); color: var(--blue); font-weight: 800; font-size: 16px; cursor: pointer; }
.bp-tabs button[aria-selected="true"] { background: var(--blue); color: var(--white); }
.bp-tabs button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.bp-main { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }
.bp-view { display: flex; flex-direction: column; gap: 14px; }

/* ---------- hero ---------- */
.bp-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 10px 0 4px; }
.bp-hero .pill { font-size: 17px; }
.bp-total { display: flex; align-items: center; gap: 14px; background: var(--white); border: 2.5px solid var(--gold); border-radius: 22px; padding: 8px 22px; }
.bp-total b { font-size: 54px; line-height: 1.1; color: var(--gold-deep); font-weight: 800; font-variant-numeric: tabular-nums; }
.bp-total span { display: flex; flex-direction: column; align-items: flex-start; font-weight: 800; font-size: 17px; color: var(--blue); line-height: 1.4; }
.bp-total small { font-size: 14px; color: var(--navy); font-weight: 700; }
.bp-total small:empty { display: none; }
.bp-sub { margin: 0; font-size: 17px; font-weight: 700; color: var(--gold-deep); text-wrap: balance; }

/* ---------- rows ---------- */
.bp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bp-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; background: var(--white); border-radius: 18px; padding: 12px 14px; box-shadow: 0 1px 0 rgba(45,104,177,.08), 0 8px 24px rgba(27,42,74,.05); }
.bp-row.lead { border: 2.5px solid var(--gold); background: linear-gradient(90deg, #fff, var(--gold-soft)); }
.bp-row .rk { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; border: 2px solid var(--line); color: var(--blue); background: var(--white); }
.bp-row .rk.r1 { background: var(--gold); border-color: var(--gold); color: var(--white); }
.bp-row .rk.r2, .bp-row .rk.r3 { border-color: var(--gold); }
.bp-row .bd { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bp-row .nm { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--blue); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-row small { font-size: 13px; font-weight: 700; color: #4A5A78; }
.bp-row .n { font-weight: 800; font-size: 34px; color: var(--navy); font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; line-height: 1.1; }
.bp-row .n small { display: block; font-size: 12px; }

.dots { display: flex; flex-wrap: wrap; gap: 5px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); }
.dots i.on { background: var(--blue); border-color: var(--blue); }
.bp-row.lead .dots i.on { background: var(--gold); border-color: var(--gold); }
.track { display: block; height: 14px; border-radius: 999px; background: var(--sky); overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.bp-row.lead .fill { background: var(--gold); }

/* standings: one cell per activity, on a full-width line under the name */
.cells { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 0; }
.cells div { background: var(--sky-2); border-radius: 10px; padding: 4px 8px; }
.cells dt { font-size: 12px; font-weight: 700; color: #4A5A78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cells dd { margin: 0; font-weight: 800; font-size: 17px; color: var(--navy); font-variant-numeric: tabular-nums; }

/* standings podium: the top three, 2nd and 3rd beside 1st (like the projector) */
.bp-podium { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; }
.bp-pod { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.bp-pod .who { max-width: 100%; font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1.45; color: var(--blue); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: balance; }
.bp-pod.p1 .who { font-size: 17px; }
.bp-pod .pts { display: flex; align-items: baseline; gap: 4px; background: var(--white); border: 2px solid var(--gold); border-radius: 999px; padding: 0 12px; font-weight: 800; font-size: 20px; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-pod .pts small { font-size: 11px; color: var(--gold-deep); }
.bp-pod.p1 .pts { background: var(--gold-soft); }
.bp-pod .block { width: 100%; display: grid; place-items: center; border-radius: 16px 16px 0 0; background: var(--blue); color: var(--white); font-weight: 800; font-size: 40px; line-height: 1; box-shadow: inset 0 -6px 0 rgba(27,42,74,.12); }
.bp-pod.p1 .block { height: 130px; background: var(--gold); font-size: 52px; }
.bp-pod.p2 .block { height: 100px; }
.bp-pod.p3 .block { height: 76px; }
.bp-pod .crown { width: 34px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }

.bp-details { background: var(--white); border-radius: 18px; padding: 4px 12px; box-shadow: 0 1px 0 rgba(45,104,177,.08); }
.bp-details summary { cursor: pointer; padding: 10px 4px; font-weight: 800; font-size: 16px; color: var(--blue); }
.bp-details .bp-list { padding-bottom: 12px; }
.bp-details .bp-row { box-shadow: none; background: var(--sky-2); }

/* every member of the group recited */
.bp-row.full { border: 2.5px solid var(--gold); background: linear-gradient(100deg, var(--gold-soft) 0%, #fff 40%, var(--gold-soft) 60%, #fff 100%); background-size: 250% 100%; animation: bpShimmer 5s linear infinite; }
.bp-row.full .rk { background: var(--gold); border-color: var(--gold); color: var(--white); }
.bp-row.full .dots i.on { background: var(--gold); border-color: var(--gold); }
.bp-row.full .fill { background: var(--gold); }
.bp-row.full small { color: var(--gold-deep); font-weight: 800; }
.bp-row.full .n { color: var(--gold-deep); }
@keyframes bpShimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.bp-honor { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; background: var(--white); border: 2.5px solid var(--gold); border-radius: 18px; padding: 10px 14px; }
.bp-honor b { background: var(--gold); color: var(--white); border-radius: 999px; padding: 0 14px; font-size: 14px; }
.bp-honor span { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--blue); line-height: 1.6; }
.bp-honor small { font-size: 14px; font-weight: 800; color: var(--gold-deep); }
.bp-secret { margin: 0; font-size: 15px; font-weight: 700; color: var(--navy); background: var(--white); border: 2px dashed var(--gold); border-radius: 999px; padding: 4px 16px; }
.bp-secret b { color: var(--gold-deep); }

.bp-quote { margin: 8px 0 0; font-family: var(--font-quote); font-weight: 700; font-size: 26px; color: var(--blue); text-align: center; line-height: 1.8; text-wrap: balance; }
.bp-quote .qm { color: var(--gold); margin: 0 6px; }

.bp-conn { position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); margin: 0; font-size: 14px; font-weight: 700; color: var(--gold-deep); background: var(--white); border: 2px solid var(--gold); border-radius: 999px; padding: 4px 16px; white-space: nowrap; }

@media (min-width: 700px) {
  .bp-title { font-size: 44px; }
  .bp-title .badge4 { width: 32px; height: 32px; font-size: 18px; margin-top: 12px; }
  .bp-logo { width: 72px; height: 72px; }
  .bp-row { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 14px 18px; }
  .bp-row .nm { font-size: 22px; }
  .bp-row .n { font-size: 40px; }
  .dots i { width: 20px; height: 20px; }
  .bp-pod .who { font-size: 19px; }
  .bp-pod.p1 .who { font-size: 22px; }
  .bp-pod .pts { font-size: 24px; }
  .bp-pod.p1 .block { height: 170px; }
  .bp-pod.p2 .block { height: 130px; }
  .bp-pod.p3 .block { height: 100px; }
}
