:root {
  --yellow: #ffd84d;
  --orange: #ff8a2a;
  --blue: #20a4f3;
  --deep-blue: #1769d2;
  --white: #fffdf4;
  --ink: #263238;
  --mint: #58d68d;
  --pink: #ff6b9f;
  --red: #ff5a5f;
  --panel: rgba(255, 255, 255, 0.92);
  --shadow: 0 14px 0 rgba(38, 50, 56, 0.13), 0 22px 40px rgba(38, 50, 56, 0.13);
  --border: 3px solid rgba(38, 50, 56, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 216, 77, 0.7), transparent 18rem),
    radial-gradient(circle at 88% 10%, rgba(32, 164, 243, 0.28), transparent 20rem),
    linear-gradient(135deg, #fff8d9 0%, #fffdf4 45%, #dff3ff 100%);
}

button, input { font: inherit; }

button { cursor: pointer; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--white);
  border-radius: 8px;
}

.skip-link:focus { top: 1rem; }

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 10px;
  margin-bottom: 28px;
  border: var(--border);
  border-radius: 22px;
  background: rgba(255, 253, 244, 0.84);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 0 rgba(38, 50, 56, 0.1);
}

.brand-button, .topnav button, .topnav a, .language-toggle, .sound-toggle, .icon-button, .menu-toggle {
  border: 0;
  color: var(--ink);
  background: transparent;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #fffdf4;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1), 0 4px 0 rgba(38, 50, 56, 0.1);
  overflow: hidden;
}

.brand-mark img {
  width: 38px;
  height: 38px;
  display: block;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.topbar-menu {
  display: contents;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  background: var(--yellow);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.12);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.topnav button, .topnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 16px;
  font-weight: 900;
  text-decoration: none;
}

.topnav button:hover, .topnav button:focus-visible, .topnav a:hover, .topnav a:focus-visible {
  background: #fff1a6;
  transform: translateY(-2px);
}

.language-toggle {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 15px;
  background: #e9f7ff;
  font-weight: 1000;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.language-toggle:hover, .language-toggle:focus-visible {
  transform: translateY(-2px);
  background: #dff3ff;
}

.sound-toggle, .icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  background: var(--yellow);
  font-weight: 900;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.12);
}

.sound-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.sound-icon svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.sound-icon svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.view { display: none; }
.view.is-active { display: block; animation: viewPop 260ms ease both; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 28px;
  align-items: stretch;
  min-height: clamp(470px, 68vh, 680px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 7vw, 76px);
  border: var(--border);
  border-radius: 32px;
  background: linear-gradient(160deg, #fffdf4 0%, #ffe783 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -34px;
  width: 120px;
  height: 120px;
  border-radius: 32px;
  background: rgba(32, 164, 243, 0.18);
  transform: rotate(14deg);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--deep-blue);
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Baloo 2", system-ui, sans-serif;
  letter-spacing: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(4.2rem, 13vw, 9.5rem);
  color: #253044;
  text-shadow: 0 7px 0 rgba(32, 164, 243, 0.18);
}

#homeTitle {
  font-size: clamp(4rem, 8vw, 7rem);
  max-width: 100%;
  overflow-wrap: normal;
}

h2 { font-size: clamp(2.1rem, 5vw, 4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.7rem); }

.hero-subtitle {
  margin: 6px 0 28px;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 900;
}

.hero-actions, .quiz-controls, .result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mascot-stage {
  position: relative;
  min-height: 460px;
  border: var(--border);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(32, 164, 243, 0.16), rgba(255, 255, 255, 0.7)),
    repeating-linear-gradient(90deg, rgba(38, 50, 56, 0.06) 0 2px, transparent 2px 58px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mascot-stage::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 54px;
  height: 10px;
  border-radius: 999px;
  background: rgba(38, 50, 56, 0.12);
}

