:root {
  --orange: #ff7a1a;
  --gold: #ffd05a;
  --blue: #2d85ff;
  --cyan: #28d7ff;
  --ink: #101928;
  --muted: #6b7280;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 28px 80px rgba(4, 18, 44, 0.26);
}

/* 2026 kid-product refresh: softer palette, role sprites, game-like feedback */
:root {
  --orange: #f58220;
  --cream: #fff3e0;
  --peach: #ffd8b5;
  --mint: #c1e4db;
  --kid-ink: #24324a;
}

body.kid-mode {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 216, 181, 0.46), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(193, 228, 219, 0.36), transparent 30%),
    linear-gradient(180deg, #fffdf7 0%, #fff6e8 58%, #f6eddc 100%);
}

body.kid-mode .mission-screen {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.8), transparent 30%),
    radial-gradient(circle at 18% 18%, rgba(255, 216, 181, 0.38), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(193, 228, 219, 0.34), transparent 28%),
    linear-gradient(180deg, #fffdf7 0%, #fff5e6 58%, #f7ead6 100%);
  isolation: isolate;
}

body.kid-mode .mission-screen::before,
body.kid-mode .mission-screen::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.52;
}

body.kid-mode .mission-screen::before {
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(245, 130, 32, 0.12) 0 1.5px, transparent 2.5px),
    radial-gradient(circle, rgba(84, 192, 174, 0.1) 0 1.5px, transparent 2.5px);
  background-size: 56px 56px, 76px 76px;
  background-position: 8px 12px, 30px 26px;
}

body.kid-mode .mission-screen::after {
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 28%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, rgba(255, 216, 181, 0), rgba(245, 130, 32, 0.08));
  filter: blur(0);
}

body.kid-mode .mission-bg {
  opacity: 0;
}

body.kid-mode .screen-shade {
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.2), rgba(255, 243, 224, 0.72)),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.56), transparent 28%);
}

body.kid-mode .stage-character {
  top: 28px;
  width: 190px;
}

body.kid-mode .stage-character img {
  width: 156px;
  height: 156px;
  border-radius: 44px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(138, 80, 12, 0.18));
  animation: stageFloat 2.8s ease-in-out infinite;
}

body.kid-mode .certificate-card .cert-hero-art {
  object-position: center;
}

body.kid-mode .stage-character span {
  margin-top: -2px;
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: #8a520f;
  box-shadow: 0 10px 22px rgba(245, 130, 32, 0.16);
}

body.kid-mode .mission-card {
  bottom: 20px;
  padding: 24px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 42px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 232, 0.82)),
    rgba(255, 255, 255, 0.84);
  color: var(--kid-ink);
  box-shadow: 0 22px 48px rgba(143, 86, 18, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
}

body.kid-mode .mission-card::before {
  content: "";
  position: absolute;
  right: 22px;
  top: 18px;
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 34% 36%, #fff, transparent 18%),
    linear-gradient(135deg, rgba(245, 130, 32, 0.2), rgba(193, 228, 219, 0.28));
  transform: rotate(8deg);
}

body.kid-mode .mission-card p:not(.signal):not(.small-tip) {
  color: #5b6575;
  font-weight: 800;
}

body.kid-mode h1,
body.kid-mode h2 {
  color: var(--kid-ink);
}

body.kid-mode h1 {
  font-size: clamp(28px, 8vw, 38px);
}

body.kid-mode h2 {
  font-size: clamp(27px, 7.5vw, 34px);
}

body.kid-mode .signal {
  color: #8a520f;
  background: linear-gradient(135deg, rgba(255, 216, 181, 0.9), rgba(255, 243, 224, 0.8));
  box-shadow: inset 0 0 0 1px rgba(245, 130, 32, 0.12), 0 8px 18px rgba(245, 130, 32, 0.12);
}

body.kid-mode .yuan-guide {
  background: rgba(255, 255, 255, 0.82);
  color: #8a520f;
  border-color: rgba(245, 130, 32, 0.14);
  box-shadow: 0 12px 24px rgba(143, 86, 18, 0.12);
}

body.kid-mode .yuan-guide img {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  object-fit: contain;
}

