/* 横屏固定画布：100vw × 100vh，无滚动。所有尺寸用 rem，根字号随屏幕缩放 */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
html { font-size: min(1.6vw, 2.2vh); height: 100%; overflow: hidden; }
body { position: fixed; inset: 0; overflow: hidden; touch-action: none; overscroll-behavior: none;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: linear-gradient(180deg, #bfe9ff 0%, #e6f7ff 55%, #d9f5c8 100%); color: #3b3355; }
button { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; touch-action: none; }
#app { position: fixed; inset: 0; }

/* ---------- 顶部状态栏 ---------- */
#topbar { position: fixed; top: 16px; left: 24px; right: 24px; height: 64px; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 0 12px 0 20px;
  border-radius: 32px; background: rgba(255,255,255,.62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(80,120,160,.18), inset 0 1px 0 rgba(255,255,255,.9); transition: background 1.5s; }
body.warn #topbar { background: rgba(255,196,130,.85); }
.tb-left, .tb-right { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.tb-right { justify-content: flex-end; }
#mod-icon { font-size: 34px; }
#stars { display: flex; gap: 6px; }
#stars i { font-style: normal; font-size: 28px; filter: grayscale(1) opacity(.3); transition: filter .3s, transform .4s cubic-bezier(.34,1.56,.64,1); }
#stars i.on { filter: none; transform: scale(1.25); }
#moonbar { flex: 1; height: 18px; border-radius: 9px; background: rgba(90,110,160,.16); position: relative; }
#moonfill { height: 100%; width: 100%; border-radius: 9px; background: linear-gradient(90deg, #a6c8ff, #ffe89a); transition: width 1s linear; }
body.warn #moonfill { background: linear-gradient(90deg, #ff9d5c, #ffd27a); }
#moon { position: absolute; top: 50%; left: 100%; transform: translate(-50%, -50%); font-size: 30px; transition: left 1s linear; }
.round-btn { width: 56px; height: 56px; border-radius: 50%; font-size: 30px; background: #fff; box-shadow: 0 4px 0 #d5dcef, 0 6px 12px rgba(0,0,0,.12); }
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d5dcef; }
.parent-lock { width: 44px; height: 44px; font-size: 20px; opacity: .22; border-radius: 50%; filter: grayscale(1); }
.parent-lock.holding { opacity: .7; animation: hold 2s linear; }
@keyframes hold { to { box-shadow: 0 0 0 10px rgba(120,120,160,.35); } }
body:not([data-screen="play"]) #home-btn, body:not([data-screen="play"]) .tb-left > * { visibility: hidden; }
body[data-screen="boot"] #topbar, body[data-screen="start"] #topbar, body[data-screen="lock"] #topbar { display: none; }

/* ---------- 大厅 ---------- */
#hub { position: fixed; top: 100px; bottom: 116px; left: 40px; right: 40px; display: none; grid-template-columns: 1fr 1.1fr 1fr; gap: 2rem; align-items: stretch; }
body[data-screen="hub"] #hub { display: grid; }
.hub-col { display: flex; flex-direction: column; gap: 1.6rem; justify-content: center; }
.mod-card { flex: 1; max-height: 13rem; border-radius: 2.6rem; background: linear-gradient(160deg, var(--a), var(--b)); position: relative;
  box-shadow: 0 .6rem 0 rgba(0,0,0,.14), 0 1.2rem 2rem rgba(60,80,120,.25), inset 0 .5rem .8rem rgba(255,255,255,.55), inset 0 -.6rem 1rem rgba(0,0,0,.1);
  transition: transform .15s; animation: floaty 4s ease-in-out infinite; }
.hub-col .mod-card:nth-child(2) { animation-delay: -2s; }
.mod-card::after { content: ""; position: absolute; left: 12%; top: 8%; width: 46%; height: 22%; border-radius: 50%; background: rgba(255,255,255,.4); filter: blur(4px); }
.mod-card:active { transform: scale(.94) translateY(.4rem); }
.mod-icon { font-size: 7rem; filter: drop-shadow(0 .4rem .3rem rgba(0,0,0,.2)); }
@keyframes floaty { 50% { transform: translateY(-.5rem); } }
.hub-pet { display: flex; align-items: center; justify-content: center; }
.pet { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.pet-body { position: relative; font-size: 13rem; line-height: 1.1; animation: breathe 3s ease-in-out infinite; filter: drop-shadow(0 1rem .8rem rgba(0,0,0,.18)); }
.pet.big .pet-body { font-size: 15rem; }
.gear { position: absolute; font-size: .42em; left: 50%; top: -6%; transform: translateX(-50%); }
.pet-lv { font-size: 1.6rem; letter-spacing: .2rem; min-height: 2rem; }
@keyframes breathe { 50% { transform: scale(1.05) translateY(-.4rem); } }
.jump { animation: jump .6s cubic-bezier(.34,1.56,.64,1) !important; }
@keyframes jump { 30% { transform: translateY(-2.2rem) scale(1.1, .92); } 60% { transform: translateY(0) scale(.94, 1.06); } }

/* ---------- 底部 Dock ---------- */
#dock { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%); z-index: 20; display: flex; gap: 24px; padding: 10px 26px; border-radius: 48px;
  background: rgba(255,255,255,.66); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 6px 20px rgba(80,120,160,.2); transition: transform .45s cubic-bezier(.34,1.3,.64,1); }
body[data-screen="hub"] #dock { transform: translate(-50%, 0); }
.dock-btn { width: 80px; height: 80px; font-size: 44px; border-radius: 26px; background: #fff; box-shadow: 0 5px 0 #d5dcef; }
.dock-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #d5dcef; }

/* ---------- 关卡画布 ---------- */
#stage-wrap { position: fixed; top: 96px; left: 32px; right: 32px; bottom: 28px; display: none; }
body[data-screen="play"] #stage-wrap { display: block; }
.stage { position: absolute; inset: 0; border-radius: 2.4rem; background: rgba(255,255,255,.42); box-shadow: inset 0 0 0 4px rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center; overflow: hidden; transition: background .8s; }
.stage.enter > * { animation: enter .8s cubic-bezier(.34,1.4,.64,1) backwards; }
@keyframes enter { from { opacity: 0; transform: translateY(3rem) scale(.8); } }
#npc { position: fixed; left: 40px; bottom: 36px; z-index: 15; width: 96px; height: 96px; border-radius: 50%; font-size: 60px; display: none;
  background: #fff; box-shadow: 0 5px 0 #d5dcef, 0 8px 16px rgba(0,0,0,.15); animation: breathe 3s ease-in-out infinite; }
body[data-screen="play"] #npc { display: block; }
#npc.cheer { animation: jump .5s 3; }
#npc::after { content: "🔊"; position: absolute; right: -6px; top: -6px; font-size: 24px; }

.art { display: inline-block; line-height: 1.15; pointer-events: none; }
img.art { width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: middle; }
.art.blob { width: 1em; height: 1em; border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75) 0 12%, transparent 30%), var(--c);
  box-shadow: inset 0 -.08em .12em rgba(0,0,0,.18), 0 .06em .1em rgba(0,0,0,.2); vertical-align: middle; }
.huge { font-size: 12rem; } .large { font-size: 8rem; } .mid { font-size: 5.2rem; }
.center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; }
.center-col.wide { width: 92%; height: 100%; justify-content: space-evenly; }
.card { background: #fff; border-radius: 2.2rem; box-shadow: 0 .5rem 0 #d9deee, 0 1rem 1.6rem rgba(60,80,120,.18); min-width: 80px; min-height: 80px;
  display: flex; align-items: center; justify-content: center; transition: transform .2s, box-shadow .2s, opacity .4s; }
.card:active { transform: scale(.95); }
.choice-row { display: flex; gap: 4rem; align-items: center; justify-content: center; }
.choice-row.small { gap: 2.4rem; }
.choice { padding: 1.4rem 2.4rem; }
.choice.food { padding: .8rem 1.4rem; }
.win { transform: scale(1.14); box-shadow: 0 0 0 .5rem #7be08a, 0 1rem 1.6rem rgba(60,160,90,.35); }
.grow { transform: scale(1.12); }
.glow { animation: glow 1s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 .6rem #ffd84d, 0 0 2.4rem #ffd84d; } }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { translate: -.8rem 0; rotate: -4deg; } 40%, 80% { translate: .8rem 0; rotate: 4deg; } }
.draggable { touch-action: none; cursor: grab; position: relative; z-index: 2; }
.dragging { z-index: 9; filter: drop-shadow(0 1rem 1rem rgba(0,0,0,.25)); }
.eaten { opacity: 0 !important; transition: opacity .35s .15s !important; pointer-events: none; }
.worn { pointer-events: none; }

/* 英语 */
.learn-item { cursor: pointer; transition: transform .5s, opacity .5s; filter: drop-shadow(0 1rem .8rem rgba(0,0,0,.18)); }
.learn-item.bite1 { -webkit-mask: radial-gradient(circle at 82% 26%, transparent 0 27%, #000 28%); mask: radial-gradient(circle at 82% 26%, transparent 0 27%, #000 28%); animation: nod .4s; }
.learn-item.bite2 { transform: scale(0) rotate(40deg); opacity: 0; }
.learn-item.bounce { animation: jump .6s; }
.learn-item.zoom-away { animation: spin-pop .9s forwards; }
@keyframes nod { 50% { transform: scale(.9) rotate(-6deg); } }
@keyframes spin-pop { 40% { transform: scale(1.3) rotate(12deg); } 100% { transform: scale(1) rotate(360deg); } }
.word-label { font-size: 3.4rem; font-weight: 800; color: #5b4bd6; background: #fff; padding: .3rem 2.2rem; border-radius: 2rem; box-shadow: 0 .4rem 0 #d9deee; letter-spacing: .1rem; }
.eater, .receiver { position: relative; transition: transform .3s; }
.eater .mouth { position: absolute; left: 50%; bottom: 8%; font-size: 3.4rem; transform: translateX(-50%); animation: chomp 1s infinite; }
@keyframes chomp { 50% { transform: translateX(-50%) scale(1.35, 1.6); } }
.eater.yum, .receiver.happy { animation: jump .6s 2; }

/* 数感 */
.count-num { position: absolute; top: 2%; left: 50%; transform: translateX(-50%); font-size: 8rem; font-weight: 900; color: #ff7a59; text-shadow: 0 .4rem 0 #fff, 0 .7rem 1rem rgba(0,0,0,.15); min-height: 9rem; }
.count-num.pop { animation: numpop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes numpop { from { transform: translateX(-50%) scale(.3); } }
.truck { position: absolute; left: 8%; top: 26%; display: flex; align-items: flex-end; transition: transform 1.6s ease-in; }
.truck .art { transform: scaleX(-1); }
.truck-bed { width: 15rem; min-height: 6rem; border: .5rem solid #c98a3b; border-top: 0; border-radius: 0 0 1.2rem 1.2rem; background: rgba(255,214,150,.6); display: flex; flex-wrap: wrap-reverse; align-content: flex-start; justify-content: center; font-size: 2rem; padding: .3rem; }
.truck.drive-off { transform: translateX(120vw); }
.stones { position: absolute; left: 4%; right: 4%; bottom: 3%; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 2.2rem; padding-left: 7rem; }
.stone { font-size: 4.8rem; min-width: 80px; min-height: 80px; line-height: 1; filter: drop-shadow(0 .4rem .3rem rgba(0,0,0,.2)); }
.size-row { display: flex; width: 100%; justify-content: space-around; align-items: flex-end; }
.size-col { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.size-col .sz.big { font-size: 9rem; } .size-col .sz.mid { font-size: 6.6rem; } .size-col .sz.small { font-size: 4.6rem; }
.slot { width: 9rem; height: 6.4rem; border: .35rem dashed #b9c3de; border-radius: 1.6rem; background: rgba(255,255,255,.5); }
.slot.filled { border-color: #7be08a; border-style: solid; }
.thing { min-width: 80px; min-height: 80px; display: flex; align-items: center; justify-content: center; line-height: 1; filter: drop-shadow(0 .4rem .3rem rgba(0,0,0,.2)); }
.thing.big { font-size: 6.2rem; } .thing.mid { font-size: 4.6rem; } .thing.small { font-size: 3.2rem; }
.bridge-wrap { position: relative; width: 94%; padding-top: 6rem; }
.bridge { display: flex; align-items: center; }
.plank { flex: 1; height: 2.6rem; background: repeating-linear-gradient(90deg, #c98a3b 0 2rem, #b3742c 2rem 2.2rem); border-radius: .5rem; }
.gap { width: 7.4rem; height: 7.4rem; }
.gap svg { stroke-dasharray: 6 5; stroke: #9aa5c4 !important; }
.gap.filled svg { opacity: 0; }
.bridge-car { position: absolute; left: 0; top: 0; font-size: 5.4rem; transform: scaleX(-1); transition: left 1.5s ease-in-out; }
.bridge-car.cross { left: calc(100% - 6rem); }
.tray { display: flex; gap: 3.5rem; }
.block { width: 7.4rem; height: 7.4rem; filter: drop-shadow(0 .5rem .4rem rgba(0,0,0,.22)); }

/* 科学 */
.scene-title { font-size: 7rem; position: relative; }
.flame-mini { position: absolute; right: -1.5rem; top: -1rem; font-size: 3.5rem; animation: flicker .5s infinite alternate; }
@keyframes flicker { to { transform: scale(1.2) rotate(6deg); } }
.scrub-area { position: relative; width: 82%; height: 88%; touch-action: none; }
.house { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 20rem; pointer-events: none; }
.flame, .germ { position: absolute; width: 6rem; height: 6rem; margin: -3rem 0 0 -3rem; font-size: 5rem; display: flex; align-items: center; justify-content: center; transition: transform .15s; pointer-events: none; }
.flame { animation: flicker .45s infinite alternate; }
.germ { animation: floaty 1.6s ease-in-out infinite; }
.fade { animation: fadeout .9s forwards !important; }
@keyframes fadeout { to { opacity: 0; transform: translateY(-2rem) scale(1.4); } }
.scrub-tool { position: absolute; font-size: 5rem; transform: translate(-50%, -60%); pointer-events: none; display: none; z-index: 6; }
.scrub-tool.on { display: block; }
.scrub-area.mouth { background: radial-gradient(ellipse at 50% 55%, #c2374f 0 38%, #ff8fa3 39%); border-radius: 42% 42% 46% 46%; border: .8rem solid #ff6f8a; }
.teeth { position: absolute; left: 9%; right: 9%; display: flex; gap: .5rem; pointer-events: none; }
.teeth.up { top: 6%; } .teeth.down { bottom: 6%; }
.teeth i { flex: 1; height: 5.4rem; background: #f3ecc8; border-radius: .4rem .4rem 1.4rem 1.4rem; box-shadow: inset 0 -.4rem .5rem rgba(0,0,0,.08); transition: background .6s; }
.teeth.down i { border-radius: 1.4rem 1.4rem .4rem .4rem; }
.mouth.clean .teeth i { background: #fff; box-shadow: 0 0 1.2rem #fff; }
.tlight { background: #2e3350; padding: .7rem; border-radius: 1.6rem; display: flex; gap: .7rem; }
.tlight i { width: 4rem; height: 4rem; border-radius: 50%; background: #555a78; }
.tlight.red .r { background: #ff4d4f; box-shadow: 0 0 2rem #ff4d4f; }
.tlight.green .g { background: #34c759; box-shadow: 0 0 2rem #34c759; }
.road { position: relative; width: 100%; height: 11rem; background: #6b7186; border-radius: 1rem; overflow: hidden;
  background-image: linear-gradient(90deg, #fff 60%, transparent 0); background-size: 5rem .5rem; background-repeat: repeat-x; background-position: 0 50%; }
.zebra { position: absolute; right: 24%; top: 0; bottom: 0; width: 3.4rem; background: repeating-linear-gradient(180deg, #fff 0 1rem, transparent 1rem 2rem); }
.road-car { position: absolute; top: 50%; left: -8%; margin-top: -4.2rem; font-size: 7rem; line-height: 1.2; transform: scaleX(-1); min-width: 80px; }
.road-car.driving { animation: drive 4.5s linear infinite; }
@keyframes drive { from { left: -10%; } to { left: 58%; } }
.road-car.waiting { left: 52%; }
.road-car.go { left: 112%; transition: left 1.2s ease-in; }
.sky { display: flex; gap: 2.6rem; }
.weather-btn { width: 8rem; height: 8rem; font-size: 4.6rem; }
.stage.wx-sun { background: linear-gradient(180deg, #ffe9a8, #fff6d9); }
.stage.wx-rain { background: linear-gradient(180deg, #9fb4cf, #d5dfec); }
.stage.wx-snow { background: linear-gradient(180deg, #cfe3f7, #ffffff); }
.wx-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; animation: none !important; }
.wx-fx i { position: absolute; top: -12%; font-style: normal; font-size: 2rem; animation: fall 2.2s linear infinite; }
@keyframes fall { to { transform: translateY(70rem); } }

/* 游戏 */
.mem-grid { display: grid; grid-template-columns: repeat(var(--cols), auto); gap: 1.8rem 2.2rem; }
.mem-card { width: 10.5rem; height: 12rem; border-radius: 1.8rem; position: relative; font-size: 6.4rem; background: linear-gradient(160deg, #8fd3f4, #7a8cf0);
  box-shadow: 0 .5rem 0 rgba(0,0,0,.15), 0 1rem 1.4rem rgba(60,80,120,.2); transition: transform .3s, background .3s; }
.mem-card span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .2s; }
.mem-card .front { opacity: 0; } .mem-card .back { font-size: 4rem; opacity: .9; }
.mem-card.up { background: #fff; transform: rotateY(360deg); }
.mem-card.up .front { opacity: 1; } .mem-card.up .back { opacity: 0; }
.mem-card.matched { box-shadow: 0 0 0 .5rem #7be08a; animation: jump .5s; }
.pz-wrap { display: flex; align-items: center; justify-content: center; gap: 5rem; }
.pz-board { display: grid; background: rgba(255,255,255,.6); border-radius: 1rem; box-shadow: 0 0 0 .5rem #fff, 0 1rem 2rem rgba(0,0,0,.15); }
.pz-slot { overflow: hidden; outline: 2px dashed rgba(120,130,170,.5); outline-offset: -1px; }
.pz-slot .pz-piece { opacity: .2; filter: grayscale(1); box-shadow: none; border-radius: 0; }
.pz-board.done { animation: jump .6s; }
.pz-tray { display: grid; }
.pz-piece { position: relative; overflow: hidden; border-radius: .8rem; box-shadow: 0 .4rem .9rem rgba(0,0,0,.25); }
.pz-img { position: absolute; text-align: center; pointer-events: none; }
.shadow-row { display: flex; width: 100%; justify-content: space-around; align-items: center; }
.shadow-slot, .shadow-animal { font-size: 8.4rem; line-height: 1.15; min-width: 10rem; text-align: center; }
.shadow-slot span { filter: brightness(0); opacity: .4; transition: opacity .3s; }
.shadow-slot.filled span { opacity: 0; }
.shadow-animal { filter: drop-shadow(0 .5rem .4rem rgba(0,0,0,.2)); }

/* ---------- 反馈层 ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -4%; width: 1rem; height: 1.6rem; border-radius: .25rem; animation: drop 1.6s ease-in forwards; }
@keyframes drop { to { top: 108%; rotate: 720deg; } }
.hint-hand { position: fixed; z-index: 55; font-size: 4.4rem; pointer-events: none; transform: translate(-20%, 10%); animation: poke .8s ease-in-out infinite; }
@keyframes poke { 50% { transform: translate(-20%, 45%); } }
.chest { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(255,250,225,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chest-box { font-size: 16rem; animation: wobble 1s ease-in-out infinite; cursor: pointer; filter: drop-shadow(0 1.4rem 1rem rgba(0,0,0,.2)); }
.chest-box.open { animation: none; transform: scale(1.5) rotate(10deg); opacity: 0; transition: all .5s; }
@keyframes wobble { 25% { transform: rotate(-7deg) scale(1.05); } 75% { transform: rotate(7deg) scale(1.05); } }
.prizes { display: flex; gap: 3.5rem; align-items: center; animation: enter .6s cubic-bezier(.34,1.56,.64,1); }
.prize-food { font-size: 7rem; } .prize-food b { font-size: 3rem; color: #ff7a59; }

/* ---------- 贴纸册 / 勋章墙 / 宠物 ---------- */
#panel { position: fixed; inset: 0; z-index: 18; display: none; align-items: center; justify-content: center; background: rgba(60,70,110,.28); padding: 96px 40px 116px; }
#panel.open { display: flex; }
.panel-card { position: relative; width: 100%; height: 100%; background: #fffdf6; border-radius: 2.6rem; box-shadow: 0 1.4rem 3rem rgba(40,50,90,.3); padding: 1.6rem; display: flex; gap: 1.4rem; animation: enter .4s cubic-bezier(.34,1.4,.64,1); }
.panel-close { position: absolute; right: -14px; top: -14px; z-index: 2; font-size: 24px; }
.tabs { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.tab { width: 5.4rem; height: 5.4rem; min-width: 80px; min-height: 80px; font-size: 3rem; border-radius: 1.6rem; background: #eef1fa; opacity: .6; }
.tab.on { opacity: 1; background: #fff; box-shadow: 0 0 0 .3rem #ffc75f, 0 .5rem 1rem rgba(0,0,0,.12); }
.sticker-grid { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1.2rem; padding: 1.4rem; border-radius: 2rem; }
.sticker { font-size: 4.4rem; border-radius: 1.6rem; background: rgba(255,255,255,.55); border: .25rem dashed rgba(120,130,170,.35); filter: grayscale(1) opacity(.22); display: flex; align-items: center; justify-content: center; line-height: 1; }
.sticker.own { filter: drop-shadow(0 .3rem .2rem rgba(0,0,0,.2)); border: .3rem solid #fff; background: rgba(255,255,255,.85); }
.sticker.own.shiny, .sticker.big.shiny { background: linear-gradient(135deg, #fff7c2, #ffe0f3, #d6f0ff); animation: sparkle 1.6s ease-in-out infinite; }
@keyframes sparkle { 50% { box-shadow: 0 0 1.6rem #ffd84d, 0 0 .4rem #fff inset; filter: brightness(1.15) drop-shadow(0 0 .6rem #ffe36b); } }
.sticker.big { font-size: 8rem; width: 12rem; height: 12rem; filter: none; border: .4rem solid #fff; background: #fff; box-shadow: 0 .8rem 1.6rem rgba(0,0,0,.18); }
.badge-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 1.2rem 3rem; padding: 1rem 5rem; place-items: center; }
.badge { width: 8.4rem; height: 8.4rem; border-radius: 50%; font-size: 4.4rem; background: radial-gradient(circle at 35% 30%, #fff, #dfe4f2); box-shadow: 0 .4rem 0 #c9cfe2; filter: grayscale(1) opacity(.35); }
.badge.on { filter: none; background: radial-gradient(circle at 35% 30%, #fff8cf, #ffc93c); box-shadow: 0 .5rem 0 #e0a100, 0 .8rem 1.4rem rgba(224,161,0,.4); }
.badge.big { width: 12rem; height: 12rem; font-size: 6.4rem; display: flex; align-items: center; justify-content: center; }
.pet-card { align-items: center; justify-content: space-evenly; }
.pet-holder { position: relative; }
.heart { position: absolute; right: 0; top: 10%; font-size: 3.4rem; animation: fadeout 1.2s forwards; }
.pet-side { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.exp { width: 18rem; height: 2rem; border-radius: 1rem; background: #eceffa; overflow: hidden; }
.exp i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffc75f, #ff7a59); border-radius: 1rem; transition: width .5s; }
.food-count { font-size: 4rem; } .food-count b { font-size: 2.6rem; color: #ff7a59; margin-left: .4rem; }
.feed-btn { width: 11rem; height: 11rem; border-radius: 50%; font-size: 6rem; background: linear-gradient(160deg, #ffe08a, #ffb347); box-shadow: 0 .6rem 0 #e08a1e, 0 1rem 1.6rem rgba(224,138,30,.4); animation: breathe 2s infinite; }
.feed-btn:active { transform: translateY(.4rem); box-shadow: 0 .2rem 0 #e08a1e; }

/* ---------- 锁屏 / 开始 / 家长 ---------- */
#lock { position: fixed; inset: 0; z-index: 80; display: none; background: linear-gradient(180deg, #141b3c 0%, #2a2f66 60%, #454a8a 100%); }
body[data-screen="lock"] #lock { display: block; }
.night-sky i { position: absolute; font-style: normal; color: #fff7c9; font-size: 1.2rem; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; transform: scale(.6); } }
.night-moon { position: absolute; right: 12%; top: 10%; font-size: 9rem; filter: drop-shadow(0 0 2rem #ffeaa0); }
.sleepers { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); width: 34rem; }
.sleeper { font-size: 11rem; display: flex; justify-content: center; gap: 1rem; filter: brightness(.82); animation: breathe 4.5s ease-in-out infinite; }
.blanket { position: absolute; left: -1rem; right: -1rem; bottom: -2rem; height: 5.6rem; border-radius: 2.6rem 2.6rem 1.6rem 1.6rem; background: linear-gradient(180deg, #7f8fe0, #5a65b8); box-shadow: inset 0 .6rem 0 rgba(255,255,255,.2); animation: breathe 4.5s ease-in-out infinite; }
.zzz { position: absolute; right: 2rem; top: -3rem; font-size: 4rem; animation: zzz 3s ease-in-out infinite; }
@keyframes zzz { from { opacity: 0; transform: translate(0, 1rem) scale(.6); } 50% { opacity: 1; } to { opacity: 0; transform: translate(2rem, -3rem) scale(1.2); } }
#lock .parent-lock { position: absolute; right: 28px; top: 24px; opacity: .16; }
#start { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(255,255,255,.75), rgba(191,233,255,.9)); }
body[data-screen="start"] #start { display: flex; }
.start-btn { position: relative; width: 24rem; height: 24rem; border-radius: 50%; font-size: 13rem; background: linear-gradient(160deg, #fff3b0, #ffc75f);
  box-shadow: 0 1rem 0 #e39a1c, 0 2rem 3rem rgba(227,154,28,.45), inset 0 1rem 1.4rem rgba(255,255,255,.6); animation: breathe 2s ease-in-out infinite; }
.start-btn .wave { position: absolute; right: -1rem; top: 1rem; font-size: 6rem; animation: wave 1s ease-in-out infinite; transform-origin: 70% 80%; }
@keyframes wave { 50% { transform: rotate(24deg); } }
.start-btn .go { position: absolute; left: 50%; bottom: -1.6rem; transform: translateX(-50%); font-size: 3.4rem; background: #56c271; color: #fff; width: 6rem; height: 6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 .4rem 0 #3a9a55; }
#dim { position: fixed; inset: 0; z-index: 75; background: #141b3c; opacity: 0; pointer-events: none; transition: opacity 2.2s ease-in; }
#dim.on { opacity: 1; pointer-events: auto; }
#gate { position: fixed; inset: 0; z-index: 90; background: rgba(20,27,60,.6); display: flex; align-items: center; justify-content: center; }
.gate-card { background: #fff; border-radius: 24px; padding: 24px; width: 320px; text-align: center; font-size: 18px; }
.gate-out { height: 44px; margin: 12px 0; font-size: 30px; font-weight: 700; border-bottom: 2px solid #dde; }
.gate-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gate-key { height: 52px; border-radius: 12px; background: #eef1fa; font-size: 22px; touch-action: manipulation; }
#parent { position: fixed; inset: 0; z-index: 95; background: #f4f6fb; }
#parent iframe { width: 100%; height: 100%; border: 0; }
.parent-close { position: absolute; right: 16px; top: 12px; padding: 10px 22px; border-radius: 20px; background: #5b4bd6; color: #fff; font-size: 16px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
#rotate { position: fixed; inset: 0; z-index: 99; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #bfe9ff; font-size: 64px; }
#rotate p { font-size: 22px; }
@media (orientation: portrait) { #rotate { display: flex; } }
@media (prefers-reduced-motion: reduce) { .mod-card, .pet-body, #npc { animation: none; } }

/* 环保：爬山捡垃圾 */
.trail { position: relative; width: 94%; height: 94%; border-radius: 2rem; background: linear-gradient(180deg, #cdeeff 0 34%, #b9e6a0 34% 100%); overflow: hidden; }
.peak { position: absolute; left: 50%; top: -2%; transform: translateX(-50%); font-size: 15rem; opacity: .9; pointer-events: none; }
.tree { position: absolute; font-size: 7rem; pointer-events: none; }
.litter { position: absolute; width: 6rem; height: 6rem; min-width: 80px; min-height: 80px; margin: -3rem 0 0 -3rem; font-size: 4.4rem; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 .4rem .3rem rgba(0,0,0,.25)); }
.bin { position: absolute; right: 3%; bottom: 3%; font-size: 9rem; line-height: 1.1; }
.badge-grid { grid-template-columns: repeat(4, 1fr); padding: 1rem 3rem; }
.pz-wrap { padding-left: 5rem; }

/* 锁屏页信息区（给家长看）与测试角标 */
.lock-info { position: absolute; left: 50%; top: 7%; transform: translateX(-50%); text-align: center; color: #e8ecff; pointer-events: none; white-space: nowrap; }
.lock-clock { font-size: 7rem; font-weight: 200; letter-spacing: .3rem; line-height: 1.1; font-variant-numeric: tabular-nums; text-shadow: 0 0 2rem rgba(180,200,255,.35); }
.lock-why { font-size: 1.9rem; margin-top: .4rem; opacity: .9; }
.lock-count { font-size: 2.3rem; margin-top: 1rem; color: #ffe9a8; font-variant-numeric: tabular-nums; }
.lock-when { font-size: 1.5rem; margin-top: .3rem; opacity: .7; }
.lock-tip { font-size: max(1rem, 12px); margin-top: 1.4rem; opacity: .38; }
#test-badge { position: fixed; left: 8px; bottom: 6px; z-index: 97; padding: 3px 10px; border-radius: 10px; font-size: 12px; color: #fff; background: rgba(229,72,77,.82); pointer-events: none; }
