@charset "UTF-8";
:root {
  --ink: #173c35;
  --muted: #536b65;
  --paper: #fff;
  --bg: #eff8f5;
  --green: #16654b;
  --lime: #dbf785;
  --yellow: #ffda57;
  --orange: #ff795e;
  --red: #a82e35;
  --line: #d9e5df;
  --shadow: 0 8px 0 #173c350b,0 18px 45px #173c3508;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', "Trebuchet MS", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

h1,h2,h3,p {
  margin: 0;
}

h1,h2,h3 {
  line-height: 1.15;
}

button,a,input {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none!important;
}

svg {
  display: block;
}

button:focus-visible,a:focus-visible,input:focus-visible,[tabindex]:focus-visible {
  outline: 3px solid #176bce;
  outline-offset: 5px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 100;
  background: var(--yellow);
  padding: 12px 20px;
  color: var(--ink);
  border-radius: 10px;
}

.skip-link:focus {
  top: 12px;
}

.topbar {
  max-width: 1240px;
  min-height: 96px;
  padding: 20px 32px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.7px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 47px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 13px 13px 19px 19px;
  font-size: 28px;
  transform: rotate(-8deg);
}

.brand-small {
  display: block;
  font-size: 14px;
  letter-spacing: 1px;
  margin-top: 5px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.record {
  font-size: 14px;
  white-space: nowrap;
  margin-right: 8px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.35;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform .18s,box-shadow .18s,background .18s;
  color: var(--ink);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(2px);
  box-shadow: none;
}

.button-primary {
  background: var(--yellow);
  border-color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}

.button-primary:hover {
  background: #ffe780;
}

.button-quiet {
  background: var(--paper);
  border-color: var(--line);
}

.button-quiet:hover {
  border-color: #749c8d;
  background: #f4fbed;
}

.button-small {
  min-height: 44px;
  padding: 9px 14px;
  font-size: 14px;
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  line-height: 1.5;
}

.topbar button {
  white-space: nowrap;
}

main {
  max-width: 1240px;
  padding: 12px 32px 25px;
  margin: auto;
}

footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

footer span {
  color: var(--green);
}

.welcome {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 650px;
  border: 1px solid var(--ink);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--ink);
}

.welcome-copy {
  padding: 44px 42px;
  color: white;
  position: relative;
}

.welcome-copy .eyebrow {
  color: var(--lime);
  font-size: 11px;
  letter-spacing: 1.3px;
}

.welcome h1 {
  position: relative;
  font-size: clamp(44px,5.8vw,72px);
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1.03;
  margin: 25px 0 20px;
}

.welcome h1>span:first-child {
  color: var(--yellow);
}

.title-star {
  display: inline-block;
  position: absolute;
  right: -4px;
  top: -14px;
  font-size: 39px;
  color: var(--orange);
  transform: rotate(15deg);
}

.intro {
  font-size: 19px;
  max-width: 390px;
  line-height: 1.5;
}

.intro-detail {
  color: #c5d9d1;
  font-size: 15px;
  margin-top: 12px;
  max-width: 390px;
}

.start-form {
  display: grid;
  gap: 8px;
  margin-top: 25px;
  max-width: 400px;
}

.start-form label {
  font-size: 15px;
  font-weight: 700;
}

.start-form input {
  width: 100%;
  min-height: 54px;
  border: 2px solid #55766b;
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
}

.start-form input::placeholder {
  color: #6a7974;
}

.start-form small {
  color: #c5d9d1;
  font-size: 12px;
}

.start-button {
  margin-top: 10px;
  font-size: 15px;
  justify-content: space-between;
  box-shadow: 0 4px 0 #0a221b;
  border-color: #0a221b;
}

.start-button span {
  font-size: 24px;
  line-height: 1;
}

.intro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 25px;
  font-size: 13px;
  color: #e5efd8;
}

.welcome-art {
  background: var(--lime);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 600px;
}

.orbit {
  position: absolute;
  border: 2px dashed #638c5360;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  transform: rotate(-20deg);
}

.orbit-two {
  width: 570px;
  height: 570px;
  border-style: solid;
  border-color: #638c5325;
}

.hero-disc {
  width: 290px;
  height: 290px;
  background: #f4ffd5;
  border: 2px solid #bed876;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 20px;
}

.hero {
  width: 230px;
  height: 300px;
  filter: drop-shadow(0 13px 0 #173c3509);
  animation: hero-bob 4s ease-in-out infinite;
}

.art-location {
  position: absolute;
  width: 94px;
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 5px 0 #173c3526;
  font-size: 40px;
  z-index: 2;
}

.art-location small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .7px;
}

.art-school {
  left: 8%;
  top: 13%;
  transform: rotate(-8deg);
}

.art-park {
  right: 8%;
  top: 18%;
  transform: rotate(10deg);
}

.art-city {
  right: 9%;
  bottom: 19%;
  transform: rotate(-6deg);
}

.art-star {
  position: absolute;
  font-size: 38px;
  color: var(--green);
}

.star-one {
  left: 12%;
  bottom: 28%;
  transform: rotate(15deg);
}

.star-two {
  right: 31%;
  top: 9%;
  font-size: 30px;
}

.art-caption {
  position: absolute;
  bottom: 8%;
  left: 8%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  padding: 13px 20px;
  border-radius: 17px;
  border: 2px solid var(--ink);
  box-shadow: 0 5px 0 #173c3520;
  transform: rotate(-3deg);
  z-index: 2;
  font-size: 14px;
}

