/* «سباق الفصول» (teacher-race.js, student-race.js): setup, the live class screen, the girl's banner. */
.rc-setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .rc-setup { grid-template-columns: minmax(0, 1fr); } }
.rc-box { padding: var(--s4, 16px); display: flex; flex-direction: column; gap: 10px; }
.rc-box:first-child { grid-row: span 2; }
.rc-box h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--f-head); font-size: 19px; flex-wrap: wrap; }
.rc-box h2 small { font-size: 13px; color: var(--muted); font-weight: 600; }
.rc-n { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.rc-step { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.rc-step button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--tint); color: var(--on-tint, var(--primary)); font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rc-step b { min-width: 44px; text-align: center; font-size: 28px; color: var(--primary); }
.rc-team { border: 1.5px solid var(--border); border-inline-start: 6px solid var(--tc); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.rc-team.is-off { opacity: .55; }
.rc-th { display: flex; align-items: center; gap: 8px; }
.rc-th small { color: var(--muted); white-space: nowrap; }
.rc-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tc); flex: none; }
.rc-name { flex: 1; min-width: 0; font-weight: 800; min-height: 40px; padding-block: 4px; }
.rc-ck { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--border); background: var(--surface); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; }
.rc-ck.is-on { background: var(--primary); border-color: var(--primary); }
.rc-girls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc-g { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 14%, var(--surface)); font-weight: 700; font-size: 14.5px; }
.rc-g em { font-style: normal; display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; border-radius: 999px; background: var(--reward-tint, #fef3c7); color: var(--on-reward, #92400e); font-size: 13px; }
.rc-g button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rc-add { display: inline-flex; align-items: center; gap: 6px; border: 1.5px dashed var(--tc); border-radius: 999px; padding: 6px 12px; background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.rc-srcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.rc-src { position: relative; text-align: start; border: 1.5px solid var(--border); border-radius: 14px; padding: 10px 12px 10px 40px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.rc-src.is-on { border-color: var(--accent, #db2777); background: color-mix(in srgb, var(--accent, #db2777) 6%, var(--surface)); }
.rc-src .rc-ck { position: absolute; inset-inline-end: 10px; top: 10px; width: 22px; height: 22px; font-size: 12px; }
.rc-src b { display: inline-flex; align-items: center; gap: 6px; }
.rc-src small { color: var(--muted); font-size: 13px; }
.rc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rc-lab { font-weight: 700; color: var(--muted); font-size: 14.5px; }
.rc-go-row { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rc-go { min-height: 60px; padding-inline: 40px; font-size: 21px; }
.rc-newg { display: flex; gap: 8px; margin-top: 10px; }
.rc-newg .t-txt { flex: 1; min-width: 0; }

/* the live class screen */
.rl { position: relative; border-radius: 26px; padding: 18px 22px 24px; color: #fff; display: flex; flex-direction: column; gap: 14px;
    background: radial-gradient(ellipse at 50% 12%, #4c1d95, #1a0533 75%); min-height: 70vh; }
#race-host:fullscreen { background: #1a0533; overflow: auto; padding: 0; }
#race-host:fullscreen .rl { min-height: 100vh; border-radius: 0; }
.rl-top { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-size: 20px; }
.rl-top i { color: #fde68a; }
.rl-round { color: #c4b5fd; font-weight: 700; font-size: 17px; }
.rl-sp { flex: 1; }
.rl-ib { width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .3); background: rgb(255 255 255 / .1); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.rl-end { background: rgb(255 255 255 / .12); color: #fff; border: 1px solid rgb(255 255 255 / .3); }
.rl-lobby { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0; }
.rl-lobby h2 { margin: 0; font-family: var(--f-head); font-size: clamp(28px, 4vw, 46px); }
.rl-lobby p { margin: 0; color: #e9d5ff; font-size: 18px; line-height: 1.7; }
.rl-in { font-weight: 800; color: #fde68a !important; font-size: 22px !important; }
.rl-big { min-height: 58px; padding-inline: 34px; font-size: 20px; }
.rl-q { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rl-qt { font-family: var(--f-head); font-weight: 900; font-size: clamp(40px, 7vw, 92px); line-height: 1.2; text-shadow: 0 6px 24px rgb(250 204 21 / .3); }
.rl-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; width: min(100%, 960px); }
.rl-op { display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 18px; padding: 12px; font-size: clamp(22px, 3vw, 34px); font-weight: 900; transition: opacity .3s, transform .3s; }
.rl-op span { font-size: .6em; opacity: .8; }
.rl-op.c0 { background: #7e22ce; } .rl-op.c1 { background: #be185d; } .rl-op.c2 { background: #0f766e; } .rl-op.c3 { background: #b45309; }
.rl-op.is-right { box-shadow: 0 0 0 5px #22c55e, 0 10px 30px rgb(34 197 94 / .45); transform: scale(1.05); }
.rl-op.is-dim { opacity: .35; }
.rl-meta { margin: 0; color: #c4b5fd; font-weight: 700; font-size: 18px; }
.rl-meta b { color: #fde68a; font-size: 28px; }
.rl-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; margin-top: auto; }
.rl-team { border-radius: 20px; padding: 12px; background: rgb(255 255 255 / .07); display: flex; flex-direction: column; gap: 8px; border: 2px solid transparent; }
.rl-team.is-lead { border-color: #fde68a; box-shadow: 0 0 24px -6px #fde68a; }
.rl-th { display: flex; align-items: center; gap: 8px; font-family: var(--f-head); font-size: 22px; color: color-mix(in srgb, var(--tc) 60%, #fff); }
.rl-pts { margin-inline-start: auto; font-size: 30px; font-weight: 900; color: color-mix(in srgb, var(--tc) 50%, #fff); }
.rl-g { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: rgb(255 255 255 / .08); font-weight: 800; font-size: 19px; transition: background .3s, box-shadow .3s; }
.rl-av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgb(255 255 255 / .18); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.rl-gn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-st { margin-inline-start: auto; font-size: 15px; white-space: nowrap; color: #c4b5fd; }
.rl-g.is-ok { background: rgb(34 197 94 / .22); box-shadow: inset 0 0 0 2px #22c55e; } .rl-g.is-ok .rl-st { color: #86efac; }
.rl-g.is-no { background: rgb(248 113 113 / .18); box-shadow: inset 0 0 0 2px #f87171; } .rl-g.is-no .rl-st { color: #fca5a5; }
.rl-g.is-in .rl-st { color: #86efac; }
.rl-g.is-fast .rl-av { background: #fde68a; color: #7c2d12; }
.rl-fast { color: #fde68a; }
.rl-final { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: min(100%, 560px); }
.rl-final li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgb(255 255 255 / .08); border-inline-start: 6px solid var(--tc); font-size: 22px; }
.rl-final em { margin-inline-start: auto; font-style: normal; font-weight: 900; color: #fde68a; }
.rl-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sr-banner { background: linear-gradient(135deg, #7e22ce, #db2777); }
/* the girl's race view on an iPad: bigger question and buttons */
.sr .sg-body { width: min(760px, 100%); }
.sr .sg-qt { font-size: clamp(32px, 6vw, 60px); font-weight: 900; text-align: center; }
.sr .sg-qn, .sr .sg-timer { text-align: center; font-size: 20px; }
.sr .sg-timer b { font-size: 34px; }
.sr .sg-opt { min-height: clamp(84px, 14vh, 130px); font-size: clamp(26px, 4vw, 42px); }
.sr .sg-msg h2 { font-size: clamp(28px, 4vw, 40px); }
/* the tournament: stages in the setup, the qualifiers between stages, the champion */
.rc-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); }
.rc-stage > b { min-width: 120px; }
.rc-step-s b { font-size: 22px; min-width: 30px; }
.rc-step-s button { width: 34px; height: 34px; }
.rc-pics { display: flex; flex-direction: column; gap: 10px; }
.rc-pic { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 14px; padding: 8px; }
.rc-pic img { width: 120px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; background: #fff; }
.rc-pic-b { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc-pic-add { align-self: flex-start; cursor: pointer; }
.rl-stage { background: #fde68a; color: #7c2d12; border-radius: 999px; padding: 4px 14px; font-size: 15px; font-weight: 900; }
.rl-img { max-width: min(100%, 900px); max-height: 46vh; border-radius: 18px; background: #fff; box-shadow: 0 12px 30px rgb(0 0 0 / .35); }
.rl-quals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; width: min(100%, 980px); }
.rl-qual { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: rgb(255 255 255 / .08); border-top: 6px solid var(--tc); }
.rl-qual b { font-size: 22px; color: color-mix(in srgb, var(--tc) 55%, #fff); }
.rl-qn { font-size: 24px; font-weight: 900; animation: rl-pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes rl-pop { from { opacity: 0; transform: scale(.4); } }
.rl-champ { padding-block: 20px; }
.rl-kick { color: #fde68a !important; font-weight: 900; font-size: 26px !important; }
.rl-cname { font-family: 'Aref Ruqaa', serif; font-size: clamp(56px, 10vw, 120px) !important; line-height: 1.25;
    background: linear-gradient(100deg, #b8862b, #fde68a 30%, #fff7d6 45%, #facc15 60%, #b8862b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rl-cclass { font-size: 30px !important; font-weight: 900; color: color-mix(in srgb, var(--tc) 50%, #fff) !important; }
/* the automatic move on: «السؤال التالي بعد ٣» + pause */
.rl-auto { margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; color: #c4b5fd; font-weight: 700; font-size: 18px; }
.rl-auto b { color: #fde68a; font-size: 26px; }
/* the qualifiers' confetti over the class screen (also in full screen) */
.rl-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
/* her iPad when she wins */
.sr-champ .sr-crown { font-size: 84px; line-height: 1; animation: rl-pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.sr-champ h2 { font-size: clamp(36px, 7vw, 56px); color: #ca8a04; }
