/* 共用样式。儿童产品，刻意只做明亮单主题。 */
:root {
  color-scheme: light;
  --bg: #EAF4FF; --card: #FFFFFF; --ink: #2D2B55; --ink-soft: #5E5C86; --line: #D8E2F4;
  --pink: #FF6FA5; --pink-deep: #D9497F; --sun: #FFB627; --sun-deep: #D99300; --mint: #1FBF9F; --mint-deep: #138F76;
  --ice: #4BA9F5; --lilac: #9B7BFF; --danger: #C2335F;
  --pink-soft: #FFE3EE; --sun-soft: #FFF1CC; --mint-soft: #D6F6EE; --ice-soft: #DCEFFF; --lilac-soft: #ECE5FF;
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ice); outline-offset: 2px; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.disp { font-weight: 800; letter-spacing: .02em; }

/* 弹层 */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(45, 43, 85, .5); display: grid; place-items: center; overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.sheet {
  background: var(--card); border-radius: 28px; padding: 24px 20px; width: min(400px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  animation: rise .35s cubic-bezier(.3, 1.4, .5, 1);
}
.sheet h2 { margin: 0; font-size: 26px; line-height: 1.25; text-wrap: balance; }
.sheet p { margin: 0; font-size: 18px; color: var(--ink); }
@keyframes rise { from { transform: translateY(30px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 10px 28px;
  border-radius: 18px; font-weight: 800; font-size: 20px; color: #fff; background: var(--pink); box-shadow: 0 4px 0 var(--pink-deep);
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pink-deep); }
.btn.mint { background: var(--mint); box-shadow: 0 4px 0 var(--mint-deep); }
.btn.sun { background: var(--sun); color: #4A3000; box-shadow: 0 4px 0 var(--sun-deep); }
.btn.ghost { background: var(--bg); color: var(--ink); box-shadow: none; font-weight: 600; font-size: 17px; }

.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 99px; font-size: 16px; max-width: calc(100% - 32px); text-align: center;
}
canvas#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