.art-caption>span {
  font-size: 32px;
}

.art-caption strong {
  display: block;
  font-size: 21px;
}

.art-sticker {
  position: absolute;
  right: 24px;
  bottom: 28px;
  background: var(--orange);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
  border-radius: 50%;
  padding: 25px 14px;
  transform: rotate(12deg);
  border: 2px solid var(--ink);
}

.game {
  animation: arrive .3s ease;
}

.game-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 10px 0 24px;
}

.game-heading h1 {
  font-size: 30px;
  letter-spacing: -.7px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.game-heading .eyebrow {
  color: var(--green);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  min-width: 0;
}

.stat>span {
  font-size: 28px;
}

.stat small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
}

.stat strong {
  display: block;
  font-size: 27px;
  line-height: 1.25;
  white-space: nowrap;
}

.stat-points {
  background: var(--yellow);
  border-color: #e5c246;
}

.stat-points small {
  color: var(--ink);
}

.good-text {
  color: var(--green);
}

.bad-text {
  color: var(--red);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 310px;
  gap: 24px;
  align-items: start;
}

.board-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.panel-heading .eyebrow {
  color: var(--muted);
  font-size: 11px;
}

.panel-heading h2 {
  font-size: 24px;
  margin-top: 5px;
  letter-spacing: -.6px;
}

.map-tag {
  font-size: 11px;
  letter-spacing: 1px;
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 7px;
  white-space: nowrap;
}

.board {
  position: relative;
  border: 1px solid #bdd5a9;
  border-radius: 20px;
  background-color: #d8f1b9;
  background-image: radial-gradient(#6b924424 1.5px,transparent 1.5px);
  background-size: 19px 19px;
  padding: 20px 12px 13px;
  isolation: isolate;
  overflow: hidden;
}

.map-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  grid-auto-rows: 112px;
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 2;
}

.map-node {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  gap: 7px;
  min-width: 0;
}

.node-circle {
  width: 48px;
  height: 48px;
  border: 2px solid #86a76e;
  background: #f4ffe4;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 4px 0 #b0ca99;
  color: #506947;
  position: relative;
}

.node-name {
  font-size: 13px;
  font-weight: 700;
  background: #d8f1b9e8;
  border-radius: 5px;
  padding: 0 3px;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.map-node.done .node-circle {
  background: var(--green);
  border-color: #114b38;
  color: white;
  box-shadow: 0 4px 0 #0d3f3029;
}

.map-node.current .node-circle {
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 7px #ffda5760,0 4px 0 var(--ink);
}

.map-node.current .node-name {
  background: var(--ink);
  color: white;
  padding: 3px 6px;
}

.node-event {
  position: absolute;
  top: -10px;
  right: -9px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  font-size: 13px;
  background: white;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: visible;
}

.route path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route #route-base {
  stroke: #a4c989;
  stroke-width: 13;
  stroke-dasharray: 1 22;
}

.route #route-progress {
  stroke: var(--green);
  stroke-width: 7;
}

.player-token {
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 70px;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%,-78%);
  transition: left .65s cubic-bezier(.25,.7,.3,1),top .65s cubic-bezier(.25,.7,.3,1);
  filter: drop-shadow(0 3px 2px #173c3526);
}

.map-legend {
  display: flex;
  justify-content: center;
  gap: 17px;
  font-size: 12px;
  margin: 18px 0 21px;
  color: var(--muted);
  flex-wrap: wrap;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}

.done-dot {
  background: var(--green);
}

.current-dot {
  background: var(--yellow);
  border: 1px solid #8f781f;
}

.locked-dot {
  background: #d8f1b9;
  border: 1px solid #86a76e;
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 9px;
}

.progress-heading strong {
  white-space: nowrap;
}

progress {
  display: block;
  width: 100%;
  height: 12px;
  border: 0;
  border-radius: 12px;
  background: #edf2ed;
  overflow: hidden;
  accent-color: var(--green);
}

progress::-webkit-progress-bar {
  background: #edf2ed;
  border-radius: 12px;
}

progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 12px;
  transition: width .5s;
}

progress::-moz-progress-bar {
  background: var(--green);
  border-radius: 12px;
}

.side-panel {
  display: grid;
  gap: 18px;
}

.mission-card {
  padding: 24px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mission-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mission-top .eyebrow {
  font-size: 10px;
  color: var(--lime);
  letter-spacing: .8px;
}

.hearts {
font-family: 'Nunito', Arial, sans-serif;
  font-size: 19px;
  color: #ffa99e;
  white-space: nowrap;
}

.empty-heart {
  color: #adbbb5;
}

.mission-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  background: #315448;
  border: 1px solid #4d725e;
  border-radius: 18px;
  font-size: 37px;
  margin: 21px 0 16px;
}

.mission-card h2 {
  font-size: 24px;
  letter-spacing: -.4px;
  margin-bottom: 12px;
}

.mission-card p {
  font-size: 15px;
  color: #d6e5df;
  margin-bottom: 22px;
}

.mission-card .button {
  width: 100%;
  font-size: 14px;
  padding: 13px 9px;
}

.mission-reward {
  display: block;
  font-size: 12px;
  color: #d8e8bd;
  line-height: 1.5;
  text-align: center;
  margin-top: 16px;
}

.event-label {
  display: inline-block;
  width: fit-content;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 7px;
  margin-bottom: 12px;
}

