/* الجوال: السؤال 26، النص 17، الأزرار 22. */
body.phone { font-size: 17px; min-height: 100vh; min-height: 100dvh; }
.screen { max-width: 480px; margin: 0 auto; padding: 16px 18px 24px; }
.screen > section { min-height: calc(100dvh - 120px); display: flex; flex-direction: column; }
.screen > section.center { align-items: center; justify-content: center; text-align: center; }
.err { color: var(--accent-text); min-height: 1.4em; margin: 6px 0; font-size: 15px; }
.btn { font-size: 22px; }
.btn.wide { width: 100%; padding: 12px; }
.bottom { margin-top: auto; padding-top: 14px; position: sticky; bottom: 12px; }
h1 { font-size: 30px; margin: 6px 0; }

/* ---------- top bar and banners ---------- */
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; max-width: 480px; margin: 0 auto; }
.topbar .avatar { font-size: 14px; }
.me-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .team { font-size: 13px; }
.me-score { margin-right: auto; color: var(--accent-text); font-size: 22px; }
.banner { background: var(--saffron); color: var(--on-accent); text-align: center; padding: 6px; font-weight: 600; }

/* ---------- join ---------- */
.join-logo { text-align: center; margin: 18px 0 22px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 15px; color: var(--wool-dim); margin-bottom: 6px; }
input[type=text], input[type=tel] {
  width: 100%; border: 0; border-radius: var(--r); background: var(--up); color: var(--wool);
  padding: 14px 16px; font-size: 20px; outline: none; box-shadow: inset 0 0 0 1.5px var(--field-line);
}
input[type=text]:focus, input[type=tel]:focus { box-shadow: inset 0 0 0 2px var(--saffron); }
input::placeholder { color: var(--wool); opacity: .4; }
.code-input { text-align: center; font-size: 30px !important; letter-spacing: .3em; direction: ltr; padding: 10px !important; }
.room-known { text-align: center; margin: -8px 0 16px; }
.avatar-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.avatar-row::-webkit-scrollbar { display: none; }
.av-opt { flex: none; width: 58px; height: 58px; border: 0; border-radius: var(--r); background: var(--up); font-size: 30px; cursor: pointer; font-family: system-ui, "Segoe UI Emoji", "Apple Color Emoji", sans-serif; line-height: 1; }
.av-opt.on { box-shadow: inset 0 0 0 3px var(--saffron); }