body.kid-mode .yuan-guide::after {
  background: linear-gradient(135deg, #f58220, #ffb02f);
}

body.kid-mode .primary-btn,
body.kid-mode .secondary-btn {
  min-height: 56px;
  border-radius: 999px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

body.kid-mode .primary-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(135deg, #ff912f, #f58220 58%, #ffbe4f);
  box-shadow: 0 16px 28px rgba(245, 130, 32, 0.28), inset 0 -3px 0 rgba(136, 65, 0, 0.16);
}

body.kid-mode .primary-btn:active,
body.kid-mode .hold-btn.charging {
  transform: translateY(3px) scale(0.965);
  filter: saturate(1.1);
  box-shadow: 0 8px 18px rgba(245, 130, 32, 0.22), inset 0 4px 0 rgba(136, 65, 0, 0.08);
}

body.kid-mode .mission-list span {
  min-height: 56px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  color: #27405f;
  box-shadow: 0 12px 24px rgba(39, 64, 95, 0.08);
  animation: badgePop 0.42s ease both;
}

body.kid-mode .mission-list span:nth-child(2) {
  animation-delay: 0.08s;
}

body.kid-mode .mission-list span:nth-child(3) {
  animation-delay: 0.16s;
}

body.kid-mode .mission-list span:nth-child(4) {
  animation-delay: 0.24s;
}

body.kid-mode .mission-list span::before {
  content: "✓";
  background: linear-gradient(135deg, #6fd3bf, #39b79f);
  box-shadow: 0 8px 16px rgba(57, 183, 159, 0.25);
  animation: checkBounce 0.72s ease both;
}

body.kid-mode .energy-ring {
  position: relative;
  width: 204px;
  height: 204px;
  background:
    radial-gradient(circle at center, #fffdf8 0 51%, transparent 52%),
    conic-gradient(#ffb02f var(--progress, 0%), rgba(193, 228, 219, 0.7) 0);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.88), 0 18px 38px rgba(245, 130, 32, 0.22), 0 0 38px rgba(255, 190, 79, 0.26);
}

body.kid-mode .energy-ring::before,
body.kid-mode .energy-ring::after {
  content: "⚡";
  position: absolute;
  color: #ffb02f;
  font-size: 24px;
  filter: drop-shadow(0 0 12px rgba(255, 176, 47, 0.5));
  opacity: 0;
}

body.kid-mode .energy-ring::before {
  left: 22px;
  top: 28px;
  animation: sparkRise 1.5s ease-in-out infinite;
}

body.kid-mode .energy-ring::after {
  right: 20px;
  bottom: 40px;
  animation: sparkRise 1.5s 0.42s ease-in-out infinite;
}

body.kid-mode .energy-ring span {
  color: #f58220;
}

body.kid-mode .small-tip {
  color: #7b8494;
  font-weight: 800;
}

body.kid-mode .reward-list {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

body.kid-mode .reward-item {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  border: 0;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 30px rgba(39, 64, 95, 0.1);
}

body.kid-mode .reward-item strong {
  color: #24324a;
}

body.kid-mode .reward-item p {
  color: #697386;
}

body.kid-mode .reward-icon {
  width: 78px;
  height: 78px;
  border-radius: 28px;
  background: linear-gradient(145deg, #fff8d8, #ffb02f);
  box-shadow: 0 16px 28px rgba(245, 130, 32, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  animation: prizeFloat 2.6s ease-in-out infinite;
}

body.kid-mode .gift-icon {
  background: linear-gradient(145deg, #ffe4f0, #ff8aa8 48%, #ffb02f);
  animation-delay: 0.32s;
}

body.kid-mode .coin-icon::before {
  content: "¥";
  color: #8a520f;
  font-size: 42px;
  font-weight: 1000;
}

body.kid-mode .gift-icon::before {
  content: "🎁";
  font-size: 38px;
}

body.kid-mode .certificate-card {
  background:
    radial-gradient(circle at 50% 3%, rgba(255, 190, 79, 0.24), transparent 24%),
    radial-gradient(circle at 12% 28%, rgba(193, 228, 219, 0.2), transparent 24%),
    linear-gradient(180deg, #fffdf7 0%, #fff6e8 58%, #f6e8cc 100%);
}

body.kid-mode .cert-frame {
  inset: 12px;
  border: 0;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(245, 130, 32, 0.32), rgba(193, 228, 219, 0.34), rgba(255, 190, 79, 0.32));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 2px;
  animation: glowBorder 3.6s linear infinite;
}

body.kid-mode .cert-frame::before,
body.kid-mode .cert-frame::after {
  display: none;
}

body.kid-mode .cert-crest {
  box-shadow: 0 20px 42px rgba(143, 86, 18, 0.14);
}

body.kid-mode .cert-title-block h2 {
  color: transparent;
  background: linear-gradient(135deg, #f58220, #ffb02f 48%, #7a4a08);
  -webkit-background-clip: text;
  background-clip: text;
}

body.kid-mode .cert-award {
  padding: 10px 18px 10px 44px;
  background:
    radial-gradient(circle at 24px 50%, rgba(255, 255, 255, 0.38) 0 12px, transparent 13px),
    linear-gradient(135deg, #ff912f, #f58220 56%, #ffbe4f);
  box-shadow: 0 18px 28px rgba(245, 130, 32, 0.22);
}

body.kid-mode .cert-award::before {
  content: "🎙️";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
}

body.kid-mode .cert-badges {
  gap: 12px;
}

body.kid-mode .cert-badges span {
  min-height: 78px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  color: #27405f;
  box-shadow: 0 14px 28px rgba(39, 64, 95, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transition: transform 0.16s ease;
  animation: prizeFloat 3s ease-in-out infinite;
}

body.kid-mode .cert-badges span:nth-child(2) {
  animation-delay: 0.18s;
}

body.kid-mode .cert-badges span:nth-child(3) {
  animation-delay: 0.36s;
}

body.kid-mode .cert-badges span:nth-child(4) {
  animation-delay: 0.54s;
}

body.kid-mode .cert-badges span:active {
  transform: scale(1.06);
}

body.kid-mode .certificate-card > .secondary-btn {
  min-width: min(100%, 238px);
  min-height: 54px;
  color: #fff;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 48%),
    linear-gradient(135deg, #1e7fff, #54c0ae);
  box-shadow: 0 16px 28px rgba(30, 127, 255, 0.22);
}

@keyframes badgePop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes checkBounce {
  0% {
    transform: scale(0.1) rotate(-18deg);
  }
  62% {
    transform: scale(1.16) rotate(5deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes sparkRise {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.7) rotate(-12deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-26px) scale(1.08) rotate(12deg);
  }
}

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

@keyframes glowBorder {
  0%, 100% {
    opacity: 0.75;
    filter: hue-rotate(0deg);
  }
  50% {
    opacity: 1;
    filter: hue-rotate(18deg);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 122, 26, 0.22), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(40, 215, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #07152c 0%, #102a4c 42%, #f5f8ff 42%, #eef7ff 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.app {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(420px, 1fr);
  gap: 26px;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0;
}

body.teacher-mode {
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 122, 26, 0.2), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(40, 215, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef7ff 100%);
}

body.teacher-mode .app {
  display: block;
  width: min(920px, calc(100% - 28px));
}

body.teacher-mode .child-only,
body.kid-mode .teacher-only {
  display: none;
}

body.kid-mode .app {
  display: block;
  width: min(520px, 100%);
  min-height: 100vh;
  padding: 0;
}

body.kid-mode .phone-shell {
  min-height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.kid-mode .mission-screen {
  min-height: 100vh;
  border-radius: 0;
}

.phone-shell {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  box-shadow: var(--shadow);
}

.mission-screen {
  position: relative;
  min-height: 820px;
  border-radius: 26px;
  overflow: hidden;
  background: #09172f;
}

.mission-bg,
.screen-shade {
  position: absolute;
  inset: 0;
}

.mission-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-shade {
  background:
    linear-gradient(180deg, rgba(4, 13, 30, 0.22), rgba(4, 13, 30, 0.06) 42%, rgba(4, 13, 30, 0.78)),
    radial-gradient(circle at 50% 45%, transparent 0 30%, rgba(5, 17, 38, 0.16) 58%, rgba(5, 17, 38, 0.68) 100%);
}

.yuan-mascot {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 82px;
  z-index: 2;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.24));
}

.stage-character {
  position: absolute;
  left: 50%;
  top: 86px;
  z-index: 2;
  display: grid;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.stage-character img {
  width: min(250px, 52vw);
  max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 22px rgba(255, 122, 26, 0.28));
  animation: stageFloat 3.2s ease-in-out infinite;
}

.stage-character span {
  margin-top: -10px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 208, 90, 0.35);
  border-radius: 999px;
  background: rgba(8, 21, 45, 0.72);
  color: #ffd05a;
  font-size: 13px;
  font-weight: 1000;
  backdrop-filter: blur(10px);
}

.stage-character.role-check img {
  transform: rotate(-2deg);
}

.stage-character.role-energy img {
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 34px rgba(40, 215, 255, 0.45));
}

.stage-character.role-reward img {
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 38px rgba(255, 208, 90, 0.45));
}

.mission-card,
.certificate-card {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 22px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(8, 21, 45, 0.88), rgba(18, 29, 56, 0.8));
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.mission-card {
  display: none;
  padding: 24px;
}

.mission-card.active {
  display: block;
  animation: cardIn 0.36s ease both;
}

.yuan-guide {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 8px 11px 8px 8px;
  border: 1px solid rgba(255, 208, 90, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffd05a;
  font-size: 13px;
  font-weight: 1000;
}

.yuan-guide img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.22));
}

.yuan-guide::after {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 122, 26, 0.22);
  color: #fff;
  font-size: 15px;
}

.guide-start::after {
  content: "启";
}

.guide-check::after {
  content: "✓";
}

.guide-energy::after {
  content: "能";
}

.guide-reward::after {
  content: "礼";
}

.signal {
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.26), rgba(255, 208, 90, 0.12));
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.13;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 28px;
  letter-spacing: 0;
}

.mission-card p:not(.signal):not(.small-tip) {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.7;
}

.primary-btn,
.secondary-btn {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ffb02f);
  box-shadow: 0 16px 34px rgba(255, 122, 26, 0.32);
  touch-action: manipulation;
  user-select: none;
}

.secondary-btn {
  color: #13508a;
  background: #eaf6ff;
  border: 1px solid rgba(45, 133, 255, 0.16);
}

.mission-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.mission-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.mission-list span::before {
  content: "✓";
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
}

.energy-ring {
  display: grid;
  width: 198px;
  height: 198px;
  place-items: center;
  margin: 8px auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #071a38 0 52%, transparent 53%),
    conic-gradient(var(--orange) var(--progress, 0%), rgba(255, 255, 255, 0.16) 0);
  box-shadow: inset 0 0 34px rgba(40, 215, 255, 0.24), 0 0 42px rgba(255, 122, 26, 0.22);
}

.energy-ring span {
  color: var(--gold);
  font-size: 36px;
  font-weight: 1000;
}

.small-tip {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.hold-btn {
  position: relative;
  overflow: hidden;
  min-width: 176px;
}

.hold-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: translateX(-120%);
}

.hold-btn.charging::after {
  animation: chargeSweep 0.7s linear infinite;
}

.vault {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: 8px auto 20px;
  border: 1px solid rgba(255, 208, 90, 0.45);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 122, 26, 0.24), rgba(45, 133, 255, 0.22)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 44px rgba(255, 208, 90, 0.22);
}

.reward-list {
  display: grid;
  gap: 14px;
  margin: 10px 0 20px;
}

.reward-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
}

.reward-item strong {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-size: 17px;
}

.reward-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
}

.reward-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(255, 122, 26, 0.25), rgba(255, 208, 90, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 208, 90, 0.18), 0 14px 24px rgba(0, 0, 0, 0.18);
}

