:root {
  --bg1: #77e8ff;
  --bg2: #6cf2b8;
  --bg3: #ffd36b;
  --ink: #16324f;
  --card: #ffffffee;
  --accent: #ff7a59;
  --accent2: #1fcbff;
  --good: #2bd17e;
  --warning: #ff9f43;
  --shadow: 0 12px 30px rgba(27, 56, 99, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Nunito', sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
}

body {
  overflow-x: hidden;
}

h1,
h2,
h3,
strong,
button {
  font-family: 'Baloo 2', cursive;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 10px 12px 90px;
  max-width: 1200px;
  margin: 0 auto;
}

.bg-aurora {
  position: fixed;
  inset: -20vh -20vw;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.55), transparent 40%),
              radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.38), transparent 35%),
              radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.24), transparent 30%);
  pointer-events: none;
  z-index: -2;
}

.bg-stars {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(#fff 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  opacity: 0.25;
  z-index: -1;
  animation: drift 14s linear infinite;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(32px); }
}

.topbar {
  display: block;
  margin-bottom: 16px;
}

.topbar-merged {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--card);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  padding: 8px 6px;
  border-radius: 16px;
  box-shadow: none;
}

.brand-pill,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  padding: 8px 6px;
  border-radius: 16px;
  box-shadow: none;
}

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

.topbar-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.topbar-logo-school {
  order: -1;
}

.topbar-logo-eu {
  height: 80px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  position: relative;
}

.topbar-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  font-size: 1.4rem;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  border: 1.5px solid rgba(0,0,0,.06);
}

.topbar-home:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.menu-trigger {
  min-width: 92px;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 176px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.95));
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 14px;
  box-shadow: 0 14px 26px rgba(22, 46, 86, 0.24);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 120;
}

.profile-menu[hidden] {
  display: none;
}

.profile-menu .btn,
.profile-menu a {
  width: 100%;
  justify-content: flex-start;
}

.brand-pill p {
  margin: 0;
  font-size: 0.8rem;
}

.foot-mascot,
.earth-mascot {
  font-size: 1.35rem;
}

.avatar-big {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, #fff, #e9f5ff);
  font-size: 1.5rem;
  box-shadow: inset 0 0 0 2px #fff;
}

.help-bubble {
  position: fixed;
  right: 12px;
  bottom: 100px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
  max-width: 220px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: bob 2.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.help-bubble p {
  margin: 0;
  font-size: 0.84rem;
}

body.focus-mode-page .help-bubble,
body.focus-mode-page .mascot-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

body.focus-mode-page.float-visible .help-bubble,
body.focus-mode-page.float-visible .mascot-dock {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.screen {
  display: grid;
  gap: 14px;
}

.game-card,
.hero-card,
.result-card,
.stat-card,
.quick-card,
.mini-game {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.game-card,
.hero-card,
.results-screen {
  padding: 18px;
}

.inner {
  margin-top: 12px;
}

.hero-card {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.2fr 1fr;
}

.hero-card h1,
.game-card h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.hero-mascots {
  display: grid;
  gap: 8px;
  align-content: center;
}

.bubble {
  border-radius: 16px;
  background: linear-gradient(120deg, #fff6d6, #d8f7ff);
  padding: 10px;
  font-weight: 700;
}

.xp-wrap {
  background: linear-gradient(120deg, #f2f6ff, #e8fffb);
  border-radius: 16px;
  padding: 12px;
}

.progress {
  width: 100%;
  background: #dce6f8;
  border-radius: 999px;
  overflow: hidden;
  height: 14px;
}

.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff7a59, #ffcf57);
  border-radius: 999px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quick-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.quick-card {
  text-decoration: none;
  color: var(--ink);
  padding: 14px;
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover,
.quick-card:focus-visible {
  transform: translateY(-4px) scale(1.02);
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #ffb35a);
}

.btn-soft {
  color: var(--ink);
  background: linear-gradient(120deg, #f4fbff, #fff5ec);
  border: 2px solid #dce9fa;
}

.btn.tiny {
  padding: 8px 10px;
  font-size: 0.78rem;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.test-setup-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.test-module-title {
  margin: 0 0 8px;
  font-weight: 800;
}

.test-module-row {
  align-items: stretch;
}

.module-choice-card {
  flex: 1 1 240px;
}

.test-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.stack-form input,
.question-card input[type='number'],
.stack-form select,
.stack-form textarea {
  width: 100%;
  margin-top: 4px;
  border-radius: 12px;
  border: 2px solid #d4e2f8;
  padding: 10px;
  font: inherit;
}

.auth-screen {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  gap: 16px;
}

.auth-realm {
  position: relative;
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  gap: 16px;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(170deg, rgba(170, 231, 255, 0.7), rgba(143, 244, 201, 0.65) 55%, rgba(255, 222, 132, 0.65));
  padding: 18px;
}

.auth-scene-intro {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.auth-decor {
  position: absolute;
  font-size: 1.6rem;
  animation: bob 2.6s ease-in-out infinite;
}

.cloud-a { left: 8%; top: 10%; }
.cloud-b { right: 12%; top: 14%; animation-delay: .8s; }
.star-a { right: 22%; top: 26%; }
.star-b { left: 16%; top: 24%; }

.auth-premium {
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(241, 250, 255, 0.94));
  border-radius: 28px;
}

.mascot-card.giant {
  font-size: 1rem;
}

.auth-card {
  width: min(680px, 100%);
}

.mascot-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.mascot-card {
  background: #fff;
  padding: 12px 16px;
  border-radius: 18px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.alert,
.reward,
.score-pill {
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}

.alert { background: #ffd6d6; }
.reward { background: #d7ffe7; }
.score-pill { background: #ebf6ff; }

.avatar-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.avatar-grid label {
  background: #f8fbff;
  border: 2px solid #d8e8ff;
  border-radius: 12px;
  padding: 8px;
}

.avatar-grid-premium label {
  background: linear-gradient(145deg, #ffffff, #eaf6ff);
  box-shadow: 0 8px 14px rgba(29, 56, 98, 0.12);
}

.avatar-grid-premium label:hover {
  transform: translateY(-2px);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(188, 237, 255, 0.88), rgba(131, 236, 194, 0.84) 50%, rgba(255, 216, 134, 0.88));
  border-radius: 30px;
  padding: 18px;
  box-shadow: 0 16px 32px rgba(23, 51, 92, .22);
  border: 2px solid rgba(255, 255, 255, 0.65);
  display: grid;
  gap: 10px;
  grid-template-columns: 1.1fr .9fr;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.7), transparent 22%),
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, 0.45), transparent 20%),
    linear-gradient(160deg, rgba(255, 248, 210, 0.3), transparent 35%);
  pointer-events: none;
}

.page-hero::after {
  content: '☁️   🌟   🍃   ☁️';
  position: absolute;
  left: 5%;
  right: 5%;
  top: 8px;
  font-size: 1.15rem;
  letter-spacing: 18px;
  opacity: .72;
  animation: drift 16s linear infinite;
  pointer-events: none;
}

body[data-page='test.php'] .page-hero {
  grid-template-columns: minmax(520px, 1.28fr) minmax(380px, 520px);
  gap: 32px;
  padding: 32px 40px;
  align-items: center;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.86), transparent 18%),
    radial-gradient(circle at 88% 18%, rgba(255, 245, 173, 0.54), transparent 24%),
    radial-gradient(circle at 74% 74%, rgba(198, 255, 132, 0.42), transparent 25%),
    radial-gradient(circle at 22% 82%, rgba(88, 214, 255, 0.34), transparent 24%),
    linear-gradient(120deg, rgba(229, 246, 255, 0.98) 0%, rgba(118, 233, 223, 0.98) 38%, rgba(103, 227, 184, 0.96) 62%, rgba(238, 238, 131, 0.96) 100%);
  box-shadow: 0 24px 48px rgba(20, 57, 103, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.44);
  border-color: rgba(255, 255, 255, 0.82);
}

body[data-page='test.php'] .app-shell {
  padding-bottom: 24px;
}

body[data-page='test.php'] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url('../img/background.png') center center / cover fixed no-repeat,
    linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
}

body[data-page='test.php'] .page-hero::before {
  display: block;
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 38%),
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.76), transparent 15%),
    radial-gradient(circle at 90% 18%, rgba(255, 255, 255, 0.3), transparent 14%),
    linear-gradient(180deg, rgba(196, 247, 255, 0.22), transparent 36%),
    linear-gradient(0deg, rgba(117, 214, 106, 0.2), transparent 28%);
  pointer-events: none;
}

body[data-page='test.php'] .page-hero {
  background-size: 100% 100%;
}

body[data-page='test.php'] .test-start-hero .hero-mascot-stage::before {
  content: '';
  position: absolute;
  inset: 56px -12px 8px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 26% 34%, rgba(114, 233, 255, 0.22), transparent 24%),
    radial-gradient(circle at 76% 46%, rgba(255, 240, 146, 0.34), transparent 28%),
    radial-gradient(circle at 50% 88%, rgba(145, 234, 108, 0.22), transparent 24%);
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}

body[data-page='test.php'] .page-hero::after {
  display: none;
  content: none;
}

body[data-page='test.php'] .test-hero-copy,
body[data-page='test.php'] .hero-mascot-stage {
  position: relative;
  z-index: 1;
}

body[data-page='test.php'] .test-hero-copy {
  max-width: 680px;
  width: 100%;
  padding: 0;
  align-self: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-page='test.php'] .test-hero-copy::after {
  display: none;
}

body[data-page='test.php'] .test-start-title {
  display: block;
  margin: 12px 0 16px;
  max-width: 14ch;
  font-size: clamp(2.1rem, 3.5vw, 2.85rem);
  line-height: 1.08;
  text-wrap: balance;
}

body[data-page='test.php'] .test-start-description {
  max-width: 36ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(22, 50, 79, 0.9);
}

body[data-page='test.php'] .question-stage-hero {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 12px 12px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

body[data-page='test.php'] .question-stage-hero::before {
  display: none;
  content: none;
}

body[data-page='test.php'] .question-stage-toprail {
  position: relative;
  overflow: hidden;
  display: block;
  margin-bottom: 14px;
  padding: 12px 18px;
  border-radius: 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, rgba(205, 244, 255, 0.22), rgba(255, 255, 255, 0.16) 44%, rgba(255, 248, 214, 0.14) 100%);
  box-shadow:
    0 18px 34px rgba(29, 67, 112, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(1.14);
  -webkit-backdrop-filter: blur(18px) saturate(1.14);
}

body[data-page='test.php'] .question-stage-topbar {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px 18px;
  align-items: center;
  position: relative;
  z-index: 1;
}

body[data-page='test.php'] .question-stage-mascot-card {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

body[data-page='test.php'] .question-stage-mascot-card .mascot-glow {
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98), rgba(220, 255, 174, 0.72) 42%, rgba(158, 241, 230, 0.44) 72%, transparent 84%);
  filter: blur(12px);
  opacity: 0.96;
}

body[data-page='test.php'] .question-stage-mascot-card .mascot-illustration {
  width: 108px;
  filter: drop-shadow(0 14px 22px rgba(24, 60, 103, 0.2));
}

body[data-page='test.php'] .question-stage-mascot-card.is-talking {
  animation: questionMascotBob .32s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-mascot-card.is-talking .question-stage-mascot-svg {
  animation: mascotTalkFloat .24s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-mascot-card.is-talking .mascot-mouth {
  transform-origin: center;
  transform-box: fill-box;
  animation: mascotMouthTalk .16s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-mascot-card.is-talking .mascot-glow {
  animation: questionMascotGlow 0.4s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-summary {
  display: grid;
  gap: 12px;
}

body[data-page='test.php'] .question-stage-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #214567;
  font-family: 'Baloo 2', cursive;
}

body[data-page='test.php'] .question-stage-meta-line span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-page='test.php'] .question-stage-meta-line span + span::before {
  content: '|';
  margin-right: 4px;
  color: rgba(33, 69, 103, 0.52);
}

body[data-page='test.php'] .question-stage-progress-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

body[data-page='test.php'] .question-stage-progress {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(228, 242, 255, 0.96), rgba(249, 255, 213, 0.95));
  box-shadow: inset 0 2px 4px rgba(24, 56, 98, 0.12), 0 4px 12px rgba(128, 194, 124, 0.14);
}

body[data-page='test.php'] .question-stage-percent {
  min-width: 54px;
  text-align: right;
  font-family: 'Baloo 2', cursive;
  font-size: 1.45rem;
  line-height: 1;
  color: #295d33;
}

body[data-page='test.php'] .question-form {
  gap: 14px;
}

body[data-page='test.php'] .question-stage-shell {
  padding: 18px 22px 80px;
  display: grid;
  gap: 0;
  isolation: isolate;
}

body[data-page='test.php'] .question-stage-shell::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(320px, calc(100% - 72px));
  height: 140px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 248, 178, 0.26), rgba(255, 248, 178, 0.08) 38%, transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 249, 196, 0.22) 48%, rgba(162, 230, 137, 0.16) 100%);
  clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%);
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

body[data-page='test.php'] .question-stage-shell::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: min(320px, calc(100% - 72px));
  height: 80px;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.24) 34%, rgba(180, 235, 152, 0.2) 55%, rgba(61, 108, 162, 0.24) 100%);
  box-shadow:
    inset 0 12px 22px rgba(255, 255, 255, 0.42),
    0 24px 36px rgba(18, 54, 95, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.34);
  opacity: 0.98;
  pointer-events: none;
  z-index: 0;
}

body[data-page='test.php'] .question-stage-bottom-mascot {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(160px, 18vw, 210px);
  height: clamp(160px, 18vw, 210px);
  pointer-events: none;
  z-index: 2;
  filter:
    drop-shadow(0 18px 26px rgba(20, 57, 98, 0.18))
    drop-shadow(0 36px 40px rgba(255, 255, 255, 0.24));
  opacity: 0.98;
  transform: translateX(-50%);
}

body[data-page='test.php'] .question-stage-bottom-mascot::before {
  content: '';
  position: absolute;
  inset: 18% 18% 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), rgba(255, 249, 188, 0.08) 58%, transparent 76%);
  filter: blur(10px);
  opacity: 0.9;
  z-index: -1;
}

body[data-page='test.php'] .question-stage-bottom-mascot::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 54%;
  height: 22px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(25, 61, 101, 0.32), rgba(25, 61, 101, 0.12) 48%, transparent 78%);
  filter: blur(8px);
  opacity: 0.78;
  z-index: -2;
}

body[data-page='test.php'] .question-stage-bottom-mascot-svg {
  width: 100%;
  height: 100%;
  transform: translateY(0);
  transform-origin: 50% 88%;
}

body[data-page='test.php'] .question-stage-bottom-mascot .mascot-ear,
body[data-page='test.php'] .question-stage-bottom-mascot .mascot-antenna,
body[data-page='test.php'] .question-stage-bottom-mascot .mascot-arm,
body[data-page='test.php'] .question-stage-bottom-mascot .mascot-eye {
  transform-box: fill-box;
  transform-origin: center;
}

body[data-page='test.php'] .question-stage-bottom-mascot .mascot-eye {
  transform-origin: center;
}

body[data-page='test.php'] .question-stage-bottom-mascot .mascot-ear-left,
body[data-page='test.php'] .question-stage-bottom-mascot .mascot-antenna-left,
body[data-page='test.php'] .question-stage-bottom-mascot .mascot-arm-left {
  transform-origin: 88% 50%;
}

body[data-page='test.php'] .question-stage-bottom-mascot .mascot-ear-right,
body[data-page='test.php'] .question-stage-bottom-mascot .mascot-antenna-right,
body[data-page='test.php'] .question-stage-bottom-mascot .mascot-arm-right {
  transform-origin: 12% 50%;
}

