/* Projector display: a fixed 1920×1080 stage scaled to fit any screen. */

html, body { height: 100%; overflow: hidden; }
body.display { background: #DCE6F3; }
#viewport { position: fixed; inset: 0; overflow: hidden; }

.stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transform-origin: center center;
  overflow: hidden;
  display: flex; flex-direction: column;
  padding: 40px 72px 40px;
}

/* ---------- header ---------- */
.st-head { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 128px; }
.st-title { font-size: 62px; }
.st-title .badge4 { width: 46px; height: 46px; font-size: 26px; margin-top: 10px; }

/* chat screen: five questions need a tighter rhythm */
.split.tight .main { gap: 20px; }
.split.tight .h1 { font-size: 72px; }
.split.tight .sub { font-size: 34px; }
.split.tight .qlist { gap: 12px; }
.split.tight .q { padding: 12px 22px; }
.split.tight .q .n { width: 58px; height: 58px; font-size: 30px; }
.split.tight .q .qt b { font-size: 29px; }
.split.tight .q .qt span { font-size: 26px; line-height: 1.5; }
.st-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.st-center .pill { font-size: 30px; padding: 6px 34px; }
.hour-label { font-size: 22px; font-weight: 700; color: var(--gold-deep); letter-spacing: .01em; }
.st-logo { width: 124px; height: 124px; justify-self: end; box-shadow: 0 6px 24px rgba(45,104,177,.12); }

.st-body { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; }
.st-foot { position: relative; z-index: 1; }
.st-foot:empty { display: none; }

.birds { position: absolute; pointer-events: none; z-index: 0; }

