* { box-sizing: border-box; }
:root { --k: 1; --on-color: #fff; --amber-deep: #A86E00; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--txt); }
body, body * { text-shadow: none; }
button, input { font: inherit; color: inherit; }

/* ===== خلفية المسرح المقسومة بين الفريقين وإطار الدور النشط ===== */
body {
  min-height: 100dvh;
  height: var(--app-h, 100dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at 88% 12%, rgba(76, 141, 255, .14), transparent 46%),
    radial-gradient(circle at 12% 12%, rgba(255, 122, 69, .14), transparent 46%),
    var(--bg);
}
body[data-turn="a"] { box-shadow: inset 0 0 0 2px rgba(76, 141, 255, .55); }
body[data-turn="b"] { box-shadow: inset 0 0 0 2px rgba(255, 122, 69, .55); }
body.passing::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  box-shadow: inset 0 0 0 4px var(--action), inset 0 0 0 8px var(--action-deep);
  opacity: .65;
}

/* ===== الشريط العلوي المدمج (الرئيسية + الشعار + الاتصال + كتم الصوت) ===== */
body > .home-nav {
  min-height: 46px;
  padding: max(2px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 2px max(10px, env(safe-area-inset-left));
  background: rgba(13, 19, 38, .96);
  border-bottom: 1px solid var(--line-soft);
}
.top-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.logo {
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1;
}
.logo span {
  font-family: var(--num);
}
.peer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.peer::before {
  content: "";
  width: 1.1em;
  height: 1.1em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--i-tv) center / contain no-repeat;
  mask: var(--i-tv) center / contain no-repeat;
}
.peer.on { color: var(--ok); }
.restart {
  position: relative;
  border: 1.5px solid var(--line-soft);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  flex: none;
}
#mute::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: currentColor;
  -webkit-mask: var(--i-sound) center / contain no-repeat;
  mask: var(--i-sound) center / contain no-repeat;
}
#mute.on {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
#mute.on::before {
  -webkit-mask-image: var(--i-mute);
  mask-image: var(--i-mute);
}

/* ===== شريط بطاقات الفرق المتقابلة وكبسولة المؤقت الوسطى ===== */
.top {
  flex: none;
  padding: 4px 10px;
  background: rgba(13, 19, 38, .94);
  border-bottom: 1px solid var(--line-soft);
}
body.ph-setup .top,
body.ph-setup #scores,
body.ph-setup:not(.can-undo) .foot {
  display: none;
}
.scores {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
body.ph-final .scores {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.score {
  min-width: 0;
  min-height: 46px;
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--panel);
  border: 1.5px solid var(--line-soft);
  border: 1px solid var(--tc);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.score.adj {
  cursor: pointer;
}
.score.on {
  background: linear-gradient(180deg, var(--tcd) 0%, rgba(19, 28, 56, .95) 100%);
  border-color: var(--tc);
  border-top-color: #fff;
  box-shadow: 0 0 0 1px var(--tc);
}
.score-top {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.t-mark {
  font-style: normal;
  font-size: 11px;
  line-height: 1;
  color: var(--tc);
  flex: none;
}
.score.on .t-mark { color: #fff; }
.score span,
.t-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--tct);
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  flex: 1 0 auto;
  text-align: start;
}
.score.on span,
.score.on .t-name { color: #fff; }
.t-badge {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  color: var(--text);
  white-space: nowrap;
  flex: none;
}
.score.on .t-badge {
  background: var(--tc);
  color: #091024;
}
.score-bot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.score b,
.t-pts {
  font-family: var(--num);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  direction: ltr;
  unicode-bidi: plaintext;
  white-space: nowrap;
}
.score.on b,
.score.on .t-pts { color: #fff; }
.t-res {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--muted);
  white-space: nowrap;
}
.score.on .t-res { color: rgba(255, 255, 255, .86); }

/* كبسولة المؤقت والدور الوسطى */
.turnbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--tcd);
  color: #fff;
  border: 2px solid var(--tc);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 15px;
  font-weight: 800;
}
.turnbar b {
  font-family: var(--num);
  font-size: 20px;
  font-weight: 800;
  display: inline-block;
}
.turnbar.timer-pod {
  min-width: 60px;
  min-height: 46px;
  padding: 2px 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
}
.turnbar.timer-pod b {
  font-size: 19px;
  line-height: 1.2;
  direction: ltr;
}
.pod-lbl {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}
.turnbar.passbar {
  background: var(--action-deep);
  border-color: var(--action);
}
.turnbar.zero,
.turnbar.low {
  background: var(--bad);
  border-color: var(--bad-text);
  color: #fff;
}

/* ===== المسرح الرئيسي والبطاقات ===== */
main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 4px 10px calc(4px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 10px 12px;
}
body:not(.ph-live):not(.ph-end) main > .card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  gap: 8px;
}
.card h1 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.card h2 { margin: 4px 0; font-size: 18px; }
.muted, .label, .small { color: var(--muted); }
.muted { line-height: 1.5; margin: 4px 0; }
.small { font-size: 13px; }
.warn {
  background: rgba(255, 184, 28, .12);
  border: 1px solid var(--warn);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--warn);
  font-size: 13px;
}
.label { display: block; margin: 8px 0 4px; font-size: 14px; }
.row { display: flex; gap: 8px; }

