:root {
  --ink: #233044;
  --muted: #657086;
  --paper: #fffaf0;
  --leaf: #2f8f6b;
  --leaf-dark: #1f6b51;
  --gold: #f4b73f;
  --coral: #e66d54;
  --water: #4f9ed4;
  --violet: #7f6ed6;
  --rose: #d95f86;
  --sky: #3387b8;
  --line: rgba(35, 48, 68, 0.14);
  --shadow: 0 24px 70px rgba(35, 48, 68, 0.18);
  --mission: #2f8f6b;
  --mission-soft: rgba(47, 143, 107, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(79, 158, 212, 0.22), rgba(255, 250, 240, 0.78)),
    var(--paper);
}

body[data-screen="game"] {
  background:
    linear-gradient(180deg, rgba(47, 143, 107, 0.12), rgba(255, 250, 240, 0.94)),
    var(--paper);
}

body[data-mission="noe"] {
  --mission: var(--water);
  --mission-soft: rgba(79, 158, 212, 0.16);
}

body[data-mission="moises"] {
  --mission: var(--gold);
  --mission-soft: rgba(244, 183, 63, 0.18);
}

body[data-mission="jesus"] {
  --mission: var(--leaf);
  --mission-soft: rgba(47, 143, 107, 0.16);
}

body[data-mission="paulo"] {
  --mission: var(--violet);
  --mission-soft: rgba(127, 110, 214, 0.16);
}

body[data-mission="joao"] {
  --mission: var(--sky);
  --mission-soft: rgba(51, 135, 184, 0.16);
}

body[data-mission="ester"],
body[data-mission="ana"] {
  --mission: var(--rose);
  --mission-soft: rgba(217, 95, 134, 0.16);
}

body[data-mission="daniel"],
body[data-mission="jose-do-egito"] {
  --mission: var(--violet);
  --mission-soft: rgba(127, 110, 214, 0.16);
}

body[data-mission="minha-escolha"] {
  --mission: var(--gold);
  --mission-soft: rgba(244, 183, 63, 0.18);
}

body[data-mission="davi"],
body[data-mission="cena-de-coragem"] {
  --mission: var(--coral);
  --mission-soft: rgba(230, 109, 84, 0.16);
}

body[data-mission="sansao"] {
  --mission: var(--rose);
  --mission-soft: rgba(217, 95, 134, 0.16);
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 4px solid rgba(244, 183, 63, 0.9);
  outline-offset: 3px;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hidden {
  display: none !important;
}

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

.hero,
.game,
.result {
  width: min(980px, 100%);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(720px, calc(100vh - 48px));
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.88) 0 46%, rgba(255, 250, 240, 0.36) 46%),
    linear-gradient(135deg, #84cbea, #f7d68c 55%, #9ed58f);
  box-shadow: var(--shadow);
}

.hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sun {
  position: absolute;
  width: 112px;
  height: 112px;
  right: 11%;
  top: 12%;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 22px rgba(244, 183, 63, 0.18);
}

.path {
  position: absolute;
  right: -4%;
  bottom: -10%;
  width: 54%;
  height: 54%;
  border: 18px solid rgba(47, 143, 107, 0.32);
  border-left: 0;
  border-bottom: 0;
  border-radius: 50% 0 0 0;
}

.marker {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 84px;
  min-height: 42px;
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-weight: 900;
  background: var(--leaf);
  box-shadow: 0 10px 24px rgba(35, 48, 68, 0.16);
}

.marker-one {
  right: 36%;
  bottom: 34%;
}

.marker-two {
  right: 20%;
  bottom: 24%;
  background: var(--coral);
}

.marker-three {
  right: 9%;
  bottom: 43%;
  background: var(--violet);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  padding: clamp(34px, 8vw, 86px);
}

.hero-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.icon-button[aria-pressed="true"] {
  color: white;
  border-color: var(--leaf);
  background: var(--leaf);
}