body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking)::before {
  animation: mascotStageSpotlight 2.8s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking)::after {
  animation: mascotStagePlatformGlow 2.8s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot::before {
  animation: mascotStageHalo 2.8s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot::after {
  animation: mascotStageShadow 2.8s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot-svg {
  animation: mascotStagePeek 2.8s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot .mascot-eye {
  animation: mascotBlink 4.6s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot .mascot-ear-left,
body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot .mascot-antenna-left,
body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot .mascot-arm-left {
  animation: mascotAppendageLeftIdle 1.7s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot .mascot-ear-right,
body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot .mascot-antenna-right,
body[data-page='test.php'] .question-stage-shell:not(.is-question-speaking) .question-stage-bottom-mascot .mascot-arm-right {
  animation: mascotAppendageRightIdle 1.7s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-talking {
  animation: questionStageMascotBob .32s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .question-stage-bottom-mascot-svg {
  animation: mascotTalkFloat .24s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .mascot-mouth {
  transform-origin: center;
  transform-box: fill-box;
  animation: mascotMouthTalk .16s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .mascot-eye {
  animation: mascotBlink 3.8s ease-in-out infinite;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .mascot-ear-left,
body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .mascot-antenna-left,
body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .mascot-arm-left {
  animation: mascotAppendageLeftTalk .24s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .mascot-ear-right,
body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .mascot-antenna-right,
body[data-page='test.php'] .question-stage-bottom-mascot.is-talking .mascot-arm-right {
  animation: mascotAppendageRightTalk .24s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-talking::before {
  animation: questionMascotGlow 0.4s ease-in-out infinite alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating {
  animation: mascotCelebrateBounce .46s ease-out 2 alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating .question-stage-bottom-mascot-svg {
  animation: mascotCelebratePop .42s ease-out 2 alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating::before {
  animation: mascotCelebrateGlow .5s ease-out 2 alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating::after {
  animation: mascotCelebrateShadow .46s ease-out 2 alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating .mascot-eye {
  animation: mascotCelebrateEyes .46s ease-out 2 alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating .mascot-ear-left,
body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating .mascot-antenna-left,
body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating .mascot-arm-left {
  animation: mascotCelebrateAppendageLeft .24s ease-in-out 4 alternate;
}

body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating .mascot-ear-right,
body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating .mascot-antenna-right,
body[data-page='test.php'] .question-stage-bottom-mascot.is-celebrating .mascot-arm-right {
  animation: mascotCelebrateAppendageRight .24s ease-in-out 4 alternate;
}

body[data-page='test.php'] .question-stage-card {
  padding: 24px 22px 18px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, rgba(208, 242, 255, 0.18), rgba(255, 255, 255, 0.12) 48%, rgba(253, 247, 212, 0.14) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.68);
  box-shadow:
    0 18px 28px rgba(22, 55, 100, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

body[data-page='test.php'] .question-stage-card > * {
  position: relative;
  z-index: 1;
}

body[data-page='test.php'] .question-stage-card h3 {
  margin: 0 0 22px;
  font-size: clamp(1.75rem, 2.7vw, 2.45rem);
  line-height: 1.18;
  text-align: center;
  color: #1e4167;
}

body[data-page='test.php'] .question-stage-options {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 14px;
}

body[data-page='test.php'] .question-stage-options .choice-pill {
  flex: 1 1 0;
  min-width: 0;
  min-height: 148px;
  position: relative;
  overflow: visible;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.1)),
    linear-gradient(135deg, rgba(219, 245, 255, 0.16), rgba(255, 255, 255, 0.1) 52%, rgba(248, 252, 212, 0.12) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.64);
  box-shadow:
    0 14px 24px rgba(23, 52, 96, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body[data-page='test.php'] .question-stage-options .choice-pill span {
  position: relative;
  width: 100%;
  height: 100%;
  gap: 8px;
  padding: 16px 8px 14px;
  border-radius: inherit;
  overflow: hidden;
  transition: background 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

body[data-page='test.php'] .question-stage-options .choice-card b {
  width: 62px;
  height: 62px;
  font-size: 1.8rem;
}

body[data-page='test.php'] .question-stage-options .choice-card strong {
  font-size: 1rem;
}

body[data-page='test.php'] .question-stage-options .choice-card small {
  font-size: 0.84rem;
  color: rgba(24, 54, 91, 0.78);
}

body[data-page='test.php'] .question-stage-options .choice-pill:hover,
body[data-page='test.php'] .question-stage-options .choice-pill:focus-within {
  transform: translateY(-6px);
  box-shadow:
    0 20px 30px rgba(23, 52, 96, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

body[data-page='test.php'] .question-stage-options .choice-pill:has(input:checked) {
  transform: translateY(-4px) scale(1.01);
  z-index: 2;
  border-color: rgba(143, 220, 98, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.18)),
    radial-gradient(circle at 50% 14%, rgba(247, 255, 179, 0.9), rgba(214, 248, 160, 0.42) 58%, rgba(255, 255, 255, 0.08) 92%);
  box-shadow:
    0 18px 30px rgba(123, 193, 86, 0.18),
    0 10px 20px rgba(23, 52, 96, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body[data-page='test.php'] .question-stage-options .choice-pill:has(input:checked)::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #8fe13d, #4fa51f);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  border: 2px solid rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  box-shadow:
    0 10px 18px rgba(78, 154, 42, 0.34),
    0 0 0 1px rgba(72, 145, 30, 0.14);
  opacity: 1;
}

body[data-page='test.php'] .question-stage-options .choice-pill input:checked + span {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.18)),
    radial-gradient(circle at 50% 18%, rgba(247, 255, 190, 0.86), rgba(217, 247, 173, 0.46) 54%, rgba(255, 255, 255, 0.08) 86%);
  color: #21451f;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.76),
    inset 0 -10px 26px rgba(161, 226, 106, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body[data-page='test.php'] .question-stage-options .choice-pill input:checked + span::before {
  content: none;
}

body[data-page='test.php'] .question-stage-options .choice-pill input:checked + span strong {
  color: #1d3b1e;
}

body[data-page='test.php'] .question-stage-options .choice-pill input:checked + span small {
  background: rgba(255, 255, 255, 0.82);
  color: #517048;
}

body[data-page='test.php'] .question-stage-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-right: 0;
  padding: 8px 10px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 253, 255, 0.76)),
    linear-gradient(145deg, rgba(244, 250, 255, 0.1), rgba(231, 247, 255, 0.04));
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 10px 20px rgba(28, 63, 108, 0.08);
  backdrop-filter: blur(5px) saturate(1.04);
  -webkit-backdrop-filter: blur(5px) saturate(1.04);
}

body[data-page='test.php'] .question-stage-footer > .btn.btn-soft {
  min-width: 86px;
  min-height: 50px;
  border-radius: 999px;
  font-size: 1rem;
}

body[data-page='test.php'] .question-stage-status {
  display: grid;
  gap: 8px;
}

body[data-page='test.php'] .question-stage-status-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(227, 245, 255, 0.96), rgba(250, 255, 223, 0.96));
  overflow: hidden;
}

body[data-page='test.php'] .question-stage-status-track::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--question-progress, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, #79d84a, #b3ea68, #7de0df);
  box-shadow: 0 0 14px rgba(136, 224, 104, 0.55);
}

body[data-page='test.php'] .question-stage-cheer {
  margin: 0;
  text-align: center;
  font-family: 'Baloo 2', cursive;
  font-size: 0.96rem;
  color: #2f8cb2;
}

body[data-page='test.php'] .question-stage-voice {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-page='test.php'] .question-stage-footer .step-indicator {
  min-width: 78px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

body[data-page='test.php'] .question-stage-panel {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.1), rgba(56, 189, 248, 0.14));
}

body[data-page='test.php'] .question-stage-panel::before,
body[data-page='test.php'] .question-stage-panel::after {
  display: none;
}

body[data-page='test.php'] .question-stage-footer [data-step-next] {
  min-width: 138px;
  min-height: 56px;
  border-radius: 999px;
  padding-inline: 22px;
  font-size: 1.25rem;
  font-weight: 800;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.36), transparent 28%),
    radial-gradient(circle at 20% 44%, rgba(255, 226, 138, 0.34), transparent 18%),
    linear-gradient(180deg, #ffbf4b, #f19931 78%, #e87a1f 100%);
  border: 3px solid rgba(255, 231, 164, 0.92);
  box-shadow: 0 18px 28px rgba(228, 128, 42, 0.3), inset 0 2px 0 rgba(255, 245, 199, 0.62);
}

body[data-page='test.php'] .mission-panel {
  position: relative;
  overflow: hidden;
  padding: 34px 34px 28px;
  border-radius: 36px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.7), transparent 18%),
    radial-gradient(circle at 88% 8%, rgba(255, 239, 172, 0.9), transparent 22%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.26), transparent 16%),
    linear-gradient(180deg, rgba(126, 215, 255, 0.96) 0%, rgba(177, 234, 255, 0.95) 44%, rgba(209, 243, 220, 0.96) 76%, rgba(133, 204, 94, 0.96) 100%);
  box-shadow: 0 22px 42px rgba(24, 58, 101, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

body[data-page='test.php'] .mission-panel::before,
body[data-page='test.php'] .mission-panel::after {
  content: '';
  position: absolute;
  inset: auto;
  pointer-events: none;
}

body[data-page='test.php'] .mission-panel::before {
  left: -4%;
  right: -4%;
  bottom: -8px;
  height: 30%;
  border-radius: 40% 40% 0 0;
  background:
    radial-gradient(circle at 8% 100%, rgba(103, 180, 71, 0.82) 0 19%, transparent 19%),
    radial-gradient(circle at 24% 100%, rgba(124, 198, 86, 0.84) 0 18%, transparent 18%),
    radial-gradient(circle at 44% 100%, rgba(114, 186, 78, 0.86) 0 20%, transparent 20%),
    radial-gradient(circle at 66% 100%, rgba(124, 198, 86, 0.84) 0 18%, transparent 18%),
    radial-gradient(circle at 86% 100%, rgba(103, 180, 71, 0.82) 0 19%, transparent 19%),
    radial-gradient(circle at 50% 0, rgba(255, 237, 179, 0.78), transparent 22%),
    linear-gradient(180deg, rgba(161, 225, 111, 0.96), rgba(103, 180, 63, 0.98));
  opacity: 0.98;
}

body[data-page='test.php'] .mission-panel::after {
  top: 24px;
  left: 0;
  right: 0;
  height: 170px;
  background:
    radial-gradient(circle at 8% 36%, rgba(255, 255, 255, 0.82), transparent 5%),
    radial-gradient(circle at 20% 16%, rgba(255, 251, 196, 0.96), transparent 2.4%),
    radial-gradient(circle at 28% 26%, rgba(255, 250, 200, 0.9), transparent 2.4%),
    radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.8), transparent 3%),
    radial-gradient(circle at 82% 34%, rgba(255, 249, 196, 0.9), transparent 2.6%),
    radial-gradient(circle at 92% 8%, rgba(255, 247, 179, 0.95), transparent 10%),
    radial-gradient(ellipse at 8% 20%, rgba(255, 255, 255, 0.52) 0 12%, transparent 12%),
    radial-gradient(ellipse at 90% 22%, rgba(255, 255, 255, 0.48) 0 14%, transparent 14%),
    linear-gradient(135deg, rgba(255, 248, 189, 0.34), transparent 28%);
  opacity: 0.92;
}

body[data-page='test.php'] .mission-panel > * {
  position: relative;
  z-index: 1;
}

body[data-page='test.php'] .mission-panel.question-stage-panel {
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.28), rgba(224, 242, 254, 0.1)),
    linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(255, 255, 255, 0.12) 46%, rgba(56, 189, 248, 0.06) 100%) !important;
  border: 1.5px solid rgba(186, 230, 253, 0.55);
  box-shadow:
    0 18px 30px rgba(7, 89, 133, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(186, 230, 253, 0.12);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

body[data-page='test.php'] .mission-panel.question-stage-panel::before,
body[data-page='test.php'] .mission-panel.question-stage-panel::after {
  display: none !important;
  content: none !important;
}

body[data-page='test.php'] .test-start-form {
  gap: 12px;
}

body[data-page='test.php'] .test-stage-intro {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

body[data-page='test.php'] .test-form-bubble {
  position: relative;
  width: min(100%, 470px);
  padding: 16px 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 30px rgba(23, 56, 100, 0.14);
  text-align: center;
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
  color: #1d3d63;
}

body[data-page='test.php'] .test-form-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 4px;
  transform: translateX(-50%) rotate(45deg);
}

body[data-page='test.php'] .test-form-bubble-icon {
  margin-right: 8px;
}

body[data-page='test.php'] .stack-form {
  gap: 12px;
}

body[data-page='test.php'] .test-setup-grid {
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page='test.php'] .test-input-field {
  display: block;
  font-size: 0;
  line-height: 0;
}

body[data-page='test.php'] .stack-form input,
body[data-page='test.php'] .stack-form select,
body[data-page='test.php'] .stack-form textarea {
  margin-top: 0;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 2px solid #cfe0fb;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 255, 0.95));
  box-shadow: 0 10px 18px rgba(38, 74, 120, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 700;
  color: #1d3d63;
}

body[data-page='test.php'] .stack-form input::placeholder,
body[data-page='test.php'] .stack-form textarea::placeholder {
  color: #35567a;
  opacity: 0.94;
}

body[data-page='test.php'] .stack-form input:focus,
body[data-page='test.php'] .stack-form select:focus,
body[data-page='test.php'] .stack-form textarea:focus {
  outline: none;
  border-color: #7fd8ff;
  box-shadow: 0 0 0 5px rgba(127, 216, 255, 0.24), 0 14px 26px rgba(38, 74, 120, 0.14);
}

body[data-page='test.php'] .test-module-title {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.15;
  color: #1d3d63;
  text-align: center;
}

body[data-page='test.php'] .test-module-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 300px));
  justify-content: center;
  gap: 14px;
}

body[data-page='test.php'] .module-choice-card {
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
}

body[data-page='test.php'] .module-choice-card span {
  position: relative;
  gap: 8px;
  padding: 12px 12px 10px;
  min-height: 176px;
  align-content: end;
  border-radius: 20px;
  border: 2px solid rgba(220, 232, 251, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.12));
  box-shadow: 0 10px 18px rgba(27, 58, 101, 0.14);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

body[data-page='test.php'] .module-choice-card span::before,
body[data-page='test.php'] .module-choice-card span::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  pointer-events: none;
}

body[data-page='test.php'] .module-choice-card span::before {
  top: 10px;
  height: 54%;
  border-radius: 16px 16px 14px 14px;
}

body[data-page='test.php'] .module-choice-card span::after {
  bottom: 10px;
  height: 28%;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.34));
}

body[data-page='test.php'] .module-choice-card:hover span,
body[data-page='test.php'] .module-choice-card:focus-within span {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(27, 58, 101, 0.18);
  border-color: rgba(255, 255, 255, 0.98);
}

body[data-page='test.php'] .module-choice-card:first-child span {
  background:
    linear-gradient(180deg, rgba(255, 236, 150, 0.98), rgba(247, 182, 72, 0.98));
}

body[data-page='test.php'] .module-choice-card:last-child span {
  background:
    linear-gradient(180deg, rgba(210, 255, 141, 0.98), rgba(116, 210, 116, 0.98));
  color: #234f2c;
}

body[data-page='test.php'] .module-choice-card:first-child span::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.5), transparent 18%),
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.42), transparent 16%),
    radial-gradient(circle at 22% 26%, rgba(255, 248, 187, 0.85), transparent 2%),
    radial-gradient(circle at 66% 18%, rgba(255, 250, 200, 0.88), transparent 2%),
    radial-gradient(circle at 54% 34%, rgba(255, 255, 255, 0.62), transparent 15%),
    linear-gradient(180deg, rgba(255, 245, 184, 0.92), rgba(255, 184, 73, 0.28));
}

body[data-page='test.php'] .module-choice-card:last-child span::before {
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.46), transparent 18%),
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.42), transparent 16%),
    radial-gradient(circle at 22% 24%, rgba(233, 255, 174, 0.88), transparent 2.2%),
    radial-gradient(circle at 76% 16%, rgba(248, 255, 197, 0.84), transparent 2%),
    radial-gradient(circle at 54% 34%, rgba(255, 255, 255, 0.56), transparent 15%),
    linear-gradient(180deg, rgba(225, 255, 177, 0.92), rgba(119, 214, 113, 0.28));
}

body[data-page='test.php'] .module-choice-card b {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 2;
  width: 74px;
  height: 74px;
  padding: 8px;
  font-size: 0;
  transform: translateX(-50%);
  box-shadow: 0 8px 14px rgba(233, 170, 67, 0.14);
}

body[data-page='test.php'] .module-choice-art {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.97), rgba(255, 248, 214, 0.86));
}

body[data-page='test.php'] .module-choice-art-svg {
  width: 100%;
  height: 100%;
}

body[data-page='test.php'] .module-choice-card strong {
  position: relative;
  z-index: 2;
  margin-top: 60px;
  font-size: 1.08rem;
  line-height: 1.08;
}

body[data-page='test.php'] .module-choice-card small {
  position: relative;
  z-index: 2;
  justify-self: center;
  font-size: 0.74rem;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: inherit;
}

body[data-page='test.php'] .choice-pill input:checked + span {
  color: #173251;
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 34px rgba(240, 173, 61, 0.2);
}

body[data-page='test.php'] .choice-pill input:checked + span::after {
  content: none;
  display: none;
}

body[data-page='test.php'] .module-choice-card::after {
  display: none;
}

body[data-page='test.php'] .test-start-actions {
  display: grid;
  grid-template-columns: 92px 1fr 92px;
  align-items: end;
  gap: 12px;
  margin-top: 4px;
}

body[data-page='test.php'] .action-mascot {
  width: 92px;
  height: 92px;
  align-self: end;
}

body[data-page='test.php'] .action-mascot-left {
  transform: rotate(-8deg) translateY(8px);
}

body[data-page='test.php'] .action-mascot-right {
  transform: rotate(8deg) translateY(8px);
}

body[data-page='test.php'] .action-mascot-svg {
  width: 100%;
  height: 100%;
}

body[data-page='test.php'] .stack-form > .btn.btn-primary {
  width: 100%;
  min-height: 76px;
  border-radius: 999px;
  font-size: 1.9rem;
  letter-spacing: 0.01em;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.34), transparent 26%),
    radial-gradient(circle at 24% 40%, rgba(255, 227, 139, 0.38), transparent 18%),
    linear-gradient(180deg, #ffc652, #f29a2f 78%, #eb7420 100%);
  border: 3px solid rgba(255, 237, 167, 0.8);
  box-shadow: 0 18px 28px rgba(228, 128, 42, 0.3), inset 0 2px 0 rgba(255, 245, 199, 0.62);
}

body[data-page='test.php'] .stack-form > .btn.btn-primary:hover,
body[data-page='test.php'] .stack-form > .btn.btn-primary:focus-visible {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.06);
}

.hero-content::after,
body:not([data-page='test.php']) .page-hero > div:first-child::after {
  content: '';
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -22px;
  height: 42%;
  background:
    radial-gradient(circle at 16% 100%, rgba(127, 213, 119, .84) 0 24%, transparent 24%),
    radial-gradient(circle at 38% 100%, rgba(116, 199, 108, .8) 0 22%, transparent 22%),
    radial-gradient(circle at 62% 100%, rgba(103, 185, 95, .82) 0 24%, transparent 24%),
    radial-gradient(circle at 83% 100%, rgba(124, 208, 116, .82) 0 22%, transparent 22%),
    linear-gradient(180deg, rgba(140, 228, 134, .92), rgba(109, 197, 103, .93));
  border-radius: 42% 42% 0 0;
  opacity: .58;
  z-index: -1;
  pointer-events: none;
}

.themed-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(240, 248, 255, 0.93));
}

.mission-panel {
  border-radius: 28px;
}

.step-form {
  gap: 12px;
}

.step-card {
  display: none;
  animation: popIn .24s ease;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #eef7ff);
}

.step-card.active {
  display: block;
}

.step-controls {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: #f0f8ff;
  border-radius: 16px;
  padding: 8px;
  position: sticky;
  bottom: 6px;
}

.step-indicator {
  margin: 0;
  text-align: center;
  font-weight: 800;
}

.mini-hub-panel .mini-game {
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 18px rgba(30, 52, 88, 0.2);
}

.mini-hub-panel .mini-game h3,
.mini-hub-panel .mini-game p {
  position: relative;
  z-index: 2;
}

.mini-hub-panel .mini-game .game-zone {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.82);
}

.tasks-full {
  gap: 10px;
}

.story-badge {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calm-hero {
  background: linear-gradient(150deg, rgba(200, 236, 255, 0.84), rgba(180, 245, 223, 0.82));
}

.calm-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(236, 246, 255, 0.9));
}

.leaderboard-podium {
  margin-bottom: 14px;
}

.results-screen {
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(206, 239, 255, 0.9), rgba(172, 244, 207, 0.9) 52%, rgba(255, 221, 148, 0.88));
}

.score-meter {
  position: relative;
  height: 78px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  margin-bottom: 8px;
}

.score-meter-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff8458, #ffd265);
  box-shadow: 0 0 16px rgba(255, 180, 86, 0.64);
  transition: width .9s cubic-bezier(.2, .8, .2, 1);
}

.score-meter .big-score {
  position: relative;
  z-index: 2;
}

.question-form {
  display: grid;
  gap: 10px;
}

.question-card {
  background: #f9fdff;
  border: 2px solid #deedff;
  border-radius: 16px;
  padding: 12px;
}

.question-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-row label {
  background: #fff;
  border: 2px solid #e4ebf8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.88rem;
}

.task-list {
  display: grid;
  gap: 8px;
}

.task-item {
  background: #f8fcff;
  border-radius: 12px;
  padding: 10px;
  border: 2px solid #d8e8ff;
}

.task-item.done {
  opacity: 0.68;
}

.coach-card {
  background: linear-gradient(130deg, #e7f7ff, #fff4dc);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 8px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  background: linear-gradient(130deg, #ffe27a, #ffb86d);
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

.mini-game {
  padding: 12px;
}

.game-zone {
  min-height: 90px;
  background: #f6fbff;
  border-radius: 12px;
  border: 2px dashed #c7dff8;
  padding: 10px;
  margin-top: 8px;
}

.claim-form {
  margin-top: 12px;
  display: grid;
}

.leaderboard {
  display: grid;
  gap: 8px;
}

.leader-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  background: #f9fcff;
  border-radius: 12px;
  padding: 8px;
  border: 2px solid #dcebff;
}

.leader-row.top {
  background: linear-gradient(120deg, #fff9dc, #e5f6ff);
}

.rank,
.chip {
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

.results-screen {
  text-align: center;
}

.mascot-reaction {
  font-size: 2rem;
}

.result-card {
  padding: 16px;
}

.big-score {
  font-size: 3rem;
  margin: 4px 0;
  line-height: 1;
}

.bottom-nav {
  --bottom-nav-padding: 8px;
  --bottom-nav-gap: 8px;
  --bottom-nav-radius: 20px;
  --bottom-nav-columns: repeat(6, minmax(0, 1fr));
  --bottom-nav-justify: stretch;
  --bottom-nav-item-radius: 16px;
  --bottom-nav-item-padding: 8px 4px 6px;
  --bottom-nav-item-font-size: 0.78rem;
  --bottom-nav-item-min-height: auto;
  --bottom-nav-icon-size: 1.05rem;
  --bottom-nav-label-size: 0.64rem;
  --bottom-nav-item-basis: 78px;
  --bottom-nav-item-padding-mobile: 6px 3px;
  position: fixed;
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  background: #ffffffef;
  border-radius: var(--bottom-nav-radius);
  box-shadow: var(--shadow);
  padding: var(--bottom-nav-padding);
  display: grid;
  gap: var(--bottom-nav-gap);
  grid-template-columns: var(--bottom-nav-columns);
  justify-content: var(--bottom-nav-justify);
  z-index: 70;
}

.bottom-nav a {
  text-decoration: none;
  text-align: center;
  color: var(--ink);
  background: #f4f9ff;
  border-radius: var(--bottom-nav-item-radius);
  padding: var(--bottom-nav-item-padding);
  min-height: var(--bottom-nav-item-min-height);
  font-size: var(--bottom-nav-item-font-size);
  font-weight: 700;
}

.pop-in {
  animation: popIn 0.35s ease;
}

.adventure-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(175, 236, 255, 0.95), rgba(108, 242, 184, 0.95) 54%, rgba(255, 222, 126, 0.95)),
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.8), transparent 38%),
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.45), transparent 30%);
  box-shadow: 0 20px 44px rgba(28, 62, 112, 0.26);
  padding: 28px 26px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1.15fr .85fr;
}

.hero-sky-layer {
  position: absolute;
  inset: 0 0 auto 0;
  height: 72%;
  background: linear-gradient(180deg, rgba(219, 245, 255, 0.65), transparent);
  pointer-events: none;
}

