/* Scoped fixes: keep the exit and title together in RTL at every breakpoint. */
html[dir="rtl"] .quiz-header{
 display:grid;grid-template-columns:auto minmax(0,1fr) auto;direction:rtl;
 align-items:center;justify-content:initial;gap:12px;height:auto;min-height:78px;
 padding-block:13px;
}
html[dir="rtl"] .quiz-header>.icon-text-button{grid-column:1;justify-self:start;min-width:44px;min-height:44px;flex-shrink:0}
html[dir="rtl"] .quiz-header>.quiz-title{grid-column:2;align-items:flex-start;justify-self:stretch;text-align:right;min-width:0;gap:3px}
html[dir="rtl"] .quiz-header>.quiz-title :is(span,small){text-align:right;max-width:100%;overflow-wrap:break-word;line-height:1.6}
html[dir="rtl"] .quiz-header>.quiz-counter{grid-column:3}
@media(max-width:680px){
 html[dir="rtl"] .quiz-header{grid-template-columns:44px minmax(0,1fr);gap:10px;padding:12px 16px;min-height:82px}
 html[dir="rtl"] .quiz-header>.icon-text-button{font-size:0;padding:8px}
 html[dir="rtl"] .quiz-header>.quiz-title>span{font-size:16px}
 html[dir="rtl"] .quiz-header>.quiz-title>small{font-size:12px}
 html[dir="rtl"] .quiz-header>.quiz-counter{display:none}
}
/* iOS can focus a tap as if it were keyboard input. Mark keyboard focus
   separately, so taps never draw the old gold/black rectangular highlight. */
.games-page #mascotGreeting,.games-page #mascotGreeting:focus,.games-page #mascotGreeting:active,.games-page #mascotGreeting:focus-visible{
 outline:none!important;box-shadow:none!important;border:0!important;
 -webkit-tap-highlight-color:transparent!important;-webkit-touch-callout:none;
 background:transparent!important;user-select:none;-webkit-user-select:none;
}
.games-page #mascotGreeting *{-webkit-tap-highlight-color:transparent!important;-webkit-user-select:none;user-select:none}
.games-page #mascotGreeting[data-keyboard-focus="true"]:focus-visible{outline:2px dashed #397964!important;outline-offset:6px}
/* Only the final five seconds of the 60-second game shake. */
.games-page #speedTimePill.final-five{border-color:#bc5c3c;background:#fff0e6;color:#8c3927;animation:clock-wobble-v24 .9s ease-in-out infinite;transform-origin:50% 55%}
@keyframes clock-wobble-v24{0%,30%,100%{transform:rotate(0)}5%,15%,25%{transform:rotate(-3deg)}10%,20%{transform:rotate(3deg)}}
.games-page .result-screen{position:relative;isolation:isolate}
.games-page .result-screen>.record-fireworks{position:absolute;inset:-18px -12px 0;z-index:0;pointer-events:none;overflow:hidden;border-radius:20px}
.games-page .result-screen>:not(.record-fireworks){position:relative;z-index:1}
.record-burst{position:absolute;width:1px;height:1px}
.record-spark{position:absolute;width:5px;height:5px;border-radius:50%;background:var(--spark-color,#c69b30);opacity:0;animation:record-spark-v24 1.6s ease-out var(--burst-delay,0s) 2 both}
@keyframes record-spark-v24{0%{opacity:0;transform:translate(0,0) scale(.5)}10%{opacity:.65}68%{opacity:.45}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.3)}}
.games-page .answer-sources{margin-top:12px;padding:12px 14px;border:1px solid #cfdbd3;border-radius:12px;background:#fffef8;text-align:right;direction:rtl;font-size:13px}
.answer-sources summary{font-weight:700;cursor:pointer;min-height:32px;line-height:1.8;color:#285c4b}
.answer-sources p{font-size:13px;line-height:1.8;margin:8px 0}
.answer-sources a{display:inline-flex;gap:6px;padding:8px 0;color:#21674f;text-decoration:underline;text-underline-offset:3px}
.answer-source-list{display:grid;gap:10px;margin-top:7px}
.answer-sources .source-disclaimer{font-size:11px;color:#6d746b}
@media(prefers-reduced-motion:reduce){
 .games-page #speedTimePill.final-five{animation:none!important}
 .record-spark{animation:none!important;display:none}
 .record-fireworks:before{content:'✦    ✧    ✦';position:absolute;top:10px;left:10%;right:10%;text-align:center;color:#a07824;font-size:28px;letter-spacing:20px;opacity:.35}
}
