/* Trivia 501 question screen (#40), as docs/design/question-screen.html.
   Loaded after the older layers, so some rules need !important to win over them.
   The active player's answers (.answer-option) and the read-only copy on other phones (.live-scene-option)
   look the same, so the card does not jump when the server's result replaces the player's own buttons. */

.sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Timer ring: runs down clockwise; the last 5 seconds turn white and pulse (no red on the timer). */
.live-scene-clock.q-timer{position:relative;flex:none;width:64px;height:64px;min-width:0;padding:0;border:0;border-radius:50%;background:none}
.q-timer svg{display:block;width:100%;height:100%;transform:rotate(-90deg)}
.q-timer .trk{fill:none;stroke:var(--fl-line);stroke-width:6}
.q-timer .arc{fill:none;stroke:var(--fl-accent);stroke-width:6;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:calc(100 - var(--left,1)*100);transition:stroke-dashoffset .2s linear}
.live-scene-clock.q-timer strong{position:absolute;inset:0;display:grid;place-items:center;margin:0;color:var(--fl-cream);font:italic 800 1.5rem/1 var(--fl-display);letter-spacing:0;font-variant-numeric:tabular-nums}
.q-timer.urgent .arc{stroke:white}
.live-scene-clock.q-timer.urgent strong{color:white}
.q-timer.urgent{animation:q-pulse 1s ease-in-out infinite}
@keyframes q-pulse{50%{transform:scale(1.1)}}

/* Answers: one column on a phone, two from 600px. */
.answer-options,.live-scene-options{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-top:10px}
@media(min-width:600px){.answer-options,.live-scene-options{grid-template-columns:1fr 1fr!important}}
.answer-option,.answer-option:hover,.answer-option:focus:not(:focus-visible),.live-scene-option{
 position:relative;display:flex!important;align-items:center;gap:10px;width:100%;min-width:0;min-height:56px!important;margin:0;padding:12px 14px!important;
 border:2px solid var(--fl-line)!important;border-radius:14px!important;background:color-mix(in srgb, var(--fl-night) 55%, transparent)!important;
 color:var(--fl-cream)!important;font:600 1rem/1.25 var(--fl-text)!important;text-align:left;box-shadow:none!important;opacity:1;filter:none!important;
 transition:transform .08s,border-color .12s,background-color .12s,opacity .12s}
.answer-option{cursor:pointer}
.answer-option:disabled{cursor:default;opacity:1}
.answer-option:active:not(:disabled){transform:scale(.975)}
.answer-option:focus-visible{outline:3px solid white;outline-offset:2px}
@media (hover:hover) and (pointer:fine){.answer-option:hover:not(:disabled):not(.is-selected){border-color:color-mix(in srgb, var(--fl-select) 45%, transparent)!important}}
.answer-option>span:first-child,.live-scene-option>b{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:8px;background:var(--fl-line)!important;color:var(--fl-cream)!important;font:italic 800 .95rem/1 var(--fl-display)}
.answer-option>i,.live-scene-option>i{margin-left:auto;font-style:normal;font-weight:800;font-size:1.1rem}
.live-scene-option>span{min-width:0}

/* A tap selects in neutral blue; green and red only after the server has checked the answer. */
.answer-option.is-selected,.answer-option.is-selected:hover,.answer-option.is-selected:focus,.live-scene-option.selected{border-color:var(--fl-select)!important;background:color-mix(in srgb, var(--fl-select) 16%, transparent)!important;transform:scale(1.015)}
.answer-option.is-selected>span:first-child,.live-scene-option.selected>b{background:var(--fl-select)!important;color:var(--fl-night)!important}
.answer-options.is-sent .answer-option.is-selected,.stage-suspense .live-scene-option.selected{animation:q-pop .4s}
.answer-options.is-sent .answer-option:not(.is-selected),.stage-suspense .live-scene-option.neutral,.stage-reveal .live-scene-option.neutral{opacity:.45}
.live-scene-option.correct{border-color:var(--fl-good)!important;background:color-mix(in srgb, var(--fl-good) 18%, transparent)!important}
.live-scene-option.wrong{border-color:var(--fl-bad)!important;background:color-mix(in srgb, var(--fl-bad) 18%, transparent)!important}
.live-scene-option.correct>b{background:var(--fl-good)!important;color:var(--fl-night)!important}
.live-scene-option.wrong>b{background:var(--fl-bad)!important;color:var(--fl-night)!important}
.live-scene-option.correct>i{color:var(--fl-good)}
.live-scene-option.wrong>i{color:var(--fl-bad)}
.stage-reveal .live-scene-option.wrong{animation:q-shake .35s}
.stage-reveal .live-scene-option.correct{animation:q-pop .4s}
@keyframes q-pop{40%{transform:scale(1.045)}}
@keyframes q-shake{20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}
.live-checking{margin:14px 0 0;color:var(--fl-muted);font-weight:600}

/* Reduced motion: the system setting or the app's own switch (Settings). */
@media(prefers-reduced-motion:reduce){.q-timer.urgent,.answer-option,.live-scene-option{animation:none!important;transition:none!important}.q-timer .arc{transition:none}}
body.reduce .q-timer.urgent,body.reduce .answer-option,body.reduce .live-scene-option{animation:none!important;transition:none!important}
body.reduce .q-timer .arc{transition:none}
