:root {
  --ink: #16324a;
  --muted: #60758a;
  --paper: #ffffff;
  --sky: #14b8ff;
  --sky-dark: #0688d5;
  --sun: #ffd84d;
  --coral: #ff6f7d;
  --mint: #37d8aa;
  --violet: #7957e8;
  --soft-blue: #e9f8ff;
  --soft-yellow: #fff8d8;
  --soft-pink: #fff0f3;
  --soft-mint: #e8fff8;
  --line: #dbe8f0;
  --correct: #0d9f6e;
  --wrong: #d93d56;
  --shadow: 0 18px 45px rgba(28, 76, 112, .14);
  --shadow-sm: 0 8px 24px rgba(28, 76, 112, .11);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(20,184,255,.16), transparent 27rem),
    radial-gradient(circle at 90% 6%, rgba(255,216,77,.22), transparent 24rem),
    #f8fcff;
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
button, input, select { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 999; padding: 10px 14px; background: #000; color: #fff; border-radius: 10px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219,232,240,.9);
}
.header-inner {
  width: min(1220px, calc(100% - 28px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { border: 0; background: transparent; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; padding: 6px; }
.brand-badge { flex: 0 0 auto; width: 52px; height: 52px; object-fit: contain; }
.brand strong { display: block; font-size: 1.02rem; }
.brand small { display: block; color: var(--muted); margin-top: 2px; }
.top-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.top-nav button { border: 0; background: transparent; padding: 9px 11px; border-radius: 12px; font-weight: 800; color: #37566e; cursor: pointer; }
.top-nav button:hover, .top-nav button:focus-visible { background: var(--soft-blue); color: var(--sky-dark); outline: none; }

.view { display: none; padding: 44px 0 74px; }
.view.active { display: block; }
.eyebrow { display: inline-block; color: var(--sky-dark); font-weight: 900; letter-spacing: .12em; font-size: .78rem; }
.hero { min-height: 470px; display: grid; grid-template-columns: 1.18fr .82fr; align-items: center; gap: 40px; }
.hero-copy h1 { margin: 12px 0 16px; font-size: clamp(2.5rem, 5.5vw, 5rem); line-height: .98; letter-spacing: -.045em; max-width: 850px; }
.hero-lead { max-width: 760px; color: var(--muted); font-size: 1.16rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--soft-mint); border: 1px solid #b9f2df; padding: 10px 14px; border-radius: 999px; color: #286854; font-weight: 700; font-size: .9rem; }
.hero-visual { position: relative; min-height: 360px; }
.float-card { position: absolute; border-radius: 30px; padding: 28px; box-shadow: var(--shadow); border: 3px solid white; display: flex; flex-direction: column; min-width: 190px; transform: rotate(-3deg); }
.float-card strong { font-size: 4rem; line-height: 1; }
.float-card span { font-weight: 900; margin-top: 8px; }
.card-blue { background: #bfeeff; top: 20px; left: 8%; }
.card-yellow { background: #ffe979; top: 150px; right: 3%; transform: rotate(4deg); }
.card-pink { background: #ffb4c0; bottom: 5px; left: 17%; transform: rotate(-1deg); }
.spark { position: absolute; width: 34px; height: 34px; border: 8px solid var(--violet); transform: rotate(45deg); border-radius: 8px; }
.spark-a { right: 11%; top: 26px; }
.spark-b { left: 2%; bottom: 46px; border-color: var(--mint); width: 22px; height: 22px; }

.btn { border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 900; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 4px solid rgba(20,184,255,.25); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--sky), #47d0ff); color: #073b59; box-shadow: 0 8px 18px rgba(20,184,255,.27); }
.btn-secondary { background: var(--sun); color: #584400; box-shadow: 0 8px 18px rgba(255,216,77,.26); }
.btn-accent { background: var(--coral); color: white; box-shadow: 0 8px 18px rgba(255,111,125,.26); }
.btn-ghost { background: #eef6fa; color: #35566e; border: 1px solid var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.wide { width: 100%; }

.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.mode-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.mode-main { background: linear-gradient(155deg, #fff, #f1fbff); border-color: #bceafd; }
.mode-icon { font-size: 2.4rem; }
.mode-kicker { font-size: .75rem; letter-spacing: .1em; color: var(--muted); font-weight: 900; margin: 12px 0 4px; }
.mode-card h2 { margin: 4px 0 8px; font-size: 1.5rem; }
.mode-card p { color: var(--muted); line-height: 1.6; flex: 1; }
.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.quick-stats > div { background: rgba(255,255,255,.75); border: 1px dashed #bcd6e5; border-radius: 20px; padding: 22px; }
.quick-stats .step { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--sky); font-weight: 900; margin-right: 8px; }
.quick-stats strong { font-size: 1.08rem; }
.quick-stats p { color: var(--muted); line-height: 1.55; margin-bottom: 0; }

.study-shell { max-width: 1080px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.section-heading h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; margin: 9px 0 10px; letter-spacing: -.035em; }
.section-heading p { color: var(--muted); margin: 0; }
.score-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 10px; }
.score-strip > div { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 8px; box-shadow: 0 5px 14px rgba(38,92,125,.06); }
.score-strip span { color: var(--muted); font-weight: 700; }
.score-strip strong { font-size: 1.12rem; }
.progress-track { height: 11px; border-radius: 999px; background: #e7f0f5; overflow: hidden; margin-bottom: 18px; }
.progress-track > div { height: 100%; width: 0%; background: linear-gradient(90deg, var(--sky), var(--mint)); transition: width .3s ease; border-radius: inherit; }
.question-card { background: white; border-radius: 30px; border: 1px solid var(--line); padding: clamp(20px, 4vw, 38px); box-shadow: var(--shadow); }
.question-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-weight: 800; font-size: .9rem; }
.question-type { background: var(--soft-blue); color: var(--sky-dark); padding: 6px 10px; border-radius: 999px; }
.art-type { background: var(--soft-pink); color: #b13e5b; }
.question-card h2 { font-size: clamp(1.5rem, 3.6vw, 2.5rem); line-height: 1.18; margin: 18px 0 24px; }
.question-visual { margin: 8px auto 26px; max-width: 820px; }
.question-visual img.art-image { max-height: 500px; width: auto; margin: auto; border-radius: 20px; box-shadow: var(--shadow-sm); border: 1px solid #d9e5ea; background: #eef4f7; }
.artwork-stage { min-height: 260px; display: grid; place-items: center; }
.artwork-stage .image-loading { color: var(--muted); font-weight: 800; }
.quiz-map-wrap { position: relative; max-width: 760px; margin: auto; }
.quiz-map-wrap img { width: 100%; border-radius: 18px; border: 1px solid var(--line); }
.quiz-map-highlight { position: absolute; transform: translate(-50%, -50%); border: 5px solid #ff4d64; background: rgba(255,216,77,.35); border-radius: 12px; min-width: 34px; min-height: 34px; display: grid; place-items: center; color: #7a1424; font-weight: 1000; box-shadow: 0 0 0 5px rgba(255,255,255,.9), 0 0 0 9px rgba(255,77,100,.25); animation: pulseMark 1.4s infinite alternate; }
@keyframes pulseMark { from { scale: .96; } to { scale: 1.08; } }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.option { text-align: left; border: 2px solid #dce9f0; background: #fbfdff; border-radius: 18px; padding: 16px; cursor: pointer; font-weight: 800; color: #29495f; min-height: 66px; display: flex; align-items: center; gap: 12px; transition: .15s ease; }
.option:hover:not(:disabled), .option:focus-visible:not(:disabled) { border-color: var(--sky); background: var(--soft-blue); transform: translateY(-1px); outline: none; }
.option-letter { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #e9f2f7; color: #42657b; }
.option.correct { border-color: #55d0a5; background: #ecfff8; color: #17674f; }
.option.correct .option-letter { background: #bff3df; color: #075e42; }
.option.wrong { border-color: #ff9aaa; background: #fff1f4; color: #8f2539; }
.option.wrong .option-letter { background: #ffd4dc; color: #971d35; }
.option:disabled { cursor: default; }
.feedback { margin-top: 18px; border-radius: 16px; padding: 14px 16px; font-weight: 800; }
.feedback.good { background: #e9fff7; border: 1px solid #b8f0dc; color: #12684f; }
.feedback.bad { background: #fff0f3; border: 1px solid #ffc4cf; color: #92263a; }
.question-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; }
.keyboard-tip { color: var(--muted); font-size: .88rem; }
.results-card { margin-top: 20px; border-radius: 28px; padding: 28px; background: linear-gradient(145deg, #ffffff, #f0fbff); border: 1px solid #bceafd; box-shadow: var(--shadow); }
.result-score { font-size: clamp(3rem, 7vw, 6rem); font-weight: 1000; line-height: 1; color: var(--sky-dark); }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.missed-list { margin-top: 20px; display: grid; gap: 10px; }
.missed-item { border-radius: 14px; border: 1px solid var(--line); background: white; padding: 13px 15px; }
.missed-item strong { display: block; margin-bottom: 4px; }
.missed-item span { color: var(--muted); }

.map-study-shell { max-width: 1220px; }
.map-status { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; display: flex; align-items: center; gap: 16px; margin: 18px 0; box-shadow: var(--shadow-sm); }
.map-status > div { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.map-status > div strong { font-size: 1.7rem; color: var(--sky-dark); }
.map-status > div span, .map-status p { color: var(--muted); }
.map-status p { flex: 1; margin: 0; }
.map-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 18px; align-items: start; }
.country-bank { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow-sm); position: sticky; top: 96px; }
.country-bank h2 { margin: 0 0 4px; }
.country-bank > p { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.country-list { display: grid; gap: 8px; }
.country-chip { border: 2px solid #cce6f4; background: var(--soft-blue); border-radius: 12px; padding: 10px 11px; font-weight: 900; cursor: grab; text-align: center; user-select: none; }
.country-chip:hover, .country-chip:focus-visible { border-color: var(--sky); outline: none; }
.country-chip.selected { background: var(--sun); border-color: #e7be1e; color: #604b00; }
.country-chip.placed { opacity: .35; text-decoration: line-through; cursor: default; }
.map-panel { min-width: 0; }
.map-canvas { position: relative; width: 100%; border-radius: 24px; overflow: hidden; background: #d9eff8; border: 4px solid white; box-shadow: var(--shadow); }
.map-canvas img { width: 100%; height: auto; }
.map-target-layer { position: absolute; inset: 0; }
.map-target { position: absolute; transform: translate(-50%, -50%); min-width: 42px; min-height: 38px; border: 3px dashed #d83b54; background: rgba(255,255,255,.84); border-radius: 9px; display: grid; place-items: center; padding: 4px 6px; font-size: clamp(.62rem, 1.4vw, .9rem); font-weight: 1000; text-align: center; line-height: 1.05; cursor: pointer; box-shadow: 0 3px 10px rgba(55,68,81,.15); }
.map-target::before { content: attr(data-marker); position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .68rem; background: #243c4e; color: white; border-radius: 6px; padding: 2px 5px; white-space: nowrap; }
.map-target.filled { border-style: solid; border-color: var(--sky); background: rgba(231,248,255,.95); color: #164b66; }
.map-target.correct { border-color: var(--correct); background: rgba(232,255,247,.95); color: #0e664b; }
.map-target.incorrect { border-color: var(--wrong); background: rgba(255,238,242,.96); color: #91263a; }
.map-feedback { margin-top: 14px; }

.privacy-banner { display: flex; align-items: center; gap: 14px; background: var(--soft-mint); border: 1px solid #b8eedc; border-radius: 20px; padding: 18px; margin: 18px 0; }
.privacy-banner > span { font-size: 2rem; }
.privacy-banner p { margin: 3px 0 0; color: #416b5f; }
.leader-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 12px; }
.leader-tabs button { border: 1px solid var(--line); background: white; border-radius: 12px; padding: 10px 14px; font-weight: 900; cursor: pointer; }
.leader-tabs button.active { background: var(--sky); border-color: var(--sky); color: #073b59; }
.leaderboard-wrap { background: white; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-sm); }
.leader-table { width: 100%; border-collapse: collapse; }
.leader-table th, .leader-table td { padding: 14px 16px; border-bottom: 1px solid #e8f0f5; text-align: left; }
.leader-table th { background: #effaff; color: #42657b; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.leader-table tr:last-child td { border-bottom: 0; }
.rank-badge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #eef5f8; font-weight: 900; }
.leader-empty { padding: 34px; text-align: center; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: white; }
.footer-inner { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.footer-inner strong, .footer-inner span { display: block; }
.footer-inner span { color: var(--muted); margin-top: 3px; }
.text-button { border: 0; background: transparent; color: var(--sky-dark); font-weight: 900; cursor: pointer; text-decoration: underline; }

.score-dialog, .credits-dialog { border: 0; border-radius: 26px; padding: 0; box-shadow: 0 25px 80px rgba(14,53,77,.32); width: min(560px, calc(100% - 28px)); color: var(--ink); }
.score-dialog::backdrop, .credits-dialog::backdrop { background: rgba(18,45,65,.55); backdrop-filter: blur(3px); }
.score-dialog form, .credits-dialog > div { padding: 30px; position: relative; }
.dialog-close { position: absolute; right: 14px; top: 12px; border: 0; background: #eef4f7; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1.4rem; }
.score-dialog h2, .credits-dialog h2 { margin: 8px 0 10px; font-size: 2rem; }
.score-dialog p, .credits-dialog p { color: var(--muted); line-height: 1.55; }
.score-dialog label { display: block; font-weight: 900; margin: 18px 0 6px; }
.score-dialog input { width: 100%; border: 2px solid #cadfe9; border-radius: 14px; padding: 13px 14px; font-size: 1rem; }
.score-dialog input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(20,184,255,.12); }
.alias-preview { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--soft-yellow); color: #665100; font-weight: 800; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.credits-list { display: grid; gap: 10px; max-height: 55vh; overflow: auto; margin-top: 16px; }
.credit-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.credit-item strong { display: block; }
.credit-item span { color: var(--muted); font-size: .9rem; }
.credit-item a { color: var(--sky-dark); font-weight: 800; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 8px; padding-block: 8px; }
  .top-nav { order: 3; display: flex; width: 100%; flex-wrap: wrap; justify-content: flex-start; padding-bottom: 4px; }
  .top-nav button { flex: 0 0 auto; white-space: nowrap; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .hero-visual { min-height: 320px; }
  .mode-grid, .quick-stats { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: 1fr; }
  .country-bank { position: static; }
  .country-list { grid-template-columns: repeat(2, 1fr); }
}

.sound-toggle { flex: 0 0 auto; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft-yellow); cursor: pointer; font-weight: 800; font-size: .8rem; }
.welcome-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; min-height: 65vh; }
.welcome-copy h1 { font-size: clamp(3.3rem,7vw,6rem); line-height: 1.05; letter-spacing: -.05em; margin: 16px 0 24px; }
.welcome-copy h1 span { color: var(--sky-dark); }
.welcome-copy p { color: var(--muted); line-height: 1.8; font-size: 1.15rem; max-width: 550px; }
.welcome-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.welcome-badges span { background: white; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; font-weight: 800; }
.welcome-card { background: white; border: 1px solid var(--line); border-radius: 30px; padding: 36px; box-shadow: var(--shadow); }
.welcome-icon { display: block; width: 110px; height: 110px; object-fit: contain; }
.welcome-card h2 { font-size: 2rem; margin: 20px 0 8px; }
.welcome-card p { color: var(--muted); }
.welcome-card label { display: block; font-weight: 800; margin: 24px 0 8px; }
.welcome-card input { width: 100%; padding: 15px; border: 2px solid var(--line); border-radius: 14px; }
.welcome-card input:focus { outline: 3px solid var(--soft-blue); border-color: var(--sky-dark); }
.form-help { font-size: .85rem; line-height: 1.5; }
.student-greeting { font-weight: 900; color: var(--violet); }
.hero-actions a { text-decoration: none; }
.session-setup { padding: 28px; margin-block: 28px; background: white; border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-sm); scroll-margin-top: 150px; }
.setup-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.setup-heading h2 { font-size: 2rem; margin: 8px 0 20px; }
.session-setup fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.session-setup legend { font-weight: 800; padding: 0; margin-bottom: 12px; }
.session-sizes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.session-choice { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px; border: 2px solid var(--line); border-radius: 18px; cursor: pointer; }
.session-choice:has(input:checked) { border-color: var(--sky-dark); background: var(--soft-blue); }
.session-choice input, .session-extras input { accent-color: var(--sky-dark); width: 18px; height: 18px; flex-shrink: 0; }
.session-choice strong { display: block; font-size: 1.1rem; }
.session-choice small { display: block; color: var(--muted); line-height: 1.5; margin-top: 5px; }
.session-choice b { font-size: 1.4rem; margin-left: auto; }
.session-extras { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 25px !important; }
.session-extras label, .always-on { padding: 12px; border-radius: 12px; background: #f1f7fb; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.session-start { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; }
.session-start p { color: var(--muted); line-height: 1.6; max-width: 700px; }
.session-start button { flex-shrink: 0; }
.question-card { position: relative; }
.answer-effect { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; font-size: 1.3rem; position: relative; }
.answer-stamp { width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #26bd88; color: white; font-size: 1.8rem; animation: stampPop .45s ease-out; }
.bad .answer-stamp { background: #e24b63; }
.feedback p { font-weight: 500; line-height: 1.65; margin: 8px 0; }
.history-note { padding-top: 10px; margin-top: 12px; border-top: 1px solid currentColor; }
.history-note h3 { font-size: .95rem; margin: 0 0 8px; }
.history-note a { color: inherit; font-size: .82rem; }
.packet-note { background: #fff7df; border: 1px solid #ebcf78; color: #695115; border-radius: 12px; padding: 12px; margin-top: 12px; }
.answer-win { animation: successGlow .65s ease-out; }
.answer-miss { animation: wrongWiggle .38s ease-out; }
.confetti { position: absolute; top: 10px; left: 24px; width: 8px; height: 12px; background: var(--sun); transform: rotate(var(--r)); animation: confettiFly .85s ease-out forwards; pointer-events: none; }
.leader-filter { display: block; margin: 18px 0; font-weight: 800; }
.leader-filter select { max-width: 100%; display: block; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: white; }
.answer-toast { position: fixed; z-index: 80; top: 145px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); width: max-content; padding: 20px 28px; border: 3px solid white; border-radius: 22px; font-weight: 900; font-size: clamp(1rem,3vw,1.6rem); box-shadow: var(--shadow); pointer-events: none; animation: toastPop 1.6s ease both; }
.toast-correct { color: white; background: #087957; }
.toast-wrong { color: white; background: #b52b45; }
@keyframes toastPop { 0% { opacity: 0; scale: .7; } 12%,80% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: .95; } }
@keyframes stampPop { 0% { transform: scale(.2) rotate(-20deg); opacity: 0; } 65% { transform: scale(1.2) rotate(6deg); } 100% { transform: scale(1); opacity: 1; } }
@keyframes successGlow { 0%,100% { box-shadow: var(--shadow-sm); } 40% { box-shadow: 0 0 0 8px #37d8aa55, 0 14px 35px #37d8aa44; } }
@keyframes wrongWiggle { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes confettiFly { from { opacity: 1; transform: translate(0,0) rotate(0); } to { opacity: 0; transform: translate(var(--x),var(--y)) rotate(var(--r)); } }
@media (max-width:900px) { .welcome-layout { grid-template-columns: 1fr; gap: 30px; } .session-sizes { grid-template-columns: 1fr; } }
@media (max-width:660px) { .welcome-card { padding: 24px; } .welcome-layout { min-height: auto; } .welcome-copy h1 { font-size: 3.4rem; } .session-setup { padding: 20px; } .session-start { flex-direction: column; align-items: stretch; } .setup-heading { align-items: flex-start; } .setup-heading h2 { font-size: 1.5rem; } .sound-toggle { font-size: .7rem; padding: 8px; } .brand { gap: 7px; } .brand strong { font-size: .8rem; max-width: 170px; } .top-nav { gap: 3px; } .top-nav button { font-size: .78rem; padding: 8px 9px; } .answer-toast { top: auto; bottom: 24px; } }

@media (max-width: 660px) {
  .view { padding-top: 30px; }
  .header-inner { min-height: 66px; }
  .brand strong { font-size: .92rem; }
  .brand small { font-size: .72rem; }
  .brand-badge { width: 40px; height: 40px; border-radius: 12px; }
  .hero { min-height: auto; }
  .hero-copy h1 { font-size: clamp(2.3rem, 13vw, 3.6rem); }
  .hero-visual { min-height: 290px; }
  .float-card { min-width: 150px; padding: 20px; }
  .float-card strong { font-size: 3rem; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .score-strip { grid-template-columns: 1fr; }
  .score-strip > div { padding: 10px 13px; }
  .question-card { border-radius: 22px; padding: 20px 16px; }
  .option-grid { grid-template-columns: 1fr; }
  .question-footer { align-items: stretch; flex-direction: column; }
  .keyboard-tip { display: none; }
  .question-footer .btn { width: 100%; }
  .map-status { align-items: stretch; flex-direction: column; }
  .map-status .btn { width: 100%; }
  .country-list { grid-template-columns: 1fr 1fr; }
  .map-target { min-width: 30px; min-height: 28px; padding: 2px 3px; font-size: .53rem; border-width: 2px; }
  .map-target::before { font-size: .52rem; top: -14px; }
  .footer-inner { flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 24px; }
  .leaderboard-wrap { overflow-x: auto; }
  .leader-table { min-width: 600px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
