/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* Accent palette — unchanged in both themes */
  --yellow:  #FFE74C;
  --purple:  #b779ed;
  --orange:  #ff7949;
  --pink:    #ff6c91;
  --cyan:    #34b8ff;
  --green:   #B7F9A8;
  --peach:   #FFB8A8;

  /* Semantic — light defaults */
  --ink:     #0A0A0A;
  --paper:   #FFFFFF;
  --soft:    #F4F1E6;
  --bg:      var(--yellow);
  --dot:     var(--ink);
  /* accent-text: always dark so colored buttons stay readable */
  --accent-text: #0A0A0A;

  --shadow:    6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --border:    3px solid var(--ink);
  --border-bold: 4px solid var(--ink);
  --radius: 16px;

  --display: 'Archivo Black', system-ui, -apple-system, sans-serif;
  --body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ------------ Dark theme via system preference ------------ */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:   #F0EDE0;
    --paper: #1A1A1A;
    --soft:  #2A2A2A;
    --bg:    #0e0701;
    --dot:   var(--yellow);
      --yellow:  #FFE74C;
  --purple:  #702db4;
  --orange:  #ef4000;
  --pink:    #ff007b;
  --cyan:    #00a6ff;
  --green:   #00a73d;
  --peach:   #901a00;
  }
}

/* ------------ Explicit theme overrides (higher specificity) ------------ */
html[data-theme="light"] {
  --ink:   #0A0A0A;
  --paper: #FFFFFF;
  --soft:  #F4F1E6;
  --bg:    var(--yellow);
  --dot:   var(--ink);
    --yellow:  #FFE74C;
  --purple:  #b779ed;
  --orange:  #ff7949;
  --pink:    #ff6c91;
  --cyan:    #34b8ff;
  --green:   #B7F9A8;
  --peach:   #FFB8A8;

}
html[data-theme="dark"] {
  --ink:   #F0EDE0;
  --paper: #1A1A1A;
  --soft:  #2A2A2A;
  --bg:    #0e0701;
  --dot:   var(--yellow);

  --purple:  #702db4;
  --orange:  #ef4000;
  --pink:    #ff007b;
  --cyan:    #00a6ff;
  --green:   #00a73d;
  --peach:   #901a00;
}

/* ============================================================
   BASE
   ============================================================ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--body);
  font-weight: 500;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.6px);
  background-size: 22px 22px;
  background-position: -2px -2px;
  min-height: 100dvh;
  overflow-x: hidden;
}

.app {
  max-width: 540px;
  margin: 0 auto;
  padding: max(env(safe-area-inset-top), 18px) 18px max(env(safe-area-inset-bottom), 24px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ------------ Screens ------------ */

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: pop 280ms cubic-bezier(.2,.7,.2,1.4);
}
.screen[hidden] { display: none; }