.menu-toggle {
  display: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    var(--leaf);
  box-shadow: 0 10px 22px rgba(31, 107, 81, 0.18);
}

.eyebrow,
.label,
.question-count {
  margin: 0;
  color: var(--leaf-dark);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p,
span {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 11ch;
  margin: 10px 0 18px;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro {
  max-width: 570px;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.2vw, 1.24rem);
  line-height: 1.55;
}

.age-note {
  max-width: 560px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border-left: 5px solid var(--leaf);
  border-radius: 8px;
  color: var(--leaf-dark);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  background: rgba(47, 143, 107, 0.11);
}

.quick-start-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 560px;
  margin: 0 0 18px;
}

.quick-start-panel .primary-button {
  min-width: 190px;
}

.quick-start-panel span {
  color: var(--leaf-dark);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.3;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 560px;
  margin: 0 0 18px;
}

.hero-stats span {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 12px;
  border: 2px solid rgba(35, 48, 68, 0.1);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.72);
}

.hero-stats strong {
  color: var(--ink);
  font-size: 1.55rem;
}

.guide-panel,
.weekly-panel,
.group-panel,
.phase-panel,
.reward-preview {
  max-width: 720px;
  margin: 16px 0;
}

.weekly-panel,
.group-panel,
.guide-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 2px solid rgba(47, 143, 107, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.guide-panel h2 {
  margin: 4px 0 6px;
  font-size: 1.45rem;
}

.guide-panel p,
.guide-panel ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-panel ul {
  padding-left: 18px;
}

.leader-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-left: 5px solid var(--coral);
  border-radius: 8px;
  background: rgba(230, 109, 84, 0.12);
}

.leader-note strong {
  color: var(--ink);
}

.leader-note span {
  color: var(--muted);
  line-height: 1.35;
}

.weekly-panel h2 {
  margin: 4px 0 6px;
  font-size: 1.55rem;
}

.weekly-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.weekly-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 10px;
  align-items: stretch;
}

.weekly-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 92px;
  align-content: start;
  padding: 14px 16px;
  overflow: hidden;
  border: 2px solid rgba(35, 48, 68, 0.12);
  border-bottom: 6px solid var(--gold);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.weekly-card strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  white-space: normal;
  font-size: clamp(0.82rem, 1.5vw, 1.02rem);
  line-height: 1.12;
  text-wrap: balance;
}

.weekly-card span {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  white-space: normal;
  font-size: clamp(0.76rem, 1.25vw, 0.88rem);
  line-height: 1.22;
}

.weekly-card.active {
  border-color: rgba(47, 143, 107, 0.72);
  border-bottom-color: var(--leaf);
  background: rgba(47, 143, 107, 0.14);
}

.group-panel h2 {
  margin: 0;
  font-size: 1.45rem;
}

.group-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.group-steps span {
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.74);
}

.group-steps strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  background: var(--coral);
}