.mascot, .robot-trader {
  position: absolute;
  display: grid;
  place-items: center;
  color: #203040;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 900;
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.12), 0 16px 24px rgba(38, 50, 56, 0.14);
  animation: floaty 2.8s ease-in-out infinite;
}

.bull {
  left: 13%;
  top: 18%;
  width: 150px;
  height: 132px;
  border-radius: 44% 44% 38% 38%;
  background: var(--yellow);
}

.bear {
  right: 11%;
  bottom: 24%;
  width: 145px;
  height: 132px;
  border-radius: 45px 45px 42px 42px;
  background: #ffb25f;
  animation-delay: -1s;
}

.robot-trader {
  left: 36%;
  bottom: 19%;
  width: 154px;
  height: 120px;
  border-radius: 24px;
  color: white;
  background: var(--blue);
  animation-delay: -1.8s;
}

.face { font-size: 2rem; }
.screen { padding: 8px 12px; border-radius: 12px; background: #253044; }
.horn, .ear, .antenna { position: absolute; display: block; }
.horn { top: -22px; width: 38px; height: 44px; border-radius: 50% 50% 0 0; background: white; }
.horn.left { left: 12px; transform: rotate(-30deg); }
.horn.right { right: 12px; transform: rotate(30deg); }
.ear { top: -12px; width: 44px; height: 44px; border-radius: 50%; background: #ff8a2a; }
.ear.left { left: 9px; }
.ear.right { right: 9px; }
.antenna { top: -36px; width: 8px; height: 38px; border-radius: 999px; background: #253044; }
.antenna::after { content: ""; position: absolute; left: -8px; top: -14px; width: 24px; height: 24px; border-radius: 50%; background: var(--pink); }

.spark {
  position: absolute;
  width: 46px;
  height: 46px;
  background: var(--yellow);
  clip-path: polygon(50% 0, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0 50%, 39% 36%);
  animation: spin 5s linear infinite;
}
.spark-one { top: 34px; right: 38px; }
.spark-two { left: 40px; bottom: 42px; background: var(--pink); animation-duration: 7s; }

.stats-grid, .dashboard-grid, .result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.stats-grid article, .stat-panel, .profile-panel, .panel, .result-card, .question-card {
  border: var(--border);
  background: var(--panel);
  box-shadow: 0 9px 0 rgba(38, 50, 56, 0.1);
}

.stats-grid article, .stat-panel {
  padding: 20px;
  border-radius: 24px;
}

.stats-grid strong, .stat-panel strong {
  display: block;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.stats-grid span, .stat-panel span { font-weight: 900; color: #5d6875; }

.section-heading {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin: 32px 0 18px;
}

.section-heading p { margin: 0; font-weight: 800; color: #5d6875; }

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

.quiz-view, .result-view, .dashboard-view { padding-bottom: 30px; }

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

.timer-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: var(--border);
  border-radius: 18px;
  background: white;
  font-weight: 1000;
}

.progress-track {
  height: 18px;
  border: 3px solid rgba(38, 50, 56, 0.12);
  border-radius: 999px;
  background: white;
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--blue));
  transition: width 280ms ease;
}

.question-card {
  position: relative;
  min-height: 480px;
  margin: 18px 0;
  padding: clamp(20px, 4vw, 38px);
  border-radius: 32px;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.question-meta span, .chips span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eaf7ff;
  color: #1769d2;
  font-weight: 1000;
}

.question-card h3 {
  max-width: 900px;
  margin-bottom: 22px;
  line-height: 1.14;
}

.question-visual {
  min-height: 150px;
  margin-bottom: 18px;
  border-radius: 24px;
  border: 3px dashed rgba(38, 50, 56, 0.14);
  background: linear-gradient(180deg, #e9f7ff, #fffdf4);
}

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

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding: 16px;
  border: var(--border);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 253, 244, 0.92), rgba(223, 243, 255, 0.92)),
    radial-gradient(circle at 96% 10%, rgba(255, 216, 77, 0.55), transparent 9rem);
  box-shadow: 0 9px 0 rgba(38, 50, 56, 0.1);
}

.footer-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  background: #fffdf4;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.1);
}