@keyframes pop {
  from { transform: translateY(10px) scale(.985); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ------------ Bubbles ------------ */

.bubble {
  background: var(--paper);
  border: var(--border-bold);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.start-hero {
  border: var(--border-bold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.start-hero img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ------------ Start screen animations ------------ */

@keyframes drop-in {
  from { transform: translateY(-36px) scale(1.05); opacity: 0; }
  70%  { transform: translateY(4px) scale(.98); opacity: 1; }
  to   { transform: none; opacity: 1; }
}

.screen--start { animation: none; }

.screen--start .bubble--title { animation: drop-in     460ms cubic-bezier(.2,.7,.2,1.4) 0ms   both; }
.screen--start .subtitle       { animation: card-rise   380ms cubic-bezier(.2,.7,.2,1.4) 90ms  both; }
.screen--start .meta           { animation: card-rise   360ms cubic-bezier(.2,.7,.2,1.4) 160ms both; }
.screen--start .btn--primary   { animation: card-rise   440ms cubic-bezier(.2,.8,.2,1.6) 230ms both; }
.screen--start .start-hero     { animation: card-rise   420ms cubic-bezier(.2,.7,.2,1.4) 140ms both; }

/* ------------ Question screen animations ------------ */

.screen--question { animation: none; }

.screen--question .name                      { animation: card-rise 420ms cubic-bezier(.2,.8,.2,1.6) 0ms   both; }
.screen--question .bubble--prompt            { animation: drop-in   340ms cubic-bezier(.2,.7,.2,1.4) 50ms  both; }
.screen--question .answers .btn:nth-child(1) { animation: card-rise 360ms cubic-bezier(.2,.7,.2,1.4) 110ms both; }
.screen--question .answers .btn:nth-child(2) { animation: card-rise 360ms cubic-bezier(.2,.7,.2,1.4) 160ms both; }
.screen--question .answers .btn:nth-child(3) { animation: card-rise 360ms cubic-bezier(.2,.7,.2,1.4) 210ms both; }

/* ------------ Reveal screen animations ------------ */

@keyframes verdict-slam {
  0%   { transform: scale(.65) rotate(-2deg); opacity: 0; }
  55%  { transform: scale(1.07) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.screen--reveal { animation: none; }

.screen--reveal .verdict              { animation: verdict-slam 380ms cubic-bezier(.2,.7,.2,1.4) 0ms   both; }
.screen--reveal .name--reveal         { animation: card-rise    360ms cubic-bezier(.2,.8,.2,1.6) 60ms  both; }
.screen--reveal .tag                  { animation: card-rise    320ms cubic-bezier(.2,.7,.2,1.4) 110ms both; }
.screen--reveal .photos               { animation: card-rise    360ms cubic-bezier(.2,.7,.2,1.4) 150ms both; }
.screen--reveal .fact                 { animation: card-rise    340ms cubic-bezier(.2,.7,.2,1.4) 190ms both; }
.screen--reveal [data-action="next"]  { animation: card-rise    360ms cubic-bezier(.2,.8,.2,1.6) 230ms both; }

/* ------------ Title bubble ------------ */

.bubble--title h1 {
  font-family: var(--display);
  font-size: clamp(40px, 12vw, 60px);
  line-height: .92;
  letter-spacing: -.02em;
  margin: 0;
}
.bubble--title .hl {
  background: var(--orange);
  display: inline-block;
  padding: 0 10px 2px;
  border: var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-top: 6px;
}

.bubble--prompt p {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .01em;
}

/* ------------ Subtitle / chips ------------ */
main {background: var(--bg);}
.subtitle {
  margin: 0; 
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  opacity: .9;
}

.meta { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .08em;
  padding: 6px 10px;
  border-radius: 999px;
}

/* ------------ Empty state ------------ */

.empty-state[hidden] { display: none; }
.empty-state {
  text-align: center;
  padding: 28px 20px;
  background: var(--paper);
  border: var(--border-bold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.empty-state__title {
  font-family: var(--display);
  font-size: 28px;
  color: var(--pink);
}

.empty-state__msg {
  margin: 0;
  font-size: 15px;
  opacity: .8;
  line-height: 1.5;
}

.empty-state__msg code {
  font-family: monospace;
  background: var(--soft);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}

/* ------------ Buttons ------------ */

.btn {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .02em;
  background: var(--paper);
  color: var(--ink);
  border: var(--border-bold);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease, background-color 150ms;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(4px,4px); box-shadow: 2px 2px 0 var(--ink); }
.btn:focus-visible { outline: 3px dashed var(--ink); outline-offset: 4px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.btn--primary { background: var(--purple); color: var(--ink); }
.btn--band    { background: var(--pink);   color: var(--ink); }
.btn--startup { background: var(--cyan);   color: var(--ink); }
.btn--both    { background: var(--orange); color: var(--ink); }

/* ------------ HUD ------------ */

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .08em;
}
.hud__pos, .hud__score {
  background: var(--ink);
  color: var(--paper);
  padding: 6px 12px;
  border-radius: 999px;
}
.hud .dim { opacity: .55; padding: 0 2px; }

/* ------------ Name card + Timer bar ------------ */

.name {
  font-family: var(--display);
  font-size: clamp(40px, 11vw, 60px);
  line-height: .95;
  margin: 6px 0 4px;
  text-align: center;
  word-break: break-word;
  background: var(--paper);
  border: var(--border-bold);
  border-radius: 18px;
  padding: 28px 16px;
  box-shadow: var(--shadow);
}
.name--reveal {
  font-size: clamp(32px, 9vw, 48px);
  padding: 18px 14px;
  margin-bottom: 0;
}

/* Timer bar — bottom edge of the question name card */
#q-name {
  position: relative;
  overflow: hidden;
  /* extra bottom padding so text never sits on top of the bar */
  padding-bottom: 34px;
}
#q-name::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 8px;
  width: var(--timer, 100%);
  background: var(--purple);
  transition: width 120ms linear;
}

/* ------------ Answers ------------ */

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

@media (min-width: 560px) {
  .answers { flex-direction: row; }
  .answers .btn { flex: 1; }
}

/* ------------ Reveal ------------ */

.verdict {
  font-family: var(--display);
  font-size: 32px;
  text-align: center;
  background: var(--paper);
  border: var(--border-bold);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  letter-spacing: .02em;
}
.verdict.correct { background: var(--green); }
.verdict.wrong   { background: var(--pink); }

.tag {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.tag span {
  background: var(--purple);
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .08em;
  padding: 5px 10px;
  border-radius: 999px;
}

.photos { display: grid; grid-template-columns: 1fr; gap: 10px; }
.photos.two { grid-template-columns: 1fr 1fr; }

/* ------------ Entity cards ------------ */

.entity-card {
  background: var(--soft);
  border: var(--border-bold);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.entity-card .photo {
  border-radius: 8px;
}

.entity-card .embed {
  border: none;
  border-radius: 8px;
  box-shadow: none;
}

.entity-card .btn {
  width: 100%;
  font-size: 14px;
  padding: 10px 8px;
  white-space: normal;
  line-height: 1.2;
}

.fact.fact--inline,
.photos.two ~ .fact {
  border: none;
  box-shadow: none;
  padding: 2px 0;
  border-radius: 0;
}

.fact--inline {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  opacity: .85;
}

/* ------------ Photo cards ------------ */

.photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border: var(--border-bold);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background: var(--soft);
}
.photo img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.photo .label {
  position: absolute; left: 8px; top: 8px;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-size: 11px;
  letter-spacing: .08em;
  padding: 4px 8px; border-radius: 999px;
  z-index: 1;
}
.photo--missing {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, var(--paper) 0 8px, var(--soft) 8px 16px);
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  text-align: center;
  padding: 10px;
}

.embed {
  border: var(--border-bold);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background: var(--yellow);
}
.embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

.fact {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  
  border: var(--border-bold);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.links { display: flex; gap: 10px; flex-wrap: wrap; }
.links .btn { flex: 1 1 140px; font-size: 16px; padding: 12px 14px; }
.btn--green { background: var(--green); color: var(--ink); }
.btn--visit   { background: var(--cyan);     color: var(--ink); }

/* ------------ End screen ------------ */

.end-headline {
  font-family: var(--display);
  font-size: clamp(44px, 14vw, 68px);
  text-align: center;
  line-height: 1;
  background: var(--paper);
  border: var(--border-bold);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
}

.end-ring-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
}

.end-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.end-ring__track {
  fill: none;
  stroke: var(--ink);
  stroke-width: 22;
  stroke-linecap: butt;
  stroke-dasharray: 339.29 113.10;
  transform: rotate(135deg);
  transform-origin: 100px 100px;
}

.end-ring__fill {
  fill: none;
  stroke: url(#ring-grad);
  stroke-width: 22;
  stroke-linecap: round;
  stroke-dasharray: 0 452.39;
  transform: rotate(135deg);
  transform-origin: 100px 100px;
  transition: stroke-dasharray 900ms cubic-bezier(.2,.7,.2,1.4);
}
circle#end-ring-fill {
 filter: drop-shadow(0 -6px var(--ink));}
 
.end-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 16px;
}

@keyframes badge-pop {
  0%   { transform: translateX(-50%) scale(0) rotate(-8deg); opacity: 0; }
  65%  { transform: translateX(-50%) scale(1.18) rotate(3deg); opacity: 1; }
  100% { transform: translateX(-50%) scale(1) rotate(0deg); }
}

.end-new-best {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .08em;
  background: var(--peach);
  border: var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  box-shadow: 2px 2px 0 var(--ink);
}
.end-new-best.animate {
  animation: badge-pop 520ms cubic-bezier(.2,.7,.2,1.4) both;
}

.end-score-num {
  font-family: var(--display);
  font-size: clamp(72px, 22vw, 96px);
  line-height: 1;
}

.end-score-of {
  font-family: var(--display);
  font-size: 16px;
  opacity: .5;
}

/* ------------ Stars ------------ */

.end-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
}

@keyframes star-pop {
  0%   { transform: scale(0) rotate(-35deg); opacity: 0; }
  55%  { transform: scale(1.45) rotate(10deg); opacity: 1; }
  75%  { transform: scale(0.84) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.star {
  font-size: 54px;
  line-height: 1;
  display: inline-block;
  animation: star-pop 620ms cubic-bezier(.2,.7,.2,1.4) both;
}
.star--filled {
  color: var(--paper);
  -webkit-text-stroke: 3px var(--ink);
  filter: drop-shadow(2px 2px 0 var(--ink));
}
.star--empty {
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
  opacity: .22;
  animation-duration: 320ms;
}

/* Stars in dark mode: yellow fill with dark stroke */
html[data-theme="dark"] .star--filled { color: var(--yellow); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .star--filled { color: var(--yellow); }
}

/* ------------ Stat cards ------------ */

@keyframes card-rise {
  from { transform: translateY(32px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.end-stat {
  border: var(--border-bold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 8px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(32px);
}
.end-stat.reveal {
  animation: card-rise 500ms cubic-bezier(.2,.7,.2,1.4) forwards;
}
.end-stat--band    { background: var(--pink); }
.end-stat--tech    { background: var(--green); }
.end-stat--streak  { background: var(--peach); }

.end-stat__label {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: .1em;
  line-height: 1.35;
  opacity: .75;
}

.end-stat__val {
  font-family: var(--display);
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.end-stat__val svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* ------------ End screen share ------------ */

.btn--share {
  background: var(--cyan);
  color: var(--accent-text);
}
.btn--share.copied {
  background: var(--green);
}

/* ------------ Footer ------------ */

.footer { width:100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 20px max(env(safe-area-inset-bottom), 18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.footer__mid {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .12em;
  padding: 7px 12px;
  border-radius: 999px;border:0px;
  white-space: nowrap;
}
.footer__chip a {
  color: var(--orange);
  text-decoration: none;
}
.footer__chip a:hover { text-decoration: underline; }

.footer__chip--icon {
  padding: 8px 11px;
}
.footer__chip--icon svg {
  display: block;
  flex-shrink: 0;
}
.footer__chip.copied {
  background: var(--green);
  color: var(--ink);
  border-color: var(--ink);
}

button.footer__chip {
  cursor: pointer;
  transition: transform 90ms ease, background-color 150ms;
}
button.footer__chip:hover  { transform: translate(-1px,-1px); }
button.footer__chip:active { transform: translate(2px,2px); }
button.footer__chip:focus-visible { outline: 3px dashed var(--paper); outline-offset: 3px; }

/* ------------ Progress bar ------------ */

.progress-track {
  position: relative;
  height: 22px;
  border-radius: 11px;
  background: var(--paper);
  border: var(--border-bold);
  box-shadow: 3px 4px 0 var(--ink);
  overflow: hidden;
}
.progress-track::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 7px 10px rgba(255,255,255,.45);
  pointer-events: none;
  z-index: 2;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 450ms cubic-bezier(.2,.7,.2,1.4);
  position: relative;
  z-index: 1;
}
.progress-fill--active::after {
  content: '';
  position: absolute;
  right: -2px; top: 0; bottom: 0;
  width: 4px;
  background: var(--ink);
}
.progress-delta {
  position: absolute;
  top: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 1;
}
.progress-delta--correct { background: #5294FF; }
.progress-delta--wrong   { background: var(--pink); }

/* ------------ Score HUD animations ------------ */

@keyframes hud-correct {
  0%   { transform: scale(1);    background: var(--ink); color: var(--paper); }
  35%  { transform: scale(1.14); background: var(--green);    color: var(--ink); }
  65%  { transform: scale(.92);  background: var(--ink); color: var(--paper); }
  100% { transform: scale(1);    background: var(--ink); color: var(--paper); }
}
@keyframes hud-wrong {
  0%,100% { transform: translateX(0);  background: var(--ink); color: var(--paper); }
  20%      { transform: translateX(-5px); background: var(--pink); }
  50%      { transform: translateX(4px);  background: var(--pink); }
  75%      { transform: translateX(-2px); background: var(--ink); }
}
.hud--popped { animation: hud-correct 420ms cubic-bezier(.2,.7,.2,1.4) forwards; }
.hud--missed { animation: hud-wrong   360ms ease forwards; }

/* ------------ About dialog ------------ */

.about-dialog {
  background: var(--paper);
  color: var(--ink);
  border: var(--border-bold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 480px;
  width: calc(100% - 36px);
  padding: 28px 24px 24px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
.about-dialog::backdrop {
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(3px);
}
.about-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--ink);
  color: var(--paper);
  border: var(--border);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 90ms ease;
}
.about-dialog__close:hover  { transform: translate(-1px,-1px); }
.about-dialog__close:active { transform: translate(2px,2px); }
.about-dialog__title {
  font-family: var(--display);
  font-size: 28px;
  margin: 0 0 14px;
  letter-spacing: .02em;
  padding-right: 40px;
}
.about-dialog__body {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
  opacity: .85;
}

.video-wrap {
  aspect-ratio: 16 / 9;
  border: var(--border-bold);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.photo-attribution {
  font-size: 11px;
  line-height: 1.4;
  opacity: .6;
  margin: 0;
}
.photo-attribution a { color: inherit; }

/* ------------ App loader ------------ */

.app-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.6px);
  background-size: 22px 22px;
  z-index: 200;
  transition: opacity 350ms ease;
}
.app-loader--done {
  opacity: 0;
  pointer-events: none;
}

.loader-dots {
  display: flex;
  gap: 10px;
}
.loader-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  animation: loader-bounce 600ms ease-in-out infinite alternate;
}
.loader-dots span:nth-child(2) {
  animation-delay: 150ms;
  background: var(--purple);
}
.loader-dots span:nth-child(3) {
  animation-delay: 300ms;
  background: var(--pink);
}

@keyframes loader-bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-14px); }
}

/* ------------ Reduced motion ------------ */

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .btn { transition: none; }
  .progress-fill { transition: none; }
  #q-name::after { transition: none; }
  .hud--popped, .hud--missed { animation: none; }
  .end-ring__fill { transition: none; }
  .star { animation: none !important; opacity: 1; }
  .end-stat { animation: none !important; opacity: 1; transform: none; }
  .end-new-best { animation: none; }
  .app-loader { transition: none; }
  .loader-dots span { animation: none; }
  .screen--start .bubble--title,
  .screen--start .subtitle,
  .screen--start .meta,
  .screen--start .btn--primary,
  .screen--start .start-hero,
  .screen--question .name,
  .screen--question .bubble--prompt,
  .screen--question .answers .btn,
  .screen--reveal .verdict,
  .screen--reveal .name--reveal,
  .screen--reveal .tag,
  .screen--reveal .photos,
  .screen--reveal .fact,
  .screen--reveal [data-action="next"] { animation: none; opacity: 1; transform: none; }
}