.hero-sun {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  top: 10px;
  right: 16px;
  background: radial-gradient(circle, #fff6a6 20%, #ffd66b 68%);
  box-shadow: 0 0 0 10px rgba(255, 230, 153, 0.35), 0 0 35px rgba(255, 204, 74, 0.65);
}

.hero-cloud {
  position: absolute;
  font-size: 1.8rem;
  filter: drop-shadow(0 8px 12px rgba(26, 50, 95, 0.22));
  animation: cloudFloat 9s ease-in-out infinite;
}

.hero-cloud.c1 { top: 14px; left: 15%; }
.hero-cloud.c2 { top: 54px; left: 52%; animation-delay: 1.2s; }

.hero-grass {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -10px;
  height: 35%;
  background:
    radial-gradient(circle at 12% 100%, #8be27f 0 26%, transparent 26%),
    radial-gradient(circle at 32% 100%, #79d86d 0 23%, transparent 23%),
    radial-gradient(circle at 55% 100%, #6dd062 0 26%, transparent 26%),
    radial-gradient(circle at 76% 100%, #84df77 0 24%, transparent 24%),
    linear-gradient(180deg, #90ec8a, #68c85d);
}

.hero-content,
.hero-mascot-stage {
  position: relative;
  z-index: 2;
}

.hero-content {
  isolation: isolate;
}

.hero-content > * {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  margin: 0;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 800;
}

.adventure-hero h1 {
  margin: 8px 0 8px;
  line-height: 1.05;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}

.adventure-hero p {
  max-width: 58ch;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
}

.glow-meter {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 4px 12px rgba(0,0,0,0.04);
}

.glow-meter p,
.glow-meter small {
  margin: 0;
  font-weight: 700;
}

.glow-meter small {
  display: block;
  margin-top: 8px;
  color: rgba(31, 56, 93, 0.78);
}

.glow-progress {
  margin: 8px 0;
  height: 16px;
  background: linear-gradient(90deg, #d6e6fb, #e4f8ff);
}

.glow-progress i {
  background: linear-gradient(90deg, #ff7a59, #ffbf49, #ffee71);
  box-shadow: 0 0 14px rgba(255, 181, 56, 0.72);
}

.score-orbs {
  display: grid;
  gap: 8px;
}

.preview-orbs .orb {
  min-height: 84px;
}

.preview-orb strong {
  font-size: 1rem;
}

.preview-orb small {
  color: rgba(255, 255, 255, 0.94);
}

.orb {
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 18px;
  color: #fff;
  min-height: 70px;
  box-shadow: 0 10px 20px rgba(20, 33, 65, 0.24);
}

.orb span {
  font-size: 0.78rem;
  font-weight: 700;
}

.orb strong {
  font-size: 1.2rem;
}

.orb small {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.orb-digital { background: linear-gradient(130deg, #ff8667, #ffbc59); }
.orb-carbon { background: linear-gradient(130deg, #16ba90, #6ed86c); }

.hero-mascot-stage {
  display: grid;
  gap: 16px;
  align-content: center;
}

.hero-summary-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 12px 22px rgba(39, 54, 94, 0.2);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,0.5);
}

.hero-card-kicker {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(40, 74, 113, 0.74);
}

.hero-summary-card h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.hero-summary-card p {
  margin: 0;
  max-width: none;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.fun-meter-chips {
  margin-top: 12px;
}

.hero-chip {
  background: linear-gradient(135deg, rgba(231, 247, 255, 0.96), rgba(255, 244, 220, 0.96));
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(38, 68, 110, 0.12);
}

.hero-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-actions-row .btn {
  flex: 1 1 220px;
}

/* =========================================================
   TEST PAGE — Liquid Water Overrides
   ========================================================= */

/* --- Animations --- */

@keyframes liquidBlob1 {
  0%, 100% { border-radius: 42% 58% 62% 38% / 46% 52% 48% 54%; transform: translate(0, 0) scale(1); }
  25%      { border-radius: 56% 44% 38% 62% / 52% 42% 58% 48%; transform: translate(12px, -8px) scale(1.04); }
  50%      { border-radius: 38% 62% 56% 44% / 48% 58% 42% 52%; transform: translate(-6px, 6px) scale(0.97); }
  75%      { border-radius: 62% 38% 44% 56% / 54% 46% 56% 44%; transform: translate(8px, 10px) scale(1.02); }
}

@keyframes liquidBlob2 {
  0%, 100% { border-radius: 54% 46% 48% 52% / 58% 42% 56% 44%; transform: translate(0,0) rotate(0deg); }
  33%      { border-radius: 46% 54% 56% 44% / 42% 58% 44% 56%; transform: translate(-10px, 8px) rotate(6deg); }
  66%      { border-radius: 52% 48% 42% 58% / 48% 52% 58% 42%; transform: translate(14px, -6px) rotate(-4deg); }
}

@keyframes liquidRipple {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.35; }
  50%  { transform: translate(-50%, -50%) scale(1);   opacity: 0.12; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

@keyframes liquidShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes liquidWave {
  0%   { d: path('M0 18 Q60 8 120 18 T240 18 T360 18 V40 H0 Z'); }
  50%  { d: path('M0 14 Q60 24 120 14 T240 14 T360 14 V40 H0 Z'); }
  100% { d: path('M0 18 Q60 8 120 18 T240 18 T360 18 V40 H0 Z'); }
}

@keyframes liquidFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* --- Wider shell --- */

body[data-page='test.php'] .app-shell {
  max-width: 1400px;
}

/* --- Page hero: wider grid --- */

body[data-page='test.php'] .page-hero {
  grid-template-columns: minmax(560px, 1.3fr) minmax(400px, 560px);
}

/* --- Question shell: liquid water --- */

body[data-page='test.php'] .question-stage-shell {
  position: relative;
  padding: 22px 28px 80px;
  border-radius: 38px;
  border: 2px solid rgba(255, 255, 255, 0.56);
  background:
    linear-gradient(180deg,
      rgba(8, 145, 178, 0.06) 0%,
      rgba(14, 165, 233, 0.1) 30%,
      rgba(56, 189, 248, 0.08) 60%,
      rgba(186, 230, 253, 0.12) 100%);
  box-shadow:
    0 24px 60px rgba(7, 89, 133, 0.16),
    0 4px 16px rgba(14, 165, 233, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(14, 165, 233, 0.06);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  overflow: hidden;
}

body[data-page='test.php'] .question-stage-shell::before {
  content: '' !important;
  display: block !important;
  position: absolute;
  top: -80px;
  left: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.08) 50%, transparent 72%);
  animation: liquidBlob1 12s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
  filter: blur(30px);
}

body[data-page='test.php'] .question-stage-shell::after {
  content: '' !important;
  display: block !important;
  position: absolute;
  bottom: 100px;
  right: -40px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.2), rgba(56, 189, 248, 0.06) 52%, transparent 70%);
  animation: liquidBlob2 10s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
  filter: blur(24px);
}

/* --- Toprail: water glass header --- */

body[data-page='test.php'] .question-stage-toprail {
  border-radius: 28px;
  border-color: rgba(186, 230, 253, 0.6);
  background:
    linear-gradient(180deg, rgba(224, 242, 254, 0.52), rgba(186, 230, 253, 0.22)),
    linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(255, 255, 255, 0.18) 50%, rgba(56, 189, 248, 0.06) 100%);
  box-shadow:
    0 12px 32px rgba(7, 89, 133, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(14, 165, 233, 0.08);
  position: relative;
  overflow: hidden;
}

body[data-page='test.php'] .question-stage-toprail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14) 30%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0.14) 70%, transparent);
  background-size: 200% 100%;
  animation: liquidShimmer 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* --- Question cards: liquid water bubbles --- */

body[data-page='test.php'] .question-stage-card {
  position: relative;
  padding: 28px 26px 20px;
  border-radius: 32px;
  border: 1.5px solid rgba(186, 230, 253, 0.55);
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.72), rgba(224, 242, 254, 0.42)),
    linear-gradient(135deg, rgba(14, 165, 233, 0.04), rgba(255, 255, 255, 0.2) 50%, rgba(56, 189, 248, 0.04) 100%);
  box-shadow:
    0 16px 36px rgba(7, 89, 133, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(186, 230, 253, 0.16);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  overflow: hidden;
}

body[data-page='test.php'] .question-stage-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 140%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.06), transparent 60%);
  transform: translate(-50%, -50%) scale(0.6);
  animation: liquidRipple 4s ease-out infinite;
  pointer-events: none;
  z-index: 0;
}

body[data-page='test.php'] .question-stage-card h3 {
  color: #0c4a6e;
  position: relative;
  z-index: 1;
}

/* --- Choice pills: water bubbles --- */

body[data-page='test.php'] .question-stage-options .choice-pill {
  border-radius: 24px;
  border-color: rgba(186, 230, 253, 0.55);
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.56), rgba(224, 242, 254, 0.24)),
    linear-gradient(135deg, rgba(14, 165, 233, 0.03), rgba(255, 255, 255, 0.14) 50%, rgba(56, 189, 248, 0.04));
  box-shadow:
    0 10px 24px rgba(7, 89, 133, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(186, 230, 253, 0.1);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}

body[data-page='test.php'] .question-stage-options .choice-pill:hover,
body[data-page='test.php'] .question-stage-options .choice-pill:focus-within {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow:
    0 18px 32px rgba(7, 89, 133, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 24px rgba(56, 189, 248, 0.12);
}

body[data-page='test.php'] .question-stage-options .choice-pill:has(input:checked) {
  border-color: rgba(14, 165, 233, 0.7);
  background:
    linear-gradient(180deg, rgba(224, 242, 254, 0.72), rgba(186, 230, 253, 0.36)),
    radial-gradient(circle at 50% 14%, rgba(186, 230, 253, 0.8), rgba(224, 242, 254, 0.3) 60%, transparent 92%);
  box-shadow:
    0 14px 28px rgba(14, 165, 233, 0.14),
    0 0 32px rgba(56, 189, 248, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-page='test.php'] .question-stage-options .choice-pill:has(input:checked)::after {
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  border-color: rgba(224, 242, 254, 0.92);
  box-shadow:
    0 8px 16px rgba(14, 165, 233, 0.3),
    0 0 0 1px rgba(7, 89, 133, 0.1);
}

body[data-page='test.php'] .question-stage-options .choice-pill input:checked + span {
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.64), rgba(224, 242, 254, 0.28)),
    radial-gradient(circle at 50% 18%, rgba(186, 230, 253, 0.7), rgba(224, 242, 254, 0.32) 56%, transparent 88%);
  color: #0c4a6e;
  box-shadow:
    inset 0 0 0 1px rgba(186, 230, 253, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-page='test.php'] .question-stage-options .choice-pill input:checked + span strong {
  color: #0c4a6e;
}

body[data-page='test.php'] .question-stage-options .choice-pill input:checked + span small {
  background: rgba(224, 242, 254, 0.88);
  color: #075985;
}

/* --- Footer bar: water glass --- */

body[data-page='test.php'] .question-stage-footer {
  border-color: rgba(186, 230, 253, 0.5);
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.92), rgba(224, 242, 254, 0.78)),
    linear-gradient(145deg, rgba(14, 165, 233, 0.04), rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(186, 230, 253, 0.14),
    0 8px 20px rgba(7, 89, 133, 0.06);
}

body[data-page='test.php'] .question-stage-status-track {
  background: linear-gradient(90deg, rgba(224, 242, 254, 0.96), rgba(186, 230, 253, 0.92));
}

body[data-page='test.php'] .question-stage-status-track::after {
  background: linear-gradient(90deg, #38bdf8, #0ea5e9, #7dd3fc);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

body[data-page='test.php'] .question-stage-cheer {
  color: #0369a1;
}

/* --- Progress bar: water line --- */

body[data-page='test.php'] .question-stage-progress {
  background: linear-gradient(90deg, rgba(224, 242, 254, 0.96), rgba(186, 230, 253, 0.92));
}

body[data-page='test.php'] .question-stage-percent {
  color: #075985;
}

/* --- Next/submit button: ocean --- */

body[data-page='test.php'] .question-stage-footer [data-step-next] {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.32), transparent 28%),
    linear-gradient(180deg, #38bdf8, #0ea5e9 60%, #0284c7 100%);
  border: 3px solid rgba(186, 230, 253, 0.8);
  box-shadow: 0 14px 24px rgba(14, 165, 233, 0.28), inset 0 2px 0 rgba(186, 230, 253, 0.5);
  color: #fff;
  text-shadow: 0 1px 2px rgba(7, 89, 133, 0.22);
}

body[data-page='test.php'] .question-stage-footer [data-step-next]:hover {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(180deg, #7dd3fc, #38bdf8 60%, #0ea5e9 100%);
  box-shadow: 0 18px 30px rgba(14, 165, 233, 0.32), inset 0 2px 0 rgba(186, 230, 253, 0.6);
}

/* --- Bottom mascot: water platform --- */

body[data-page='test.php'] .question-stage-shell > .question-stage-bottom-mascot::after {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.22), rgba(14, 165, 233, 0.08) 48%, transparent 78%);
}

body[data-page='test.php'] .question-stage-shell > .question-stage-bottom-mascot::before {
  background: radial-gradient(circle, rgba(186, 230, 253, 0.5), rgba(56, 189, 248, 0.12) 58%, transparent 76%);
}

/* --- Mission panel (start form): liquid water --- */

body[data-page='test.php'] .mission-panel:not(.question-stage-panel) {
  border-color: rgba(186, 230, 253, 0.6);
  background:
    radial-gradient(circle at 14% 16%, rgba(240, 249, 255, 0.8), transparent 18%),
    radial-gradient(circle at 88% 8%, rgba(186, 230, 253, 0.7), transparent 22%),
    linear-gradient(180deg,
      rgba(224, 242, 254, 0.96) 0%,
      rgba(186, 230, 253, 0.94) 40%,
      rgba(125, 211, 252, 0.92) 70%,
      rgba(56, 189, 248, 0.88) 100%);
  box-shadow: 0 22px 50px rgba(7, 89, 133, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-page='test.php'] .mission-panel:not(.question-stage-panel)::before {
  background:
    radial-gradient(circle at 8% 100%, rgba(14, 165, 233, 0.5) 0 19%, transparent 19%),
    radial-gradient(circle at 24% 100%, rgba(56, 189, 248, 0.52) 0 18%, transparent 18%),
    radial-gradient(circle at 44% 100%, rgba(14, 165, 233, 0.54) 0 20%, transparent 20%),
    radial-gradient(circle at 66% 100%, rgba(56, 189, 248, 0.52) 0 18%, transparent 18%),
    radial-gradient(circle at 86% 100%, rgba(14, 165, 233, 0.5) 0 19%, transparent 19%),
    linear-gradient(180deg, rgba(125, 211, 252, 0.92), rgba(14, 165, 233, 0.86));
}

/* --- Start form inputs: water --- */

body[data-page='test.php'] .stack-form input,
body[data-page='test.php'] .stack-form select,
body[data-page='test.php'] .stack-form textarea {
  border-color: rgba(125, 211, 252, 0.6);
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.98), rgba(224, 242, 254, 0.95));
}

body[data-page='test.php'] .stack-form input:focus,
body[data-page='test.php'] .stack-form select:focus,
body[data-page='test.php'] .stack-form textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.2), 0 12px 24px rgba(7, 89, 133, 0.1);
}

/* --- Start button: deeper ocean --- */

body[data-page='test.php'] .stack-form > .btn.btn-primary {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.3), transparent 26%),
    linear-gradient(180deg, #38bdf8, #0ea5e9 60%, #0284c7 100%);
  border: 3px solid rgba(186, 230, 253, 0.76);
  box-shadow: 0 18px 28px rgba(14, 165, 233, 0.3), inset 0 2px 0 rgba(186, 230, 253, 0.5);
  color: #fff;
  text-shadow: 0 1px 2px rgba(7, 89, 133, 0.2);
}

/* --- Module choice cards: water tint --- */

body[data-page='test.php'] .module-choice-card:first-child span {
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.98), rgba(125, 211, 252, 0.94));
  color: #0c4a6e;
}

body[data-page='test.php'] .module-choice-card:first-child span::before {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.56), transparent 20%),
    linear-gradient(180deg, rgba(186, 230, 253, 0.72), rgba(56, 189, 248, 0.18));
}

body[data-page='test.php'] .module-choice-card:last-child span {
  background: linear-gradient(180deg, rgba(209, 250, 229, 0.98), rgba(110, 231, 183, 0.94));
  color: #064e3b;
}

body[data-page='test.php'] .module-choice-card:last-child span::before {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.52), transparent 20%),
    linear-gradient(180deg, rgba(167, 243, 208, 0.72), rgba(52, 211, 153, 0.18));
}

/* --- Hero: water tint background --- */

body[data-page='test.php'] .page-hero {
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.82), transparent 18%),
    radial-gradient(circle at 88% 18%, rgba(186, 230, 253, 0.5), transparent 24%),
    radial-gradient(circle at 74% 74%, rgba(125, 211, 252, 0.34), transparent 25%),
    radial-gradient(circle at 22% 82%, rgba(56, 189, 248, 0.28), transparent 24%),
    linear-gradient(140deg,
      rgba(240, 249, 255, 0.98) 0%,
      rgba(186, 230, 253, 0.95) 32%,
      rgba(125, 211, 252, 0.92) 58%,
      rgba(56, 189, 248, 0.88) 100%);
  box-shadow: 0 24px 48px rgba(7, 89, 133, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-color: rgba(186, 230, 253, 0.72);
}

/* --- Form bubble --- */

body[data-page='test.php'] .test-form-bubble {
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.98), rgba(224, 242, 254, 0.96));
  border-color: rgba(186, 230, 253, 0.8);
  color: #0c4a6e;
}

body[data-page='test.php'] .test-form-bubble::after {
  background: rgba(240, 249, 255, 0.98);
}

body[data-page='test.php'] .test-module-title {
  color: #0c4a6e;
}

body[data-page='results.php'] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url('../img/background.png') center center / cover fixed no-repeat,
    linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
}

body[data-page='results.php'] .app-shell {
  padding-bottom: 30px;
}

body[data-page='results.php'] .report-stage-shell {
  position: relative;
  overflow: hidden;
  padding: 18px 22px 24px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.14)),
    linear-gradient(135deg, rgba(205, 244, 255, 0.24), rgba(255, 255, 255, 0.16) 42%, rgba(255, 248, 214, 0.18) 100%);
  box-shadow:
    0 28px 54px rgba(18, 54, 95, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

body[data-page='results.php'] .report-stage-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 38%),
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.76), transparent 15%),
    radial-gradient(circle at 90% 18%, rgba(255, 255, 255, 0.3), transparent 14%),
    linear-gradient(180deg, rgba(196, 247, 255, 0.22), transparent 36%),
    linear-gradient(0deg, rgba(117, 214, 106, 0.18), transparent 28%);
  pointer-events: none;
}

body[data-page='results.php'] .report-stage-shell::after {
  display: none;
  content: none;
}

body[data-page='results.php'] .report-stage-toprail,
body[data-page='results.php'] .report-stage-body {
  position: relative;
  z-index: 1;
}

body[data-page='results.php'] .report-stage-toprail {
  position: relative;
  overflow: hidden;
  display: block;
  margin-bottom: 18px;
  padding: 12px 18px;
  border-radius: 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, rgba(205, 244, 255, 0.22), rgba(255, 255, 255, 0.16) 44%, rgba(255, 248, 214, 0.14) 100%);
  box-shadow:
    0 18px 34px rgba(29, 67, 112, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(1.14);
  -webkit-backdrop-filter: blur(18px) saturate(1.14);
}

body[data-page='results.php'] .report-stage-topbar {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) minmax(180px, 220px);
  gap: 16px 18px;
  align-items: stretch;
}

body[data-page='results.php'] .report-stage-mascot-card,
body[data-page='results.php'] .report-stage-student-card {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

body[data-page='results.php'] .report-stage-mascot-card .mascot-glow,
body[data-page='results.php'] .report-stage-student-card .mascot-glow {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98), rgba(220, 255, 174, 0.72) 42%, rgba(158, 241, 230, 0.44) 72%, transparent 84%);
  filter: blur(12px);
  opacity: 0.96;
}

body[data-page='results.php'] .report-stage-student-card .mascot-illustration,
body[data-page='results.php'] .report-stage-mascot-card .mascot-illustration {
  position: relative;
  z-index: 1;
  width: 106px;
  filter: drop-shadow(0 14px 22px rgba(24, 60, 103, 0.2));
}