/* ===== الأزرار العامة ===== */
.btn {
  border: 2px solid var(--line-soft);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}
.btn:disabled { opacity: .35; cursor: default; }
.btn.main, body .btn.main {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .35);
  font-weight: 800;
}
.btn.big {
  width: 100%;
  min-height: 50px;
  font-size: 18px;
}
.btn.ghost {
  background: none;
  border-color: transparent;
  color: var(--muted);
}
.btn.miss, body .tools .miss, .ph-live .tools .btn.miss {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
  box-shadow: 0 2px 9px rgba(0, 0, 0, .35);
  font-weight: 800;
}
.splashbtn, .splashbtn.on {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--text);
  font-weight: 800;
}
.splashbtn.on {
  border-color: var(--gold);
  color: var(--gold-text);
}

/* ===== شريط السؤال المدمج والشارات والأدوات المرجعية ===== */
.ph-live main > .card,
.ph-end main > .card.end-card {
  flex: none;
  padding: 4px 8px;
  border-radius: 12px;
}
.q-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 8px;
}
.meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 22px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: var(--panel-2);
  color: var(--text);
  border: 0;
}
.meta .chip.warn { color: var(--warn); }
.question-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 6px;
  width: 100%;
}
.ranking-details,
.answer-details {
  position: relative;
  min-width: 0;
  flex: 0 1 auto;
}
.ranking-details[open],
.answer-details[open] {
  flex: 1 1 100%;
}
.ranking-details summary,
.answer-details summary,
.report-list {
  min-height: 44px;
  padding: 2px 3px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--gold-text, #FBAC28); cursor: pointer;
}
.ranking-details summary,
.answer-details summary {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  list-style: none;
}
.ranking-details summary::-webkit-details-marker,
.answer-details summary::-webkit-details-marker {
  display: none;
}
.ranking-details summary::before,
.answer-details summary::before {
  content: "▾";
  font-size: 10px;
  line-height: 1;
}
.report-list {
  display: inline-flex;
  align-items: center;
  text-underline-offset: 3px;
  /* زر أصلي: بلا تصفير يرسم المتصفح خلفيته الفاتحة وسط البطاقة الداكنة (فحص جيميناي 2026-10-29) */
  background: none;
  border: 0;
  font-family: inherit;
}
.score.adj:focus-visible { outline: 3px solid var(--gold-text, #FBAC28); outline-offset: 2px; }
.details-pop {
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 2px;
  max-height: 150px;
  overflow-y: auto;
}
.ranking-details p,
.answer-details p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 6px;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.ranking-details p:last-child,
.answer-details p:last-child {
  margin-bottom: 0;
}
body .ranking-details .src {
  display: block;
  color: var(--text);
}
.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-inline-start: 8px;
  padding-block: 4px;
  color: var(--gold-text);
  font-weight: 700;
}
.q,
.ph-live .q {
  margin: 2px 0 0;
  padding: 4px 8px;
  font-size: calc(14px * var(--k));
  line-height: 1.28;
  font-weight: 800;
  text-align: center;
  background: var(--panel-2);
  border: 0;
  border-bottom: 1px solid var(--gold);
  border-radius: 10px;
  color: var(--text);
}
.ph-pre .q {
  font-size: calc(18px * var(--k));
  padding: 10px;
}

/* تنبيهات الوقت والباس واقتراح الإنهاء */
.timenote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 3px 0 0;
  padding: 3px 8px;
  border-radius: 8px;
  background: transparent;
  border: 1.5px solid var(--warn);
  color: var(--warn);
  font-size: calc(12px * var(--k));
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}
.timenote i {
  width: 1em;
  height: 1em;
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--i-bell) center / contain no-repeat;
  mask: var(--i-bell) center / contain no-repeat;
}
.timenote em { font-style: normal; }
.passrules {
  display: flex;
  gap: 5px;
  margin-top: 3px;
}
.passrules span {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 22px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}
.passrules .ok { background: transparent; border: 1.5px solid var(--ok); color: var(--ok); }
.passrules .no { background: transparent; border: 1.5px solid var(--bad-text); color: var(--bad-text); }
.suggest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  padding: 3px 6px 3px 10px;
  border-radius: 8px;
  background: rgba(200, 166, 255, .14);
  color: var(--action);
  font-size: 12px;
  font-weight: 700;
}
.suggest .btn {
  min-height: 44px;
  padding: 4px 10px;
  font-size: 12px;
}

/* ===== شبكة الأجوبة (عمودان في العمودي، تدعم 10 و11 جواباً بلا تمرير مزعج) ===== */
.answers, .traps { display: grid; gap: 4px; }
.ph-live .answers,
.ph-end .answers {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(min-content, 1fr);
  align-content: stretch;
}
.ph-live .answers.l11 .answer-row:last-child:nth-child(odd),
.ph-end .answers.l11 .answer-row:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.answer-row {
  min-width: 0;
  display: flex;
}
.ans {
  width: 100%;
  min-height: 44px;
  height: 100%;
  padding: 3px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--panel);
  display: grid;
  grid-template-columns: minmax(22px, max-content) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 5px;
  row-gap: 1px;
  align-items: center;
  text-align: start;
  cursor: pointer;
}
.ans .n {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  font-family: var(--num);
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold-text);
}
.ans .pt {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--num);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--gold-text);
  text-align: center;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