.badges-card {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-line h2 {
  font-size: 19px;
}

.section-line>span {
  font-size: 12px;
  color: var(--muted);
}

.badges {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.badge {
  padding: 12px 7px;
  border: 1px dashed #b8c6bf;
  border-radius: 14px;
  background: #f2f5f2;
  text-align: center;
  min-width: 0;
}

.badge-icon {
  display: block;
  font-size: 28px;
  filter: grayscale(1);
  opacity: .65;
}

.badge strong {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  margin: 7px 0 5px;
}

.badge small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.badge.unlocked {
  border-style: solid;
  border-color: #bed777;
  background: #f2ffd2;
}

.badge.unlocked .badge-icon {
  filter: none;
  opacity: 1;
}

.badge.just-unlocked {
  animation: badge-glow 1s ease 2;
}

.gentle-note {
  font-size: 13px;
  color: var(--muted);
  padding: 0 8px;
  line-height: 1.6;
}

.points-float {
  position: absolute;
  z-index: 5;
  font-size: 25px;
  font-weight: 900;
  color: var(--green);
  text-shadow: 0 2px white;
  pointer-events: none;
  animation: float-points 1.3s ease forwards;
}

.dialog {
  width: min(650px,calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  padding: 30px;
  border: 2px solid var(--ink);
  border-radius: 26px;
  color: var(--ink);
  background: white;
  box-shadow: 0 16px 0 #0c241b24,0 25px 100px #071f2840;
  overscroll-behavior: contain;
}

.dialog[open] {
  animation: arrive .22s ease;
}

.dialog::backdrop {
  background: #102e34b8;
  backdrop-filter: blur(5px);
}

body:has(dialog[open]) {
  overflow: hidden;
}

.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.dialog-top .eyebrow {
  color: var(--muted);
}

.close-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
  background: #f4f8f5;
  color: var(--ink);
}

.close-button:hover {
  background: #e0edd9;
}

.dialog h2 {
  font-size: 30px;
  letter-spacing: -.6px;
  overflow-wrap: anywhere;
}

.character-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 22px;
}

.character-emoji {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: #eef5d7;
  border-radius: 17px;
  font-size: 33px;
  flex-shrink: 0;
}

.character-line>div {
  font-size: 14px;
  font-weight: 700;
}

.topic-label {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.character-line .event-label {
  margin: 0 0 0 auto;
  max-width: 145px;
  text-align: center;
}

.scenario {
  font-size: 17px;
  line-height: 1.65;
  margin-top: 16px;
}

.choice-prompt {
  font-size: 14px;
  font-weight: 800;
  margin: 23px 0 12px;
}

.options {
  display: grid;
  gap: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 68px;
  background: #f3f7ee;
  border: 2px solid #d4e1ce;
  border-radius: 15px;
  color: var(--ink);
  padding: 13px 16px;
  text-align: left;
  font-size: 16px;
  line-height: 1.4;
  transition: background .15s,transform .15s,border-color .15s;
}

.choice:not(:disabled):hover {
  background: #edfacd;
  border-color: var(--green);
  transform: translateX(3px);
}

.choice-letter {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid #c5d9bb;
  border-radius: 9px;
  font-weight: 800;
  font-size: 14px;
}

.choice:disabled {
  opacity: .7;
}

.choice.selected {
  opacity: 1;
}

.choice.is-correct {
  border-color: var(--green);
  background: #e4f7d9;
  opacity: 1;
}

.choice.is-wrong {
  border-color: var(--red);
  background: #fff0ec;
  opacity: 1;
}

.choice.is-correct .choice-letter {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.choice.is-wrong .choice-letter {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

.feedback {
  margin-top: 20px;
  padding: 17px 19px;
  border-radius: 15px;
  border: 1px solid #a9cc98;
  background: #eaf8df;
}

.feedback strong {
  display: block;
  font-size: 19px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.feedback p {
  margin: 8px 0;
  font-size: 15px;
  line-height: 1.6;
}

.feedback>span {
  font-size: 13px;
  font-weight: 800;
}

.feedback.incorrect {
  border-color: #e4aea1;
  background: #fff0e6;
}

.feedback-button {
  width: 100%;
  margin-top: 17px;
}

.small-dialog {
  max-width: 470px;
  text-align: center;
  padding: 30px;
}

.small-dialog p {
  margin: 18px 0 24px;
  line-height: 1.7;
}

.small-dialog .button {
  width: 100%;
  margin-top: 12px;
}

.dialog-illustration {
  display: block;
  font-size: 58px;
  margin-bottom: 14px;
}

.help-list {
  padding-left: 24px;
  margin: 23px 0;
  line-height: 1.7;
}

.help-list li {
  padding-left: 5px;
  margin-bottom: 12px;
}

.learning-note {
  padding: 18px;
  border-radius: 16px;
  background: #f0f8dc;
}

.learning-note p {
  font-size: 15px;
  margin-top: 10px;
}

.keyboard-note {
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0;
}

.results-dialog {
  width: min(760px,calc(100% - 32px));
}

.results-dialog>p {
  margin: 14px 0 24px;
}

.result-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 17px;
  margin: 12px 0;
  background: #f7faf3;
}

.result-item summary {
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.4;
}

.result-item p {
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.6;
}

.result-item small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.result-attempts {
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.5;
}

.result-attempts li {
  margin-top: 9px;
}

.results-dialog>.button {
  margin-top: 16px;
}

.victory {
  position: relative;
  max-width: 900px;
  text-align: center;
  margin: 18px auto;
  padding: 40px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  animation: arrive .4s ease;
}

.victory-trophy {
  display: block;
  font-size: 76px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.victory .eyebrow {
  color: var(--green);
}

.victory h1 {
  font-size: clamp(32px,5.5vw,56px);
  letter-spacing: -1.4px;
  margin: 12px 0 16px;
}

.victory>p {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.rank {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid #adc96b;
  background: var(--lime);
  border-radius: 50px;
  font-size: 18px;
  font-weight: 800;
  margin: 24px 0 13px;
}

.victory .victory-message {
  color: var(--muted);
  font-size: 15px;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin: 28px 0 12px;
}

.final-stats>div {
  padding: 18px 8px;
  border-radius: 16px;
  background: #f0f6e8;
}

.final-stats>div:first-child {
  background: var(--yellow);
}

.final-stats strong {
  display: block;
  font-size: 30px;
  line-height: 1.3;
}

.final-stats span {
  display: block;
  font-size: 13px;
  margin-top: 5px;
}

.victory .accuracy-note {
  font-size: 12px;
  color: var(--muted);
}

.final-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.earned-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f1f8e7;
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 12px;
}

.victory .best-results {
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0;
}

.victory-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 15px 22px;
  background: var(--ink);
  border: 2px solid var(--yellow);
  border-radius: 16px;
  color: white;
  box-shadow: 0 10px 30px #0002;
  font-size: 15px;
  text-align: center;
  pointer-events: none;
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 30;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 16px;
  top: -30px;
  animation: confetti-fall 3s ease-in forwards;
}

.storage-note,.noscript {
  text-align: center;
  background: #fff1d1;
  color: #6a420a;
  border-radius: 12px;
  padding: 14px;
  margin: 12px auto;
  max-width: 800px;
  font-size: 14px;
}

.shake {
  animation: shake .35s ease;
}

@keyframes hero-bob {
  0%,100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-9px) rotate(1deg);
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes badge-glow {
  50% {
    box-shadow: 0 0 0 5px #ffda5790;
    transform: scale(1.03);
  }
}

@keyframes float-points {
  from {
    opacity: 1;
    transform: translate(-50%,0);
  }
  to {
    opacity: 0;
    transform: translate(-50%,-75px);
  }
}

@keyframes shake {
  20%,60% {
    transform: translateX(-5px);
  }
  40%,80% {
    transform: translateX(5px);
  }
}

@keyframes confetti-fall {
  to {
    transform: translate(var(--drift),105vh) rotate(640deg);
    opacity: 0;
  }
}

@media(min-width:1400px) {
  .welcome h1 {
    font-size: 74px;
  }
}

@media(max-width:1050px) {
  .welcome-copy {
    padding: 38px 30px;
  }
  .title-star {
    display: none;
  }
  .welcome-art {
    min-height: 600px;
  }
  .hero-disc {
    width: 240px;
    height: 240px;
  }
  .hero {
    width: 205px;
    height: 265px;
  }
  .art-location {
    width: 77px;
    height: 80px;
    font-size: 32px;
  }
  .art-caption {
    left: 5%;
    padding: 12px;
  }
  .art-caption strong {
    font-size: 18px;
  }
  .art-sticker {
    right: 12px;
    bottom: 20px;
    font-size: 10px;
    padding: 22px 10px;
  }
  .game-layout {
    grid-template-columns: minmax(0,1fr) 280px;
    gap: 16px;
  }
  .board-panel {
    padding: 18px;
  }
  .mission-card {
    padding: 20px;
  }
  .panel-heading h2 {
    font-size: 21px;
  }
  .map-tag {
    display: none;
  }
  .stat {
    padding: 16px;
  }
  .node-name {
    font-size: 12px;
  }
  .map-nodes {
    grid-auto-rows: 116px;
  }
}

@media(max-width:800px) {
  .topbar {
    padding: 18px 20px;
  }
  .top-actions {
    gap: 8px;
  }
  .record {
    display: none;
  }
  main {
    padding: 8px 20px 20px;
  }
  .welcome {
    grid-template-columns: 1fr .8fr;
  }
  .welcome-copy {
    padding: 35px 25px;
  }
  .welcome h1 {
    font-size: 49px;
    letter-spacing: -2px;
  }
  .intro {
    font-size: 17px;
  }
  .welcome-copy .eyebrow {
    font-size: 10px;
  }
  .welcome-art {
    min-height: 610px;
  }
  .art-school {
    left: 6%;
    top: 9%;
  }
  .art-park {
    right: 5%;
    top: 20%;
  }
  .art-city {
    right: 6%;
    bottom: 18%;
  }
  .hero-disc {
    width: 205px;
    height: 205px;
  }
  .hero {
    width: 180px;
    height: 240px;
  }
  .art-sticker {
    display: none;
  }
  .art-caption {
    left: 6%;
    bottom: 6%;
    font-size: 12px;
  }
  .art-caption strong {
    font-size: 16px;
  }
  .art-caption>span {
    font-size: 26px;
  }
  .game-layout {
    grid-template-columns: 1fr;
  }
  .side-panel {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .gentle-note {
    grid-column: 1/-1;
  }
  .map-nodes {
    grid-auto-rows: 114px;
  }
  .node-name {
    font-size: 14px;
  }
  .mission-top .eyebrow {
    font-size: 11px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 14px 12px;
    gap: 10px;
  }
  .stat strong {
    font-size: 23px;
  }
  .stat>span {
    font-size: 22px;
  }
  .stat small {
    font-size: 10px;
  }
  .mission-card h2 {
    font-size: 22px;
  }
}

@media(max-width:600px) {
  .topbar {
    min-height: 80px;
    padding: 14px 16px;
    gap: 8px;
  }
  .brand {
    font-size: 16px;
    gap: 7px;
  }
  .brand-small {
    font-size: 11px;
  }
  .brand-mark {
    width: 35px;
    height: 39px;
    font-size: 23px;
  }
  .help-label {
    display: none;
  }
  .top-actions .button {
    padding: 8px 11px;
    font-size: 13px;
    min-width: 44px;
  }
  .top-actions {
    gap: 7px;
  }
  main {
    padding: 6px 14px 14px;
  }
  .welcome {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    min-height: 0;
  }
  .welcome-copy {
    padding: 29px 24px 31px;
  }
  .welcome h1 {
    font-size: 56px;
    letter-spacing: -2.5px;
    margin-top: 18px;
  }
  .welcome-copy .eyebrow {
    font-size: 10px;
  }
  .intro {
    font-size: 18px;
  }
  .intro-detail {
    font-size: 15px;
  }
  .start-form {
    max-width: none;
    margin-top: 22px;
  }
  .intro-pills {
    font-size: 12px;
    gap: 18px;
  }
  .welcome-art {
    min-height: 260px;
  }
  .hero-disc {
    width: 178px;
    height: 178px;
    margin-top: 0;
  }
  .hero {
    width: 151px;
    height: 200px;
  }
  .orbit-one {
    width: 270px;
    height: 270px;
  }
  .orbit-two {
    width: 380px;
    height: 380px;
  }
  .art-location {
    width: 65px;
    height: 68px;
    border-radius: 17px;
    font-size: 27px;
  }
  .art-location small {
    font-size: 8px;
  }
  .art-school {
    left: 7%;
    top: 12%;
  }
  .art-park {
    right: 7%;
    top: 12%;
  }
  .art-city {
    right: 6%;
    bottom: 10%;
  }
  .star-one {
    left: 9%;
    bottom: 34%;
    font-size: 28px;
  }
  .star-two {
    right: 35%;
    top: 7%;
    font-size: 23px;
  }
  .art-caption {
    left: 4%;
    bottom: 9%;
    gap: 6px;
    padding: 8px 10px;
    font-size: 10px;
  }
  .art-caption strong {
    font-size: 13px;
  }
  .art-caption>span {
    font-size: 22px;
  }
  .game-heading h1 {
    font-size: 25px;
  }
  .game-heading {
    margin: 8px 0 18px;
  }
  .game-heading .eyebrow {
    font-size: 11px;
  }
  .stats {
    grid-template-columns: repeat(2,1fr);
    margin-bottom: 16px;
    gap: 9px;
  }
  .stat {
    padding: 13px 16px;
    gap: 14px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat small {
    font-size: 11px;
  }
  .stat>span {
    font-size: 26px;
  }
  .game-layout {
    gap: 16px;
  }
  .board-panel {
    padding: 16px;
    border-radius: 20px;
  }
  .panel-heading {
    margin-bottom: 14px;
  }
  .panel-heading h2 {
    font-size: 22px;
  }
  .panel-heading .eyebrow {
    font-size: 10px;
  }
  .board {
    padding: 18px 4px 8px;
  }
  .map-nodes {
    grid-template-columns: repeat(3,minmax(0,1fr));
    grid-auto-rows: 94px;
  }
  .node-circle {
    width: 43px;
    height: 43px;
    font-size: 19px;
  }
  .node-name {
    font-size: 13px;
  }
  .player-token {
    width: 49px;
    height: 64px;
  }
  .map-legend {
    gap: 11px;
    font-size: 11px;
    margin: 16px 0;
  }
  .progress-heading {
    font-size: 12px;
  }
  .side-panel {
    grid-template-columns: 1fr;
  }
  .mission-card {
    padding: 22px;
    position: relative;
  }
  .mission-icon {
    margin-top: 16px;
  }
  .mission-card h2 {
    font-size: 25px;
  }
  .mission-card p {
    font-size: 16px;
  }
  .mission-card .button {
    font-size: 15px;
    min-height: 54px;
  }
  .mission-top .eyebrow {
    font-size: 12px;
  }
  .hearts {
    font-size: 23px;
  }
  .badges-card {
    padding: 20px;
  }
  .badges {
    grid-template-columns: repeat(2,1fr);
  }
  .badge strong {
    font-size: 14px;
  }
  .badge small {
    font-size: 12px;
  }
  .badge-icon {
    font-size: 32px;
  }
  .gentle-note {
    font-size: 14px;
  }
  .dialog {
    padding: 20px;
    border-radius: 21px;
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }
  .dialog h2 {
    font-size: 26px;
  }
  .character-line {
    gap: 10px;
    margin-bottom: 18px;
  }
  .character-line>div {
    font-size: 13px;
  }
  .character-line .event-label {
    font-size: 10px;
    max-width: 98px;
    padding: 4px 6px;
  }
  .character-emoji {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }
  .topic-label {
    font-size: 11px;
  }
  .scenario {
    font-size: 16px;
    line-height: 1.6;
  }
  .choice {
    padding: 12px;
    gap: 10px;
    font-size: 15px;
    min-height: 66px;
  }
  .choice-letter {
    width: 28px;
    height: 28px;
  }
  .feedback {
    padding: 15px;
  }
  .feedback strong {
    font-size: 18px;
  }
  .feedback p {
    font-size: 14px;
  }
  .victory {
    padding: 28px 20px;
    border-radius: 24px;
  }
  .victory-trophy {
    font-size: 65px;
  }
  .victory h1 {
    font-size: 36px;
  }
  .final-stats {
    grid-template-columns: repeat(2,1fr);
  }
  .final-stats strong {
    font-size: 30px;
  }
  .victory-actions {
    flex-direction: column;
  }
  .victory-actions .button {
    width: 100%;
  }
  footer {
    font-size: 11px;
    gap: 8px;
    padding: 20px 10px;
  }
  .toast {
    font-size: 13px;
    padding: 12px 15px;
  }
}

@media(max-width:360px) {
  .welcome-copy {
    padding: 26px 18px;
  }
  .welcome h1 {
    font-size: 48px;
  }
  .top-actions .button {
    padding: 8px;
    font-size: 12px;
  }
  .brand {
    font-size: 14px;
  }
  .brand-small {
    font-size: 10px;
  }
  .intro-pills {
    gap: 12px;
  }
  .node-name {
    font-size: 12px;
  }
  .panel-heading h2 {
    font-size: 20px;
  }
  .map-legend {
    gap: 7px;
  }
  .victory h1 {
    font-size: 30px;
  }
  .art-caption {
    left: 2%;
  }
  .art-school {
    left: 4%;
  }
  .art-park {
    right: 4%;
  }
}



/* =========================================================
   EFECTOS MEJORADOS — AVANZA SIN TRANZA
   ========================================================= */

:root {
  --fx-ease: cubic-bezier(.2,.9,.25,1.2);
  --fx-soft: cubic-bezier(.22,.61,.36,1);
}

/* Entrada de pantallas */
.screen-enter {
  animation: screen-enter .55s var(--fx-soft) both;
}

/* Inicio más vivo */
.welcome-copy > * {
  animation: intro-rise .65s var(--fx-soft) both;
}
.welcome-copy > *:nth-child(2) { animation-delay: .05s; }
.welcome-copy > *:nth-child(3) { animation-delay: .11s; }
.welcome-copy > *:nth-child(4) { animation-delay: .17s; }
.welcome-copy > *:nth-child(5) { animation-delay: .23s; }
.welcome-copy > *:nth-child(6) { animation-delay: .29s; }

.orbit-one { animation: orbit-spin 24s linear infinite; }
.orbit-two { animation: orbit-spin-reverse 34s linear infinite; }
.art-school { animation: location-float 4.8s ease-in-out infinite; }
.art-park { animation: location-float 5.4s ease-in-out .7s infinite; }
.art-city { animation: location-float 5s ease-in-out 1.3s infinite; }
.art-star { animation: star-twinkle 2.2s ease-in-out infinite; }
.star-two { animation-delay: .9s; }
.hero-disc {
  box-shadow: 0 0 0 0 #fff8, 0 18px 45px #173c3520;
  animation: hero-aura 3.4s ease-in-out infinite;
}

/* Botones con sensación de juego */
.button,.choice {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.button::after,.choice::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,transparent 25%,#fff7 48%,transparent 70%);
  transform: translateX(-140%);
  transition: transform .55s ease;
  pointer-events: none;
  z-index: -1;
}
.button:hover::after,.choice:not(:disabled):hover::after {
  transform: translateX(140%);
}
.fx-ripple {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff9;
  pointer-events: none;
  transform: translate(-50%,-50%) scale(0);
  animation: ripple .62s ease-out forwards;
  z-index: 8;
}

/* Tarjetas y estadísticas */
.stat {
  transition: transform .22s var(--fx-ease), box-shadow .22s ease, border-color .22s ease;
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px #173c3512;
}
.stat.fx-pop { animation: stat-pop .52s var(--fx-ease); }
.mission-card.fx-refresh { animation: mission-refresh .55s var(--fx-soft); }
.mission-icon { display:inline-block; }
.mission-card.fx-refresh .mission-icon { animation: icon-pop .7s var(--fx-ease); }
.event-label:not([hidden]) { animation: event-shimmer 2.2s ease-in-out infinite; }

/* Tablero */
.board::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at center,#fff7 0 4%,transparent 5% 100%);
  background-size: 80px 80px;
  opacity: .15;
  animation: board-drift 18s linear infinite;
  pointer-events: none;
}
.map-node.current .node-circle { animation: current-node 1.8s ease-in-out infinite; }
.map-node.done.fx-complete .node-circle { animation: node-complete .75s var(--fx-ease); }
.node-event { animation: event-bob 2.4s ease-in-out infinite; }
#route-progress {
  stroke-dasharray: 12 8;
  animation: route-flow 1s linear infinite;
}
.player-token {
  transform-origin: 50% 80%;
}
.player-token.player-moving {
  animation: player-hop .72s var(--fx-soft);
  filter: drop-shadow(0 10px 5px #173c3535);
}
.player-token.player-land {
  animation: player-land .38s var(--fx-ease);
}

/* Preguntas */
.dialog[open] {
  animation: dialog-spring .36s var(--fx-ease);
}
.dialog[open]::backdrop { animation: backdrop-in .3s ease both; }
.question-dialog[open] .character-line { animation: question-pop .45s .05s var(--fx-ease) both; }
.question-dialog[open] h2 { animation: question-in .45s .1s var(--fx-soft) both; }
.question-dialog[open] .scenario { animation: question-in .45s .16s var(--fx-soft) both; }
.choice {
  animation: choice-in .42s var(--fx-soft) both;
  animation-delay: calc(var(--choice-index,0) * 70ms + 150ms);
}
.choice:not(:disabled):hover .choice-letter { animation: letter-nudge .35s var(--fx-ease); }
.choice.selected.is-correct { animation: correct-choice .65s var(--fx-ease); }
.choice.selected.is-wrong { animation: wrong-choice .5s ease; }
.feedback:not([hidden]) { animation: feedback-in .42s var(--fx-ease); }
.feedback:not(.incorrect) { box-shadow: 0 0 0 0 #28b48d45; }
.feedback:not(.incorrect) { animation: feedback-in .42s var(--fx-ease), success-glow 1.3s .42s ease; }

/* Corazones */
.hearts span { display:inline-block; transform-origin:center; }
.hearts .heart-gain { animation: heart-gain .7s var(--fx-ease); }
.hearts .heart-loss { animation: heart-loss .55s ease; }

/* Partículas locales */
.fx-spark {
  position: fixed;
  z-index: 80;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--spark,#ffda57);
  pointer-events: none;
  animation: spark-burst .75s ease-out forwards;
}
.fx-star {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  font-size: 18px;
  animation: star-burst .9s ease-out forwards;
}

.points-float {
  padding: 4px 10px;
  background: #ffffffdd;
  border: 2px solid #28b48d55;
  border-radius: 999px;
  box-shadow: 0 8px 18px #173c3520;
  animation: float-points-plus 1.45s var(--fx-soft) forwards;
}

/* Toast e insignias */
.toast:not([hidden]) { animation: toast-pop .5s var(--fx-ease); }
.badge.just-unlocked {
  animation: badge-unlock 1.1s var(--fx-ease) 2;
}
.badge.just-unlocked .badge-icon { animation: badge-icon-spin .8s var(--fx-ease); }

/* Transición de nivel */
.level-flash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle,#ffda5748 0 18%,transparent 48%);
  animation: level-flash-bg .95s ease forwards;
}
.level-flash > div {
  display: grid;
  place-items: center;
  min-width: min(420px,82vw);
  padding: 24px 30px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 9px 0 var(--ink),0 30px 90px #0003;
  transform: rotate(-2deg);
  animation: level-card .95s var(--fx-ease) forwards;
}
.level-flash strong { font-size: clamp(24px,5vw,40px); letter-spacing:-1px; }
.level-flash span { margin-top:6px; font-weight:800; }

/* Victoria */
.victory { overflow:hidden; }
.victory::before {
  content:"";
  position:absolute;
  inset:-40%;
  background: conic-gradient(from 0deg,transparent,#ffda5728,transparent,#28b48d20,transparent);
  animation: victory-rays 14s linear infinite;
  pointer-events:none;
}
.victory > * { position:relative; z-index:1; }
.victory-trophy { animation: trophy-bounce 1.2s var(--fx-ease) both, trophy-float 3s 1.2s ease-in-out infinite; }
.rank { animation: rank-pop .75s .25s var(--fx-ease) both; }
.final-stats > div { animation: final-card .55s var(--fx-ease) both; }
.final-stats > div:nth-child(1){animation-delay:.15s}.final-stats > div:nth-child(2){animation-delay:.23s}.final-stats > div:nth-child(3){animation-delay:.31s}.final-stats > div:nth-child(4){animation-delay:.39s}
.earned-pill { animation: badge-pill .55s var(--fx-ease) both; }

.confetti-piece.circle { border-radius:50%; }
.confetti-piece.ribbon { width:7px; height:22px; border-radius:4px; }

/* Mini sacudida global solo al fallar */
body.fx-wrong-flash::after {
  content:"";
  position:fixed;
  inset:0;
  z-index:85;
  pointer-events:none;
  box-shadow: inset 0 0 0 5px #ff705b99;
  animation: wrong-flash .38s ease;
}

@keyframes screen-enter { from{opacity:0;transform:translateY(16px) scale(.992)} to{opacity:1;transform:none} }
@keyframes intro-rise { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:none} }
@keyframes orbit-spin { to{transform:rotate(340deg)} }
@keyframes orbit-spin-reverse { to{transform:rotate(-380deg)} }
@keyframes location-float { 0%,100%{translate:0 0} 50%{translate:0 -9px} }
@keyframes star-twinkle { 0%,100%{opacity:.45;transform:scale(.8) rotate(0)} 50%{opacity:1;transform:scale(1.25) rotate(18deg)} }
@keyframes hero-aura { 50%{box-shadow:0 0 0 14px #fff4,0 22px 55px #173c352a} }
@keyframes ripple { to{transform:translate(-50%,-50%) scale(14);opacity:0} }
@keyframes stat-pop { 45%{transform:scale(1.09) rotate(-1deg)} }
@keyframes mission-refresh { from{opacity:.65;transform:translateX(14px)} to{opacity:1;transform:none} }
@keyframes icon-pop { 45%{transform:scale(1.28) rotate(-8deg)} }
@keyframes event-shimmer { 50%{filter:brightness(1.15);box-shadow:0 0 0 5px #ffda5730} }
@keyframes board-drift { to{transform:translate3d(80px,80px,0)} }
@keyframes current-node { 50%{transform:translateY(-3px);box-shadow:0 0 0 10px #ffda5730,0 6px 0 var(--ink)} }
@keyframes node-complete { 45%{transform:scale(1.22) rotate(8deg)} }
@keyframes event-bob { 50%{transform:translateY(-4px) rotate(8deg)} }
@keyframes route-flow { to{stroke-dashoffset:-20} }
@keyframes player-hop { 0%{transform:translate(-50%,-78%) scale(1)} 35%{transform:translate(-50%,-103%) scale(1.08) rotate(-6deg)} 68%{transform:translate(-50%,-87%) scale(.98) rotate(4deg)} 100%{transform:translate(-50%,-78%) scale(1)} }
@keyframes player-land { 40%{transform:translate(-50%,-75%) scale(1.1,.9)} }
@keyframes dialog-spring { from{opacity:0;transform:translateY(24px) scale(.93)} 70%{opacity:1;transform:translateY(-3px) scale(1.015)} to{transform:none} }
@keyframes backdrop-in { from{opacity:0} to{opacity:1} }
@keyframes question-pop { from{opacity:0;transform:translateX(-18px) scale(.95)} to{opacity:1;transform:none} }
@keyframes question-in { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }
@keyframes choice-in { from{opacity:0;transform:translateX(22px) scale(.98)} to{opacity:1;transform:none} }
@keyframes letter-nudge { 50%{transform:rotate(-9deg) scale(1.08)} }
@keyframes correct-choice { 35%{transform:scale(1.025);box-shadow:0 0 0 6px #28b48d25} 65%{transform:scale(.995)} }
@keyframes wrong-choice { 20%,60%{transform:translateX(-8px)} 40%,80%{transform:translateX(8px)} }
@keyframes feedback-in { from{opacity:0;transform:translateY(12px) scale(.98)} to{opacity:1;transform:none} }
@keyframes success-glow { 50%{box-shadow:0 0 0 8px #28b48d20,0 12px 30px #28b48d1b} }
@keyframes heart-gain { 35%{transform:scale(1.6) rotate(-10deg);filter:drop-shadow(0 0 8px #ffda57)} }
@keyframes heart-loss { 0%{transform:scale(1)} 35%{transform:scale(1.3) rotate(10deg)} 100%{transform:scale(.75);opacity:.45} }
@keyframes spark-burst { from{transform:translate(-50%,-50%) scale(1);opacity:1} to{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(0);opacity:0} }
@keyframes star-burst { from{transform:translate(-50%,-50%) scale(.4) rotate(0);opacity:1} to{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(1.2) rotate(220deg);opacity:0} }
@keyframes float-points-plus { 0%{opacity:0;transform:translate(-50%,10px) scale(.65)} 18%{opacity:1;transform:translate(-50%,-5px) scale(1.15)} 100%{opacity:0;transform:translate(-50%,-95px) scale(.95)} }
@keyframes toast-pop { from{opacity:0;transform:translate(-50%,18px) scale(.9)} 65%{transform:translate(-50%,-3px) scale(1.03)} to{opacity:1;transform:translate(-50%,0) scale(1)} }
@keyframes badge-unlock { 40%{transform:scale(1.08) rotate(-2deg);box-shadow:0 0 0 8px #ffda5740,0 10px 24px #173c3518} }
@keyframes badge-icon-spin { 60%{transform:rotate(18deg) scale(1.35)} }
@keyframes level-flash-bg { 0%{opacity:0} 20%,65%{opacity:1} 100%{opacity:0} }
@keyframes level-card { 0%{opacity:0;transform:scale(.45) rotate(-10deg)} 30%{opacity:1;transform:scale(1.08) rotate(2deg)} 70%{transform:scale(1) rotate(-2deg)} 100%{opacity:0;transform:scale(.92) translateY(-20px)} }
@keyframes victory-rays { to{transform:rotate(360deg)} }
@keyframes trophy-bounce { 0%{opacity:0;transform:translateY(-40px) scale(.4) rotate(-18deg)} 60%{opacity:1;transform:translateY(7px) scale(1.18) rotate(8deg)} 100%{transform:none} }
@keyframes trophy-float { 50%{transform:translateY(-8px) rotate(3deg)} }
@keyframes rank-pop { from{opacity:0;transform:scale(.55) rotate(-5deg)} to{opacity:1;transform:none} }
@keyframes final-card { from{opacity:0;transform:translateY(18px) scale(.9)} to{opacity:1;transform:none} }
@keyframes badge-pill { from{opacity:0;transform:translateY(8px) scale(.86)} to{opacity:1;transform:none} }
@keyframes wrong-flash { 0%,100%{opacity:0} 35%{opacity:1} }

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

.saved-summary {
  font-size: 12px;
  color: #d6e5c4;
  margin-top: 17px;
}

@media(max-width:600px) {
  #game {
    padding-bottom: 72px;
  }
  #mission-button {
    position: fixed;
    bottom: 18px;
    left: 18px;
    width: calc(100% - 36px);
    z-index: 10;
    min-height: 56px;
    box-shadow: 0 4px 0 var(--ink),0 0 0 7px #eff8f5ed,0 8px 28px #173c3530;
  }
  .mission-card {
    padding-bottom: 18px;
  }
  .mission-reward {
    text-align: left;
    margin-top: 10px;
  }
}