.calendar-panel {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 16px 0;
  padding: 16px;
  border: 2px solid rgba(35, 48, 68, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.calendar-panel h2 {
  margin: 0;
  font-size: 1.45rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.calendar-grid span {
  min-height: 42px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  background: rgba(47, 143, 107, 0.12);
}

.phase-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.phase-card {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 14px;
  border: 2px solid rgba(35, 48, 68, 0.12);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.phase-card strong {
  font-size: 1rem;
}

.phase-card span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.phase-card.active {
  border-color: rgba(47, 143, 107, 0.72);
  border-left-color: var(--leaf);
  background: rgba(47, 143, 107, 0.14);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
  color: var(--leaf-dark);
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.section-label span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: var(--leaf);
}

.mode-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin-bottom: 14px;
}

.setup-panel {
  display: block;
}

.mission-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 720px;
  margin-bottom: 12px;
}

.mode-button,
.mission-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.mode-button {
  min-height: 86px;
}

.mission-card {
  position: relative;
  align-content: start;
  min-height: 118px;
  overflow: hidden;
  border-top-width: 6px;
}

.mission-status {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--leaf-dark) !important;
  font-size: 0.74rem !important;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(47, 143, 107, 0.12);
}

.mission-card::after {
  position: absolute;
  right: -18px;
  bottom: -20px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(47, 143, 107, 0.12);
  content: "";
}

.mission-card[data-accent="trail"] {
  border-top-color: var(--leaf);
}

.mission-card[data-accent="noe"] {
  border-top-color: var(--water);
}

.mission-card[data-accent="moises"] {
  border-top-color: var(--gold);
}

.mission-card[data-accent="jesus"] {
  border-top-color: var(--leaf);
}

.mission-card[data-accent="paulo"] {
  border-top-color: var(--violet);
}

.mission-card[data-accent="joao"] {
  border-top-color: var(--sky);
}

.mission-card[data-accent="davi"] {
  border-top-color: var(--coral);
}

.mission-card[data-accent="sansao"] {
  border-top-color: var(--rose);
}

.mission-card[data-accent="ester"],
.mission-card[data-accent="ana"] {
  border-top-color: var(--rose);
}

.mission-card[data-accent="daniel"],
.mission-card[data-accent="jose"] {
  border-top-color: var(--violet);
}

.mission-card[data-accent="final"] {
  border-top-color: var(--gold);
}

.mission-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border-radius: 50%;
  color: white !important;
  font-size: 0.96rem !important;
  font-weight: 900;
  background: var(--ink);
}

.mission-card[data-accent="trail"] .mission-symbol {
  background: var(--leaf);
}

.mission-card[data-accent="noe"] .mission-symbol {
  background: var(--water);
}

.mission-card[data-accent="moises"] .mission-symbol {
  background: var(--gold);
}

.mission-card[data-accent="jesus"] .mission-symbol {
  background: var(--leaf);
}

.mission-card[data-accent="paulo"] .mission-symbol {
  background: var(--violet);
}

.mission-card[data-accent="joao"] .mission-symbol {
  background: var(--sky);
}

.mission-card[data-accent="davi"] .mission-symbol {
  background: var(--coral);
}

.mission-card[data-accent="sansao"] .mission-symbol {
  background: var(--rose);
}

.mission-card[data-accent="ester"] .mission-symbol,
.mission-card[data-accent="ana"] .mission-symbol {
  background: var(--rose);
}

.mission-card[data-accent="daniel"] .mission-symbol,
.mission-card[data-accent="jose"] .mission-symbol {
  background: var(--violet);
}

.mission-card[data-accent="final"] .mission-symbol {
  background: var(--gold);
}

.mode-button strong,
.mission-card strong {
  font-size: 1rem;
}

.mode-button span,
.mission-card span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

.mode-button.active,
.mission-card.active {
  border-color: rgba(47, 143, 107, 0.72);
  background: rgba(47, 143, 107, 0.14);
  box-shadow: 0 10px 24px rgba(47, 143, 107, 0.14);
}

.mode-button.active::before,
.mission-card.active::before {
  color: var(--leaf-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  content: "Selecionado";
}

.primary-button,
.secondary-button,
.next-button,
.answer-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button,
.next-button {
  padding: 14px 24px;
  color: white;
  font-weight: 900;
  background: var(--leaf);
  box-shadow: 0 12px 24px rgba(31, 107, 81, 0.24);
}

.secondary-button {
  padding: 14px 24px;
  border: 2px solid var(--line);
  color: var(--ink);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.82);
}

.primary-button:hover,
.next-button:hover,
.answer-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.collection-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 720px;
  margin: 16px 0;
  padding: 16px;
  border: 2px solid rgba(35, 48, 68, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.reward-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.reward-preview span {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 2px solid rgba(244, 183, 63, 0.24);
  border-radius: 8px;
  color: #6f4b00;
  font-weight: 900;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent),
    rgba(244, 183, 63, 0.18);
}

.collection-panel h2 {
  margin: 4px 0 6px;
  font-size: 1.45rem;
}