.reward-icon::before {
  color: var(--gold);
  font-size: 31px;
  font-weight: 1000;
}

.coin-icon::before {
  content: "¥";
}

.gift-icon::before {
  content: "礼";
}

.vault span {
  width: 76px;
  height: 76px;
  border: 9px solid var(--gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.12);
}

.vault strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  letter-spacing: 4px;
}

.certificate-card {
  inset: 0;
  padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 208, 90, 0.22), transparent 28%),
    linear-gradient(180deg, #fff9ec 0%, #fff4dc 42%, #f4e5c6 100%);
  color: #172033;
  animation: certIn 0.52s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  overflow-y: auto;
}

.cert-frame {
  position: absolute;
  inset: 14px;
  border: 3px solid rgba(151, 110, 43, 0.66);
  border-radius: 34px;
  pointer-events: none;
}

.cert-frame::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 137, 36, 0.26);
  border-radius: 25px;
}

.cert-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 55%;
  width: 300px;
  height: 300px;
  border: 22px solid rgba(255, 122, 26, 0.05);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
}

.cert-ribbon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 122px;
  margin-top: 8px;
}

.cert-ribbon::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.16), rgba(255, 208, 90, 0.1));
  filter: blur(1px);
}

.cert-ribbon img {
  position: relative;
  z-index: 1;
  width: 112px;
  max-height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(105, 65, 10, 0.22));
}