.footer-logo img {
  width: 48px;
  height: 48px;
  display: block;
}

.footer-brand strong {
  display: block;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 1.25rem;
  line-height: 1;
}

.footer-brand p {
  margin: 4px 0 0;
  color: #5d6875;
  font-weight: 900;
}

.footer-brand a {
  color: var(--deep-blue);
  text-decoration: none;
  border-bottom: 3px solid rgba(32, 164, 243, 0.24);
}

.footer-brand a:hover,
.footer-brand a:focus-visible {
  color: #0f4ca3;
  border-bottom-color: var(--yellow);
}

.footer-support {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  min-height: 52px;
}

.knowledge-page {
  display: grid;
  gap: 28px;
}

.knowledge-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 24px;
  align-items: stretch;
}

.knowledge-hero-copy,
.knowledge-hero-chart,
.knowledge-intro,
.basic-knowledge,
.topic-index,
.knowledge-topic,
.knowledge-faq {
  border: var(--border);
  background: var(--panel);
  box-shadow: 0 9px 0 rgba(38, 50, 56, 0.1);
}

.knowledge-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 430px;
  padding: clamp(24px, 5vw, 54px);
  border-radius: 32px;
  background: linear-gradient(155deg, #fffdf4 0%, #dff3ff 100%);
}

.knowledge-hero-copy h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 4.7vw, 4.45rem);
}

.knowledge-hero-copy p {
  max-width: 760px;
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.65;
}

.knowledge-hero-chart {
  display: grid;
  min-height: 430px;
  place-items: center;
  padding: 16px;
  border-radius: 32px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 216, 77, 0.24), rgba(255, 253, 244, 0.8)),
    repeating-linear-gradient(90deg, rgba(38, 50, 56, 0.05) 0 2px, transparent 2px 54px);
}

.knowledge-hero-chart svg,
.topic-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.knowledge-intro,
.basic-knowledge,
.topic-index,
.knowledge-faq {
  padding: clamp(20px, 4vw, 34px);
  border-radius: 28px;
}

.knowledge-intro h2,
.knowledge-faq h2 {
  margin-bottom: 12px;
}

.knowledge-intro p,
.knowledge-topic p,
.knowledge-faq p {
  line-height: 1.68;
  font-weight: 800;
}

.knowledge-checklist,
.knowledge-topic ul,
.basic-card ul {
  display: grid;
  gap: 8px;
  padding-left: 22px;
  font-weight: 850;
  line-height: 1.55;
}

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

.basic-card {
  min-width: 0;
  padding: 18px;
  border-radius: 24px;
  background: #fffdf4;
  border: 3px solid rgba(38, 50, 56, 0.1);
}

.basic-card h3 {
  margin-top: 14px;
  font-size: 1.35rem;
}

.basic-card p {
  line-height: 1.65;
  font-weight: 820;
}

.basic-chart {
  margin: 0;
  padding: 10px;
  border-radius: 20px;
  background: white;
  box-shadow: inset 0 0 0 3px rgba(38, 50, 56, 0.08);
}

.basic-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.basic-chart text {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  fill: #263238;
}

.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--deep-blue);
  background: #e9f7ff;
  font-weight: 1000;
  text-decoration: none;
}

.topic-links a:hover,
.topic-links a:focus-visible {
  color: var(--ink);
  background: #fff1a6;
}

.knowledge-topics {
  display: grid;
  gap: 20px;
}

.knowledge-topic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.48fr);
  gap: 22px;
  align-items: center;
  padding: clamp(20px, 4vw, 34px);
  border-radius: 30px;
  scroll-margin-top: 112px;
}

.knowledge-topic h2 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.knowledge-topic h3 {
  margin-top: 18px;
  font-size: 1.2rem;
}