body[data-page='results.php'] .report-stage-summary {
  display: grid;
  gap: 12px;
  align-content: center;
}

body[data-page='results.php'] .report-stage-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #214567;
  font-family: 'Baloo 2', cursive;
}

body[data-page='results.php'] .report-stage-meta-line span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-page='results.php'] .report-stage-meta-line span + span::before {
  content: '|';
  margin-right: 4px;
  color: rgba(33, 69, 103, 0.52);
}

body[data-page='results.php'] .report-stage-headline h1 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.06;
}

body[data-page='results.php'] .report-stage-kicker {
  width: fit-content;
}

body[data-page='results.php'] .report-stage-summary-text {
  max-width: 58ch;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.58;
  color: rgba(22, 50, 79, 0.9);
}

body[data-page='results.php'] .report-stage-body {
  display: grid;
  gap: 0;
}

body[data-page='results.php'] .report-stage-progress-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

body[data-page='results.php'] .report-stage-score-track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(228, 242, 255, 0.96), rgba(249, 255, 213, 0.95));
  box-shadow: inset 0 2px 4px rgba(24, 56, 98, 0.12), 0 4px 12px rgba(128, 194, 124, 0.14);
}

body[data-page='results.php'] .report-stage-score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8b63, #ffd265 48%, #6ed86c 100%);
  box-shadow: 0 0 18px rgba(255, 181, 56, 0.5);
}

body[data-page='results.php'] .report-stage-score-value {
  min-width: 88px;
  text-align: right;
  font-family: 'Baloo 2', cursive;
  font-size: 1.45rem;
  line-height: 1;
  color: #295d33;
}

body[data-page='results.php'] .report-stage-sidecard {
  display: grid;
  gap: 8px;
  align-content: center;
  justify-items: start;
  padding: 18px 16px;
  border-radius: 24px;
  background:
    linear-gradient(155deg, rgba(205, 243, 255, 0.36), rgba(255, 255, 255, 0.14) 45%, rgba(183, 240, 223, 0.22) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow:
    0 18px 30px rgba(29, 67, 112, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(160, 222, 255, 0.12);
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  text-align: left;
}

body[data-page='results.php'] .report-stage-side-mascot {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.34), transparent 30%),
    linear-gradient(150deg, rgba(206, 244, 255, 0.28), rgba(255, 255, 255, 0.08) 44%, rgba(171, 236, 221, 0.18) 100%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(132, 211, 251, 0.12);
}

body[data-page='results.php'] .report-stage-side-mascot::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.48), rgba(197, 247, 255, 0.18) 58%, transparent 76%);
  filter: blur(8px);
}

body[data-page='results.php'] .report-stage-side-mascot-svg {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 74px;
  filter: drop-shadow(0 10px 18px rgba(24, 60, 103, 0.18));
}

body[data-page='results.php'] .report-stage-side-mascot .mascot-eye {
  animation: mascotBlink 4.6s ease-in-out infinite;
}

body[data-page='results.php'] .report-stage-side-mascot .mascot-ear-left,
body[data-page='results.php'] .report-stage-side-mascot .mascot-antenna-left,
body[data-page='results.php'] .report-stage-side-mascot .mascot-arm-left {
  animation: mascotAppendageLeftIdle 1.7s ease-in-out infinite;
}

body[data-page='results.php'] .report-stage-side-mascot .mascot-ear-right,
body[data-page='results.php'] .report-stage-side-mascot .mascot-antenna-right,
body[data-page='results.php'] .report-stage-side-mascot .mascot-arm-right {
  animation: mascotAppendageRightIdle 1.7s ease-in-out infinite;
}

body[data-page='results.php'] .report-stage-side-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(40, 74, 113, 0.68);
}

body[data-page='results.php'] .report-stage-sidecard strong {
  font-size: 1.5rem;
  line-height: 1;
}

body[data-page='results.php'] .report-stage-sidecard p,
body[data-page='results.php'] .report-stage-sidecard small {
  margin: 0;
}

body[data-page='results.php'] .report-module-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

body[data-page='results.php'] .report-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

body[data-page='results.php'] .report-overview-card {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 26%),
    linear-gradient(150deg, rgba(196, 240, 255, 0.34), rgba(255, 255, 255, 0.1) 42%, rgba(163, 235, 215, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 16px 30px rgba(29, 67, 112, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -1px 0 rgba(129, 206, 247, 0.12);
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
}

body[data-page='results.php'] .report-overview-card::before,
body[data-page='results.php'] .report-panel-card::before,
body[data-page='results.php'] .report-distribution-item::before,
body[data-page='results.php'] .report-note-card::before,
body[data-page='results.php'] .report-answer-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.26), transparent 36%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 20%);
  pointer-events: none;
}

body[data-page='results.php'] .report-overview-card p,
body[data-page='results.php'] .report-overview-card small,
body[data-page='results.php'] .report-panel-text,
body[data-page='results.php'] .report-answer-body p,
body[data-page='results.php'] .report-answer-body small,
body[data-page='results.php'] .report-note-card p,
body[data-page='results.php'] .report-note-card small,
body[data-page='results.php'] .report-empty-copy {
  margin: 0;
}

body[data-page='results.php'] .report-overview-card strong {
  display: block;
  margin: 6px 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
}

body[data-page='results.php'] .report-overview-card--score {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.36), transparent 24%),
    linear-gradient(135deg, rgba(255, 175, 139, 0.24), rgba(255, 221, 148, 0.24), rgba(179, 235, 255, 0.16) 82%);
}

body[data-page='results.php'] .report-overview-card--warning {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.34), transparent 24%),
    linear-gradient(135deg, rgba(255, 198, 138, 0.22), rgba(255, 234, 178, 0.22), rgba(184, 235, 224, 0.14) 82%);
}

body[data-page='results.php'] .report-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

body[data-page='results.php'] .report-panel-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.34), transparent 22%),
    linear-gradient(155deg, rgba(196, 240, 255, 0.3), rgba(255, 255, 255, 0.08) 46%, rgba(164, 235, 218, 0.18) 100%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 18px 32px rgba(29, 67, 112, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(138, 214, 252, 0.12);
  backdrop-filter: blur(17px) saturate(1.2);
  -webkit-backdrop-filter: blur(17px) saturate(1.2);
}

body[data-page='results.php'] .report-panel-card--positive {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.34), transparent 22%),
    linear-gradient(155deg, rgba(198, 255, 214, 0.24), rgba(255, 255, 255, 0.08) 46%, rgba(165, 240, 226, 0.18) 100%);
}

body[data-page='results.php'] .report-panel-card--focus {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.34), transparent 22%),
    linear-gradient(155deg, rgba(255, 236, 188, 0.22), rgba(255, 255, 255, 0.08) 46%, rgba(179, 236, 255, 0.16) 100%);
}

body[data-page='results.php'] .report-panel-card--answers {
  margin-bottom: 16px;
}

body[data-page='results.php'] .report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

body[data-page='results.php'] .report-card-head h3 {
  margin: 0;
  font-size: 1.28rem;
}

body[data-page='results.php'] .report-mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(224, 247, 255, 0.34), rgba(255, 255, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.46);
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}

body[data-page='results.php'] .report-score-meter {
  margin-bottom: 10px;
}

body[data-page='results.php'] .report-distribution-list,
body[data-page='results.php'] .report-note-list,
body[data-page='results.php'] .report-answer-list {
  display: grid;
  gap: 10px;
}

body[data-page='results.php'] .report-distribution-item,
body[data-page='results.php'] .report-note-card,
body[data-page='results.php'] .report-answer-item {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(150deg, rgba(207, 243, 255, 0.28), rgba(255, 255, 255, 0.08) 46%, rgba(174, 236, 220, 0.16) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(132, 211, 251, 0.1);
  backdrop-filter: blur(14px) saturate(1.18);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
}

body[data-page='results.php'] .report-distribution-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

body[data-page='results.php'] .report-distribution-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(221, 235, 251, 0.9), rgba(236, 249, 255, 0.86));
}

body[data-page='results.php'] .report-distribution-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3fc2ff, #79e3b1);
}

body[data-page='results.php'] .report-note-card--positive {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(145deg, rgba(210, 255, 219, 0.26), rgba(255, 255, 255, 0.08) 52%, rgba(173, 240, 227, 0.16) 100%);
}

body[data-page='results.php'] .report-note-card--focus {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(145deg, rgba(255, 236, 194, 0.24), rgba(255, 255, 255, 0.08) 52%, rgba(186, 232, 255, 0.16) 100%);
}

body[data-page='results.php'] .report-note-card strong,
body[data-page='results.php'] .report-answer-body strong {
  display: block;
  margin-bottom: 6px;
}

body[data-page='results.php'] .report-answer-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

body[data-page='results.php'] .report-answer-index {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.36), transparent 22%),
    linear-gradient(135deg, rgba(208, 244, 255, 0.42), rgba(255, 255, 255, 0.16) 54%, rgba(183, 239, 223, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(132, 211, 251, 0.12);
  font-family: 'Baloo 2', cursive;
  font-size: 1.35rem;
  font-weight: 800;
}

body[data-page='results.php'] .report-actions-row {
  position: relative;
  z-index: 1;
  margin-top: 10px;
}

body[data-page='results.php'] .report-tone-low .report-stage-sidecard strong {
  color: #278d58;
}

body[data-page='results.php'] .report-tone-medium .report-stage-sidecard strong {
  color: #2270a6;
}

body[data-page='results.php'] .report-tone-elevated .report-stage-sidecard strong {
  color: #d37a22;
}

body[data-page='results.php'] .report-tone-high .report-stage-sidecard strong {
  color: #d55d3f;
}

body[data-page='results.php'] .report-stage-shell--empty {
  padding-bottom: 24px;
}

body[data-page='results.php'] .report-stage-shell--empty::after {
  display: none;
}

.mascot-planet,
.mascot-foot {
  position: relative;
  background: rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 12px 22px rgba(39, 54, 94, 0.2);
}

.mascot-illustration-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 176px;
  padding: 8px;
  text-align: center;
  overflow: hidden;
  transition: transform .28s ease, opacity .28s ease, filter .28s ease;
}

.mascot-illustration {
  position: relative;
  z-index: 1;
  width: min(220px, 100%);
  height: auto;
  display: block;
}

.mascot-illustration-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.mascot-illustration-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-weight: 800;
}

.start-mascot-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 220px));
  grid-template-areas:
    'bubble bubble'
    'digital carbon';
  justify-content: end;
  align-items: end;
  column-gap: 28px;
  row-gap: 10px;
  min-height: 260px;
}

body[data-page='test.php'] .start-mascot-stage {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  grid-template-areas:
    'bubble bubble'
    'digital carbon';
  justify-content: stretch;
  align-items: start;
  column-gap: 16px;
  row-gap: 16px;
  width: 100%;
  min-height: auto;
  margin-left: auto;
}

.start-mascot-stage .mascot-illustration-card {
  position: relative;
  width: 100%;
  max-width: 220px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  opacity: 1;
  transform: none;
  filter: none;
  transform-origin: center bottom;
  will-change: transform, opacity, filter;
  transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .32s ease, filter .32s ease;
}

body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card {
  min-height: 196px;
  max-width: none;
  width: 100%;
  padding: 16px 14px 12px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.18));
  box-shadow: 0 12px 22px rgba(23, 56, 100, 0.14);
  cursor: pointer;
  text-align: center;
  backdrop-filter: blur(3px);
}

body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card:hover,
body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(23, 56, 100, 0.22);
  outline: none;
}

body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card[aria-pressed='true'] {
  border-color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.34));
}

.start-mascot-stage .mascot-digital-card {
  grid-area: digital;
}

.start-mascot-stage .mascot-carbon-card {
  grid-area: carbon;
}

.start-mascot-bubble {
  position: relative;
  grid-area: bubble;
  justify-self: center;
  min-width: 240px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  padding: 12px 18px;
  text-align: center;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 12px 20px rgba(25, 52, 92, 0.18);
  z-index: 3;
}

body[data-page='test.php'] .start-mascot-bubble {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 14px 18px;
  font-size: 0.98rem;
  line-height: 1.35;
  justify-self: center;
  margin: 0 auto;
}

.start-mascot-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 4px;
}

.start-mascot-stage .mascot-glow {
  inset: 26px 34px 48px;
  opacity: .6;
}

body[data-page='test.php'] .start-mascot-stage .mascot-glow {
  inset: 22px 22px 48px;
  opacity: .44;
}

body[data-page='test.php'] .start-mascot-stage .mascot-illustration {
  width: min(156px, 100%);
}

body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card p {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  font-size: 0.95rem;
  line-height: 1.2;
}

.start-mascot-stage .mascot-illustration {
  width: min(240px, 100%);
  transform-origin: center center;
}

.mascot-illustration-card.is-talking .mascot-mouth {
  transform-origin: center;
  transform-box: fill-box;
  animation: mascotMouthTalk .18s ease-in-out infinite alternate;
}

.mascot-illustration-card.is-talking .mascot-illustration-svg {
  animation: mascotTalkFloat .32s ease-in-out infinite alternate;
}

.start-mascot-stage[data-selected-module=''] .mascot-illustration-card,
.start-mascot-stage:not([data-selected-module]) .mascot-illustration-card {
  opacity: .96;
}

body[data-page='test.php'] .start-mascot-stage[data-selected-module='digital'] .mascot-digital-card {
  z-index: 2;
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 18px 28px rgba(33, 67, 110, 0.16));
}

body[data-page='test.php'] .start-mascot-stage[data-selected-module='digital'] .mascot-carbon-card {
  opacity: .32;
  transform: translateY(8px) scale(.9);
  filter: saturate(.84) blur(1px);
}

body[data-page='test.php'] .start-mascot-stage[data-selected-module='carbon'] .mascot-carbon-card {
  z-index: 2;
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 18px 28px rgba(33, 67, 110, 0.16));
}

body[data-page='test.php'] .start-mascot-stage[data-selected-module='carbon'] .mascot-digital-card {
  opacity: .32;
  transform: translateY(8px) scale(.9);
  filter: saturate(.84) blur(1px);
}

body[data-page='test.php'] .start-mascot-stage[data-selected-module='digital'] .mascot-digital-card .mascot-illustration,
body[data-page='test.php'] .start-mascot-stage[data-selected-module='carbon'] .mascot-carbon-card .mascot-illustration {
  animation: mascotImagePop .46s ease;
}

@keyframes mascotImagePop {
  0% {
    transform: scale(.9) rotate(-4deg);
  }
  55% {
    transform: scale(1.08) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes mascotMouthTalk {
  0% {
    transform: scaleY(1) translateY(0);
  }
  100% {
    transform: scaleY(1.45) translateY(2px);
  }
}

@keyframes mascotTalkFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-4px);
  }
}

@keyframes questionMascotBob {
  0% {
    transform: translateY(0) rotate(-1.5deg);
  }
  100% {
    transform: translateY(-4px) rotate(1.5deg);
  }
}

@keyframes questionStageMascotBob {
  0% {
    transform: translateX(-50%) translateY(0) rotate(-1.5deg);
  }
  100% {
    transform: translateX(-50%) translateY(-4px) rotate(1.5deg);
  }
}

@keyframes questionMascotGlow {
  0% {
    opacity: 0.62;
    transform: scale(0.98);
  }
  100% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

@keyframes mascotStagePeek {
  0% {
    transform: translateY(0) scale(1) rotate(-1.5deg);
  }
  28% {
    transform: translateY(-4px) scale(1.035, 0.98) rotate(1.6deg);
  }
  54% {
    transform: translateY(-2px) scale(1.015, 0.995) rotate(-0.9deg);
  }
  100% {
    transform: translateY(0) scale(1) rotate(1.5deg);
  }
}

@keyframes mascotStageHalo {
  0% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.62;
    transform: scale(0.96);
  }
}

@keyframes mascotStageSpotlight {
  0% {
    opacity: 0.62;
    transform: translateX(-50%) scaleY(0.96);
  }
  50% {
    opacity: 0.92;
    transform: translateX(-50%) scaleY(1.04);
  }
  100% {
    opacity: 0.68;
    transform: translateX(-50%) scaleY(0.98);
  }
}

@keyframes mascotStagePlatformGlow {
  0% {
    opacity: 0.9;
    transform: translateX(-50%) scale(0.98);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.04);
  }
  100% {
    opacity: 0.94;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes mascotStageShadow {
  0% {
    opacity: 0.72;
    transform: translateX(-50%) scaleX(0.96);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) scaleX(1.04);
  }
  100% {
    opacity: 0.76;
    transform: translateX(-50%) scaleX(0.98);
  }
}

@keyframes mascotAppendageLeftIdle {
  0% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(4deg) translateY(-1px);
  }
  100% {
    transform: rotate(-3deg);
  }
}

@keyframes mascotAppendageRightIdle {
  0% {
    transform: rotate(5deg);
  }
  50% {
    transform: rotate(-4deg) translateY(-1px);
  }
  100% {
    transform: rotate(3deg);
  }
}

@keyframes mascotAppendageLeftTalk {
  0% {
    transform: rotate(-10deg) translateY(0);
  }
  100% {
    transform: rotate(8deg) translateY(-2px);
  }
}

@keyframes mascotAppendageRightTalk {
  0% {
    transform: rotate(10deg) translateY(0);
  }
  100% {
    transform: rotate(-8deg) translateY(-2px);
  }
}

@keyframes mascotBlink {
  0%, 44%, 48%, 100% {
    transform: scaleY(1);
  }
  46% {
    transform: scaleY(0.08);
  }
  47% {
    transform: scaleY(0.2);
  }
}

@keyframes mascotCelebrateBounce {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  100% {
    transform: translateX(-50%) translateY(-10px);
  }
}

@keyframes mascotCelebratePop {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    transform: translateY(-4px) scale(1.06) rotate(2deg);
  }
}

@keyframes mascotCelebrateGlow {
  0% {
    opacity: 0.78;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@keyframes mascotCelebrateShadow {
  0% {
    opacity: 0.82;
    transform: translateX(-50%) scaleX(1);
  }
  100% {
    opacity: 0.56;
    transform: translateX(-50%) scaleX(0.88);
  }
}

@keyframes mascotCelebrateEyes {
  0% {
    transform: scaleY(1);
  }
  100% {
    transform: scale(1.08, 0.86);
  }
}

@keyframes mascotCelebrateAppendageLeft {
  0% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(18deg) translateY(-2px);
  }
}

@keyframes mascotCelebrateAppendageRight {
  0% {
    transform: rotate(10deg);
  }
  100% {
    transform: rotate(-18deg) translateY(-2px);
  }
}

.mascot-face {
  font-size: 2.2rem;
  position: relative;
}

.mascot-glow {
  position: absolute;
  inset: 14px;
  border-radius: 20px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72), transparent 70%);
}

.mascot-planet p,
.mascot-foot p {
  margin: 0;
  font-weight: 800;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.world-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 230px;
  border-radius: 28px;
  padding: 20px;
  text-decoration: none;
  color: #14324f;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 14px 28px rgba(22, 55, 98, 0.24);
  transform: translateY(0) scale(1);
  transition: transform .25s ease, box-shadow .25s ease;
}

.world-card > * {
  position: relative;
  z-index: 1;
}

.world-card:hover,
.world-card:focus-visible {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 22px 38px rgba(22, 55, 98, 0.3);
}

.world-stars {
  font-size: 1.2rem;
  opacity: .96;
}

.world-stars--mascots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.world-chat-bubble {
  font-size: 1.2rem;
}

.world-mascot-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(20, 50, 79, 0.18));
}

.world-card h3 {
  margin: 8px 0 4px;
  font-size: 1.6rem;
}

.world-card p {
  margin: 0 0 10px;
  font-weight: 700;
  max-width: 34ch;
}

.world-cta {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
}

.world-card::after {
  content: '';
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  z-index: 0;
}