.collection-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.collection-stats {
  display: grid;
  place-items: center;
  min-width: 92px;
  min-height: 82px;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  background: var(--leaf);
}

.collection-stats strong {
  font-size: 1.7rem;
}

.collection-stats span {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.collection-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.collection-item {
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.collection-item strong {
  font-size: 0.92rem;
}

.collection-item span {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(35, 48, 68, 0.08);
}

.collection-item small {
  color: var(--muted);
  font-weight: 800;
}

.collection-item.bronze span {
  color: #7a421f;
  background: rgba(180, 106, 54, 0.2);
}

.collection-item.prata span {
  color: #4d5c6e;
  background: rgba(111, 128, 148, 0.18);
}

.collection-item.ouro span {
  color: #6f4b00;
  background: rgba(244, 183, 63, 0.24);
}

.next-goal {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
  background: rgba(244, 183, 63, 0.14);
}

.game {
  display: grid;
  gap: 16px;
}

.mission-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid rgba(35, 48, 68, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 26px rgba(35, 48, 68, 0.08);
}

.challenge-badge {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent),
    var(--mission);
}

.stage-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.stage-dot {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 2px solid rgba(35, 48, 68, 0.12);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.74);
}

.stage-dot.done {
  color: var(--ink);
  border-color: rgba(244, 183, 63, 0.9);
  background: var(--gold);
}

.stage-dot.current {
  color: white;
  border-color: rgba(255, 255, 255, 0.74);
  background: var(--coral);
}

.topbar,
.question-panel,
.result {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  overflow: hidden;
  border-color: rgba(35, 48, 68, 0.12);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    linear-gradient(135deg, var(--mission), transparent);
}

.topbar::before {
  display: block;
  width: 10px;
  align-self: stretch;
  border-radius: 999px;
  background: var(--mission);
  content: "";
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 10px;
}

.score {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: 10px;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent),
    var(--coral);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1);
}

.score.streak {
  background: var(--violet);
}

.score span:first-child {
  font-size: 2rem;
}

.score span:last-child {
  font-size: 0.84rem;
  text-transform: uppercase;
}

.progress-shell {
  height: 18px;
  overflow: hidden;
  border: 2px solid rgba(35, 48, 68, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 26px rgba(35, 48, 68, 0.08);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--mission), var(--gold), var(--coral));
  transition: width 220ms ease;
}

.question-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 5vw, 36px);
  border-color: rgba(255, 255, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.9)),
    var(--mission-soft);
}

.question-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--mission), var(--gold));
  content: "";
}

.question-panel h3 {
  margin: 12px 0 20px;
  font-size: clamp(1.45rem, 3.5vw, 2.35rem);
  line-height: 1.16;
}

.character-scene {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 14px 0 18px;
}

.character-avatar {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 72px;
  height: 72px;
  border: 4px solid rgba(255, 255, 255, 0.84);
  border-radius: 50%;
  color: white;
  font-size: 1.9rem;
  font-weight: 900;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent),
    var(--mission);
  box-shadow: 0 14px 28px rgba(35, 48, 68, 0.18);
  animation: avatarFloat 3.4s ease-in-out infinite;
}

.character-avatar span {
  display: block;
  color: white;
  font-size: 1.75rem;
  line-height: 1;
}