/* ---------- generic screen pieces ---------- */
.scr { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; animation: scrIn .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes scrIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.split { width: 100%; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 72px; align-items: center; animation: scrIn .55s cubic-bezier(.2,.7,.2,1) both; }
.split .main { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.split .side { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.h1 { margin: 0; font-family: var(--font-display); font-weight: 900; color: var(--blue); font-size: 92px; line-height: 1.28; text-wrap: balance; }
.h1.xl { font-size: 118px; }
.h1 .dot { width: 22px; height: 22px; margin: 0 26px; vertical-align: .32em; }
.sub { margin: 0; font-size: 42px; font-weight: 700; color: var(--gold-deep); line-height: 1.5; text-wrap: balance; }
.center { text-align: center; }

.sec-title { display: flex; align-items: center; gap: 18px; font-size: 36px; font-weight: 800; color: var(--blue); }
.sec-title::after { content: ''; flex: 1; height: 2px; background: var(--blue); opacity: .3; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 56px; position: relative; }
.steps::before { content: ''; position: absolute; top: 0; right: 16%; left: 16%; height: 3px; background: var(--blue); opacity: .35; }
.step { position: relative; background: var(--white); border-radius: 30px; padding: 74px 28px 32px; text-align: center; box-shadow: 0 2px 0 rgba(45,104,177,.10); }
.step .ic { position: absolute; top: -56px; right: 50%; transform: translateX(50%); width: 112px; height: 112px; border-radius: 50%; background: var(--white); border: 3px solid var(--gold); display: grid; place-items: center; color: var(--blue); font-size: 54px; }
.step h3 { margin: 0 0 10px; font-size: 38px; color: var(--blue); font-weight: 800; }
.step p { margin: 0; font-size: 30px; line-height: 1.65; }
.step b, .gold { color: var(--gold-deep); }

.note { display: flex; align-items: center; gap: 22px; background: var(--white); border: 2.5px solid var(--gold); border-radius: 26px; padding: 22px 30px; font-size: 32px; line-height: 1.6; }
.note .icon { font-size: 44px; color: var(--blue); }

.qlist { display: flex; flex-direction: column; gap: 16px; }
.q { display: flex; align-items: center; gap: 24px; background: var(--white); border-radius: 26px; padding: 18px 26px; box-shadow: 0 2px 0 rgba(45,104,177,.10); }
.q .n { flex: none; width: 68px; height: 68px; border-radius: 50%; background: var(--gold); color: var(--white); display: grid; place-items: center; font-weight: 800; font-size: 34px; }
.q .qt { display: flex; flex-direction: column; }
.q .qt b { font-size: 32px; color: var(--blue); font-weight: 800; line-height: 1.4; }
.q .qt span { font-size: 28px; line-height: 1.55; }

.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tip { background: var(--white); border-radius: 26px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-size: 32px; font-weight: 700; }
.tip .ic { width: 92px; height: 92px; border-radius: 50%; border: 3px solid var(--blue); display: grid; place-items: center; color: var(--blue); font-size: 44px; background: var(--white); }

.bar { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--blue); color: var(--white); border-radius: 28px; padding: 22px 10px; text-align: center; }
.bar > div { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 18px; border-inline-start: 1px solid rgba(255,255,255,.42); }
.bar > div:first-child { border-inline-start: 0; }
.bar .big { font-size: 34px; font-weight: 800; line-height: 1.3; }
.bar .small { font-size: 23px; font-weight: 600; opacity: .95; }
.bar .on { position: relative; }
.bar .on .big { color: #FFE2A8; }
.bar .on::after { content: ''; position: absolute; bottom: -22px; right: 50%; transform: translateX(50%); width: 46px; height: 6px; border-radius: 6px 6px 0 0; background: var(--gold); }

.quote { margin: 0; font-family: var(--font-quote); font-weight: 700; font-size: 66px; color: var(--blue); line-height: 1.6; }
.quote .qm { color: var(--gold); margin: 0 12px; }

.sun { display: block; }

/* competitions overview */
.comps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; width: 100%; }
.comp { background: var(--white); border-radius: 30px; padding: 34px 30px 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; position: relative; }
.comp .num { position: absolute; top: 20px; right: 24px; width: 50px; height: 50px; border-radius: 50%; background: var(--gold); color: var(--white); display: grid; place-items: center; font-weight: 800; font-size: 26px; }
.comp .ic { width: 110px; height: 110px; border-radius: 50%; border: 3px solid var(--gold); display: grid; place-items: center; color: var(--blue); font-size: 56px; }
.comp h3 { margin: 0; font-size: 42px; font-weight: 800; color: var(--blue); }
.comp p { margin: 0; font-size: 28px; line-height: 1.6; }
.comp .pts { margin-top: 6px; font-size: 26px; font-weight: 800; color: var(--gold-deep); background: var(--gold-soft); border-radius: 999px; padding: 6px 22px; }

/* story (مين صاحب الحكاية؟) */
.fact { position: relative; width: 100%; background: var(--white); border-radius: 40px; padding: 70px 80px 60px; text-align: center; border: 3px solid var(--blue); }
.fact .tag { position: absolute; top: -32px; right: 50%; transform: translateX(50%); background: var(--blue); color: var(--white); font-size: 30px; font-weight: 800; padding: 8px 34px; border-radius: 999px; white-space: nowrap; }
.fact .text { font-family: var(--font-display); font-weight: 800; font-size: 70px; line-height: 1.55; color: var(--navy); text-wrap: balance; }
.fact.small .text { font-size: 56px; }
.owner { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 34px; font-size: 40px; font-weight: 800; color: var(--gold-deep); animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
.owner .name { font-family: var(--font-display); font-weight: 900; font-size: 64px; color: var(--blue); background: var(--gold-soft); border: 3px solid var(--gold); border-radius: 26px; padding: 4px 34px; }
.guess { margin-top: 30px; font-size: 38px; font-weight: 700; color: var(--gold-deep); }
.progress-dots { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 1100px; }
.progress-dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--line); }
.progress-dots i.on { background: var(--gold); }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* bro (تعرف أخوك؟) */
.round { display: flex; gap: 18px; align-items: center; font-size: 32px; font-weight: 800; color: var(--gold-deep); }
.round .chip { background: var(--white); border: 2.5px solid var(--gold); border-radius: 999px; padding: 4px 26px; }
.bq { width: 100%; background: var(--white); border-radius: 40px; padding: 60px 70px; text-align: center; border: 3px solid var(--blue); font-family: var(--font-display); font-weight: 900; font-size: 78px; line-height: 1.5; color: var(--blue); text-wrap: balance; animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }

/* ---------- timer ---------- */
.timer-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.timer-cap { font-size: 26px; font-weight: 800; color: var(--blue); background: var(--white); border: 2px solid var(--blue); border-radius: 999px; padding: 4px 26px; }
.timer { position: relative; width: 440px; height: 440px; }
.timer.md { width: 340px; height: 340px; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.timer .face { fill: var(--white); }
.timer .trk { fill: none; stroke: var(--line); stroke-width: 14; }
.timer .prog { fill: none; stroke: var(--blue); stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset .3s linear, stroke .4s; }
.timer .tick { fill: var(--gold); }
.tm-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tm-digits { direction: ltr; font-family: var(--font-body); font-weight: 800; font-size: 122px; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer.md .tm-digits { font-size: 92px; }
.tm-label { font-size: 28px; font-weight: 700; color: var(--blue); }
.timer.md .tm-label { font-size: 24px; }
.timer[data-state="warn"] .prog { stroke: var(--gold); }
.timer[data-state="warn"] .tm-digits { color: var(--gold-deep); }
.timer[data-state="paused"] .tm-digits { animation: blink 1.4s ease-in-out infinite; }
.timer[data-state="paused"] .tm-label { color: var(--gold-deep); }
.timer[data-state="done"] { animation: ring 1s ease-in-out 4; }
.timer[data-state="done"] .prog { stroke: var(--gold); }
.timer[data-state="done"] .tm-digits { color: var(--gold-deep); }
.timer[data-state="done"] .tm-label { color: var(--gold-deep); font-size: 34px; font-weight: 800; }
@keyframes blink { 50% { opacity: .35; } }
@keyframes ring { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.mini-timer { position: absolute; top: 150px; left: 0; display: flex; align-items: center; gap: 12px; background: var(--white); border: 2.5px solid var(--blue); border-radius: 999px; padding: 6px 22px 6px 16px; font-size: 34px; font-weight: 800; color: var(--navy); z-index: 3; }
.mini-timer .icon { color: var(--blue); font-size: 34px; }
.mini-timer .d { direction: ltr; font-variant-numeric: tabular-nums; }
.mini-timer[data-state="warn"], .mini-timer[data-state="done"] { border-color: var(--gold); color: var(--gold-deep); }

.stage.time-up::after { content: ''; position: absolute; inset: 0; border: 16px solid var(--gold); pointer-events: none; z-index: 20; animation: frame 1s ease-in-out 3 both; }
@keyframes frame { 0%,100% { opacity: 0; } 50% { opacity: 1; } }

/* ---------- scoreboard ---------- */
.board { width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap, 14px); }
/* Rows split the board's height (up to 104px each) and size their text from it (cqh = 1% of the
   row's height), so nothing spills out of a row however many groups or header lines there are. */
.brow { position: relative; container-type: size; flex: 1 1 0; min-height: 0; max-height: 104px; display: grid; grid-template-columns: 96px minmax(0, 1fr) 560px 150px; align-items: center; gap: 26px; background: var(--white); border-radius: 26px; padding: 0 26px; box-shadow: 0 2px 0 rgba(45,104,177,.1); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.brow.lead { border: 3px solid var(--gold); background: linear-gradient(90deg, #fff, var(--gold-soft)); }
.brow .rk { width: min(66px, 68cqh); height: min(66px, 68cqh); border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: min(32px, 34cqh); background: var(--white); border: 3px solid var(--line); color: var(--blue); }
.brow.r1 .rk { background: var(--gold); border-color: var(--gold); color: var(--white); }
.brow.r2 .rk, .brow.r3 .rk { border-color: var(--gold); }
.brow .nm { display: flex; flex-direction: column; min-width: 0; }
.brow .nm b { font-family: var(--font-display); font-weight: 900; font-size: min(36px, 40cqh); color: var(--blue); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .nm small { font-size: min(20px, 21cqh); font-weight: 600; color: #4A5A78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
@container (max-height: 70px) { .brow .nm small { display: none; } }
.brow .track { display: block; height: min(26px, 26cqh); border-radius: 999px; background: var(--sky); overflow: hidden; }
.brow .fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--blue); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.brow.r1 .fill { background: var(--gold); }
.brow .tot { font-weight: 800; font-size: min(56px, 58cqh); line-height: 1; color: var(--navy); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bump { animation: bump .8s ease; }
@keyframes bump { 30% { transform: scale(1.35); color: var(--gold-deep); } }
.board-head { flex: none; display: grid; grid-template-columns: 96px minmax(0, 1fr) 560px 150px; gap: 26px; padding: 0 26px; font-size: 24px; font-weight: 800; color: var(--blue); }
.board-head span:last-child { text-align: center; }

/* ---------- Quran board (مسابقة سورة السجدة) ---------- */
.qscr { justify-content: flex-start; gap: 16px; width: 100%; }
.qhead { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.qhead .h1 { font-size: 68px; line-height: 1.2; }
.qhead .sub { font-size: 30px; }
.qtotal { flex: none; display: flex; align-items: center; gap: 18px; background: var(--white); border: 3px solid var(--gold); border-radius: 30px; padding: 14px 30px 14px 34px; }
.qtotal .ic { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--blue); display: grid; place-items: center; color: var(--blue); font-size: 42px; }
.qtotal .n { font-weight: 800; font-size: 92px; line-height: 1; color: var(--gold-deep); font-variant-numeric: tabular-nums; }
.qtotal .l { display: flex; flex-direction: column; font-size: 28px; font-weight: 800; color: var(--blue); line-height: 1.35; }
.qtotal .l small { font-size: 22px; font-weight: 700; color: var(--navy); }
.qtotal .l small:empty { display: none; }
.brow.qrow { grid-template-columns: 96px minmax(0, 1fr) auto 130px; }
.brow.qrow .nm b { font-size: min(34px, 38cqh); line-height: 1.2; }
.dots { display: flex; align-items: center; gap: 10px; }
.dots i { flex: none; width: min(34px, 38cqh); height: min(34px, 38cqh); border-radius: 50%; border: 3px solid var(--line); background: var(--white); }
.dots i.on { background: var(--blue); border-color: var(--blue); }
.brow.lead .dots i.on { background: var(--gold); border-color: var(--gold); }
.dots i.new { animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
.dots .track { width: 520px; }
.qquote { flex: none; margin-top: auto; font-size: 40px; line-height: 1.6; text-align: center; }

/* ---------- camp standings (الترتيب العام) ---------- */
.board-head.thead, .brow.trow { grid-template-columns: 96px minmax(0, 2.4fr) repeat(var(--cols, 5), minmax(0, 1fr)) 170px; gap: 16px; }
.board-head.thead span { text-align: center; line-height: 1.25; font-size: 22px; text-wrap: balance; }
.board-head.thead span:nth-child(2) { text-align: start; }
/* Long group names wrap onto two lines instead of being cut to a few letters. */
.trow .nm b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: min(30px, 32cqh); line-height: 1.25; }
.trow .c { min-width: 0; text-align: center; font-weight: 800; font-size: min(40px, 42cqh); color: var(--navy); font-variant-numeric: tabular-nums; border-inline-start: 2px solid var(--sky); line-height: 1.6; white-space: nowrap; }
.trow .tot { color: var(--blue); }

/* ---------- full recitation (المجموعة كلها سمّعت) ---------- */
.brow.qrow.full { border: 3px solid var(--gold); background: linear-gradient(100deg, var(--gold-soft) 0%, #fff 40%, var(--gold-soft) 60%, #fff 100%); background-size: 250% 100%; animation: shimmer 5s linear infinite; }
.brow.qrow.full .rk { background: var(--gold); border-color: var(--gold); color: var(--white); }
.brow.qrow.full .dots i.on { background: var(--gold); border-color: var(--gold); }
.brow.qrow.full .fill { background: var(--gold); }
.brow.qrow.full .nm small { color: var(--gold-deep); font-weight: 800; }
.brow.qrow.full .nm small .icon { vertical-align: -.15em; margin-inline-end: 6px; }
.brow.qrow.full .tot { color: var(--gold-deep); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.cheer-pop > * { animation: pop .8s cubic-bezier(.2,1.6,.4,1) both; }

.honor { width: 100%; display: flex; align-items: center; gap: 18px; overflow: hidden; background: var(--white); border: 3px solid var(--gold); border-radius: 999px; padding: 8px 30px 8px 10px; }
.honor .hl { display: flex; align-items: center; gap: 10px; background: var(--gold); color: var(--white); font-weight: 800; font-size: 28px; border-radius: 999px; padding: 4px 24px; white-space: nowrap; }
.honor .hg { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--blue); white-space: nowrap; animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
.honor .hg .icon { color: var(--gold); }
.honor .hn { margin-inline-start: auto; font-size: 28px; font-weight: 800; color: var(--gold-deep); white-space: nowrap; }

/* ---------- columns (Quran count, or stacked camp points) ---------- */
.cols { width: 100%; flex: 1; min-height: 0; display: flex; align-items: stretch; justify-content: center; gap: 28px; }
.qcol { flex: 1 1 0; max-width: 250px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.qcol .crown { flex: none; font-size: 46px; color: var(--gold); visibility: hidden; }
.qcol.full .crown, .scol.r1.lead .crown { visibility: visible; }
.qcol .cv { display: flex; align-items: baseline; gap: 8px; }
.qcol .cv b { font-weight: 800; font-size: 52px; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.qcol .cv small { font-size: 24px; font-weight: 700; color: #4A5A78; }
.qcol .cbar { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 150px; background: var(--white); border-radius: 22px 22px 8px 8px; display: flex; flex-direction: column-reverse; overflow: hidden; box-shadow: 0 2px 0 rgba(45,104,177,.1); }
.qcol .cfill { display: block; width: 100%; flex: none; background: var(--blue); border-radius: 18px 18px 0 0; transition: height .9s cubic-bezier(.2,.8,.2,1); }
.qcol.lead .cfill, .qcol.full .cfill { background: var(--gold); }
.qcol .target { position: absolute; inset-inline: 0; height: 0; border-top: 4px dashed var(--gold-deep); z-index: 1; }
.qcol.full .cbar { outline: 4px solid var(--gold); outline-offset: 4px; }
.qcol.full .cv b { color: var(--gold-deep); }
/* A fixed two-line slot for the name, so every bar keeps the same baseline. */
.qcol .cn { flex: none; height: 2.6em; max-width: 100%; font-family: var(--font-display); font-weight: 900; font-size: 26px; color: var(--blue); text-align: center; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: balance; }
.qcol .crk { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 26px; border: 3px solid var(--line); color: var(--blue); background: var(--white); }
.qcol.r1 .crk { background: var(--gold); border-color: var(--gold); color: var(--white); }
.qcol.r2 .crk, .qcol.r3 .crk { border-color: var(--gold); }
.scol .cbar .seg { flex: none; display: flex; align-items: center; justify-content: center; border-top: 2px solid var(--white); }
.scol .cbar .seg:first-child { border-top: 0; }
.seg em { font-style: normal; font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.seg.one { background: var(--blue); }
.lead .seg.one { background: var(--gold); }

/* ---------- stacked bars (الترتيب العام • أشرطة) ---------- */
.brow.sbar { grid-template-columns: 96px 420px minmax(0, 1fr) 150px; }
.sbar .nm b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: min(32px, 32cqh); line-height: 1.25; }
.stack { display: flex; height: min(46px, 50cqh); border-radius: 12px; overflow: hidden; background: var(--sky); }
.stack .seg { height: 100%; min-width: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; border-inline-start: 2px solid var(--white); }
.stack .seg:first-child { border-inline-start: 0; }
.thead-row { flex: none; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
/* The title always stays on one line; the legend or note beside it takes what is left. */
.thead-row .h1 { flex: none; font-size: 70px; line-height: 1.2; white-space: nowrap; }
.legend { flex: 0 1 auto; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.legend i { flex: none; width: 22px; height: 22px; border-radius: 6px; }
.secret { flex: 0 1 auto; min-width: 0; margin: 0; display: flex; align-items: center; gap: 14px; background: var(--white); border: 3px dashed var(--gold); border-radius: 999px; padding: 10px 30px; font-size: 28px; font-weight: 700; color: var(--navy); }
.secret .icon { color: var(--blue); font-size: 34px; }
.secret b { color: var(--gold-deep); }
.trow.locked .c { color: var(--gold); font-family: var(--font-display); }

/* ---------- rings (سورة السجدة • دواير) ---------- */
.rings { width: 100%; flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); align-content: center; gap: 30px 24px; }
.qring { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.qring .ring { position: relative; width: 240px; height: 240px; }
.rings.two .ring { width: 170px; height: 170px; }
.ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .rt { fill: var(--white); stroke: var(--line); stroke-width: 10; }
.ring .rp { fill: none; stroke: var(--blue); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); }
.qring.lead .rp, .qring.full .rp { stroke: var(--gold); }
.qring.full .rt { fill: var(--gold-soft); }
.qring.full .ring { filter: drop-shadow(0 0 18px rgba(212,162,76,.55)); }
.ring .rc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring .rc b { font-size: 76px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.rings.two .ring .rc b { font-size: 56px; }
.ring .rc small { margin-top: 8px; font-size: 22px; font-weight: 700; color: #4A5A78; }
.qring.full .rc b { color: var(--gold-deep); }
.ring .crown { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); font-size: 56px; color: var(--gold); display: none; }
.qring.full .crown { display: block; }
.ring .rrk { position: absolute; top: 4px; inset-inline-start: 4px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 3px solid var(--line); font-weight: 800; font-size: 24px; color: var(--blue); }
.qring.r1 .rrk { background: var(--gold); border-color: var(--gold); color: var(--white); }
.qring.r2 .rrk, .qring.r3 .rrk { border-color: var(--gold); }
.qring .rn { max-width: 100%; font-family: var(--font-display); font-weight: 900; font-size: 32px; color: var(--blue); text-align: center; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qring .rs { min-height: 1.5em; font-size: 24px; font-weight: 800; color: var(--gold-deep); }
.qring.full .rs { background: var(--gold); color: var(--white); border-radius: 999px; padding: 0 20px; }

/* ---------- standings podium (الترتيب العام • منصة) — the main board ----------
   Top three on the podium, everyone else in one row of cards underneath. Totals only, no details.
   The podium fills the free height: each column is as tall as the board and its block takes a
   share of it, shrinking first if a long name needs two lines. */
.tpod { width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 22px; }
.tpod .podium { flex: 1; min-height: 0; align-items: stretch; gap: 40px; }
.tpod .pod { width: 470px; min-height: 0; justify-content: flex-end; gap: 12px; }
.tpod .pod .crown { flex: none; font-size: 64px; }
.tpod .pod .who { flex: none; max-width: 100%; font-size: 44px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: balance; }
.tpod .pod.p1 .who { font-size: 52px; }
.tpod .pod .pts { flex: none; display: flex; align-items: baseline; gap: 10px; background: var(--white); border: 3px solid var(--gold); border-radius: 999px; padding: 2px 28px; font-size: 26px; color: var(--gold-deep); white-space: nowrap; }
.tpod .pod .pts b { font-size: 44px; line-height: 1.3; color: var(--navy); font-variant-numeric: tabular-nums; }
.tpod .pod.p1 .pts { background: var(--gold-soft); }
.tpod .pod .block { height: auto; min-height: 110px; font-size: 120px; line-height: 1; box-shadow: inset 0 -10px 0 rgba(27,42,74,.12); }
.tpod .pod.p1 .block { flex: 0 1 56%; font-size: 150px; }
.tpod .pod.p2 .block { flex: 0 1 42%; }
.tpod .pod.p3 .block { flex: 0 1 32%; }
.tpod .rest { flex: none; list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 18px; }
.tpod .rest li { flex: 0 1 auto; min-width: 0; max-width: 620px; display: grid; grid-template-columns: 52px minmax(0, max-content) auto; align-items: center; gap: 14px; background: var(--white); border-radius: 22px; padding: 10px 12px 10px 26px; box-shadow: 0 2px 0 rgba(45,104,177,.1); }
.tpod .rest .r { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 26px; color: var(--blue); }
.tpod .rest .nmx { min-width: 0; font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1.4; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpod .rest .s { display: flex; margin-inline-start: 8px; align-items: baseline; gap: 6px; font-weight: 800; font-size: 36px; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tpod .rest .s small { font-size: 20px; color: var(--gold-deep); }

/* ---------- auto rotation footer (تبديل تلقائي) ---------- */
.rot { position: relative; display: flex; align-items: center; gap: 14px; background: var(--white); border: 2px solid var(--blue); border-radius: 999px; padding: 8px 22px; overflow: hidden; }
.rot .lbl { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; color: var(--blue); white-space: nowrap; padding-inline-end: 16px; border-inline-end: 2px solid var(--line); }
.rot ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex: 1; min-width: 0; overflow: hidden; }
.rot li { font-size: 22px; font-weight: 700; color: #4A5A78; padding: 2px 16px; border-radius: 999px; white-space: nowrap; }
.rot li.on { background: var(--blue); color: var(--white); }
.rot .prog { position: absolute; bottom: 0; inset-inline: 0; height: 5px; background: var(--gold); transform-origin: right; animation: rotProg linear both; }
@keyframes rotProg { from { transform: scaleX(var(--from, 1)); } to { transform: scaleX(0); } }

/* ---------- ticker ---------- */
.ticker { display: flex; align-items: center; gap: 14px; background: var(--blue); border-radius: 26px; padding: 14px 22px; color: var(--white); }
.ticker .lbl { font-size: 26px; font-weight: 800; padding-inline-end: 18px; border-inline-end: 1px solid rgba(255,255,255,.45); white-space: nowrap; }
.ticker ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; flex: 1; min-width: 0; overflow: hidden; }
.ticker li { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 6px 18px 6px 8px; font-size: 26px; font-weight: 700; white-space: nowrap; min-width: 0; }
.ticker li .r { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--blue); font-weight: 800; font-size: 22px; flex: none; }
.ticker li.first .r { background: var(--gold); color: var(--white); }
.ticker li .s { color: #FFE2A8; font-weight: 800; }
.ticker li .nmx { overflow: hidden; text-overflow: ellipsis; }

/* ---------- podium ---------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 34px; width: 100%; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 400px; }
.pod .who { font-family: var(--font-display); font-weight: 900; font-size: 46px; color: var(--blue); text-align: center; line-height: 1.35; }
.pod .pts { font-size: 32px; font-weight: 800; color: var(--gold-deep); }
.pod .block { width: 100%; border-radius: 28px 28px 0 0; background: var(--blue); color: var(--white); display: grid; place-items: center; font-size: 96px; font-weight: 800; animation: rise 1s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.pod.p1 .block { height: 330px; background: var(--gold); }
.pod.p2 .block { height: 240px; animation-delay: .35s; }
.pod.p3 .block { height: 180px; animation-delay: .7s; }
.pod.p1 .crown { color: var(--gold); font-size: 80px; }
@keyframes rise { from { transform: scaleY(0); } to { transform: none; } }

/* ---------- overlays ---------- */
.toast { position: absolute; left: 50%; bottom: 150px; transform: translate(-50%, 40px); opacity: 0; z-index: 10; display: flex; align-items: center; gap: 22px; background: var(--white); border: 3px solid var(--gold); border-radius: 999px; padding: 14px 40px 14px 18px; box-shadow: 0 18px 50px rgba(27,42,74,.18); transition: transform .45s cubic-bezier(.2,1.4,.4,1), opacity .3s; white-space: nowrap; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .pts { min-width: 96px; height: 96px; padding: 0 14px; border-radius: 48px; background: var(--gold); color: var(--white); display: grid; place-items: center; font-weight: 800; font-size: 44px; direction: ltr; }
.toast.neg .pts { background: var(--blue); }
.toast .tx { font-size: 38px; font-weight: 800; color: var(--navy); }
.toast .tx small { display: block; font-size: 26px; font-weight: 700; color: var(--gold-deep); }

.announce { position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; background: rgba(237,242,250,.86); backdrop-filter: blur(6px); animation: fadeIn .35s both; }
.announce .card { max-width: 1500px; background: var(--white); border: 4px solid var(--blue); border-radius: 44px; padding: 70px 90px 64px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 30px; box-shadow: 0 30px 80px rgba(27,42,74,.18); }
.announce .pill { font-size: 32px; }
.announce .msg { font-family: var(--font-display); font-weight: 900; font-size: 84px; line-height: 1.45; color: var(--blue); text-wrap: balance; }
@keyframes fadeIn { from { opacity: 0; } }

/* A group just finished: everyone recited. */
.cheer { position: absolute; inset: 0; z-index: 16; display: grid; place-items: center; background: rgba(237,242,250,.88); backdrop-filter: blur(6px); animation: fadeIn .35s both; }
.cheer .card { position: relative; overflow: hidden; width: 1400px; background: var(--white); border: 5px solid var(--gold); border-radius: 48px; padding: 44px 80px 54px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; box-shadow: 0 30px 80px rgba(27,42,74,.18); animation: pop .7s cubic-bezier(.2,1.5,.4,1) both; }
.cheer .rays { position: absolute; inset: -60%; background: repeating-conic-gradient(from 0deg, rgba(212,162,76,.13) 0 6deg, transparent 6deg 18deg); animation: spin 40s linear infinite; }
.cheer .card > :not(.rays) { position: relative; }
.cheer .pill { font-size: 30px; }
.cheer .k { font-family: var(--font-quote); font-weight: 700; font-size: 66px; color: var(--gold-deep); line-height: 1.4; }
.cheer .nm { font-family: var(--font-display); font-weight: 900; font-size: 112px; color: var(--blue); line-height: 1.3; text-wrap: balance; }
.cheer .msg { font-size: 54px; font-weight: 800; color: var(--navy); }
.cheer .next { margin-top: 12px; font-size: 40px; font-weight: 800; color: var(--white); background: var(--blue); border-radius: 999px; padding: 8px 44px; }
@keyframes spin { to { transform: rotate(360deg); } }

.conn { position: absolute; bottom: 14px; left: 18px; z-index: 30; font-size: 22px; font-weight: 700; color: var(--gold-deep); background: var(--white); border: 2px solid var(--gold); border-radius: 999px; padding: 4px 18px; }

/* Controls outside the stage (not scaled). */
.ctl { position: fixed; bottom: 14px; left: 14px; z-index: 40; display: flex; gap: 8px; opacity: .25; transition: opacity .2s; }
.ctl:hover, .ctl:focus-within { opacity: 1; }
.ctl button, .ctl a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--blue); background: var(--white); color: var(--blue); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
:fullscreen .ctl { display: none; }

.help { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(27,42,74,.45); }
.help .box { background: var(--white); border-radius: 22px; padding: 28px 34px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.help h2 { margin: 0 0 14px; color: var(--blue); font-family: var(--font-display); font-size: 26px; }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 17px; }
.help dt { font-weight: 800; direction: ltr; text-align: left; }
.help dd { margin: 0; }
.help kbd { display: inline-block; min-width: 30px; padding: 2px 8px; border: 1.5px solid var(--line); border-bottom-width: 3px; border-radius: 8px; background: var(--sky-2); font-family: var(--font-body); font-size: 15px; text-align: center; }