.topic-chart {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: inset 0 0 0 3px rgba(38, 50, 56, 0.08);
}

.topic-chart text {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  fill: #263238;
}

.knowledge-faq {
  display: grid;
  gap: 12px;
}

.knowledge-faq details {
  padding: 14px 16px;
  border-radius: 18px;
  background: #fffdf4;
  border: 3px solid rgba(38, 50, 56, 0.1);
}

.knowledge-faq summary {
  cursor: pointer;
  font-weight: 1000;
}

.knowledge-faq p {
  margin: 10px 0 0;
}

body[data-knowledge-lang="vi"] .lang-en,
body[data-knowledge-lang="en"] .lang-vi {
  display: none;
}

.not-found-page {
  display: grid;
  min-height: 70vh;
  place-items: center;
}

.not-found-hero {
  width: min(920px, 100%);
  text-align: center;
}

.not-found-stage {
  min-height: 320px;
  margin-bottom: 24px;
}

.not-found-stage::after {
  bottom: 34px;
}

.sad-404 {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: clamp(6px, 2vw, 20px);
  padding: 34px clamp(18px, 5vw, 70px) 54px;
}

.number-mascot {
  position: relative;
  inset: auto;
  animation: floaty 3.4s ease-in-out infinite;
}

.number-four-left,
.number-four-right {
  width: clamp(126px, 19vw, 178px);
  height: clamp(148px, 22vw, 208px);
  border-radius: 32px;
}

.number-zero {
  width: clamp(132px, 20vw, 190px);
  height: clamp(132px, 20vw, 190px);
  border-radius: 50%;
  background: #ffb25f;
}

.number-four-left::before,
.number-four-left::after,
.number-four-right::before,
.number-four-right::after,
.number-zero::before {
  content: "";
  position: absolute;
  background: rgba(255, 253, 244, 0.92);
  box-shadow: inset 0 -5px 0 rgba(38, 50, 56, 0.08);
}

.number-four-left::before,
.number-four-right::before {
  left: 18%;
  top: 13%;
  width: 24%;
  height: 56%;
  border-radius: 16px;
  transform: rotate(26deg);
}

.number-four-left::after,
.number-four-right::after {
  left: 21%;
  top: 44%;
  width: 62%;
  height: 22%;
  border-radius: 16px;
}

.number-zero::before {
  inset: 25%;
  border-radius: 50%;
}

.number-four-right {
  background: var(--blue);
  animation-delay: -1.3s;
}

.number-four-right .screen {
  font-size: 1.2rem;
}

.not-found-hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
}

