:root {
  font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  color: #f7f8ff;
  background: #10182d;
  font-synthesis: none;
  --orange: #ffb46e;
  --mint: #81eed0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 16% 5%, #263f62, transparent 54%),
    radial-gradient(ellipse at 94% 88%, #302746, transparent 48%), #10182d;
}
button { font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid #ffc467; outline-offset: 4px; }
.shell {
  min-height: 100dvh;
  max-width: 720px;
  margin: auto;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}
header { display: flex; justify-content: center; flex-shrink: 0; }
.brand { width: 112px; height: 56px; border-radius: 18px; overflow: hidden; background: white; box-shadow: 0 5px 22px #0002; }
.brand img { display: block; width: 112px; height: 112px; margin-top: -27px; }
#app { flex: 1; display: flex; justify-content: center; align-items: center; padding: 14px 0; }
.panel { width: 100%; text-align: center; animation: enter .3s ease-out both; }
.title { font-size: clamp(2.6rem, 10vw, 4.3rem); line-height: 1.01; letter-spacing: -.05em; margin: 12px 0 18px; }
.title em { color: #ffbd73; font-style: normal; }
.sub { color: #d2deec; font-size: 1.2rem; line-height: 1.4; margin: 0; }
.hero { position: relative; width: 260px; height: 224px; margin: 12px auto 20px; display: grid; place-items: center; }
.globe { position: relative; width: 164px; height: 164px; border-radius: 50%; overflow: hidden; background: #258ddd; box-shadow: 0 0 0 1px #72d8f044, 0 0 45px #399ee933, 0 18px 30px #0004; animation: hover 4s ease-in-out infinite; }
.globe-map { position: absolute; inset: 0; background: url("world.svg") repeat-x; background-size: 328px 164px; animation: revolve 16s linear infinite; }
.globe::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 28% 25%, #ffffff40, transparent 47%, #02152944 74%, #031126c9 100%); box-shadow: inset -12px -4px 22px #031b3266, inset 5px 4px 10px #c7f6ff55; }
.orbit { position: absolute; width: 252px; height: 92px; border: 1px solid #6facc43b; border-radius: 50%; transform: rotate(-24deg); }
.orbit-two { width: 206px; height: 204px; transform: rotate(20deg); border-style: dashed; opacity: .45; animation: orbit 40s linear infinite; }
.satellite { position: absolute; font-size: 28px; color: #ffc47e; animation: twinkle 3s ease-in-out infinite; }
.star-one { top: 22px; right: 22px; }
.star-two { left: 13px; bottom: 30px; font-size: 23px; color: #a1e7e7; animation-delay: -1.5s; }
.primary { border: 0; background: var(--orange); color: #172035; border-radius: 18px; padding: 18px 30px; font-size: 1.25rem; font-weight: 900; box-shadow: 0 5px 0 #c87945, 0 8px 30px #ffad6517; min-width: min(100%, 260px); min-height: 62px; transition: transform .15s, background .15s, box-shadow .15s; }
.primary:hover { background: #ffc58f; transform: translateY(-2px); }
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #c87945; }
.topline { display: flex; justify-content: space-between; color: #dce7f3; font-size: 1.125rem; font-weight: 800; }
.topline b { color: #ffd29c; }
.progress { height: 8px; border-radius: 20px; background: #35465e; margin: 10px 0 15px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, #ffae69, #ffd9a3); transition: width .3s; }
.card { position: relative; background: linear-gradient(145deg, #e3f7ff, #f7fcff); color: #142239; border: 1px solid #b7d9ee; border-radius: 26px; padding: 12px 16px 17px; box-shadow: 0 9px 28px #020b1b26; }
.flag { font-size: clamp(5rem, 22vw, 8.125rem); line-height: 1.25; filter: drop-shadow(0 6px 5px #25354a20); animation: flag-in .4s cubic-bezier(.16,1.4,.4,1) both; }
h2 { font-size: clamp(1.6rem, 7vw, 2.125rem); letter-spacing: -.035em; margin: 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.choice { position: relative; min-height: 76px; border: 1px solid #667c95; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #2d4662, #24364e); padding: 12px 10px; font-weight: 800; font-size: clamp(1.125rem, 4.5vw, 1.438rem); line-height: 1.15; overflow-wrap: anywhere; animation: choice-in .28s ease-out calc(var(--order) * 35ms) backwards; transition: background .18s, border-color .18s, transform .15s; }
.choice:not(:disabled):hover { background: #38536b; border-color: #9bbfd3; }
.choice:not(:disabled):active { transform: scale(.97); }
.choice:disabled { cursor: default; opacity: .58; }
.choice.correct { background: #22634f; border: 2px solid #91ffd4; opacity: 1; animation: correct-pop .4s ease-out; padding-right: 28px; }
.choice.wrong { background: #813443; border: 2px solid #ffb2b8; opacity: 1; padding-right: 28px; }
.answer-icon { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 19px; }
.won { animation: glow .7s ease-out; }
.sparkles { position: absolute; left: 50%; top: 40%; pointer-events: none; }
.sparkles i { position: absolute; width: 7px; height: 10px; border-radius: 2px; background: var(--color); animation: burst .7s ease-out both; }
.feedback { min-height: 124px; padding: 12px 2px 0; font-size: 1.25rem; font-weight: 900; }
.feedback-copy { animation: enter .22s ease-out both; }
.feedback-copy.success { color: #9ff2d8; }
.feedback .explain { font-size: 1.063rem; color: #cfdeeb; font-weight: 500; margin-top: 4px; line-height: 1.3; }
.advance { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: #c5d5e6; font-size: 1rem; font-weight: 600; }
.advance-track { width: 88px; height: 6px; background: #526079; border-radius: 10px; overflow: hidden; }
.advance-track i { display: block; width: 100%; height: 100%; background: #ffc27e; transform: scaleX(0); transform-origin: left; border-radius: inherit; animation: advance linear forwards; }
.score-pop { animation: score-pop .35s ease-out; }
.result-card { background: linear-gradient(145deg, #293f59, #263449); border: 1px solid #526a83; border-radius: 24px; padding: 24px; margin: 20px 0; }
.result-card p { font-size: 1.125rem; color: #d1ddeb; }
.result-score { font-size: clamp(4.375rem, 20vw, 6rem); font-weight: 900; letter-spacing: -.06em; color: #ffbd73; line-height: 1; }
.result-score span { font-size: 2.25rem; color: #c7d6e6; }
.result-star { font-size: 4rem; line-height: 1; color: #ffd198; text-shadow: 0 0 34px #ffb36566; animation: correct-pop .6s ease-out; }
.cta { display: grid; gap: 8px; margin-top: 18px; }
.yt { display: flex; align-items: center; gap: 12px; text-align: left; text-decoration: none; color: #fff; background: #ff00331f; border: 1px solid #ff4d6d66; border-radius: 16px; padding: 10px 14px; }
.yt:hover { background: #ff003333; }
.yt svg { width: 34px; height: 24px; flex: none; }
.yt b { display: block; font-size: 1.05rem; }
.yt small { display: block; color: #ffd0d8; font-size: .9rem; font-weight: 600; }
.more { color: #d2deec; font-weight: 800; text-decoration: none; padding: 8px; }
.more:hover { color: #fff; text-decoration: underline; }
.loading { font-size: 1.125rem; color: #d1ddeb; }
@keyframes revolve { to { background-position-x: -328px; } }
@keyframes hover { 50% { transform: translateY(-7px); } }
@keyframes orbit { to { transform: rotate(380deg); } }
@keyframes twinkle { 50% { opacity: .55; transform: scale(.8) rotate(15deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes choice-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flag-in { from { opacity: 0; transform: scale(.86) rotate(-4deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes correct-pop { 45% { transform: scale(1.04); } }
@keyframes glow { 35% { box-shadow: 0 0 0 5px #84edcd40, 0 0 32px #84edcd20; } }
@keyframes score-pop { 50% { transform: translateY(-3px) scale(1.08); } }
@keyframes advance { to { transform: scaleX(1); } }
@keyframes burst { from { opacity: 1; transform: rotate(var(--angle)) translateY(0) scale(.5); } to { opacity: 0; transform: rotate(var(--angle)) translateY(calc(-1 * var(--distance))) rotate(70deg) scale(1); } }
html[data-paused="true"] *, html[data-paused="true"] *::before, html[data-paused="true"] *::after { animation-play-state: paused !important; }
@media (max-height: 690px) {
  .shell { padding: 10px 14px; }
  .brand { width: 96px; height: 48px; border-radius: 15px; }
  .brand img { width: 96px; height: 96px; margin-top: -23px; }
  #app { padding: 10px 0; }
  .flag { font-size: 76px; }
  .card { padding: 8px 12px 12px; }
  .choice { min-height: 62px; }
  .feedback { padding-top: 8px; min-height: 118px; }
  .hero { height: 174px; margin: 6px auto 12px; }
  .globe { width: 132px; height: 132px; }
  .globe-map { background-size: 328px 132px; }
  .orbit-one { width: 220px; height: 76px; }
  .orbit-two { width: 172px; height: 166px; }
}
@media (max-width: 350px) {
  .choice { font-size: 1.063rem; }
  .shell { padding: 10px; }
  .feedback .explain { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .panel, .flag, .choice, .won, .score-pop, .result-star, .sparkles i, .globe, .globe-map, .orbit, .satellite { animation: none !important; }
  .primary, .choice, .progress i { transition: none; }
}