.character-avatar small {
  display: block;
  max-width: 58px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.speech-bubble {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.speech-bubble::before {
  position: absolute;
  left: -9px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-left: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  transform: rotate(45deg);
  content: "";
}

.speech-bubble strong {
  color: var(--mission);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.speech-bubble span {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

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

.answer-button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 16px;
  border: 2px solid var(--line);
  color: var(--ink);
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  background:
    linear-gradient(180deg, white, rgba(255, 255, 255, 0.86)),
    var(--mission-soft);
  box-shadow: 0 10px 22px rgba(35, 48, 68, 0.08);
}

.answer-letter {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  font-size: 0.92rem;
  background: var(--mission);
}

.answer-button.correct {
  border-color: var(--leaf);
  background: rgba(47, 143, 107, 0.14);
}

.hint-button {
  min-height: 44px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 2px solid rgba(244, 183, 63, 0.58);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(244, 183, 63, 0.16);
  cursor: pointer;
}

.hint-button:disabled {
  cursor: default;
  opacity: 0.7;
}

.hint-box {
  margin: 0 0 14px;
  padding: 13px 14px;
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.4;
  background: rgba(244, 183, 63, 0.16);
}

.answer-button.wrong {
  border-color: var(--coral);
  background: rgba(230, 109, 84, 0.14);
}

.answer-button:disabled {
  cursor: default;
}

.feedback {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 16px;
  border-left: 6px solid var(--mission);
  border-radius: 8px;
  color: var(--ink);
  background: var(--mission-soft);
  line-height: 1.45;
}

.feedback strong {
  font-size: 1.04rem;
}

.feedback em {
  color: var(--leaf-dark);
  font-style: normal;
  font-weight: 900;
}

.next-button {
  margin-top: 18px;
}

.result {
  display: grid;
  position: relative;
  justify-items: center;
  gap: 14px;
  padding: clamp(28px, 6vw, 54px);
  text-align: center;
  overflow: hidden;
}

.reward-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reward-burst span {
  position: absolute;
  display: block;
  width: 80px;
  height: 80px;
  border: 16px solid rgba(244, 183, 63, 0.24);
  border-radius: 50%;
}

.reward-burst span:nth-child(1) {
  left: 10%;
  top: 12%;
}

.reward-burst span:nth-child(2) {
  right: 12%;
  top: 18%;
  border-color: rgba(47, 143, 107, 0.2);
}

.reward-burst span:nth-child(3) {
  right: 20%;
  bottom: 8%;
  border-color: rgba(127, 110, 214, 0.2);
}

.result-badge {
  display: grid;
  place-items: center;
  min-width: 154px;
  min-height: 154px;
  padding: 22px;
  border-radius: 50%;
  color: white;
  font-size: 1.34rem;
  font-weight: 900;
  background: var(--water);
  box-shadow: 0 16px 34px rgba(79, 158, 212, 0.3);
}

.result h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.result p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
}

.achievement-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(680px, 100%);
}

.achievement {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.achievement strong {
  color: var(--ink);
}

.achievement span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.mission {
  display: grid;
  gap: 6px;
  width: min(620px, 100%);
  padding: 16px;
  border: 2px solid rgba(47, 143, 107, 0.24);
  border-radius: 8px;
  background: rgba(47, 143, 107, 0.1);
}

.share-card {
  position: relative;
  display: grid;
  gap: 8px;
  width: min(620px, 100%);
  overflow: hidden;
  padding: 48px 20px 20px;
  border: 2px solid rgba(244, 183, 63, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(244, 183, 63, 0.24), rgba(47, 143, 107, 0.16)),
    rgba(255, 255, 255, 0.9);
}

.share-ribbon {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--leaf), var(--water), var(--violet));
}

.share-card h3 {
  margin: 0;
  font-size: 1.6rem;
}

.share-card p {
  margin: 0;
}

.share-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.share-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.72);
}