.cert-top,
.cert-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cert-top span {
  color: #8b6221;
  font-weight: 1000;
  font-size: 17px;
}

.yfd-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
  color: #171717;
  font-size: 18px;
  font-weight: 1000;
  white-space: nowrap;
}

.yfd-logo img {
  width: 34px;
  height: 34px;
  display: inline-block;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(255, 106, 0, 0.22);
}

.yfd-logo em {
  font-style: normal;
}

.cert-award {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 12px auto 14px;
  padding: 10px 22px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ffb02f);
  font-weight: 1000;
  box-shadow: 0 12px 24px rgba(255, 122, 26, 0.2);
}

.certificate-card h2 {
  position: relative;
  z-index: 1;
  margin: 14px 0 14px;
  color: #9b4b00;
  font-size: clamp(46px, 11vw, 68px);
  line-height: 1.08;
  text-align: center;
}

.cert-copy {
  position: relative;
  z-index: 1;
  color: #24324a;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.68;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 14px;
}

.cert-no {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: rgba(139, 98, 33, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 2px;
}

.cert-section-title {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 20px auto 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #8b6221;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 0 0 1px rgba(139, 98, 33, 0.1);
  font-size: 13px;
  font-weight: 1000;
}

.cert-badges {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0 0 16px;
}

.cert-badges span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 232, 0.84));
  color: #23405f;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(139, 98, 33, 0.08), 0 8px 18px rgba(42, 68, 105, 0.08);
}