body.passing .ans:not(.open) .pt { color: #FFCFD7; }
.ans .nm {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  font-size: max(16px, calc(16px * var(--k)));
  font-weight: 700;
  line-height: 1.18;
  color: var(--text);
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
}
.ans .nm small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
}
.ans .nm small.answer-hint,
.answer-hint {
  color: var(--gold-text);
  font-weight: 700;
}
.ans.hinted {
  border-color: var(--hint);
  border-style: dashed;
  background: rgba(251, 172, 40, .08);
}
.ans.open,
.ans.open.t-a,
.ans.open.t-b {
  background: linear-gradient(135deg, var(--tcd) 0%, rgba(19, 28, 56, .92) 100%);
  border-color: var(--tc);
  color: #fff;
  opacity: .94;
}
.ans.open.unrev {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line-soft);
  color: var(--muted);
  opacity: .75;
}
.ans.open .n {
  background: var(--tc);
  border-color: var(--tc);
}

/* ===== شريط الفخاخ الأحمر المخصص ===== */
.ph-live .traps,
.ph-end .traps {
  flex: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: rgba(200, 30, 69, .08);
  border: 1px solid rgba(200, 30, 69, .42);
  border-radius: 10px;
  padding: 3px 5px;
}
.trap-h {
  grid-column: 1 / -1;
  margin: 0;
  display: flex;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--bad-text);
}
.trap-h span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.1;
}
.trap-h span::before {
  content: "";
  display: inline-block;
  width: .95em;
  height: .95em;
  background: currentColor;
  -webkit-mask: var(--i-warn) center / contain no-repeat;
  mask: var(--i-warn) center / contain no-repeat;
}
.ans.trap {
  min-height: 44px;
  height: auto;
  padding: 3px 5px;
  border-radius: 8px;
  border: 1.5px dashed var(--bad);
  background: var(--panel);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  row-gap: 1px;
  justify-items: center;
  text-align: center;
}
.ans.trap .n { display: none; }
.ans.trap .nm {
  grid-column: 1;
  grid-row: 1;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}
.ans.trap .nm small {
  font-size: 10px;
  line-height: 1.1;
}
/* الفخ المكشوف أحمر: لون القيمة الباهت كان بتباين 2.97 (درس 2026-11-03) */
.ans.trap.open .nm small { color: #fff; }
.ans.trap .pt {
  grid-column: 1;
  grid-row: 2;
  font-size: 10px;
  line-height: 1.2;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--bad);
  color: #fff;
}
.ans.trap.open,
.ans.trap.open.t-a,
.ans.trap.open.t-b {
  background: var(--bad);
  border-style: solid;
  border-color: #fff;
  color: #fff;
  opacity: .92;
}

/* ===== شريط أدوات الحكم السفلي (صفان مدمجان، كل زر >= 44×44) ===== */
.ph-live .tools {
  flex: none;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  padding: 0;
}
.ph-live .tools .btn {
  grid-column: span 3;
  min-height: 44px;
  height: auto;
  padding: 4px 6px;
  font-size: calc(13px * var(--k));
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  color: var(--text);
}
.ph-live .tools .t-plus,
.ph-live .tools .t-undo,
.ph-live .tools .pausebtn {
  grid-column: span 4;
}
.ph-live .tools .btn.t-pass,
.tools .t-pass {
  background: var(--action-deep);
  border-color: var(--action);
  color: #fff;
}
.tools .t-pass::before,
.tools .t-hint::before,
.tools .pausebtn::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat;
  mask: var(--ic) center / contain no-repeat;
}
.tools .t-pass::before { --ic: var(--i-skip); }
.tools .t-hint::before { --ic: var(--i-bulb); }
.tools .pausebtn::before { --ic: var(--i-pause); }
body.paused .tools { display: none; }
body.paused .answers,
body.paused .traps,
body.paused .cats {
  opacity: .35;
  pointer-events: none;
}
.pausebar {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  background: var(--warn);
  color: var(--ink);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 16px;
}
.pausebar .row .btn {
  flex: 1;
  min-height: 44px;
}