.world-digital { background: linear-gradient(140deg, #9fe6ff, #7fc5ff 58%, #6bb4ff); }
.world-carbon { background: linear-gradient(140deg, #acffd6, #6de5ad 55%, #66d38e); }
.world-mini { background: linear-gradient(140deg, #ffd986, #ffba6e 55%, #ff9d6f); }
.world-tasks { background: linear-gradient(140deg, #c7c9ff, #a8b8ff 52%, #87a8ff); }
.world-chat { background: linear-gradient(140deg, #c7c9ff, #a8b8ff 52%, #87a8ff); }
.world-badges { background: linear-gradient(140deg, #ffd7f4, #ffc1da 58%, #ffb2b4); }

.world-form {
  display: grid;
  align-content: start;
  gap: 8px;
}

.challenge-stack {
  display: grid;
  gap: 6px;
}

.challenge-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  padding: 8px 10px;
  font-weight: 700;
  transition: transform .16s ease, opacity .16s ease;
}

.challenge-card input {
  accent-color: #ff7a59;
  width: 18px;
  height: 18px;
}

.challenge-card.done {
  opacity: .62;
  transform: scale(.98);
}

.story-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.coach-stage,
.podium-stage {
  border-radius: 28px;
  padding: 16px;
  color: #14324f;
  box-shadow: 0 14px 28px rgba(22, 55, 98, 0.24);
}

.coach-stage {
  background: linear-gradient(150deg, #d5fbff, #fff2c4 64%, #ffe3cd);
}

.coach-mascot {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 14px rgba(25, 44, 79, 0.2);
  font-size: 1.8rem;
}

.speech-bubble {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  margin: 8px 0;
  font-weight: 700;
  box-shadow: 0 8px 14px rgba(25, 44, 79, 0.16);
}

.speech-bubble::before {
  content: '';
  position: absolute;
  left: 14px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
}

.coach-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.podium-stage {
  background: linear-gradient(150deg, #f2ebff, #d3e4ff 56%, #b8d7ff);
}

.podium-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 220px;
}

.podium-col {
  text-align: center;
  border-radius: 20px 20px 12px 12px;
  padding: 12px 8px;
  background: linear-gradient(180deg, #fff, #ebf4ff);
  box-shadow: 0 10px 20px rgba(23, 45, 87, .18);
}

.podium-col.rank-1 { min-height: 185px; border-bottom: 8px solid #ffd65e; }
.podium-col.rank-2 { min-height: 145px; border-bottom: 8px solid #c8d2dd; }
.podium-col.rank-3 { min-height: 125px; border-bottom: 8px solid #f2bc8f; }

.podium-col.rank-1 {
  box-shadow: 0 14px 24px rgba(248, 185, 72, 0.35);
}

.crown {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.podium-avatar {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.deep-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.deep-chart {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(230, 245, 255, 0.94));
}

.deep-badges {
  background: linear-gradient(145deg, rgba(255, 244, 222, 0.96), rgba(255, 228, 242, 0.94));
}

.deep-badges .badge {
  background: linear-gradient(130deg, #ffe27a, #ff9f67);
  box-shadow: 0 6px 12px rgba(221, 131, 64, .28);
}

.quick-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.streak-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.streak-strip span {
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.streak-strip span:empty {
  display: none;
}

@keyframes cloudFloat {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

@keyframes popIn {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.confetti {
  position: fixed;
  width: 8px;
  height: 12px;
  top: -20px;
  border-radius: 2px;
  opacity: 0.9;
  z-index: 200;
  animation: confettiFall 2.4s linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translateY(105vh) rotate(620deg);
    opacity: 0.95;
  }
}

.level-up-popup {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(18, 33, 58, 0.35);
  z-index: 120;
  animation: fadeOut 2.8s ease forwards;
}

.level-up-content {
  background: linear-gradient(145deg, #fff5b6, #ffd877 60%, #ffb46d);
  border-radius: 22px;
  padding: 16px 24px;
  text-align: center;
  box-shadow: 0 18px 34px rgba(20, 34, 62, 0.33);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.level-up-content p,
.level-up-content h3,
.level-up-content strong {
  margin: 0;
}

.mission-helper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.mascot-foot.mini,
.mascot-planet.mini {
  min-width: 62px;
  padding: 8px;
}

.path-progress {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dfefff, #e9fff4);
  overflow: hidden;
  position: relative;
}

.path-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--path-width, 0%);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8b61, #ffd867, #8df08a);
  box-shadow: 0 0 12px rgba(255, 177, 80, 0.76);
  transition: width .26s ease;
}

.choice-pill {
  position: relative;
  min-width: 165px;
  min-height: 144px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #eef8ff);
  box-shadow: 0 18px 30px rgba(20, 50, 92, 0.24);
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
}

.choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pill span {
  display: grid;
  gap: 4px;
  place-items: center;
  text-align: center;
  padding: 14px 12px;
  font-weight: 800;
  height: 100%;
}

.choice-card b {
  font-size: 2.25rem;
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff7d0, #ffe39d);
  box-shadow: 0 8px 12px rgba(233, 170, 67, 0.35);
}

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

.choice-card small {
  font-size: .78rem;
  opacity: .95;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

body[data-page='digital.php'] .step-controls,
body[data-page='carbon.php'] .step-controls,
body[data-page='test.php'] .step-controls {
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  bottom: 4px;
}

body[data-page='digital.php'] .step-controls .btn,
body[data-page='carbon.php'] .step-controls .btn,
body[data-page='test.php'] .step-controls .btn {
  padding: 8px 10px;
  font-size: 0.85rem;
  min-height: 40px;
}

body[data-page='digital.php'] .step-indicator,
body[data-page='carbon.php'] .step-indicator,
body[data-page='test.php'] .step-indicator {
  font-size: 0.88rem;
}

.choice-pill input:checked + span {
  background: linear-gradient(145deg, #ffe9a6, #ffc873);
  color: #5f3400;
}

.choice-pill input:checked + span b {
  filter: drop-shadow(0 4px 8px rgba(255, 181, 67, .55));
}

.choice-pill.pop {
  animation: choicePop .26s ease;
}

.choice-pill input:checked + span::after {
  content: '⭐ Super Secim';
  margin-top: 2px;
  font-size: .72rem;
  font-weight: 900;
}

.choice-card::after {
  content: '🪄';
  position: absolute;
  right: 10px;
  top: 8px;
  opacity: .38;
}

.challenge-card.ticket {
  justify-content: space-between;
  border: 2px dashed rgba(255, 135, 98, 0.56);
  background:
    radial-gradient(circle at 8px 8px, #fff 2px, transparent 3px) 0 0/16px 16px,
    linear-gradient(145deg, #fffef4, #ffeccc);
}

.challenge-card.ticket em {
  font-style: normal;
  background: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 800;
}

.badge.locked {
  background: linear-gradient(130deg, #d4dbe6, #bcc6d4);
  color: #5d6b7f;
  opacity: .9;
  position: relative;
}

.badge.sticker {
  transform: rotate(-2deg);
  box-shadow: 0 8px 12px rgba(29, 50, 86, 0.2);
}

.badge.sticker:nth-child(2n) {
  transform: rotate(2deg);
}

.badge.locked::after {
  content: ' ✨';
  opacity: .8;
}

.hint-text {
  margin-top: 8px;
  font-size: .86rem;
  font-weight: 700;
  color: #49617e;
}

.arcade-thumb {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(23, 46, 82, 0.16);
  margin-bottom: 6px;
}

.arcade-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.arcade-controls select {
  margin-left: 6px;
  border-radius: 10px;
  border: 2px solid #d4e4fb;
  padding: 4px 8px;
}

/* ─── Mini-Game Card System ─── */
.mg-card {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.mg-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(30,52,88,0.18); }
.mg-card-done { opacity: 0.7; pointer-events: none; }

.mg-card-bg {
  position: absolute; inset: 0; opacity: 0.12; border-radius: inherit; z-index: 0;
}
.mg-bg-blue { background: linear-gradient(135deg,#3b82f6,#60a5fa); }
.mg-bg-purple { background: linear-gradient(135deg,#8b5cf6,#a78bfa); }
.mg-bg-green { background: linear-gradient(135deg,#22c55e,#4ade80); }
.mg-bg-yellow { background: linear-gradient(135deg,#eab308,#fbbf24); }
.mg-bg-teal { background: linear-gradient(135deg,#14b8a6,#5eead4); }
.mg-bg-aqua { background: linear-gradient(135deg,#06b6d4,#67e8f9); }

.mg-card-icon {
  font-size: 2.4rem;
  padding: 18px 18px 0 18px;
  position: relative; z-index: 1;
}
.mg-card-body {
  padding: 6px 18px 14px 18px;
  flex: 1;
  position: relative; z-index: 1;
}
.mg-card-body h3 { font-size: 1.1rem; margin: 0 0 4px; }
.mg-card-body p { font-size: 0.85rem; margin: 0 0 8px; color: #475569; }

.mg-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.mg-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px;
  border-radius: 8px; text-transform: uppercase; letter-spacing: 0.04em;
}
.mg-tag-digital { background: #dbeafe; color: #1d4ed8; }
.mg-tag-carbon { background: #dcfce7; color: #166534; }
.mg-tag-balance { background: #fef3c7; color: #92400e; }
.mg-tag-time { background: #f1f5f9; color: #64748b; }

.mg-play-btn {
  margin: 0 18px 18px 18px;
  position: relative; z-index: 1;
  font-size: 1rem; font-weight: 800;
  border-radius: 14px; padding: 10px 0;
  text-align: center;
}

.arcade-score-display {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.8); border-radius: 12px; padding: 6px 14px;
  border: 2px solid #e2e8f0;
}
.arcade-score-label { font-size: 0.85rem; font-weight: 700; color: #64748b; }
.arcade-score-value { font-size: 1.4rem; font-weight: 800; color: #0f172a; min-width: 40px; text-align: right; }

/* Game zone active */
.mg-zone-active {
  min-height: 180px;
  background: rgba(255,255,255,0.95);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  margin: 0 18px 18px 18px;
  position: relative;
  z-index: 2;
}

/* Timer bar */
.mg-timer-bar {
  height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; margin-bottom: 12px;
}
.mg-timer-fill {
  height: 100%; background: linear-gradient(90deg,#22c55e,#4ade80);
  border-radius: 99px; transition: width 0.1s linear;
}
.mg-timer-fill.mg-timer-danger { background: linear-gradient(90deg,#ef4444,#f87171); }

/* Result display */
.mg-result { text-align: center; padding: 20px 0; }
.mg-result-stars { font-size: 2rem; margin-bottom: 6px; }
.mg-result-score { font-size: 1.6rem; font-weight: 800; color: #0f172a; }
.mg-result-combo { font-size: 1rem; font-weight: 700; color: #f59e0b; margin-top: 4px; }
.mg-result-hint { font-size: 0.85rem; color: #64748b; margin-top: 8px; }

/* Bildirim game */
.mg-notif-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.mg-notif-card {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 12px; border: 2px solid #e2e8f0;
  background: #fff; cursor: pointer; text-align: left;
  font-size: 0.85rem; font-weight: 600;
  animation: mgSlideIn 0.3s ease;
  transition: transform 0.15s, opacity 0.3s;
}
.mg-notif-card:hover { transform: scale(1.03); }
.mg-notif-icon { font-size: 1.3rem; flex-shrink: 0; }
.mg-notif-good { border-color: #bbf7d0; }
.mg-notif-bad { border-color: #fecaca; }
.mg-notif-correct { background: #dcfce7 !important; border-color: #22c55e; }
.mg-notif-wrong { background: #fee2e2 !important; border-color: #ef4444; }
.mg-notif-tapped { opacity: 0.4; pointer-events: none; transform: scale(0.9); }
@keyframes mgSlideIn { from { opacity:0; transform: translateY(-10px); } to { opacity:1; transform: translateY(0); } }

/* Takvim game */
.mg-takvim-wrap { display: flex; flex-direction: column; gap: 12px; }
.mg-takvim-slots { display: flex; gap: 8px; }
.mg-takvim-slot {
  flex: 1; background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 12px;
  padding: 10px; text-align: center; min-height: 70px;
}
.mg-takvim-slot-label { font-size: 0.8rem; font-weight: 700; color: #64748b; margin-bottom: 4px; }
.mg-takvim-slot-content { font-size: 0.85rem; font-weight: 700; color: #94a3b8; }
.mg-takvim-slot-content.filled { color: #0f172a; }
.mg-takvim-slot-content.mg-takvim-good { color: #16a34a; }
.mg-takvim-slot-content.mg-takvim-bad { color: #dc2626; }
.mg-takvim-pool { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-takvim-act {
  padding: 8px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 700;
  border: 2px solid #e2e8f0; background: #fff; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.mg-takvim-act:hover { transform: scale(1.05); }
.mg-takvim-outdoor { border-color: #bbf7d0; background: #f0fdf4; }
.mg-takvim-screen { border-color: #fecaca; background: #fef2f2; }
.mg-takvim-act:disabled { opacity: 0.4; pointer-events: none; }

/* Ulasim game */
.mg-ulasim-round { text-align: center; }
.mg-ulasim-q { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.mg-ulasim-badge {
  display: inline-block; background: #dbeafe; color: #1d4ed8;
  font-size: 0.75rem; font-weight: 800; padding: 2px 8px; border-radius: 8px; margin-right: 6px;
}
.mg-ulasim-opts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mg-ulasim-btn {
  padding: 14px 22px; border-radius: 14px; font-size: 1rem; font-weight: 700;
  border: 2px solid #e2e8f0; background: #fff; cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}
.mg-ulasim-btn:hover { transform: scale(1.06); background: #f0f9ff; }
.mg-ulasim-btn.mg-correct { background: #dcfce7; border-color: #22c55e; }
.mg-ulasim-btn.mg-wrong { background: #fee2e2; border-color: #ef4444; }
.mg-ulasim-btn:disabled { opacity: 0.6; pointer-events: none; }

/* Enerji game */
.mg-room {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px;
}
.mg-room-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px; border-radius: 14px; background: #fef3c7; border: 2px solid #fde68a;
  cursor: pointer; transition: transform 0.15s, background 0.2s;
}
.mg-room-item:hover { transform: scale(1.05); }
.mg-room-item.mg-room-off { background: #f0fdf4; border-color: #bbf7d0; cursor: default; }
.mg-room-item.mg-room-found { background: #dcfce7; border-color: #22c55e; }
.mg-room-item.mg-room-mistake { animation: mgShake 0.4s ease; }
.mg-room-icon { font-size: 1.8rem; }
.mg-room-name { font-size: 0.8rem; font-weight: 700; color: #0f172a; }
.mg-room-status { font-size: 0.7rem; font-weight: 600; }
@keyframes mgShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* Geri dönüşüm game */
.mg-geri-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.mg-geri-waste {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  background: #f8fafc; border-radius: 16px; padding: 18px 28px;
  border: 2px solid #e2e8f0; min-width: 220px; transition: background 0.3s;
}
.mg-geri-waste.mg-geri-flash-good { background: #dcfce7; border-color: #22c55e; }
.mg-geri-waste.mg-geri-flash-bad { background: #fee2e2; border-color: #ef4444; }
.mg-geri-icon { font-size: 2.2rem; }
.mg-geri-name { font-size: 1.1rem; font-weight: 800; }
.mg-geri-counter { font-size: 0.8rem; font-weight: 700; color: #64748b; }
.mg-geri-bins { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mg-geri-bin {
  padding: 12px 18px; border-radius: 14px; font-size: 0.95rem; font-weight: 700;
  border: 3px solid #e2e8f0; background: #fff; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.mg-geri-bin:hover { transform: scale(1.08); }

/* Su game */
.mg-su-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mg-su-faucet { position: relative; width: 80px; height: 80px; }
.mg-su-pipe {
  width: 30px; height: 50px; background: #94a3b8; border-radius: 6px 6px 0 0;
  margin: 0 auto; position: relative;
}
.mg-su-pipe::after {
  content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; background: #38bdf8; border-radius: 50%;
  animation: mgDrip 0.6s ease-in-out infinite;
}
@keyframes mgDrip { 0%{ opacity:1; transform: translateX(-50%) translateY(0); } 100%{ opacity:0; transform: translateX(-50%) translateY(24px); } }
.mg-su-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 260px; }
.mg-su-bar { flex:1; height: 14px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.mg-su-bar-fill { height: 100%; background: linear-gradient(90deg,#38bdf8,#0ea5e9); border-radius: 99px; transition: width 0.15s; width: 0; }
.mg-su-count { font-size: 0.85rem; font-weight: 700; color: #0f172a; min-width: 50px; }
.mg-su-tap-btn {
  padding: 16px 36px; border-radius: 50%; font-size: 1.2rem; font-weight: 800;
  background: linear-gradient(135deg,#38bdf8,#0284c7); color: #fff;
  border: 3px solid #bae6fd; cursor: pointer;
  transition: transform 0.1s; user-select: none;
  width: 120px; height: 120px; display: flex; align-items: center; justify-content: center;
}
.mg-su-tap-btn:active, .mg-su-tap-btn.mg-su-splash { transform: scale(0.9); }

.insight-grid .coach-card {
  margin-bottom: 8px;
}

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

body.low-fx .bg-stars,
body.low-fx .spotlight,
body.low-fx .room-light,
body.low-fx .hero-cloud,
body.low-fx .confetti {
  display: none !important;
}

body.low-fx .app-shell {
  filter: saturate(0.95);
}

.celebration-caption {
  margin: 6px 0 14px;
  font-weight: 800;
}

.bottom-nav a {
  background: linear-gradient(145deg, #f2f9ff, #eaf7ff);
  border-radius: var(--bottom-nav-item-radius);
  padding: var(--bottom-nav-item-padding);
  display: grid;
  gap: 2px;
  place-items: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.bottom-nav {
  background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(231, 245, 255, .92));
  border: 2px solid rgba(255, 255, 255, .85);
  backdrop-filter: blur(8px);
}

.bottom-nav a {
  border: 1px solid rgba(255, 255, 255, .95);
}

.bottom-nav a span {
  font-size: var(--bottom-nav-icon-size);
}

.bottom-nav a small {
  font-size: var(--bottom-nav-label-size);
  line-height: 1;
}

.bottom-nav--compact {
  --bottom-nav-padding: 6px;
  --bottom-nav-gap: 6px;
  --bottom-nav-radius: 16px;
  --bottom-nav-columns: repeat(6, minmax(72px, 92px));
  --bottom-nav-justify: center;
  --bottom-nav-item-radius: 10px;
  --bottom-nav-item-padding: 5px 3px;
  --bottom-nav-item-font-size: 0.72rem;
  --bottom-nav-item-min-height: 42px;
  --bottom-nav-icon-size: 0.9rem;
  --bottom-nav-label-size: 0.58rem;
  --bottom-nav-item-basis: 70px;
  --bottom-nav-item-padding-mobile: 5px 2px;
}

.bottom-nav a.active {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 18px rgba(34, 81, 152, 0.22);
  background: linear-gradient(145deg, #fff3b8, #ffe091);
}

.bottom-nav a.active span {
  filter: drop-shadow(0 0 8px rgba(255, 179, 60, .75));
}

.bottom-nav a:hover {
  transform: translateY(-2px);
}

.btn:focus-visible,
.bottom-nav a:focus-visible,
.choice-pill:focus-within {
  outline: 3px solid rgba(255, 174, 64, 0.8);
  outline-offset: 2px;
}

.game-toast {
  position: fixed;
  left: 50%;
  top: 14px;
  transform: translateX(-50%) translateY(-10px);
  background: linear-gradient(145deg, #fff5b8, #ffd677);
  color: #5d3500;
  font-weight: 900;
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 10px 20px rgba(25, 42, 74, 0.28);
  z-index: 250;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.game-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes choicePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes fadeOut {
  0%, 72% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.mascot-dock {
  position: fixed;
  left: 12px;
  bottom: 96px;
  z-index: 55;
  display: grid;
  gap: 8px;
}

.mascot-buddy {
  background: linear-gradient(145deg, #ffffff, #ecf6ff);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 255, 255, .82);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.mascot-buddy .face {
  font-size: 1.25rem;
}

.mascot-buddy em {
  font-style: normal;
  font-size: .78rem;
  font-weight: 800;
}

.mascot-buddy.foot {
  animation: bob 2.6s ease-in-out infinite;
}

.mascot-buddy.earth {
  animation: bob 2.8s ease-in-out infinite;
  animation-delay: .4s;
}

.podium-scene {
  position: relative;
  border-radius: 24px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(59, 87, 136, .15), rgba(171, 196, 235, .24));
  overflow: hidden;
}

.spotlight {
  position: absolute;
  top: -14px;
  width: 160px;
  height: 250px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: .32;
}

.spotlight.left { left: 2%; }
.spotlight.center { left: calc(50% - 80px); opacity: .44; }
.spotlight.right { right: 2%; }

.stage-floor {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -26px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 160, .8), rgba(255, 200, 110, .4), transparent 70%);
}

.stage-sign {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  background: linear-gradient(145deg, #ffe9a1, #ffc96e);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .3px;
  box-shadow: 0 8px 14px rgba(20, 38, 73, .28);
  z-index: 3;
}

.crowd-line {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  font-size: 1rem;
  opacity: .86;
  z-index: 2;
}

.badge-room {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding-top: 50px;
}

.badge-shelf {
  position: absolute;
  left: 2%;
  right: 2%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a9734f, #c98c5d, #a56f47);
  box-shadow: 0 6px 10px rgba(40, 24, 10, .25);
}

.badge-shelf.top { top: 14px; }
.badge-shelf.mid { top: 28px; opacity: .66; }

.room-light {
  position: absolute;
  top: 0;
  width: 180px;
  height: 260px;
  background: linear-gradient(180deg, rgba(255, 246, 197, .56), rgba(255, 246, 197, 0));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.room-light.l1 { left: 8%; }
.room-light.l2 { right: 8%; }

.page-hero {
  box-shadow: 0 26px 52px rgba(15, 41, 84, .34);
}

.page-hero::before {
  opacity: 1;
}

.hero-mascot-stage .mascot-planet,
.hero-mascot-stage .mascot-foot {
  transform: scale(1.05);
  border: 2px solid rgba(255, 255, 255, 0.88);
  background: linear-gradient(145deg, rgba(255,255,255,.93), rgba(236,247,255,.9));
}

.hero-mascot-stage:not(.start-mascot-stage) .mascot-illustration-card {
  transform: scale(1.05);
}

.start-mascot-stage.hero-mascot-stage .mascot-illustration-card {
  transform: none;
}

@media (min-width: 821px) and (max-height: 900px) {
  body[data-page='test.php'] .app-shell {
    padding-bottom: 80px;
  }

  body[data-page='test.php'] .topbar {
    margin-bottom: 10px;
  }

  body[data-page='test.php'] .topbar-merged {
    padding: 10px 12px;
    border-radius: 28px;
  }

  body[data-page='test.php'] .screen {
    gap: 10px;
  }

  body[data-page='test.php'] .page-hero {
    grid-template-columns: minmax(420px, 1.15fr) minmax(300px, 420px);
    gap: 20px;
    padding: 20px 24px;
  }

  body[data-page='test.php'] .question-stage-hero {
    padding: 14px 18px 12px;
  }

  body[data-page='test.php'] .question-stage-topbar {
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 14px 16px;
  }

  body[data-page='test.php'] .question-stage-mascot-card {
    width: 126px;
    height: 126px;
  }

  body[data-page='test.php'] .question-stage-mascot-card .mascot-glow {
    inset: 16px;
  }

  body[data-page='test.php'] .question-stage-mascot-card .mascot-illustration {
    width: 98px;
  }

  body[data-page='test.php'] .question-stage-meta-line {
    min-height: 36px;
    font-size: 1.12rem;
  }

  body[data-page='test.php'] .question-stage-progress {
    height: 15px;
  }

  body[data-page='test.php'] .question-stage-percent {
    min-width: 60px;
    font-size: 1.56rem;
  }

  body[data-page='test.php'] .question-stage-card {
    padding: 24px 20px 18px;
  }

  body[data-page='test.php'] .question-stage-card h3 {
    margin-bottom: 22px;
    font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  }

  body[data-page='test.php'] .question-stage-options {
    gap: 12px;
  }

  body[data-page='test.php'] .question-stage-options .choice-pill {
    min-height: 162px;
  }

  body[data-page='test.php'] .question-stage-options .choice-card b {
    width: 64px;
    height: 64px;
    font-size: 1.85rem;
  }

  body[data-page='test.php'] .question-stage-options .choice-card strong {
    font-size: 1.02rem;
  }

  body[data-page='test.php'] .question-stage-options .choice-card small {
    font-size: 0.84rem;
  }

  body[data-page='test.php'] .question-stage-footer {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    margin-right: 0;
    padding: 8px;
  }

  body[data-page='test.php'] .question-stage-footer > .btn.btn-soft {
    min-width: 84px;
    min-height: 50px;
    font-size: 1rem;
  }

  body[data-page='test.php'] .question-stage-cheer {
    font-size: 0.98rem;
  }

  body[data-page='test.php'] .question-stage-footer .step-indicator {
    min-width: 76px;
    font-size: 1rem;
  }

  body[data-page='test.php'] .question-stage-footer [data-step-next] {
    min-width: 138px;
    min-height: 56px;
    font-size: 1.18rem;
  }

  body[data-page='test.php'] .test-start-title {
    margin: 8px 0 10px;
    font-size: clamp(1.8rem, 2.8vw, 2.3rem);
  }

  body[data-page='test.php'] .test-start-description {
    font-size: 0.94rem;
    line-height: 1.4;
  }

  body[data-page='test.php'] .start-mascot-stage {
    column-gap: 12px;
    row-gap: 10px;
  }

  body[data-page='test.php'] .start-mascot-bubble {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card {
    min-height: 164px;
    padding: 10px 10px 8px;
    border-radius: 20px;
  }

  body[data-page='test.php'] .start-mascot-stage .mascot-glow {
    inset: 18px 18px 38px;
  }

  body[data-page='test.php'] .start-mascot-stage .mascot-illustration {
    width: min(108px, 100%);
  }

  body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card p {
    min-height: 34px;
    font-size: 0.86rem;
  }

  body[data-page='test.php'] .mission-panel {
    padding: 22px 24px 18px;
    border-radius: 30px;
  }

  body[data-page='test.php'] .mission-panel::after {
    top: 16px;
    height: 126px;
  }

  body[data-page='test.php'] .test-start-form,
  body[data-page='test.php'] .stack-form {
    gap: 12px;
  }

  body[data-page='test.php'] .test-stage-intro {
    gap: 8px;
    margin-bottom: 0;
  }

  body[data-page='test.php'] .test-form-bubble {
    width: min(100%, 400px);
    padding: 12px 18px;
    border-radius: 24px;
    font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  }

  body[data-page='test.php'] .test-form-bubble::after {
    width: 16px;
    height: 16px;
    bottom: -8px;
  }

  body[data-page='test.php'] .test-module-title {
    font-size: 1.2rem;
  }

  body[data-page='test.php'] .test-setup-grid {
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-page='test.php'] .stack-form input,
  body[data-page='test.php'] .stack-form select,
  body[data-page='test.php'] .stack-form textarea {
    min-height: 50px;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.92rem;
  }

  body[data-page='test.php'] .test-module-row {
    grid-template-columns: repeat(2, minmax(170px, 260px));
    gap: 12px;
  }

  body[data-page='test.php'] .module-choice-card span {
    min-height: 150px;
    padding: 10px 10px 8px;
  }

  body[data-page='test.php'] .module-choice-card span::before {
    top: 8px;
    height: 52%;
  }

  body[data-page='test.php'] .module-choice-card span::after {
    bottom: 8px;
    height: 26%;
  }

  body[data-page='test.php'] .module-choice-card b {
    top: 12px;
    width: 60px;
    height: 60px;
    padding: 6px;
  }

  body[data-page='test.php'] .module-choice-card strong {
    margin-top: 48px;
    font-size: 0.98rem;
  }

  body[data-page='test.php'] .module-choice-card small {
    font-size: 0.68rem;
    padding: 4px 8px;
  }

  body[data-page='test.php'] .test-start-actions {
    grid-template-columns: 56px 1fr 56px;
    gap: 10px;
    margin-top: 0;
  }

  body[data-page='test.php'] .action-mascot {
    width: 56px;
    height: 56px;
  }

  body[data-page='test.php'] .stack-form > .btn.btn-primary {
    min-height: 56px;
    font-size: 1.3rem;
  }
}

@media (max-width: 900px) {
  body[data-page='results.php'] .report-stage-shell {
    padding: 16px 14px 22px;
  }

  body[data-page='results.php'] .report-stage-topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  body[data-page='results.php'] .report-stage-mascot-card,
  body[data-page='results.php'] .report-stage-student-card {
    width: 118px;
    height: 118px;
  }

  body[data-page='results.php'] .report-stage-student-card .mascot-illustration,
  body[data-page='results.php'] .report-stage-mascot-card .mascot-illustration {
    width: 92px;
  }

  body[data-page='results.php'] .report-stage-summary {
    width: 100%;
  }

  body[data-page='results.php'] .report-stage-meta-line {
    justify-content: center;
    font-size: 1rem;
    line-height: 1.12;
  }

  body[data-page='results.php'] .report-stage-kicker {
    margin-inline: auto;
  }

  body[data-page='results.php'] .report-stage-summary-text {
    max-width: 100%;
  }

  body[data-page='results.php'] .report-stage-sidecard {
    width: min(100%, 360px);
    text-align: center;
    justify-items: center;
  }

  body[data-page='results.php'] .report-stage-side-mascot {
    width: 88px;
    height: 88px;
  }

  body[data-page='results.php'] .report-stage-side-mascot-svg {
    width: 68px;
    height: 68px;
  }

  body[data-page='results.php'] .report-module-switches {
    justify-content: center;
  }

  body[data-page='results.php'] .report-overview-grid,
  body[data-page='results.php'] .report-content-grid {
    grid-template-columns: 1fr;
  }

  body[data-page='results.php'] .report-answer-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
  }

  body[data-page='results.php'] .report-answer-index {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.15rem;
  }
}

@media (max-width: 640px) {
  body[data-page='results.php'] .report-stage-headline h1 {
    font-size: clamp(1.8rem, 7vw, 2.25rem);
  }

  body[data-page='results.php'] .report-stage-progress-wrap {
    gap: 10px;
  }

  body[data-page='results.php'] .report-stage-score-value {
    min-width: 74px;
    font-size: 1.32rem;
  }

  body[data-page='results.php'] .report-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page='results.php'] .report-panel-card,
  body[data-page='results.php'] .report-overview-card {
    padding: 15px;
  }
}

@media (min-width: 821px) and (max-height: 900px) {
  body[data-page='results.php'] .app-shell {
    padding-bottom: 24px;
  }

  body[data-page='results.php'] .report-stage-shell {
    padding-bottom: 22px;
  }

  body[data-page='results.php'] .report-stage-topbar {
    grid-template-columns: 126px minmax(0, 1fr) 210px;
  }

  body[data-page='results.php'] .report-stage-mascot-card,
  body[data-page='results.php'] .report-stage-student-card {
    width: 126px;
    height: 126px;
  }

  body[data-page='results.php'] .report-stage-student-card .mascot-illustration,
  body[data-page='results.php'] .report-stage-mascot-card .mascot-illustration {
    width: 98px;
  }

  body[data-page='results.php'] .report-overview-card strong {
    font-size: 2rem;
  }
}

@media (max-width: 900px) {
  body[data-page='test.php'] .question-stage-shell {
    padding-bottom: 156px;
  }

  body[data-page='test.php'] .question-stage-shell::before {
    bottom: 54px;
    width: min(320px, calc(100% - 44px));
    height: 200px;
  }

  body[data-page='test.php'] .question-stage-shell::after {
    bottom: 18px;
    width: min(310px, calc(100% - 44px));
    height: 98px;
  }

  body[data-page='test.php'] .question-stage-bottom-mascot {
    bottom: 28px;
    width: clamp(180px, 34vw, 238px);
    height: clamp(180px, 34vw, 238px);
  }

  body[data-page='test.php'] .page-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 18px;
  }

  body[data-page='test.php'] .question-stage-hero {
    padding: 14px 14px 12px;
  }

  body[data-page='test.php'] .question-stage-topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
  }

  body[data-page='test.php'] .question-stage-mascot-card {
    width: 118px;
    height: 118px;
  }

  body[data-page='test.php'] .question-stage-mascot-card .mascot-illustration {
    width: 92px;
  }

  body[data-page='test.php'] .question-stage-summary {
    width: 100%;
    gap: 12px;
  }

  body[data-page='test.php'] .question-stage-meta-line {
    justify-content: center;
    font-size: 1rem;
    line-height: 1.1;
  }

  body[data-page='test.php'] .question-stage-progress-wrap {
    width: 100%;
    gap: 12px;
  }

  body[data-page='test.php'] .question-stage-card {
    padding: 18px 14px 14px;
  }

  body[data-page='test.php'] .question-stage-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }

  body[data-page='test.php'] .question-stage-options {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  body[data-page='test.php'] .question-stage-options .choice-pill {
    flex: 0 1 calc(50% - 10px);
    min-width: 136px;
    min-height: 146px;
  }

  body[data-page='test.php'] .question-stage-footer {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-right: 0;
  }

  body[data-page='test.php'] .question-stage-status {
    grid-column: 1 / -1;
    order: -2;
  }

  body[data-page='test.php'] .question-stage-footer .step-indicator {
    order: -1;
    grid-column: 1 / -1;
    justify-self: center;
  }

  body[data-page='test.php'] .question-stage-footer [data-step-next],
  body[data-page='test.php'] .question-stage-footer > .btn.btn-soft {
    width: 100%;
    min-width: 0;
  }

  body[data-page='test.php'] .test-hero-copy {
    max-width: 100%;
    padding: 0;
  }

  body[data-page='test.php'] .test-start-title {
    max-width: 100%;
    font-size: clamp(1.9rem, 7vw, 2.45rem);
  }

  body[data-page='test.php'] .test-start-description {
    max-width: 100%;
  }

  body[data-page='test.php'] .mission-panel {
    padding: 22px 16px 18px;
    border-radius: 28px;
  }

  body[data-page='test.php'] .test-stage-intro {
    gap: 10px;
  }

  body[data-page='test.php'] .test-form-bubble {
    width: min(100%, 360px);
    padding: 14px 18px;
    font-size: clamp(1.25rem, 6vw, 1.6rem);
  }

  body[data-page='test.php'] .test-setup-grid {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  body[data-page='test.php'] .stack-form input,
  body[data-page='test.php'] .stack-form select,
  body[data-page='test.php'] .stack-form textarea {
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 18px;
  }

  body[data-page='test.php'] .test-module-title {
    font-size: 1.28rem;
  }

  body[data-page='test.php'] .test-module-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body[data-page='test.php'] .module-choice-card span {
    min-height: 224px;
    padding: 14px 14px 16px;
    border-radius: 24px;
  }

  body[data-page='test.php'] .module-choice-card b {
    width: 94px;
    height: 94px;
    top: 20px;
    padding: 10px;
  }

  body[data-page='test.php'] .module-choice-card strong {
    margin-top: 90px;
    font-size: 1.35rem;
  }

  body[data-page='test.php'] .module-choice-card small {
    font-size: 0.86rem;
    padding: 5px 10px;
  }

  body[data-page='test.php'] .test-start-actions {
    grid-template-columns: 62px 1fr 62px;
    gap: 8px;
  }

  body[data-page='test.php'] .action-mascot {
    width: 62px;
    height: 62px;
  }

  body[data-page='test.php'] .stack-form > .btn.btn-primary {
    min-height: 60px;
    font-size: 1.35rem;
  }

  body[data-page='test.php'] .start-mascot-stage {
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
    row-gap: 14px;
    width: 100%;
  }

  .start-mascot-stage .mascot-illustration-card {
    max-width: 180px;
  }

  body[data-page='test.php'] .start-mascot-bubble {
    min-width: 0;
    width: min(100%, 380px);
    max-width: 380px;
    padding: 12px 16px;
    font-size: 0.92rem;
  }

  body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card {
    min-height: 196px;
    padding: 14px 10px 10px;
  }

  body[data-page='test.php'] .start-mascot-stage .mascot-illustration {
    width: min(146px, 100%);
  }

  body[data-page='test.php'] .start-mascot-stage .mascot-illustration-card p {
    min-height: 48px;
    font-size: 0.9rem;
  }

  body[data-page='test.php'] .start-mascot-stage[data-selected-module='digital'] .mascot-carbon-card,
  body[data-page='test.php'] .start-mascot-stage[data-selected-module='carbon'] .mascot-digital-card {
    transform: translateY(6px) scale(.92);
  }

  .start-mascot-stage[data-selected-module='digital'] .mascot-digital-card {
    transform: translateX(16px) scale(1.08);
  }

  .start-mascot-stage[data-selected-module='carbon'] .mascot-carbon-card {
    transform: translateX(-16px) scale(1.08);
  }

  .start-mascot-stage[data-selected-module='digital'] .mascot-carbon-card {
    transform: translateX(72px) translateY(22px) scale(.24) rotate(14deg);
  }

  .start-mascot-stage[data-selected-module='carbon'] .mascot-digital-card {
    transform: translateX(-72px) translateY(22px) scale(.24) rotate(-14deg);
  }
}

.hero-mascot-stage .mascot-face {
  font-size: 3.2rem;
}

.mascot-dock {
  gap: 10px;
}

.mascot-buddy {
  min-width: 210px;
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(18, 45, 88, .28);
}

.mascot-buddy .face {
  font-size: 2.2rem;
}

.step-card {
  border: 2px solid rgba(255, 255, 255, .86);
}

.podium-scene {
  padding: 16px;
  border: 2px solid rgba(255,255,255,.72);
}

.podium-col {
  border: 2px solid rgba(255,255,255,.7);
}

.podium-col.rank-1 {
  transform: scale(1.06);
  box-shadow: 0 18px 28px rgba(247, 180, 61, .45);
}

.crown {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 10px rgba(255, 211, 99, .85));
}

.spotlight {
  opacity: .62;
}

.badge-room {
  border: 2px solid rgba(255,255,255,.78);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 244, 200, .5), transparent 40%),
    linear-gradient(180deg, rgba(206, 228, 255, .64), rgba(248, 221, 189, .68)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.18) 24px, transparent 24px, transparent 48px);
}

.badge-room .game-card {
  box-shadow: 0 16px 26px rgba(25, 45, 82, .2);
}

.badge.sticker {
  border-radius: 14px;
  padding: 10px 12px;
}

.badge.locked {
  filter: grayscale(.18);
}

.bottom-nav {
  box-shadow: 0 18px 32px rgba(17, 44, 86, .34);
}

.bottom-nav a {
  min-height: 54px;
}

.bottom-nav a.active {
  transform: translateY(-10px) scale(1.1);
}

@media (max-width: 820px) {
  .app-shell {
    padding: 10px 10px 102px;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .topbar-merged {
    align-items: flex-start;
    flex-wrap: wrap;
    border-radius: 24px;
    padding: 10px;
    gap: 8px;
  }

  .brand-pill {
    padding: 6px 4px;
    min-width: 0;
  }

  .topbar-actions {
    width: auto;
    padding: 6px 4px;
    border-radius: 16px;
    align-items: center;
  }

  .menu-trigger {
    min-width: 80px;
  }

  .profile-menu {
    right: 0;
    min-width: 164px;
    padding: 7px;
    gap: 5px;
  }

  .avatar-big {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .topbar-actions .btn {
    padding: 6px 8px;
    border-radius: 11px;
    min-height: 34px;
    font-size: 0.72rem;
  }

  .topbar-actions .btn.tiny {
    padding: 6px 7px;
    font-size: 0.66rem;
  }

  .page-hero {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .step-controls {
    grid-template-columns: 1fr 1fr;
  }

  .step-controls .step-indicator {
    grid-column: 1 / -1;
    order: -1;
  }

  body[data-page='digital.php'] .option-row,
  body[data-page='carbon.php'] .option-row,
  body[data-page='test.php'] .option-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  body[data-page='digital.php'] .choice-pill,
  body[data-page='carbon.php'] .choice-pill,
  body[data-page='test.php'] .choice-pill {
    min-width: 0;
    width: 100%;
    min-height: 118px;
    border-radius: 18px;
    box-shadow: 0 10px 18px rgba(20, 50, 92, 0.17);
  }

  body[data-page='digital.php'] .choice-pill span,
  body[data-page='carbon.php'] .choice-pill span,
  body[data-page='test.php'] .choice-pill span {
    gap: 2px;
    padding: 10px 8px;
  }

  body[data-page='digital.php'] .choice-card b,
  body[data-page='carbon.php'] .choice-card b,
  body[data-page='test.php'] .choice-card b {
    width: 48px;
    height: 48px;
    font-size: 1.65rem;
  }

  body[data-page='digital.php'] .choice-card strong,
  body[data-page='carbon.php'] .choice-card strong,
  body[data-page='test.php'] .choice-card strong {
    font-size: 0.88rem;
    line-height: 1.1;
  }

  body[data-page='digital.php'] .choice-card small,
  body[data-page='carbon.php'] .choice-card small,
  body[data-page='test.php'] .choice-card small {
    font-size: 0.69rem;
    padding: 2px 7px;
  }

  body[data-page='digital.php'] .step-controls,
  body[data-page='carbon.php'] .step-controls,
  body[data-page='test.php'] .step-controls {
    gap: 5px;
    padding: 6px;
  }

  body[data-page='digital.php'] .step-controls .btn,
  body[data-page='carbon.php'] .step-controls .btn,
  body[data-page='test.php'] .step-controls .btn {
    min-height: 36px;
    font-size: 0.78rem;
    padding: 7px 8px;
  }

  body[data-page='digital.php'] .step-indicator,
  body[data-page='carbon.php'] .step-indicator,
  body[data-page='test.php'] .step-indicator {
    font-size: 0.8rem;
  }

  .adventure-hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-actions-row .btn {
    width: 100%;
  }

  .world-card {
    min-height: 200px;
  }

  .podium-wrap {
    min-height: 180px;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .leader-row {
    grid-template-columns: auto auto 1fr;
  }

  .help-bubble {
    max-width: 170px;
    font-size: 0.76rem;
  }

  .mascot-dock {
    left: 8px;
    bottom: 112px;
  }

  .mascot-buddy {
    min-width: 116px;
  }

  .bottom-nav {
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    --bottom-nav-padding: 8px 10px;
    --bottom-nav-gap: 8px;
    --bottom-nav-radius: 18px;
    --bottom-nav-justify: flex-start;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .bottom-nav {
    scrollbar-width: none;
  }

  .bottom-nav a {
    flex: 0 0 var(--bottom-nav-item-basis);
    min-height: var(--bottom-nav-item-min-height, 50px);
    padding: var(--bottom-nav-item-padding-mobile);
    scroll-snap-align: start;
  }

  .bottom-nav a.active {
    transform: translateY(-4px) scale(1.03);
  }

  .bottom-nav a small {
    font-size: var(--bottom-nav-label-size);
    line-height: 1;
  }
}

/* =========================================================
   RESULTS POSTER — Child-friendly results card
   ========================================================= */

body[data-page='results.php'] .result-poster {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 32px;
  overflow: hidden;
  background: #f0faf6;
  box-shadow:
    0 24px 64px rgba(18, 54, 95, 0.18),
    0 4px 16px rgba(18, 54, 95, 0.08);
}

/* ---------- Hero ---------- */

body[data-page='results.php'] .result-hero {
  position: relative;
  padding: 44px 24px 130px;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg,
      #d3f2ff 0%,
      #a8e4f8 28%,
      #7dd8a6 68%,
      #5cc78a 88%,
      #4db876 100%);
}

body[data-page='results.php'] .result-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,0.48), transparent 40%),
    radial-gradient(ellipse at 80% 15%, rgba(255,255,255,0.34), transparent 35%),
    radial-gradient(ellipse at 50% 60%, rgba(255,255,255,0.08), transparent 50%);
  pointer-events: none;
}

body[data-page='results.php'] .result-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60'%3E%3Cpath d='M0 30c100-18 200 8 340 12s220-22 340-6 200 18 320 0 160-18 200-6V60H0z' fill='%23f0faf6'/%3E%3C/svg%3E") center bottom / 100% auto no-repeat;
  pointer-events: none;
  z-index: 2;
}

body[data-page='results.php'] .result-hero-title {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 3px 12px rgba(24, 80, 60, 0.28);
}

body[data-page='results.php'] .result-hero-highlight {
  display: block;
  font-size: 1.18em;
  background: linear-gradient(90deg, #fff, #ffe27a);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}

body[data-page='results.php'] .result-hero-subtitle {
  position: relative;
  z-index: 1;
  max-width: 42ch;
  margin: 0 auto 28px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(24, 80, 60, 0.18);
}

/* Confetti */

body[data-page='results.php'] .result-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

body[data-page='results.php'] .result-confetti i {
  position: absolute;
  top: -10%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0.7;
  animation: resultConfettiFall 4s ease-in infinite;
}

body[data-page='results.php'] .result-confetti i:nth-child(1)  { left: 5%;  background: #ffd265; animation-delay: 0s; animation-duration: 3.4s; }
body[data-page='results.php'] .result-confetti i:nth-child(2)  { left: 15%; background: #ff8b63; animation-delay: 0.6s; animation-duration: 4.2s; width: 6px; height: 6px; }
body[data-page='results.php'] .result-confetti i:nth-child(3)  { left: 25%; background: #6ed86c; animation-delay: 1.1s; animation-duration: 3.8s; }
body[data-page='results.php'] .result-confetti i:nth-child(4)  { left: 35%; background: #5aa9ff; animation-delay: 0.3s; animation-duration: 4.5s; width: 10px; height: 10px; }
body[data-page='results.php'] .result-confetti i:nth-child(5)  { left: 45%; background: #ffd265; animation-delay: 1.8s; animation-duration: 3.6s; }
body[data-page='results.php'] .result-confetti i:nth-child(6)  { left: 55%; background: #ff8b63; animation-delay: 0.9s; animation-duration: 4.1s; width: 7px; height: 7px; }
body[data-page='results.php'] .result-confetti i:nth-child(7)  { left: 65%; background: #6ed86c; animation-delay: 2.2s; animation-duration: 3.3s; }
body[data-page='results.php'] .result-confetti i:nth-child(8)  { left: 75%; background: #5aa9ff; animation-delay: 0.4s; animation-duration: 4.6s; }
body[data-page='results.php'] .result-confetti i:nth-child(9)  { left: 85%; background: #ffd265; animation-delay: 1.5s; animation-duration: 3.9s; width: 6px; height: 6px; }
body[data-page='results.php'] .result-confetti i:nth-child(10) { left: 92%; background: #ff8b63; animation-delay: 2.6s; animation-duration: 4.3s; }
body[data-page='results.php'] .result-confetti i:nth-child(11) { left: 10%; background: #6ed86c; animation-delay: 3.1s; animation-duration: 3.5s; width: 5px; height: 5px; }
body[data-page='results.php'] .result-confetti i:nth-child(12) { left: 50%; background: #ffd265; animation-delay: 2.8s; animation-duration: 4s; }

@keyframes resultConfettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.8; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

/* ---------- Hero Narrator ---------- */

body[data-page='results.php'] .result-hero-narrator {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 20px 28px 0;
  padding: 24px 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body[data-page='results.php'] .result-narrator-mascot {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  animation: resultMascotFloat 3s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 14px rgba(24, 80, 60, 0.22));
}

body[data-page='results.php'] .result-narrator-mascot-svg {
  width: 100%;
  height: 100%;
  display: block;
}

body[data-page='results.php'] .result-narrator-mascot-svg .mascot-eye {
  animation: mascotBlink 4s ease-in-out infinite;
  transform-origin: center;
}

body[data-page='results.php'] .result-narrator-mascot-svg .mascot-mouth {
  animation: mascotMouthTalk 0.4s ease-in-out infinite alternate;
  transform-origin: center;
}

body[data-page='results.php'] .result-narrator-mascot-svg.idle .mascot-mouth {
  animation: none;
}

body[data-page='results.php'] .result-narrator-mascot-svg .mascot-arm-left {
  animation: mascotAppendageLeftTalk 0.6s ease-in-out infinite alternate;
  transform-origin: top center;
}

body[data-page='results.php'] .result-narrator-mascot-svg .mascot-arm-right {
  animation: mascotAppendageRightTalk 0.6s ease-in-out infinite alternate;
  transform-origin: top center;
}

body[data-page='results.php'] .result-narrator-mascot-svg.idle .mascot-arm-left {
  animation: mascotCelebrateAppendageLeft 1.4s ease-in-out infinite alternate;
}

body[data-page='results.php'] .result-narrator-mascot-svg.idle .mascot-arm-right {
  animation: mascotCelebrateAppendageRight 1.4s ease-in-out infinite alternate;
}

body[data-page='results.php'] .result-narrator-mascot-svg .mascot-antenna-left {
  animation: mascotAppendageLeftIdle 2.4s ease-in-out infinite;
  transform-origin: bottom center;
}

body[data-page='results.php'] .result-narrator-mascot-svg .mascot-antenna-right {
  animation: mascotAppendageRightIdle 2.4s ease-in-out infinite;
  transform-origin: bottom center;
}

body[data-page='results.php'] .result-narrator-speech {
  flex: 1;
  min-width: 0;
}

body[data-page='results.php'] .result-narrator-bubble {
  position: relative;
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  min-height: 56px;
}

body[data-page='results.php'] .result-narrator-bubble::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 22px;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.6);
  border-left: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  transform: rotate(45deg);
}

body[data-page='results.php'] .result-narrator-text {
  font-size: 1rem;
  line-height: 1.65;
  color: #1a3d2e;
  font-weight: 600;
}

body[data-page='results.php'] .result-comment-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #22c55e;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: resultCursorBlink 0.7s step-end infinite;
}

@keyframes resultCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

body[data-page='results.php'] .result-narrator-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}

body[data-page='results.php'] .result-comment-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-page='results.php'] .result-comment-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}

body[data-page='results.php'] .result-comment-dot.active {
  background: #fff;
  transform: scale(1.35);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

body[data-page='results.php'] .result-comment-dot:hover {
  background: rgba(255, 255, 255, 0.75);
}

body[data-page='results.php'] .result-narrator-voice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body[data-page='results.php'] .result-narrator-voice-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

body[data-page='results.php'] .result-narrator-voice-btn.is-speaking {
  background: rgba(34, 197, 94, 0.45);
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.35);
  animation: voicePulse 1.2s ease-in-out infinite;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.3); }
  50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.5); }
}

@media (max-width: 580px) {
  body[data-page='results.php'] .result-hero-narrator {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin: 16px 12px 0;
    padding: 18px 16px;
  }

  body[data-page='results.php'] .result-narrator-mascot {
    width: 80px;
    height: 80px;
  }

  body[data-page='results.php'] .result-narrator-bubble::before {
    display: none;
  }

  body[data-page='results.php'] .result-narrator-controls {
    justify-content: center;
    gap: 14px;
  }
}

/* ---------- Body ---------- */

body[data-page='results.php'] .result-body {
  position: relative;
  padding: 0 20px 28px;
}

/* ---------- Main Card (Character + Gauge + Detail) ---------- */

body[data-page='results.php'] .result-main-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 20px 18px;
  margin-bottom: 16px;
  border-radius: 26px;
  background:
    linear-gradient(155deg, rgba(255,255,255,0.86), rgba(240,250,246,0.74));
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 12px 32px rgba(18, 54, 95, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Character column */

body[data-page='results.php'] .result-character-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

body[data-page='results.php'] .result-char-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #3a6b52;
}

body[data-page='results.php'] .result-char-avatar {
  width: 80px;
  height: 80px;
  padding: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), transparent 50%),
    linear-gradient(135deg, #d2f5e3, #c4eeff);
  box-shadow: 0 6px 18px rgba(24, 80, 60, 0.14);
  overflow: hidden;
}

body[data-page='results.php'] .result-avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}

body[data-page='results.php'] .result-avatar-svg .mascot-eye {
  animation: mascotBlink 5s ease-in-out infinite;
  transform-origin: center;
}

body[data-page='results.php'] .result-avatar-svg .mascot-arm-left {
  animation: mascotAppendageLeftIdle 2.8s ease-in-out infinite;
  transform-origin: top center;
}

body[data-page='results.php'] .result-avatar-svg .mascot-arm-right {
  animation: mascotAppendageRightIdle 2.8s ease-in-out infinite;
  transform-origin: top center;
}

body[data-page='results.php'] .result-char-name {
  font-family: 'Baloo 2', cursive;
  font-size: 0.95rem;
  color: #1d4e3e;
}

body[data-page='results.php'] .result-level-dots {
  display: flex;
  gap: 5px;
}

body[data-page='results.php'] .result-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #d4e5de;
  transform: rotate(45deg);
}

body[data-page='results.php'] .result-dot--on {
  background: linear-gradient(135deg, #3fc2ff, #22c55e);
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

/* Gauge column */

body[data-page='results.php'] .result-gauge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

body[data-page='results.php'] .result-gauge-svg {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
}

body[data-page='results.php'] .result-gauge-value {
  margin-top: -32px;
  text-align: center;
  line-height: 1;
}

body[data-page='results.php'] .result-gauge-value strong {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: #1d4e3e;
}

body[data-page='results.php'] .result-gauge-value span {
  font-size: 1rem;
  font-weight: 700;
  color: #6b8f7e;
}

body[data-page='results.php'] .result-gauge-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28);
}

/* Detail column */

body[data-page='results.php'] .result-detail-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-page='results.php'] .result-detail-label {
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem;
  color: #1d4e3e;
}

body[data-page='results.php'] .result-detail-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #4a7a66;
}

body[data-page='results.php'] .result-detail-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, #e8f5e9, #d4e8d9);
}

body[data-page='results.php'] .result-detail-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #86efac, #22c55e);
  transition: width 0.6s ease;
}

/* ---------- Info Cards ---------- */

body[data-page='results.php'] .result-info-card {
  padding: 18px 20px;
  margin-bottom: 14px;
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255,255,255,0.82), rgba(240,250,246,0.68));
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 8px 24px rgba(18, 54, 95, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body[data-page='results.php'] .result-info-card h3,
body[data-page='results.php'] .result-info-card h4 {
  margin: 0 0 10px;
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  color: #1d4e3e;
}

body[data-page='results.php'] .result-info-icon {
  margin-right: 4px;
}

body[data-page='results.php'] .result-info-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

body[data-page='results.php'] .result-info-label {
  font-size: 0.9rem;
  color: #4a7a66;
  white-space: nowrap;
}

body[data-page='results.php'] .result-info-value {
  font-family: 'Baloo 2', cursive;
  font-size: 1.2rem;
  color: #1d4e3e;
  white-space: nowrap;
}

body[data-page='results.php'] .result-small-label {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #6b8f7e;
}

/* Bar tracks */

body[data-page='results.php'] .result-bar-track {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2ece7;
}

body[data-page='results.php'] .result-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.6s ease;
}

body[data-page='results.php'] .result-bar--green .result-bar-fill {
  background: linear-gradient(90deg, #a3e635, #22c55e);
}

body[data-page='results.php'] .result-bar--orange .result-bar-fill {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

body[data-page='results.php'] .result-bar-label {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #3a6b52;
}

/* Duo row */

body[data-page='results.php'] .result-duo-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

body[data-page='results.php'] .result-info-card--half {
  margin-bottom: 0;
}

/* ---------- Tips ---------- */

body[data-page='results.php'] .result-tips-section {
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255,255,255,0.82), rgba(240,250,246,0.68));
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 8px 24px rgba(18, 54, 95, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body[data-page='results.php'] .result-tips-section h3 {
  margin: 0 0 16px;
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  color: #1d4e3e;
}

body[data-page='results.php'] .result-tip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

body[data-page='results.php'] .result-tip-row + .result-tip-row {
  border-top: 1px solid rgba(34, 197, 94, 0.12);
}

body[data-page='results.php'] .result-tip-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

body[data-page='results.php'] .result-tip-check svg {
  display: block;
}

body[data-page='results.php'] .result-tip-row span:last-child {
  font-size: 0.95rem;
  color: #2d5a48;
  font-weight: 600;
}

/* ---------- Corner Mascot ---------- */

body[data-page='results.php'] .result-corner-mascot {
  position: relative;
  width: 90px;
  margin: -10px 0 10px auto;
  opacity: 0.82;
  filter: drop-shadow(0 6px 12px rgba(24, 80, 60, 0.14));
  animation: resultMascotFloat 3.5s ease-in-out infinite alternate-reverse;
}

body[data-page='results.php'] .result-corner-svg {
  width: 100%;
  height: auto;
  display: block;
}

body[data-page='results.php'] .result-corner-svg .mascot-eye {
  animation: mascotBlink 4.5s ease-in-out infinite;
  transform-origin: center;
}

body[data-page='results.php'] .result-corner-svg .mascot-arm-left {
  animation: mascotAppendageLeftIdle 2.6s ease-in-out infinite;
  transform-origin: top center;
}

body[data-page='results.php'] .result-corner-svg .mascot-arm-right {
  animation: mascotAppendageRightIdle 2.6s ease-in-out infinite;
  transform-origin: top center;
}

/* ---------- Actions ---------- */

body[data-page='results.php'] .result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ---------- Share / QR / PDF ---------- */

body[data-page='results.php'] .result-share-section {
  background: rgba(255,255,255,0.55);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1.5px solid rgba(34,197,94,0.18);
}

body[data-page='results.php'] .result-share-section h3 {
  font-size: 1.05rem;
  margin: 0 0 14px;
  color: #1a3d2e;
}

body[data-page='results.php'] .result-share-row {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
}

body[data-page='results.php'] .result-qr-wrap {
  flex-shrink: 0;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

body[data-page='results.php'] .result-share-info {
  flex: 1;
  min-width: 200px;
}

body[data-page='results.php'] .result-share-info p {
  font-size: .92rem;
  color: #3d5a4a;
  margin: 0 0 10px;
  line-height: 1.5;
}

body[data-page='results.php'] .result-share-link {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid rgba(34,197,94,0.25);
  border-radius: 10px;
  font-size: .82rem;
  background: rgba(255,255,255,0.7);
  color: #1a3d2e;
  margin-bottom: 10px;
  font-family: 'Nunito', sans-serif;
}

body[data-page='results.php'] .result-share-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Print / PDF ---------- */

@media print {
  body[data-page='results.php'] .topbar,
  body[data-page='results.php'] .bg-aurora,
  body[data-page='results.php'] .bg-stars,
  body[data-page='results.php'] .result-confetti,
  body[data-page='results.php'] .result-narrator-controls,
  body[data-page='results.php'] .result-share-section,
  body[data-page='results.php'] .result-actions,
  body[data-page='results.php'] .result-hero-narrator {
    display: none !important;
  }

  body[data-page='results.php'] .result-poster {
    box-shadow: none;
    margin: 0;
    max-width: 100%;
  }

  body[data-page='results.php'] .result-hero {
    background: #e8f5e9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body[data-page='results.php'] .result-body {
    background: #fff !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 580px) {
  body[data-page='results.php'] .result-poster {
    margin: 0 -6px;
    border-radius: 24px;
  }

  body[data-page='results.php'] .result-hero {
    padding: 32px 16px 110px;
  }

  body[data-page='results.php'] .result-body {
    padding: 0 14px 22px;
  }

  body[data-page='results.php'] .result-main-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 18px;
    padding: 18px 14px;
  }

  body[data-page='results.php'] .result-detail-col {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  body[data-page='results.php'] .result-detail-bar {
    width: 100%;
  }

  body[data-page='results.php'] .result-info-row {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  body[data-page='results.php'] .result-duo-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Results Mascot Animations ---------- */

@keyframes resultMascotFloat {
  0% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
  100% { transform: translateY(-2px) rotate(-0.5deg); }
}

/* ---------- (narrator styles in hero section above) ---------- */

/* ==========================================================
   Mascot Chat – mascot_chat.php
   ========================================================== */

/* — Page background — */
body[data-page='mascot_chat.php'] {
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.08)),
    url('../img/background.png') center center / cover fixed no-repeat,
    linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
}
body[data-page='mascot_chat.php'] .app-shell {
  padding-bottom: 24px;
}

/* — Layout shell — */
.mc-app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  font-family: 'Nunito', sans-serif;
  overflow: hidden;
}
.mc-app [hidden] { display: none !important; }

/* ======== SELECT MASCOT SCREEN ======== */
.mc-select {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.mc-select-header {
  margin-bottom: 12px;
}
.mc-select-content {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 38px 28px 42px;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,.82);
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 16%, rgba(255,255,255,.86), transparent 18%),
    radial-gradient(circle at 88% 18%, rgba(255,245,173,.54), transparent 24%),
    radial-gradient(circle at 74% 74%, rgba(198,255,132,.42), transparent 25%),
    radial-gradient(circle at 22% 82%, rgba(88,214,255,.34), transparent 24%),
    linear-gradient(120deg, rgba(229,246,255,.98) 0%, rgba(118,233,223,.98) 38%, rgba(103,227,184,.96) 62%, rgba(238,238,131,.96) 100%);
  box-shadow: 0 24px 48px rgba(20,57,103,.22), inset 0 1px 0 rgba(255,255,255,.44);
}
.mc-select-content::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.2), transparent 38%),
    radial-gradient(circle at 12% 14%, rgba(255,255,255,.76), transparent 15%),
    radial-gradient(circle at 90% 18%, rgba(255,255,255,.3), transparent 14%);
  pointer-events: none;
}
.mc-select-content::after {
  content: '☁️   🌟   🍃   ☁️';
  position: absolute;
  left: 5%; right: 5%; top: 10px;
  font-size: 1.1rem;
  letter-spacing: 18px;
  opacity: .6;
  animation: drift 16s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.mc-select-content > * { position: relative; z-index: 1; }

.mc-select-title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--ink);
  text-align: center;
  margin: 0;
  line-height: 1.15;
}
.mc-select-subtitle {
  font-size: 1rem;
  color: rgba(22,50,79,.75);
  margin-top: -10px;
  text-align: center;
}
.mc-select-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px));
  gap: 18px;
  justify-content: center;
}

/* Mascot pick cards — glassmorphism like test.php hero mascot cards */
.mc-mascot-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 210px;
  padding: 22px 16px 18px;
  border-radius: 24px;
  border: 2px solid rgba(255,255,255,.72);
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.18));
  box-shadow: 0 12px 22px rgba(23,56,100,.14);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  font-family: 'Baloo 2', cursive;
  color: var(--ink);
  backdrop-filter: blur(3px);
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, border-color .3s ease;
}
.mc-mascot-pick:hover,
.mc-mascot-pick:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(23,56,100,.22);
  outline: none;
}

/* Glow layer behind mascot image */
.mc-pick-glow {
  position: absolute;
  inset: 22px 22px 48px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
  filter: blur(14px);
}
.mc-mascot-pick:hover .mc-pick-glow,
.mc-mascot-pick:focus-visible .mc-pick-glow { opacity: .7; }

.mc-mascot-pick[data-mc-pick="digital"] .mc-pick-glow {
  background: radial-gradient(circle, rgba(108,92,231,.45), rgba(90,169,255,.2) 60%, transparent 80%);
}
.mc-mascot-pick[data-mc-pick="digital"]:hover,
.mc-mascot-pick[data-mc-pick="digital"]:focus-visible {
  border-color: rgba(108,92,231,.6);
  background: linear-gradient(180deg, rgba(237,233,255,.6), rgba(255,255,255,.25));
}

.mc-mascot-pick[data-mc-pick="carbon"] .mc-pick-glow {
  background: radial-gradient(circle, rgba(0,184,148,.45), rgba(220,255,174,.3) 60%, transparent 80%);
}
.mc-mascot-pick[data-mc-pick="carbon"]:hover,
.mc-mascot-pick[data-mc-pick="carbon"]:focus-visible {
  border-color: rgba(0,184,148,.6);
  background: linear-gradient(180deg, rgba(220,255,235,.6), rgba(255,255,255,.25));
}

.mc-pick-img {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 10px 18px rgba(24,60,103,.18));
  transition: transform .3s ease;
}
.mc-mascot-pick:hover .mc-pick-img { transform: scale(1.06) translateY(-3px); }

.mc-mascot-pick strong {
  font-size: 1.1rem;
  line-height: 1.15;
}
.mc-mascot-pick small {
  font-size: 0.82rem;
  color: rgba(22,50,79,.65);
  font-family: 'Nunito', sans-serif;
}

/* ======== NAME INPUT SCREEN ======== */
.mc-name {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.mc-name-content {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 38px 32px 36px;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,.82);
  text-align: center;
  background:
    radial-gradient(circle at 14% 16%, rgba(255,255,255,.7), transparent 18%),
    radial-gradient(circle at 88% 8%, rgba(255,239,172,.9), transparent 22%),
    linear-gradient(180deg, rgba(126,215,255,.96) 0%, rgba(177,234,255,.95) 44%, rgba(209,243,220,.96) 76%, rgba(133,204,94,.96) 100%);
  box-shadow: 0 22px 42px rgba(24,58,101,.18), inset 0 1px 0 rgba(255,255,255,.62);
}
.mc-name-content::before {
  content: '';
  position: absolute;
  left: -4%; right: -4%; bottom: -8px; height: 30%;
  border-radius: 40% 40% 0 0;
  background:
    radial-gradient(circle at 24% 100%, rgba(124,198,86,.84) 0 18%, transparent 18%),
    radial-gradient(circle at 66% 100%, rgba(124,198,86,.84) 0 18%, transparent 18%),
    linear-gradient(180deg, rgba(161,225,111,.96), rgba(103,180,63,.98));
  opacity: .7;
  pointer-events: none;
}
.mc-name-content > * { position: relative; z-index: 1; }

.mc-name-mascot {
  position: relative;
}
.mc-name-mascot-img {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 14px 22px rgba(24,60,103,.2));
  animation: mcFloatIdle 2.8s ease-in-out infinite;
}
@keyframes mcFloatIdle {
  0%, 100% { transform: translateY(0) rotate(-0.5deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

.mc-name-bubble {
  background: rgba(255,255,255,.96);
  padding: 14px 24px;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  max-width: 340px;
  line-height: 1.5;
  box-shadow: 0 8px 18px rgba(25,52,92,.14);
  font-family: 'Baloo 2', cursive;
}
.mc-name-bubble p { margin: 0; }
.mc-name-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.mc-name-input {
  padding: 12px 18px;
  font-size: 1rem;
  border-radius: 16px;
  border: 2px solid rgba(212,226,248,.95);
  outline: none;
  width: 210px;
  transition: border-color .2s, box-shadow .2s;
  font-family: 'Nunito', sans-serif;
  background: rgba(255,255,255,.95);
  box-shadow: inset 0 2px 4px rgba(24,56,98,.08);
}
.mc-name-input:focus {
  border-color: rgba(108,92,231,.6);
  box-shadow: inset 0 2px 4px rgba(24,56,98,.08), 0 0 0 3px rgba(108,92,231,.15);
}

/* ======== CHAT SCREEN ======== */
.mc-chat {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  max-width: 620px;
  width: 100%;
  height: min(82dvh, 760px);
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  max-height: 100%;
  min-height: 0;
  border: 1.5px solid rgba(186,230,253,.55);
  background:
    linear-gradient(180deg, rgba(240,249,255,.28), rgba(224,242,254,.1)),
    linear-gradient(135deg, rgba(14,165,233,.08), rgba(255,255,255,.12) 46%, rgba(56,189,248,.06) 100%);
  box-shadow:
    0 18px 30px rgba(7,89,133,.1),
    inset 0 1px 0 rgba(255,255,255,.72),
    inset 0 -1px 0 rgba(186,230,253,.12);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  position: relative;
}

/* Top bar — glassmorphism like question-stage-toprail */
.mc-chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1.5px solid rgba(255,255,255,.45);
  background:
    linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,.12)),
    linear-gradient(135deg, rgba(205,244,255,.22), rgba(255,255,255,.16) 44%, rgba(255,248,214,.14) 100%);
  backdrop-filter: blur(18px) saturate(1.14);
  -webkit-backdrop-filter: blur(18px) saturate(1.14);
  flex-shrink: 0;
  z-index: 5;
}
.mc-chat-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mc-chat-avatar {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 4px 8px rgba(24,60,103,.15));
}
.mc-chat-topbar-left strong {
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  display: block;
  color: var(--ink);
}
.mc-chat-topbar-left small {
  font-size: 0.78rem;
  color: rgba(22,50,79,.6);
}
.mc-chat-topbar-right {
  display: flex;
  gap: 6px;
}

/* Chat body */
.mc-chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.3), transparent 60%),
    linear-gradient(180deg, rgba(248,252,255,.6), rgba(240,248,255,.4));
}

/* Mascot stage inside chat */
.mc-chat-mascot-stage {
  display: flex;
  justify-content: center;
  padding: 14px 0 8px;
  position: relative;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,.7), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
}
.mc-chat-mascot-stage::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 12px;
  width: 180px;
  height: 120px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(125,255,224,.4), rgba(125,255,224,0) 70%);
  pointer-events: none;
}
.mc-chat-mascot-stage::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 60px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25,61,101,.18), transparent 70%);
  transform: translateX(-50%);
  filter: blur(6px);
}
.mc-chat-mascot-img {
  position: relative;
  z-index: 1;
  width: clamp(106px, 15.5vw, 148px);
  height: clamp(106px, 15.5vw, 148px);
  filter: drop-shadow(0 10px 18px rgba(24,60,103,.16));
  transition: transform .3s ease;
  animation: mcFloatIdle 3s ease-in-out infinite;
}
.mc-chat-mascot-img.is-talking {
  animation: mcMascotBounce 0.5s ease-in-out infinite alternate;
}
.mc-mascot-mouth {
  --mc-mouth-open: 0;
  position: absolute;
  left: 50%;
  top: calc(50% + 18px);
  width: 24px;
  height: 11px;
  transform: translateX(-50%) scaleY(calc(0.35 + var(--mc-mouth-open)));
  transform-origin: center center;
  border-radius: 999px;
  border: 2px solid rgba(17, 49, 83, .72);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,164,176,.9));
  box-shadow: 0 4px 12px rgba(16,44,74,.24);
  opacity: 0;
  transition: transform .1s linear, opacity .12s ease;
  z-index: 2;
  pointer-events: none;
}
.mc-chat-mascot-stage.is-speaking .mc-mascot-mouth {
  opacity: .98;
}
.mc-chat-mascot-stage.is-speaking::before {
  animation: mcGlowPulse 1.4s ease-in-out infinite;
}
@keyframes mcMascotBounce {
  0% { transform: scale(1) rotate(-1.5deg); }
  100% { transform: scale(1.08) rotate(2deg); }
}
@keyframes mcGlowPulse {
  0%, 100% { opacity: .38; }
  50% { opacity: .72; }
}

/* Messages area */
.mc-messages {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
  overflow-y: auto;
  scroll-behavior: smooth;
  min-height: 0;
}

/* Bubbles */
.mc-bubble {
  max-width: clamp(210px, 80%, 520px);
  padding: 13px 18px;
  border-radius: 20px;
  font-size: 0.99rem;
  line-height: 1.56;
  word-break: break-word;
  animation: mcFadeIn 0.3s ease;
}
.mc-bubble--bot {
  align-self: flex-start;
  background: rgba(255,255,255,.92);
  border: 1.5px solid rgba(255,255,255,.6);
  border-bottom-left-radius: 6px;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(23,56,100,.08);
}
.mc-bubble--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), #ffb35a);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 14px rgba(255,122,89,.2);
}
@keyframes mcFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Typing indicator */
.mc-typing {
  display: inline-flex;
  gap: 5px;
  padding: 14px 20px;
  align-self: flex-start;
  background: rgba(255,255,255,.92);
  border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 20px;
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 14px rgba(23,56,100,.08);
}
.mc-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(22,50,79,.35);
  animation: mcDot 1.2s infinite;
}
.mc-typing span:nth-child(2) { animation-delay: 0.2s; }
.mc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mcDot {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Chips — pill-style like choice-pill cards */
.mc-chips {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  overflow-x: auto;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.25));
  z-index: 4;
}
.mc-chip {
  flex-shrink: 0;
  padding: 11px 18px;
  border: 2px solid rgba(212,226,248,.85);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(244,251,255,.95), rgba(255,245,236,.9));
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  white-space: nowrap;
  font-family: 'Baloo 2', cursive;
  color: var(--ink);
  box-shadow: 0 3px 8px rgba(23,56,100,.06);
}
.mc-chip:hover {
  border-color: rgba(108,92,231,.45);
  background: linear-gradient(120deg, rgba(237,233,255,.9), rgba(255,245,236,.9));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(23,56,100,.12);
}
.mc-chip:active { transform: scale(.96); }

/* Input bar — sticky polished strip */
.mc-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1.5px solid rgba(255,255,255,.45);
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.34));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: sticky;
  bottom: 0;
  align-items: center;
  flex-shrink: 0;
  z-index: 6;
}
.mc-text-input {
  flex: 1;
  padding: 11px 16px;
  border: 2px solid rgba(212,226,248,.85);
  border-radius: 16px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: 'Nunito', sans-serif;
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 2px 4px rgba(24,56,98,.06);
}
.mc-text-input:focus {
  border-color: rgba(108,92,231,.5);
  box-shadow: inset 0 2px 4px rgba(24,56,98,.06), 0 0 0 3px rgba(108,92,231,.12);
}

.mc-send-btn,
.mc-mic-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform .16s ease, filter .16s ease, box-shadow .2s ease;
  flex-shrink: 0;
}
.mc-send-btn {
  background: linear-gradient(120deg, var(--accent), #ffb35a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,122,89,.3);
}
.mc-send-btn:hover { transform: scale(1.06); }
.mc-send-btn:active { transform: scale(.94); }
.mc-mic-btn {
  background: linear-gradient(120deg, rgba(244,251,255,.95), rgba(255,245,236,.9));
  color: var(--ink);
  border: 2px solid rgba(212,226,248,.6);
}
.mc-mic-btn:hover { transform: scale(1.06); }
.mc-mic-btn:active { transform: scale(.94); }
.mc-mic-btn.is-recording {
  background: linear-gradient(120deg, #e74c3c, #ff6b6b);
  border-color: rgba(231,76,60,.4);
  color: #fff;
  animation: mcPulse 1s infinite;
}
@keyframes mcPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,.4); }
  50% { box-shadow: 0 0 0 12px rgba(231,76,60,0); }
}

/* Idle warning */
.mc-idle-warning {
  text-align: center;
  padding: 12px 18px;
  background: linear-gradient(120deg, rgba(255,243,205,.95), rgba(255,249,230,.9));
  border: 1.5px solid rgba(255,220,130,.5);
  color: #856404;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 16px;
  margin: 0 18px 10px;
  box-shadow: 0 4px 12px rgba(133,100,4,.08);
}

/* ======== SUMMARY SCREEN ======== */
.mc-summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.mc-summary-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  max-width: 460px;
  width: 100%;
  padding: 38px 32px 36px;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,.82);
  background:
    radial-gradient(circle at 14% 16%, rgba(255,255,255,.7), transparent 18%),
    radial-gradient(circle at 88% 8%, rgba(255,239,172,.9), transparent 22%),
    linear-gradient(180deg, rgba(126,215,255,.96) 0%, rgba(177,234,255,.95) 44%, rgba(209,243,220,.96) 76%, rgba(133,204,94,.96) 100%);
  box-shadow: 0 22px 42px rgba(24,58,101,.18), inset 0 1px 0 rgba(255,255,255,.62);
}
.mc-summary-card::before {
  content: '🌟   ✨   🎉';
  position: absolute;
  left: 5%; right: 5%; top: 12px;
  font-size: 1rem;
  letter-spacing: 14px;
  opacity: .5;
  text-align: center;
  pointer-events: none;
}
.mc-summary-card > * { position: relative; z-index: 1; }

.mc-summary-mascot {
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 14px 22px rgba(24,60,103,.2));
  animation: mcFloatIdle 2.8s ease-in-out infinite;
}
.mc-summary-card h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0;
}
.mc-summary-card p {
  font-size: 0.95rem;
  color: rgba(22,50,79,.8);
  line-height: 1.55;
  margin: 0;
}
.mc-summary-tip {
  background: rgba(255,255,255,.88);
  padding: 16px 22px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
  width: 100%;
  box-shadow: 0 4px 14px rgba(23,56,100,.08);
  border: 1.5px solid rgba(255,255,255,.6);
}
.mc-summary-tip:empty { display: none; }
.mc-summary-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 600px) {
  .mc-select-content {
    padding: 28px 18px 32px;
    border-radius: 24px;
  }
  .mc-select-title { font-size: 1.4rem; }
  .mc-select-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .mc-mascot-pick {
    min-height: 180px;
    padding: 18px 12px 14px;
    border-radius: 20px;
  }
  .mc-pick-img { width: 90px; height: 90px; }
  .mc-name-content {
    padding: 28px 18px 28px;
    border-radius: 24px;
  }
  .mc-name-mascot-img { width: 100px; height: 100px; }
  .mc-chat {
    border-radius: 22px;
    height: calc(100dvh - 132px);
  }
  .mc-bubble { max-width: clamp(170px, 90%, 400px); font-size: 0.93rem; }
  .mc-chat-mascot-stage { padding: 10px 0 6px; }
  .mc-chat-mascot-stage::before { width: 136px; height: 94px; top: 6px; }
  .mc-chat-mascot-img { width: clamp(86px, 25vw, 112px); height: clamp(86px, 25vw, 112px); }
  .mc-mascot-mouth { width: 20px; height: 9px; top: calc(50% + 14px); }
  .mc-chips { padding: 8px 14px; gap: 7px; }
  .mc-chip { padding: 10px 14px; font-size: 0.85rem; }
  .mc-summary-card {
    padding: 28px 18px 28px;
    border-radius: 24px;
  }
  .mc-summary-mascot { width: 90px; height: 90px; }
}

/* ===== Badge Gallery (bg-*) ===== */

.bg-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.bg-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.92);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border: 1.5px solid rgba(0,0,0,.06);
}

.bg-stat-icon {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e7ff, #f0f4ff);
  border-radius: 14px;
  flex-shrink: 0;
}

.bg-stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}

.bg-stat-label {
  font-size: .78rem;
  color: #64748b;
  font-weight: 500;
}

/* Level Card */
.bg-level-card {
  margin-bottom: 18px;
}

.bg-level-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.bg-level-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(245,158,11,.35);
}

.bg-level-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.bg-level-info {
  flex: 1;
  min-width: 0;
}

.bg-level-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 2px;
}

.bg-level-sub {
  font-size: .85rem;
  color: #64748b;
  margin: 0 0 10px;
}

.bg-level-bar {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.bg-level-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  border-radius: 999px;
  transition: width .6s ease;
}

.bg-level-next {
  font-size: .75rem;
  color: #94a3b8;
  margin: 6px 0 0;
}

/* Section containers */
.bg-section {
  margin-bottom: 0;
}

.bg-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 4px;
}

.bg-section-desc {
  font-size: .85rem;
  color: #64748b;
  margin: 0 0 18px;
}

/* Badge Grid */
.bg-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.bg-badge-card {
  position: relative;
  background: rgba(255,255,255,.95);
  border-radius: 20px;
  padding: 24px 14px 16px;
  text-align: center;
  border: 2px solid rgba(0,0,0,.06);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}

.bg-badge-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.bg-badge-glow {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0;
  filter: blur(28px);
  pointer-events: none;
  transition: opacity .3s;
}

.bg-badge-unlocked .bg-badge-glow {
  opacity: .25;
}

.bg-badge-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transition: background .3s;
}

.bg-badge-icon {
  font-size: 1.6rem;
}

.bg-badge-locked .bg-badge-icon-wrap {
  background: #e2e8f0;
}

.bg-badge-locked {
  opacity: .6;
}

.bg-badge-name {
  font-size: .88rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.bg-badge-desc {
  font-size: .72rem;
  color: #94a3b8;
  line-height: 1.3;
  margin-bottom: 10px;
}

.bg-badge-status {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .02em;
}

.bg-badge-status-done {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.bg-badge-status-lock {
  background: #f1f5f9;
  color: #94a3b8;
}

/* Accessory Grid */
.bg-acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.bg-acc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.92);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1.5px solid rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}

.bg-acc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.bg-acc-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  flex-shrink: 0;
  transition: background .3s;
}

.bg-acc-icon {
  font-size: 1.3rem;
}

.bg-acc-locked {
  opacity: .5;
}

.bg-acc-info {
  flex: 1;
  min-width: 0;
}

.bg-acc-name {
  font-size: .88rem;
  font-weight: 700;
  color: #1e293b;
}

.bg-acc-from {
  font-size: .72rem;
  color: #94a3b8;
}

.bg-acc-check {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Collection Progress */
.bg-progress-section {
  text-align: center;
}

.bg-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.bg-progress-bar {
  flex: 1;
  height: 14px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.bg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  border-radius: 999px;
  transition: width .8s ease;
}

.bg-progress-label {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  min-width: 45px;
}

.bg-progress-hint {
  font-size: .88rem;
  color: #64748b;
}

/* Responsive */
@media (max-width: 640px) {
  .bg-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .bg-badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bg-acc-grid {
    grid-template-columns: 1fr;
  }
  .bg-level-avatar {
    width: 56px;
    height: 56px;
  }
  .bg-level-number {
    font-size: 1.4rem;
  }
}