.reward-summary {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  margin: 16px 0 20px;
  padding: 16px;
  border: 1px solid rgba(139, 98, 33, 0.2);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 253, 246, 0.96), rgba(255, 244, 224, 0.76));
  box-shadow: 0 12px 28px rgba(118, 82, 25, 0.08);
}

.reward-summary strong {
  color: #8b6221;
  font-size: 15px;
}

.reward-summary span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #25405f;
  font-weight: 900;
}

.reward-summary i {
  display: inline-grid;
  min-width: 42px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ffb02f);
  font-style: normal;
  font-size: 12px;
}

.cert-footer {
  position: relative;
  z-index: 1;
  color: #846221;
  font-weight: 900;
  margin-bottom: 18px;
}

.certificate-card .secondary-btn {
  position: relative;
  z-index: 1;
  border-color: rgba(139, 98, 33, 0.2);
  color: #7a4a08;
  background: #fff7e6;
}

.cert-crest {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: 8px auto 0;
  width: min(100%, 720px);
  aspect-ratio: 2.42 / 1;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 18px 42px rgba(124, 79, 12, 0.16);
}

.cert-crest::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(151, 110, 43, 0.2);
  border-radius: inherit;
  pointer-events: none;
}

.cert-hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.cert-title-block {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  margin-top: 14px;
  text-align: center;
}

.cert-title-block p {
  margin: 0 0 3px;
  color: #8b6221;
  font-size: 14px;
  font-weight: 1000;
}

.cert-title-block h2 {
  margin: 0;
  color: #8c4a08;
  font-size: clamp(42px, 10vw, 60px);
  line-height: 1.02;
  letter-spacing: 0;
}