/* ---------- wait ---------- */
.wait-avatar .avatar { font-size: 34px; }
#waitText { margin: 0 0 14px; }
.team-line { margin: 6px 0 12px; }
.team-line .team { font-size: 17px; }
.team-line .dim { display: block; margin-top: 6px; }
.team-rename { width: 100%; margin-top: 10px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.inline .btn { font-size: 18px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.suggest .btn { font-size: 15px; padding: 6px 12px; font-family: "Readex"; font-weight: 500; }
.picker { width: 100%; margin-top: 18px; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-grid .av-opt { width: 100%; height: auto; aspect-ratio: 1; font-size: 26px; }
.my-awards { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; width: 100%; }
.my-awards .award { background: var(--up); border-radius: var(--r); padding: 10px 14px; }
.my-awards .award b { font-family: "Lalezar"; font-weight: 400; color: var(--accent-text); font-size: 20px; }

/* ---------- question ---------- */
.timer { height: 8px; background: var(--up); border-radius: 99px; overflow: hidden; margin: 4px 0 10px; }
.timer .fill { height: 100%; width: 100%; background: var(--saffron); border-radius: 99px; transition: width .2s linear; margin-right: auto; }
.qmeta { margin: 0; font-size: 14px; }
.qtext { font-size: 26px; margin: 4px 0 14px; line-height: 1.3; }
.pair { position: relative; height: 240px; padding: 10px 10px 34px; }
.pair canvas { width: 100%; height: 100%; display: block; }
.labels { position: absolute; left: 10px; right: 10px; bottom: 8px; height: 22px; }
.lbl { position: absolute; transform: translateX(-50%); white-space: nowrap; font-size: 14px; font-weight: 600; }
.lbl.target { color: var(--accent-text); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; margin: 16px 0 0; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: var(--up); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 99px; background: var(--up); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; background: var(--saffron); margin-top: -11px; border: 0; }
input[type=range]::-moz-range-thumb { width: 32px; height: 32px; border-radius: 50%; background: var(--saffron); border: 0; }
.slider-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--wool-dim); }
.readout { text-align: center; margin-top: 8px; }
.readout .disp { display: block; font-size: 40px; line-height: 1.1; }
.num-row { display: flex; align-items: center; gap: 10px; }
.num-row input { font-size: 32px; text-align: center; direction: ltr; }
.num-row .dim { flex: none; font-size: 18px; }
.year-read { text-align: center; font-size: 64px; line-height: 1.1; margin: 10px 0 0; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; text-align: right; width: 100%; border: 0; border-radius: var(--r); background: var(--up); color: var(--wool); padding: 14px 16px; font-size: 19px; font-family: "Readex"; font-weight: 500; cursor: pointer; }
.choice .letter { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: "Lalezar"; font-size: 20px; color: var(--accent-text); box-shadow: inset 0 0 0 2px var(--saffron); line-height: 1; }
.choice.picked { background: var(--saffron); color: var(--on-accent); }
.choice.picked .letter { color: var(--on-accent); box-shadow: inset 0 0 0 2px var(--on-accent); }
.stop-read { font-size: 76px; line-height: 1; margin-top: 30px; direction: ltr; }
.stop-btn { width: 190px; height: 190px; border-radius: 50%; font-size: 34px; margin: 20px auto 0; display: block; }
.stop-btn.running { background: var(--up); color: var(--accent-text); box-shadow: inset 0 0 0 4px var(--saffron); }
.react-pad { width: 100%; height: 52vh; border: 0; border-radius: 22px; background: var(--up); color: var(--wool-dim); font-size: 38px; cursor: pointer; }
.react-pad.go { background: var(--saffron); color: var(--on-accent); }
.react-pad.early { background: var(--up); color: var(--accent-text); box-shadow: inset 0 0 0 4px var(--saffron); }

/* ---------- answered, result, final ---------- */
.done-mark { width: 110px; height: 110px; border-radius: 50%; background: var(--up); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-size: 60px; line-height: 1; box-shadow: inset 0 0 0 4px var(--saffron); }
.sadu.mini { width: 100%; max-width: 300px; height: 22px; background-size: 157px 22px; position: relative; margin-bottom: 18px; }
.sadu.mini i { position: absolute; top: -10px; bottom: -6px; right: 46%; width: 3px; background: var(--truth); border-radius: 2px; }
.points { font-size: 96px; line-height: 1; color: var(--accent-text); margin: 4px 0 10px; }
.verdict { margin: 0 0 10px; }
.verdict span { display: inline-block; background: var(--up); color: var(--accent-text); border-radius: 99px; padding: 3px 16px; font-weight: 600; }
.verdict span.exact { background: var(--saffron); color: var(--on-accent); }
#resultAnswer { margin: 0 0 16px; }
.rank-card { padding: 12px 26px; font-size: 22px; }
.final-score { font-size: 20px; margin: 0 0 10px; }

/* ---------- reactions ---------- */
.react-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; gap: 2px; padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); background: var(--deep); }
.react-bar button { flex: 1 1 0; min-width: 0; max-width: 54px; height: 50px; padding: 0; border: 0; border-radius: 12px; background: none; font-size: 26px; cursor: pointer; font-family: system-ui, "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.react-bar button:active { background: var(--up); transform: scale(.92); }
body.has-react .screen { padding-bottom: 90px; }

.points { direction: ltr; unicode-bidi: isolate; }

/* ---------- score card ---------- */
.card-box { width: 100%; margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.card-box img { width: min(300px, 82%); border-radius: 14px; box-shadow: 0 0 0 1px var(--wool-faint); }
.card-box .small { font-size: 13px; margin: 0; }

.host-btn { display: block; text-align: center; text-decoration: none; box-sizing: border-box; }

/* The day/night switch at the top of phone screens (join, the daily's start and end) and in the game's top bar. */
.top-row { display: flex; justify-content: flex-end; margin: -4px 0 -6px; }
.topbar .theme-top { margin-inline-start: 8px; }
.topbar .theme-icon { width: 32px; height: 32px; }
.r-top .theme-icon { width: 34px; height: 34px; }

/* ---------- phones mode (the bus): the reveal and the ranking on each phone ---------- */
#board { display: flex; flex-direction: column; gap: .7rem; padding-bottom: 6rem; }
#board.hidden { display: none; }
.board-meta { margin: 0; }
.board-q { font-size: 1.5rem; line-height: 1.35; margin: 0; }
.board-truth { display: flex; align-items: baseline; gap: .6rem; }
.board-truth span { background: var(--truth, #D63A2F); color: #F4EDE1; border-radius: 99px; padding: .1em .8em; font-weight: 600; }
.board-truth b { font-size: 2rem; color: var(--accent-text); }
.board-canvas { width: 100%; height: 11rem; display: block; }
.board-ruler { position: relative; height: 6.5rem; margin: .5rem .4rem 0; }
.board-ruler.hidden { display: none; }
.board-ruler .bar { position: absolute; left: 0; right: 0; bottom: 1.4rem; height: 2px; background: var(--field-line, rgba(244,237,225,.35)); }
.board-ruler .bm { position: absolute; bottom: 1.9rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.board-ruler .bm.up { bottom: 3.6rem; }
.board-ruler { direction: ltr; }
.board-ruler .end { position: absolute; bottom: 0; font-size: .75rem; opacity: .7; }
.board-ruler .end.lo { left: 0; }
.board-ruler .end.hi { right: 0; }
.board-ruler .bm .avatar { font-size: .75rem; }
.board-ruler .bm.me { z-index: 2; }
.board-ruler .bm.me .avatar { box-shadow: 0 0 0 3px var(--saffron, #F2B233); }
.board-ruler .bm .who { font-size: .8rem; font-weight: 700; color: var(--accent-text); }
.board-ruler .bm.truth { bottom: 0; z-index: 3; }
.board-ruler .bm.truth .tag { background: var(--truth, #D63A2F); color: #F4EDE1; font-size: .8rem; border-radius: 99px; padding: 0 .6em; }
.board-fact { margin: 0; line-height: 1.6; }
.board-me { padding: .7rem 1rem; font-weight: 600; }
.board-me .exact { color: var(--accent-text); }
.board-head { margin: .4rem 0 0; }
.rank-list { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; width: 100%; text-align: right; }
.rank-list.hidden { display: none; }
.rank-list li { display: flex; align-items: center; gap: .55rem; background: var(--up, rgba(255,255,255,.06)); border-radius: .7rem; padding: .45rem .7rem; }
.rank-list li.me { box-shadow: inset 0 0 0 2px var(--saffron, #F2B233); }
.rank-list .rk { min-width: 1.6rem; text-align: center; color: var(--accent-text); }
.rank-list .avatar { font-size: .8rem; flex: none; }
.rank-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .gs { opacity: .8; white-space: nowrap; }
.rank-list .dl { color: var(--accent-text); font-size: .9rem; white-space: nowrap; }
.rank-list .sc { min-width: 2.5rem; text-align: left; }
#result .rank-list, #final .rank-list { margin-bottom: 6rem; }
.award .award-who { font-weight: 400; opacity: .85; }