.not-found-actions {
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 920px) {
  .topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    top: 8px;
  }
  .brand-button {
    grid-column: 2;
    justify-content: center;
    min-width: 0;
  }
  .brand-button > span:not(.brand-mark) { display: inline; }
  .menu-toggle {
    display: grid;
    grid-column: 3;
    grid-row: 1;
  }
  .topbar-menu {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 10px;
  }
  .topbar.is-menu-open .topbar-menu {
    display: grid;
    gap: 10px;
  }
  .topnav {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .topnav button,
  .topnav a {
    min-height: 44px;
    border-radius: 14px;
    background: rgba(255, 253, 244, 0.72);
  }
  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
  }
  .topbar-actions .language-toggle {
    width: 100%;
  }
  .topbar-actions .sound-toggle {
    justify-self: end;
  }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .knowledge-hero,
  .knowledge-topic,
  .basic-grid {
    grid-template-columns: 1fr;
  }
  .mascot-stage { min-height: 360px; }
  .stats-grid, .dashboard-grid, .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .topbar { top: 6px; }
  .topnav button, .topnav a { padding: 9px 10px; font-size: 0.9rem; }
  .language-toggle { min-height: 38px; padding: 6px 10px; font-size: 0.82rem; }
  .hero-copy { padding: 26px; border-radius: 24px; }
  h1 { font-size: clamp(2.35rem, 12.7vw, 3.9rem); }
  #homeTitle { font-size: clamp(2.35rem, 12.7vw, 3.9rem); }
  .hero-actions, .result-actions { display: grid; grid-template-columns: 1fr; }
  .quiz-view { padding-bottom: 12px; }
  .quiz-top {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
  }
  .quiz-top > div {
    min-width: 0;
  }
  .quiz-top .eyebrow {
    margin-bottom: 2px;
    font-size: 0.72rem;
  }
  .quiz-top h2 {
    font-size: 1.45rem;
    line-height: 1.05;
  }
  .timer-pill {
    min-height: 38px;
    padding: 7px 9px;
    border-width: 2px;
    border-radius: 13px;
    font-size: 0.82rem;
  }
  .progress-track { height: 12px; border-width: 2px; }
  .question-card {
    min-height: 0;
    margin: 10px 0;
    padding: 14px;
    border-radius: 22px;
  }
  .question-meta {
    gap: 5px;
    margin-bottom: 10px;
  }
  .question-meta span,
  .chips span {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.76rem;
  }
  .question-card h3 {
    margin-bottom: 12px;
    font-size: 1.18rem;
    line-height: 1.12;
  }
  .question-visual {
    min-height: 86px;
    margin-bottom: 10px;
    border-radius: 16px;
  }
  .quiz-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .stats-grid article {
    min-width: 0;
    padding: 10px 5px;
    border-width: 2px;
    border-radius: 14px;
    text-align: center;
  }
  .stats-grid strong {
    font-size: 1.2rem;
  }
  .stats-grid span {
    display: block;
    font-size: 0.68rem;
    line-height: 1.05;
  }
  .dashboard-grid, .result-grid, .category-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .site-footer { align-items: stretch; flex-direction: column; }
  .footer-brand {
    justify-content: center;
    text-align: left;
    gap: 10px;
  }
  .footer-logo {
    width: 66px;
    height: 66px;
    border-radius: 20px;
  }
  .footer-logo img {
    width: 60px;
    height: 60px;
  }
  .footer-brand strong {
    font-size: 1.12rem;
  }
  .footer-brand p {
    max-width: 260px;
    font-size: 0.74rem;
    line-height: 1.32;
  }
  .footer-support {
    justify-content: center;
    order: 2;
  }
  .mascot-stage { min-height: 300px; }
  .knowledge-hero-copy,
  .knowledge-hero-chart,
  .basic-knowledge,
  .knowledge-topic,
  .knowledge-intro,
  .topic-index,
  .knowledge-faq {
    border-radius: 24px;
  }
  .knowledge-hero-copy,
  .knowledge-hero-chart {
    min-height: 0;
  }
  .knowledge-hero-copy h1 { font-size: clamp(1.78rem, 10.7vw, 2.8rem); }
  .knowledge-topic { scroll-margin-top: 188px; }
  .not-found-page { min-height: 62vh; }
  .not-found-stage {
    min-height: 220px;
    margin-bottom: 18px;
  }
  .sad-404 {
    padding: 30px 8px 42px;
    gap: 4px;
  }
  .number-four-left,
  .number-four-right {
    width: 88px;
    height: 112px;
    border-radius: 24px;
  }
  .number-zero {
    width: 92px;
    height: 92px;
  }
  .number-mascot .face {
    font-size: 1.3rem;
  }
  .number-four-right .screen {
    padding: 6px 8px;
    font-size: 0.82rem;
  }
  .not-found-hero h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }
  .bull { width: 118px; height: 104px; }
  .bear { width: 112px; height: 104px; }
  .robot-trader { left: 30%; width: 128px; height: 96px; }
  .not-found-stage .number-mascot {
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }
  .not-found-stage .number-four-left,
  .not-found-stage .number-four-right {
    width: 88px;
    height: 112px;
  }
  .not-found-stage .number-zero {
    width: 92px;
    height: 92px;
  }
}

@keyframes viewPop {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

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