/* ===== شاشات ما قبل السؤال ونهايته والنتيجة النهائية والإعداد ===== */
body.ph-live .foot { display: none; }
.foot {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: rgba(13, 19, 38, .97);
  border-top: 1px solid var(--line-soft);
}
.foot .btn {
  min-height: 44px;
}
body.ph-pre main > .card { position: relative; }
body.ph-pre .preacts {
  position: sticky;
  bottom: -1px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  background: var(--panel);
  z-index: 2;
  flex: none;
}
body.ph-pre .preacts .btn { min-height: 48px; }
body.ph-end main { overflow-y: auto; }
.end-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
  margin-top: 3px;
}
.end-summary h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.end-gains {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.end-summary .btn.big {
  grid-column: 1 / -1;
  min-height: 44px;
  font-size: 16px;
}
.gain {
  margin: 0;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  color: #fff;
  background: var(--tcd);
  border: 1.5px solid var(--tc);
  border-radius: 8px;
  unicode-bidi: plaintext;
}
body.ph-final main > .card {
  justify-content: center;
  text-align: center;
  gap: 10px;
}
body.ph-final h1 {
  font-size: 28px;
  margin: 0;
}
body.ph-final .gain {
  font-size: 22px;
  padding: 12px;
}
.game-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  padding: 10px;
  color: var(--gold-text);
  text-decoration: none;
}
.card.wait {
  justify-content: center;
  gap: 12px;
  text-align: start;
}
/* بحجم محتواها في وسط الشاشة، لا ممطوطة بطولها مع فراغ كبير فوق العنوان (فحص جيميناي 2026-10-29) */
body:not(.ph-live):not(.ph-end) main > .card.wait { flex: 0 1 auto; margin-block: auto; }
.card.wait h1 { font-size: 26px; }
.card.wait .lead { font-size: 16px; line-height: 1.55; margin: 0; }
.codein {
  flex: 1;
  min-width: 0;
  width: 0;
  font-family: var(--num);
  font-size: 24px;
  text-align: center;
  letter-spacing: 6px;
  padding: 6px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--used);
  direction: ltr;
}
.tvlink {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== نافذة تعديل النقاط والرسالة الكبيرة ===== */
.adjov {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 12, 27, .76);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: jfade 180ms var(--ease-out);
}
.adjbox {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: jbox 240ms var(--ease-out) backwards;
}
.adjh { font-size: 18px; text-align: center; }
.adjrow {
  background: var(--tcd);
  border: 2px solid var(--tc);
  border-radius: 12px;
  padding: 8px;
  color: #fff;
}
.adjname {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  margin-bottom: 6px;
}
.adjname b {
  font-family: var(--num);
  font-size: 22px;
  direction: ltr;
  unicode-bidi: isolate;
}
.adjbtns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.adjbtns .btn {
  min-height: 46px;
  font-family: var(--num);
  font-size: 17px;
  font-weight: 800;
  direction: ltr;
  padding: 4px;
}
.adjbtns .minus { background: #9b1036; border: 2px solid var(--bad); color: #fff; }
.adjbtns .plus { background: #0F6E56; border: 2px solid #A6FFCA; color: #fff; }
.adjbox .small { margin: 0; text-align: center; }
.bignote {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: rgba(8, 12, 27, .95);
  color: #fff;
}
.bignote b { font-size: 30px; font-weight: 800; }
.bignote p { margin: 0; font-size: 19px; opacity: .85; max-width: 420px; line-height: 1.6; }

/* ===== الحركات والاستجابة اللمسية ===== */
.btn, .ans, .restart, .score.adj, .chip {
  transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:not(:disabled):active, .restart:active, .score.adj:active {
  transform: scale(.97);
  transition-duration: 70ms;
}
.ans:not(:disabled):active {
  transform: scale(.985);
  transition-duration: 70ms;
}
.enter { animation: jin 240ms var(--ease-out) backwards; }
@keyframes jin { from { opacity: 0; transform: translateY(8px); } }
.answers.qin .ans { animation: jin 260ms var(--ease-out) backwards; }
.ans.open.fresh { animation: jopen 320ms var(--ease-settle); }
@keyframes jopen { 0% { transform: scale(.94); opacity: .55; } 100% { transform: none; opacity: 1; } }
.ans.trap.open.fresh, .score b.down { animation: jshake 360ms var(--ease-out); }
@keyframes jshake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.score b.up { animation: jup 360ms var(--ease-out); }
@keyframes jup { 40% { transform: scale(1.18); } }
.q.qnew, .ph-live .q.qnew { animation: jqnew 300ms var(--ease-out); }
@keyframes jqnew { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.turnbar.swap { animation: jswap 260ms var(--ease-out); }
@keyframes jswap { from { opacity: .2; transform: translateX(24px) scale(.97); } }
@keyframes jfade { from { opacity: 0; } }
@keyframes jbox { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.turnbar.low { animation: jlow 500ms var(--ease-in-out) 10 alternate; }
@keyframes jlow { to { transform: scale(1.025); } }
@media (prefers-reduced-motion: reduce) {
  .enter, .answers.qin .ans, .ans.open.fresh, .q.qnew, .ph-live .q.qnew, .turnbar.swap, .adjov, .adjbox { animation: jfade 150ms linear both !important; }
  .ans.trap.open.fresh, .score b.down, .score b.up, .turnbar.low { animation: none !important; }
  .btn:active, .ans:active, .restart:active, .score.adj:active { transform: none; }
}

/* ===== خامة الزعفران المعتمدة وتباين الحبر ===== */
html body:not(#x) .btn.main { background: url("media/brand/saffron.webp") center / 360px, #FBAC28; color: #1B1633; box-shadow: 0 3px 12px rgba(0, 0, 0, .35); }
html body:not(#x) .logo span, html body:not(#x) .ans .pt, html body:not(#x) .btn.pick.on, html body:not(#x) .splashbtn.on, html body:not(#x) .ans .n {
  background: none; color: var(--gold-text, #FBAC28); -webkit-text-fill-color: currentColor;
}
html body:not(#x) .btn.pick.on *, html body:not(#x) .tools .t-hint *, html body:not(#x) .splashbtn.on * { -webkit-text-fill-color: currentColor; }
html body:not(#x) .tools .t-hint { background: url("media/brand/saffron.webp") center / 360px, var(--gold); border-color: var(--gold); color: var(--ink); -webkit-text-fill-color: currentColor; }
html body:not(#x) .ans.open .n, html body:not(#x) .ans.open .pt { color: var(--text); -webkit-text-fill-color: currentColor; }
html body:not(#x) .ans.trap .pt { background: var(--bad); color: #fff; -webkit-text-fill-color: currentColor; }

/* ===== الوضع الأفقي (844×390): قمرة قيادة من عمودين بلا قص ===== */
@media (orientation: landscape) and (max-height: 520px) {
  body > .home-nav { min-height: 44px; padding-block: 1px; }
  .top { padding: 1px 10px; }
  .score { min-height: 44px; padding: 2px 8px; }
  .turnbar.timer-pod { min-height: 44px; padding: 2px 6px; }
  body.ph-live main,
  body.ph-end main {
    max-width: 100%;
    padding: 1px 8px calc(1px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 294px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 2px 8px;
    align-items: stretch;
    overflow-y: auto;
  }
  body.ph-live main > .pausebar { grid-column: 1 / -1; }
  body.ph-live main > .card,
  body.ph-end main > .card.end-card { grid-column: 1; grid-row: 1; align-self: start; padding: 3px 6px; }
  body.ph-end main > .card.end-card { grid-row: 1 / span 2; }
  body.ph-live .question-tools,
  body.ph-end .question-tools { gap: 1px 4px; flex-wrap: nowrap; }
  body.ph-live .ranking-details summary,
  body.ph-live .answer-details summary,
  body.ph-live .report-list,
  body.ph-end .ranking-details summary,
  body.ph-end .answer-details summary,
  body.ph-end .report-list { font-size: 10.5px; padding: 2px 2px; white-space: nowrap; }
  body.ph-live main > .tools { grid-column: 1; grid-row: 2; align-self: end; gap: 3px; }
  body.ph-live main > .answers,
  body.ph-end main > .answers {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    height: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }
  body.ph-live main > .traps,
  body.ph-end main > .traps {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
    align-items: center;
    padding: 2px 5px;
    gap: 4px;
  }
  body.ph-live .trap-h,
  body.ph-end .trap-h {
    grid-column: 1;
    grid-row: 1;
    padding-inline: 2px;
    white-space: nowrap;
  }
  body.ph-live .ans,
  body.ph-end .ans {
    min-height: 44px;
    padding: 1px 5px;
    row-gap: 0;
  }
  body.ph-live .ans .nm,
  body.ph-end .ans .nm {
    font-size: 13px;
    line-height: 1.1;
  }
  body.ph-live .ans .nm small,
  body.ph-end .ans .nm small {
    font-size: 9.5px;
    line-height: 1.05;
  }
  body.ph-live .ans.trap,
  body.ph-end .ans.trap {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    column-gap: 4px;
    padding: 1px 5px;
    text-align: start;
    justify-items: start;
  }
  body.ph-live .ans.trap .nm,
  body.ph-end .ans.trap .nm { grid-column: 1; grid-row: 1; text-align: start; font-size: 11px; line-height: 1.05; }
  body.ph-live .ans.trap .nm small,
  body.ph-end .ans.trap .nm small { font-size: 9px; line-height: 1.05; }
  body.ph-live .ans.trap .pt,
  body.ph-end .ans.trap .pt { grid-column: 2; grid-row: 1; }
  .ph-live .answers.l11 .answer-row:last-child:nth-child(odd),
  .ph-end .answers.l11 .answer-row:last-child:nth-child(odd) {
    grid-column: auto;
  }
  body.ph-end .foot,
  body.ph-pre .foot { display: none; }
  body.ph-pre main > .card { padding: 6px 10px; gap: 4px; }
  body.ph-pre .q { padding: 4px 8px; font-size: 15px; }
  body.ph-pre .card > .turnbar { padding: 3px 10px; font-size: 13px; }
  body.ph-pre .muted { margin: 0; font-size: 12px; }
  body.ph-pre .preacts { flex-direction: row; gap: 6px; padding-top: 4px; }
  body.ph-pre .preacts .btn { flex: 1; min-height: 44px; font-size: 13px; padding: 4px 8px; }
  body.ph-pre, body.ph-final, body.ph-setup { overflow-y: auto; }
  body:not(.ph-live):not(.ph-end)[class*="ph-"] main { flex: none; min-height: 260px; }
}
@media (max-height: 760px) and (orientation: portrait) {
  .top { padding: 2px 8px; }
  main { padding: 2px 8px calc(2px + env(safe-area-inset-bottom)); gap: 3px; }
  .ph-live main > .card { padding: 3px 6px; }
  .ph-live .q { padding: 3px 6px; font-size: calc(13px * var(--k)); line-height: 1.22; }
  .ph-live .answers { gap: 3px; }
  .ph-live .traps { padding: 2px 4px; gap: 3px; }
  .ph-live .tools { gap: 3px; }
}

/* قائمة واحدة في الطرف الأيسر من شريط التدفق. */
body[data-game] > .home-nav { position: sticky; top: 0; width: 100%; min-height: 44px; flex-wrap: nowrap; }
.top-meta { flex: 1; }
.judge-menu { position: relative; margin-inline-start: auto; }
.judge-menu > summary { width: 44px; height: 44px; min-height: 44px; border: 1px solid var(--line-soft); border-radius: 12px; list-style: none; display: grid; place-items: center; cursor: pointer; }
.judge-menu > summary::-webkit-details-marker { display: none; }
.judge-menu > summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.judge-menu-items { position: absolute; inset-inline-end: 0; top: 48px; z-index: 150; width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 64px); overflow-y: auto; padding: 12px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: 0 12px 28px #0006; display: flex; flex-direction: column; gap: 8px; }
.judge-menu:not([open]) > .judge-menu-items { display: none; }
.judge-menu-items a { text-decoration: none; }
#support-link { gap: 8px; }
.sup-ic{width:1.25em;height:1.25em;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.judge-menu #mute { width: 100%; }
.judge-menu #mute::before { right: 12px; left: auto; width: 22px; }
/* الكتم داخل القائمة يكتب اسمه في كل المقاسات: كان أيقونة بلا نص على الآيباد والمكتب (تدقيق 2026-11-19، البند 50) */
.judge-menu #mute { height: auto; padding: 8px 44px; font: inherit; font-weight: 700; }
.judge-menu #mute::after { content: attr(data-label); }
.scores { direction: rtl; }
.scores:not(:has(.timer-pod)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.ph-final:not(.can-undo) .foot { display: none; }   /* ضغطة غلط على «النتيجة النهائية» لها رجوع (مراجعة 2026-11-04) */

.ph-final .end-primary { display: flex; align-items: stretch; justify-content: center; gap: 10px; flex-wrap: nowrap; }
.ph-final .end-primary .main { flex: 1; min-width: 0; }

/* طبقة الحركة (2026-10-26): زر الضغط المطوّل يمتلئ بلون الخطر */
#reset.fx-hold { --fx-hold: rgba(224,83,61,.55); }

/* الفريق الأول يميناً في كل الشاشات، مثل ستة في ستة والقراءة من اليمين (قرار المالك 2026-11-01)؛ لوحة الأجوبة لها اتجاهها فلا تتأثر */
#judge .judge-middle, #stage .teamsin, #stage .mid { direction: rtl; }

/* نهاية اللعبة: الفائز يتصدر، والخاسر أهدأ، ولحظات الجولة تحته */
.final-card h1.t-a, .final-card h1.t-b { color: var(--gold-text); }
.final-gap { margin: 0; color: var(--muted); font-size: 16px; }
body.ph-final .gain.won { font-size: 28px; padding: 18px 12px; }
.final-moments { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.final-moments p { margin: 0; padding: 8px 12px; font-size: 14px; line-height: 1.4; color: var(--text); background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; }
.final-art { display: block; width: 150px; height: 150px; margin: 0 auto -6px; object-fit: contain; }

/* إعدادات النظام (مراجعة آبل 2026-11-04) */
@media (prefers-contrast: more) { :root { --muted: #E4E2F0; } body#judge .btn { border-width: 2px; } }
@media (forced-colors: active) { body#judge .btn { border: 2px solid ButtonText; } }

/* ===== جوال الحكم على الحاسوب واللوحي (المواصفة 015، مراجعة آبل الكاملة 2026-11-07؛ العيب top10-judge-desktop-zoom) =====
   كل ما ليس جوالاً بالطول (ذاك في judge-phone.css بـ --jfs). أحجامه مبنية على الجوال بين 9.5 و11 بكسل فكانت تحت حد 12.
   لا تكبير شاملاً: zoom 1.25 لكل النوافذ أخفى 6 أجوبة من 10 داخل تمرير على نافذة حاسوب 1366×768 الحقيقية (1366×657)، فرُدّ.
   بدله حد 12 على كل قاعدة كانت تحته فقط، بمحدداتها نفسها (الأكبر منها في حالات أخرى يبقى أكبر)، ورأس السؤال سطر واحد حين يتسع العرض
   فيرجع للأجوبة 24 بكسل من الارتفاع، وما تحته من كتل يسترد الارتفاع على النوافذ العريضة والقصيرة بلا تغيير ترتيب.
   يحرسه قسم الحاسوب في tools/top10/test_judge_phone.cjs (البيانات المحزومة) والقسم 6 في tools/top10/test_apple_review.cjs (قائمة اصطناعية):
   كل جواب وفخ وزر حكم كامل بلا تمرير على 1280×650 و1366×657 و1024×768 و1440×789، وأصغر خط 12، وزرعا التكبير الشامل وحذف هذه الكتلة. */
@media not all and (max-width: 500px) and (max-height: 1000px) and (orientation: portrait) {
  body#judge { --judge-desk: 1; }   /* علامة الكتلة: زرع الحاجز يحذفها بهذه العلامة ليثبت أنه يكشف غيابها */
  .t-mark, .t-badge, .t-res, .pod-lbl, .chip, .passrules span, .trap-h,
  .ans .n, .ans .pt, .ans .nm small, .ans.trap .nm, .ans.trap .nm small, .ans.trap .pt,
  .ranking-details summary, .answer-details summary, .report-list,
  .ranking-details summary::before, .answer-details summary::before { font-size: 12px; }
  .q, .ph-live .q { font-size: max(12px, calc(14px * var(--k))); }
  .timenote { font-size: max(12px, calc(12px * var(--k))); }
  .ph-live .tools .btn { font-size: max(12px, calc(13px * var(--k))); }
  /* زر حجم الخط يظهر هنا أيضاً، والاسم اللاتيني الصغير يكبر معه: كان ثابتاً على 12 مهما اختار الحكم (تدقيق 2026-11-19، البند 49) */
  .judge-menu #fs-size { display: flex; align-items: center; justify-content: center; width: 100%; }
  .judge-menu #fs-size[hidden] { display: none; }
  .ans .nm small, .ans.trap .nm, .ans.trap .nm small { font-size: max(12px, calc(12px * var(--k))); }
  /* سطر اللاعب اللاتيني في التشكيلات اتجاهه يسار فكان يلتصق بالحافة البعيدة عن اسمه العربي: يُحاذى تحت الاسم (تدقيق 2026-11-19، البند 54) */
  .ans:not(.trap) .nm small.answer-value { text-align: right; }
  /* القمرة الأفقية (نافذة أقصر من 520) لها أحجام أصغر بمحددات أعلى: الحد نفسه بمحدداتها */
  body.ph-live .ranking-details summary, body.ph-live .answer-details summary, body.ph-live .report-list,
  body.ph-end .ranking-details summary, body.ph-end .answer-details summary, body.ph-end .report-list,
  body.ph-live .ans .nm small, body.ph-end .ans .nm small,
  body.ph-live .ans.trap .nm, body.ph-end .ans.trap .nm,
  body.ph-live .ans.trap .nm small, body.ph-end .ans.trap .nm small { font-size: max(12px, calc(12px * var(--k))); }
}
/* عرض 700 فأكثر ليس جوالاً بالطول أبداً: الشارات وروابط المصدر والأسماء المقبولة في سطر واحد، وكانت سطرين (68 بكسل) لأن الأدوات بعرض 100% */
@media (min-width: 700px) {
  .question-tools { width: auto; flex: 0 1 auto; gap: 2px 14px; }
}
/* نافذة عريضة: أدوات الحكم السبع صف واحد، وعنوان الفخاخ في أول صفها؛ كانت صفين وسطراً فوق الفخاخ، فاختفى الجواب الحادي عشر
   في التشكيلات داخل تمرير على 1280×650 و1366×657 حتى قبل مراجعة آبل. الترتيب نفسه، و«غلط» أول زر */
@media (min-width: 1000px) {
  .ph-live .tools { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .ph-live .tools .btn, .ph-live .tools .t-plus, .ph-live .tools .t-undo, .ph-live .tools .pausebtn { grid-column: auto; }
  .ph-live .traps, .ph-end .traps { grid-template-columns: auto repeat(3, minmax(0, 1fr)); align-items: center; }
  .ph-live .trap-h, .ph-end .trap-h { grid-column: 1; grid-row: 1; padding-inline: 4px; max-width: 7.5em; text-align: center; }
  .ph-live .trap-h span, .ph-end .trap-h span { justify-content: center; flex-wrap: wrap; }
  /* قيمة الفخ بجانب اسمه لا تحته: صف أقل في بطاقة الفخ الطويلة */
  .ph-live .ans.trap, .ph-end .ans.trap { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; column-gap: 6px; }
  .ph-live .ans.trap .nm, .ph-end .ans.trap .nm { grid-column: 1; grid-row: 1; }
  .ph-live .ans.trap .pt, .ph-end .ans.trap .pt { grid-column: 2; grid-row: 1; align-self: center; }
}
/* نهاية السؤال على نافذة عريضة: «السؤال التالي» في صف النقاط نفسه لا تحته، فيرجع صف كامل للأجوبة المكشوفة */
@media (min-width: 1000px) {
  .end-summary { grid-template-columns: auto minmax(0, 1fr) minmax(200px, 32%); }
  .end-summary .btn.big { grid-column: auto; }
}
/* نافذة أعرض: العمود 920 بدل 760، فتقل الأسطر المكسورة في الأجوبة والفخاخ الطويلة (فخ «Doctor Strange in the Multiverse of Madness»
   صار أربعة أسطر بعرض 186 فدفع الجواب العاشر تحت حافة التمرير على 1280×650) */
@media (min-width: 1100px) {
  main, .scores { max-width: 920px; }
}
/* نافذة حاسوب قصيرة: صورة الفائز أصغر حتى يبقى «لعبة جديدة» كاملاً، والتوسيط «آمن» فلا يُقص أعلى البطاقة إذا طالت
   (كان الزر مقصوصاً 4 بكسل والصورة فوق حافة البطاقة على 1280×650 و1366×657) */
body.ph-final main > .card { justify-content: safe center; }
@media (min-width: 700px) and (max-height: 720px) {
  .final-art { width: 104px; height: 104px; }
  /* وفراغات أضيق بين الأقسام: 12 بكسل ترجع للأجوبة في أطول القوائم بتلميحات الفريقين */
  main { gap: 3px; padding-top: 2px; padding-bottom: calc(2px + env(safe-area-inset-bottom)); }
  .ph-live .answers, .ph-end .answers { gap: 3px; }
}

/* ===== زرّا الوقت (المواصفة 016، 2026-11-08): وقت الدور ووقت السؤال كل واحد بزره، والإيقاف بالكلمة وبحد متقطع لا باللون وحده ===== */
/* زرّا الوقت داخل شريط الأدوات (المواصفة 016): على الجوال صف ثالث بنصفين، وعلى الحاسوب في صف الأدوات الواحد */
.ph-live .tools .time-btn { flex-wrap: wrap; gap: 0 2px; }
/* نافذة أضيق من 1000: الزران في الصف الثاني مع «+10 ث» و«تراجع» و«إيقاف»؛ صف ثالث أنزل الأدوات تحت شاشة 375×667 بخط مضاعف */
@media (max-width: 999px) {
  .ph-live .tools .time-btn .verb { display: none; }
  .ph-live .tools:has(.t-qclock) .t-plus, .ph-live .tools:has(.t-qclock) .t-undo, .ph-live .tools:has(.t-qclock) .pausebtn { grid-column: span 2; }
  .ph-live .tools:has(.t-qclock) .time-btn { grid-column: span 3; }
  .ph-live .tools:has(.time-btn.solo) .t-plus, .ph-live .tools:has(.time-btn.solo) .t-undo, .ph-live .tools:has(.time-btn.solo) .pausebtn, .ph-live .tools .time-btn.solo { grid-column: span 3; }
}
/* رمز الإيقاف والتكميل بقناع مثل زر «إيقاف»: حرفا ⏸ و▶ لا يوجدان في خط اللعبة فظهرا خطوطاً */
.tools .time-btn .tico { display: inline-block; width: 1em; height: 1em; flex: none; margin-inline-end: 4px; background: currentColor; -webkit-mask: var(--i-pause) center / contain no-repeat; mask: var(--i-pause) center / contain no-repeat; }
/* زرّا الوقت برمز ساعة إيقاف لا برمز الإيقاف: ثلاثة أزرار بالرمز نفسه كانت تلتبس على الحكم، والإيقاف الكامل يبقى له وحده (مراجعة آبل 2026-11-08، buttons.md) */
.tools .time-btn .tico.watch { --i-watch: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='14' r='7.5'/%3E%3Cpath d='M12 14V10.5M10 2.5h4M18.5 6.5l1.5-1.5'/%3E%3C/svg%3E"); -webkit-mask-image: var(--i-watch); mask-image: var(--i-watch); }
/* الرمز والاسم سطر، والوقت سطر تحته، في الزرين معاً */
html:not([data-jfs="1.25"]):not([data-jfs="1.5"]):not([data-jfs="2"]) .ph-live .tools .time-btn > b { flex-basis: 100%; text-align: center; }   /* بالخط الأكبر الزر بعرض الصف فيبقى سطراً واحداً */
.tools .time-btn .tico.play { --i-play: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12.5-7.5z' fill='black'/%3E%3C/svg%3E"); -webkit-mask-image: var(--i-play); mask-image: var(--i-play); }
.ph-live .tools .time-btn b { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.ph-live .tools .time-btn.held { border-style: dashed; border-width: 2px; border-color: var(--gold); }
@media (min-width: 1000px) {
  .ph-live .tools { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .ph-live .tools .time-btn, .ph-live .tools .time-btn.solo { grid-column: auto; }
}
.turnbar.held { opacity: .8; border-style: dashed; }
/* الزر المعطل لا يطلق نقرة، فلمسه والقائمة مفتوحة لم يكن يغلقها؛ يمرّر اللمسة لما تحته فتصل الصفحة (2026-11-08) */
.tools .btn:disabled { pointer-events: none; }

/* رمز التشغيل في «ابدأ الوقت» و«أكمل اللعب» مرسوم بقناع بلون الكلام، لا حرف ▶ (مراجعة إمبكابل 2026-11-09) */
.btn .bico { display: inline-block; width: 1em; height: 1em; flex: none; margin-inline-end: 6px; vertical-align: -.08em; background: currentColor; }
.btn .bico.play { --i-play: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3v18l17-9z' fill='black'/%3E%3C/svg%3E"); -webkit-mask: var(--i-play) center / contain no-repeat; mask: var(--i-play) center / contain no-repeat; }
@media (forced-colors: active) { .btn .bico { background: ButtonText; } }

/* تعذّر تحميل الأسئلة وقت الاستئناف: رسالة وزر، واللعبة محفوظة (تدقيق 2026-11-19) */
.loadfail { margin: 24px 16px 12px; text-align: center; line-height: 1.7; }
.loadfail-retry { display: block; margin: 0 auto; min-height: 48px; padding: 0 28px; border: 0; border-radius: 14px; background: var(--gold, #f2c14e); color: #1a1408; font: inherit; font-weight: 800; }