.mission strong {
  color: var(--leaf-dark);
  text-transform: uppercase;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

@media (min-width: 1025px) {
  .hero,
  .game,
  .result {
    width: min(1080px, 100%);
  }

  .hero-content {
    width: min(720px, 100%);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .app {
    padding: 20px;
  }

  .hero,
  .game,
  .result {
    width: min(940px, 100%);
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    width: min(760px, 100%);
    padding: 42px;
  }

  .mission-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phase-track,
  .group-steps,
  .calendar-grid,
  .reward-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .answers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .app {
    padding: 8px;
  }

  .hero {
    min-height: calc(100vh - 28px);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 240, 0.58)),
      linear-gradient(135deg, #84cbea, #f7d68c 55%, #9ed58f);
  }

  .hero-content {
    padding: 76px 18px 24px;
  }

  .hero-actions {
    left: 18px;
    right: 18px;
    justify-content: flex-end;
  }

  .menu-toggle {
    display: grid;
    grid-template-columns: 20px auto;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 12px;
    border: 2px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-weight: 900;
    background: rgba(255, 255, 255, 0.88);
  }

  .menu-toggle span {
    grid-column: 1;
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .menu-toggle strong {
    grid-column: 2;
    grid-row: 1 / 4;
    font-size: 0.88rem;
  }

  .setup-panel {
    display: none;
  }

  .setup-panel.open {
    display: block;
  }

  .sun {
    width: 82px;
    height: 82px;
    right: 8%;
    top: 7%;
  }

  .marker,
  .path {
    display: none;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  .mission-strip,
  .stage-track {
    grid-template-columns: 1fr;
  }

  .mission-strip {
    gap: 8px;
    padding: 8px;
  }

  .challenge-badge {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .stage-track {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
  }

  .stage-dot {
    min-height: 28px;
  }

  .topbar::before {
    width: 100%;
    height: 5px;
  }

  .answers,
  .mode-picker,
  .mission-map,
  .phase-track,
  .group-steps,
  .calendar-grid,
  .hero-stats,
  .reward-preview,
  .collection-panel,
  .collection-grid,
  .achievement-list {
    grid-template-columns: 1fr;
  }

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

  .weekly-actions {
    grid-template-columns: 1fr;
  }

  .weekly-card {
    width: 100%;
    min-height: 86px;
    padding: 13px 14px;
  }

  .topbar h2 {
    font-size: 1.12rem;
    line-height: 1.18;
  }

  .label,
  .question-count {
    font-size: 0.74rem;
  }

  .collection-stats {
    justify-items: start;
    min-width: 0;
    min-height: auto;
    padding: 12px;
  }

  .character-scene {
    grid-template-columns: auto 1fr;
    gap: 9px;
    margin: 8px 0 10px;
  }

  .speech-bubble::before {
    display: none;
  }

  .score {
    min-height: 42px;
    padding: 7px;
  }

  .score span:first-child {
    font-size: 1.25rem;
  }

  .score span:last-child {
    font-size: 0.66rem;
  }

  .game {
    gap: 8px;
  }

  .progress-shell {
    height: 12px;
  }

  .question-panel {
    padding: 14px 12px;
  }

  .question-panel::before {
    height: 5px;
  }

  .question-panel h3 {
    margin: 8px 0 10px;
    font-size: 1.13rem;
    line-height: 1.25;
  }

  .character-avatar {
    width: 48px;
    height: 48px;
    border-width: 3px;
  }

  .character-avatar span {
    font-size: 1.18rem;
  }

  .character-avatar small {
    max-width: 42px;
    font-size: 0.44rem;
  }

  .speech-bubble {
    padding: 9px 10px;
  }

  .speech-bubble strong {
    font-size: 0.74rem;
  }

  .speech-bubble span {
    font-size: 0.86rem;
    line-height: 1.25;
  }

  .hint-button {
    min-height: 38px;
    margin-bottom: 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .answers {
    gap: 8px;
  }

  .answer-button {
    min-height: 58px;
    padding: 10px;
    gap: 9px;
    line-height: 1.2;
  }

  .answer-letter {
    width: 30px;
    height: 30px;
  }

  .feedback {
    gap: 6px;
    margin-top: 10px;
    padding: 10px;
    line-height: 1.34;
  }

  .next-button {
    width: 100%;
    margin-top: 10px;
  }
}

@media (max-width: 430px) {
  .weekly-panel h2 {
    font-size: 1.28rem;
    line-height: 1.12;
  }

  .weekly-panel p {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .weekly-card strong {
    font-size: 0.88rem;
    line-height: 1.08;
  }

  .weekly-card span {
    font-size: 0.82rem;
    line-height: 1.16;
  }
}

@keyframes avatarFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