.cert-title-block span {
  margin-top: 9px;
  color: rgba(139, 98, 33, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
}

.cert-label {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 12px auto 0;
  padding: 4px 12px;
  border-radius: 999px;
  color: #8b6221;
  background: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  font-weight: 1000;
}

.certificate-card h3 {
  position: relative;
  z-index: 1;
  margin: 6px 0 8px;
  color: #9b4b00;
  font-size: clamp(48px, 12vw, 72px);
  line-height: 1.08;
  text-align: center;
  letter-spacing: 0;
}

.cert-footer > div {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.cert-footer .yfd-logo {
  transform: scale(0.82);
  transform-origin: right center;
}

.certificate-card > .secondary-btn {
  display: block;
  min-width: 190px;
  margin: 0 auto;
  border-radius: 999px;
}

.hidden {
  display: none !important;
}

.control-panel {
  align-self: start;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-head p {
  margin: 0 0 6px;
  color: #df5a00;
  font-weight: 1000;
}

.panel-head h2 {
  margin-bottom: 8px;
  color: #172033;
}

.panel-head span {
  display: block;
  color: #667085;
  line-height: 1.7;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

label {
  display: grid;
  gap: 7px;
  color: #44556f;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(73, 98, 137, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #172033;
  outline: 0;
}

input,
select {
  height: 46px;
  padding: 0 12px;
}

textarea {
  min-height: 190px;
  padding: 14px;
  line-height: 1.7;
  resize: vertical;
}

.checks,
.award-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.link-box {
  margin-bottom: 14px;
}

.checks label,
.award-card {
  min-height: 54px;
  padding: 11px;
  border: 1px solid rgba(73, 98, 137, 0.12);
  border-radius: 16px;
  background: #fff;
}

.checks label {
  display: flex;
  align-items: center;
}

.checks input {
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
}

.award-card {
  color: #465875;
  text-align: left;
}

.award-card strong {
  display: block;
  margin-bottom: 5px;
  color: #213653;
}

.award-card.active {
  border-color: rgba(255, 122, 26, 0.56);
  background: linear-gradient(135deg, #fff4e8, #edf8ff);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 25, 48, 0.92);
  font-weight: 900;
  pointer-events: none;
  transition: 0.2s ease;
}

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

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

@keyframes certIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.9);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

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

@keyframes chargeSweep {
  to {
    transform: translateX(120%);
  }
}

@media (max-width: 960px) {
  body {
    background: linear-gradient(180deg, #07152c 0%, #102a4c 58%, #eef7ff 58%);
  }

  .app {
    grid-template-columns: 1fr;
  }

  .phone-shell {
    width: min(440px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .app {
    width: min(100% - 14px, 1180px);
    padding-top: 8px;
  }

  .mission-screen {
    min-height: 100vh;
  }

  .mission-card,
  .certificate-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 18px;
  }

  h1 {
    font-size: 30px;
  }

  .form-grid,
  .checks,
  .award-grid,
  .cert-badges {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    display: grid;
  }
}

@media (max-width: 560px) {
  html,
  body.kid-mode {
    width: 100%;
    min-height: 100svh;
    overflow-x: hidden;
    background:
      radial-gradient(circle at 18% 8%, rgba(255, 216, 181, 0.36), transparent 28%),
      radial-gradient(circle at 82% 12%, rgba(193, 228, 219, 0.32), transparent 30%),
      linear-gradient(180deg, #fffdf7 0%, #fff6e8 62%, #f6eddc 100%);
  }

  body.kid-mode .app {
    width: 100vw !important;
    max-width: none;
    min-height: 100svh;
    margin: 0;
    padding: 0 !important;
  }

  body.kid-mode .phone-shell {
    width: 100vw !important;
    min-height: 100svh;
    margin: 0;
    padding: 0;
    border-radius: 0;
  }

  body.kid-mode .mission-screen {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    border-radius: 0;
  }

  body.kid-mode .mission-bg {
    object-position: center top;
  }

  body.kid-mode .stage-character {
    top: max(22px, env(safe-area-inset-top));
  }

  body.kid-mode .stage-character img {
    width: min(150px, 40vw);
    height: min(150px, 40vw);
    object-fit: contain;
  }

  body.kid-mode .stage-character span {
    padding: 6px 10px;
    font-size: 12px;
  }

  body.kid-mode .mission-card {
    left: 12px;
    right: 12px;
    top: 286px;
    bottom: auto;
    max-height: calc(100svh - 304px);
    padding: 16px;
    border-radius: 22px;
    overflow-y: auto;
  }

  body.kid-mode .yuan-guide {
    margin-bottom: 10px;
    padding: 6px 9px 6px 6px;
    font-size: 12px;
  }

  body.kid-mode .yuan-guide img {
    width: 34px;
    height: 34px;
    object-fit: contain;
  }

  body.kid-mode .signal {
    margin-bottom: 9px;
    font-size: 12px;
  }

  body.kid-mode h1 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.12;
  }

  body.kid-mode h2 {
    font-size: clamp(28px, 7vw, 36px);
    line-height: 1.18;
  }

  body.kid-mode .mission-card p:not(.signal):not(.small-tip) {
    font-size: 15px;
    line-height: 1.62;
  }

  body.kid-mode .mission-list {
    gap: 8px;
  }

  body.kid-mode .mission-list span {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
  }

  body.kid-mode .energy-ring {
    width: min(174px, 48vw);
    height: min(174px, 48vw);
    margin: 4px auto 14px;
  }

  body.kid-mode .reward-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.kid-mode .reward-item {
    grid-template-columns: 48px 1fr;
    justify-items: stretch;
    text-align: left;
    gap: 10px;
    padding: 12px;
    border-radius: 17px;
  }

  body.kid-mode .reward-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  body.kid-mode .reward-item strong {
    font-size: 15px;
  }

  body.kid-mode .reward-item p {
    font-size: 13px;
  }

  body.kid-mode .certificate-card {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw;
    height: 100svh;
    max-height: none;
    padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    border-radius: 0;
    overflow-y: auto;
  }

  body.kid-mode .cert-frame {
    inset: 12px;
    border-radius: 22px;
  }

  body.kid-mode .cert-crest {
    width: calc(100% - 20px);
    margin-top: 8px;
    border-radius: 18px;
  }

  body.kid-mode .cert-hero-art {
    object-position: center;
  }

  body.kid-mode .cert-title-block p {
    font-size: 13px;
  }

  body.kid-mode .cert-title-block h2 {
    font-size: clamp(34px, 9vw, 46px);
  }

  body.kid-mode .cert-title-block span {
    margin-top: 7px;
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  body.kid-mode .cert-top span {
    font-size: 15px;
  }

  body.kid-mode .yfd-logo {
    gap: 6px;
    font-size: 15px;
  }

  body.kid-mode .yfd-logo img {
    width: 30px;
    height: 30px;
  }

  body.kid-mode .cert-no {
    display: none;
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 1px;
  }

  body.kid-mode .cert-label {
    margin-top: 10px;
    font-size: 12px;
  }

  body.kid-mode .cert-award {
    margin: 12px auto 11px;
    padding: 8px 14px;
    font-size: 14px;
  }

  body.kid-mode .certificate-card h3 {
    margin: 5px 0 8px;
    font-size: clamp(42px, 11vw, 56px);
  }

  body.kid-mode .cert-copy {
    padding: 0 6px;
    font-size: 14px;
    line-height: 1.55;
  }

  body.kid-mode .cert-badges {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 14px;
  }

  body.kid-mode .cert-badges span {
    min-height: 38px;
    padding: 8px;
    font-size: 12px;
  }

  body.kid-mode .reward-summary {
    margin: 12px 0 14px;
    padding: 12px;
    gap: 8px;
  }

  body.kid-mode .reward-summary strong,
  body.kid-mode .reward-summary span,
  body.kid-mode .cert-footer {
    font-size: 13px;
  }

  body.kid-mode .cert-section-title {
    margin: 12px auto 9px;
    font-size: 12px;
  }

  body.kid-mode .cert-footer {
    margin-bottom: 12px;
  }

  body.kid-mode .certificate-card > .secondary-btn {
    min-height: 44px;
    min-width: 168px;
    font-size: 15px;
  }
}
