* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #f3cf9c url(img/bg_home.webp) center 70% / cover no-repeat;
  color: #3b1d0a;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
body.egg { background: radial-gradient(130% 85% at 50% 105%, #ffb15a 0%, #e0566a 28%, #6a2266 52%, #2a1150 74%, #160a30 100%); background-color: #241046; }
button { font-family: inherit; cursor: pointer; }
#app {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
}
header { width: 100%; max-width: 1000px; display: flex; align-items: center; gap: 10px; z-index: 5; }
h1 {
  flex: 1; margin: 0; font-size: clamp(22px, 4.6vw, 38px); letter-spacing: 1px; color: #fff; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 0 #7a2e00, 0 -2px 0 #7a2e00, 2px 0 0 #7a2e00, -2px 0 0 #7a2e00, 0 4px 8px rgba(0,0,0,.35);
}
.pill {
  display: flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 14px; font-weight: 900; white-space: nowrap;
  font-size: clamp(18px, 3.6vw, 28px); background: #fff; color: #7a2e00; box-shadow: 0 4px 0 rgba(0,0,0,.25);
}
.pill small { font-size: .6em; }
.pill.lv { background: #ffd34d; box-shadow: 0 4px 0 #c98a00; }
.pill.en { background: #3b2a8a; color: #fff6b0; box-shadow: 0 4px 0 #1d1250; }
.pill.hit { background: rgba(0,0,0,.55); color: #fff; box-shadow: none; }
.pop { animation: pop .5s ease-out 2; }
@keyframes pop { 50% { transform: scale(1.3); } }
#lock { width: 48px; height: 48px; border: 0; background: rgba(255,255,255,.35); border-radius: 50%; padding: 4px; flex: none; }
#lock svg { width: 100%; height: 100%; display: block; }
#growth { width: min(640px, 100%); display: flex; align-items: center; gap: 10px; margin-top: 8px; z-index: 5; }
#stageName { background: #e8492f; color: #fff; font-weight: 900; border-radius: 12px; padding: 3px 10px; font-size: clamp(15px, 3vw, 20px); white-space: nowrap; box-shadow: 0 3px 0 #8a2416; }
#gBar { flex: 1; height: 26px; background: rgba(60,20,0,.35); border-radius: 999px; position: relative; overflow: hidden; border: 2px solid #fff; }
#gFill { height: 100%; width: 0; background: linear-gradient(90deg, #ffe066, #ff8a3d); transition: width .6s; }
#gText { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; color: #fff; text-shadow: 0 1px 2px #000; }

#stage { position: relative; flex: 1; width: 100%; max-width: 1000px; min-height: 0; }
.layer { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
#eggWrap { align-items: center; }
#eggWrap svg { width: min(100%, 520px); height: 100%; overflow: visible; }
#eggMove { width: 100%; height: 100%; display: flex; justify-content: center; transform-origin: 50% 88%; }
#eggMove.breathe { animation: breathe 2.4s ease-in-out infinite; }
#eggMove.shake { animation: shake .13s linear infinite; }
@keyframes breathe { 50% { transform: scale(1.03, .975); } }
@keyframes shake { 0% { transform: translate(-4px,0) rotate(-3deg); } 50% { transform: translate(4px,0) rotate(3deg); } 100% { transform: translate(-4px,0) rotate(-3deg); } }
.crack { stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset .35s ease-out; }
.crack.on { stroke-dashoffset: 0; }
#topPiece { transform-box: fill-box; transform-origin: 50% 80%; }
#topPiece.flyoff { animation: flyoff .9s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes flyoff { to { transform: translate(-90px,-190px) rotate(-70deg); opacity: 0; } }
#hint { position: absolute; left: 50%; top: 58%; font-size: 64px; pointer-events: none; animation: hint 1s ease-in-out infinite; }
@keyframes hint { 0%,100% { transform: translate(-10%, 0); } 50% { transform: translate(-10%, -16px); } }

#dragonScale { height: 100%; aspect-ratio: 400 / 380; max-width: 100%; transform-origin: 50% 96%; transition: transform .8s cubic-bezier(.3,1.5,.5,1); }
#dragonMove, #dragonAct { width: 100%; height: 100%; transform-origin: 50% 90%; }
#dragonMove { animation: bob 2.3s ease-in-out infinite; }
#dragonMove.sleepy { animation-duration: 4.5s; }
@keyframes bob { 50% { transform: translateY(-6px) scale(1.01, .99); } }
#dragonSvg { width: 100%; height: 100%; overflow: visible; display: block; }
.glow { animation: glow 2s ease-in-out infinite; }
@keyframes glow { 0%,100% { opacity: .45; } 50% { opacity: .95; } }
.wingL path, .wingR path { transform-box: fill-box; animation: flapL 1.3s ease-in-out infinite; }
.wingL path { transform-origin: 100% 100%; }
.wingR path { transform-origin: 0% 100%; animation-name: flapR; }
@keyframes flapL { 50% { transform: rotate(-14deg); } }
@keyframes flapR { 50% { transform: rotate(14deg); } }
#eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.2s infinite; }
@keyframes blink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
.flicker { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .45s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scale(1,1); } to { transform: scale(.82,1.2); } }

#bunny { position: absolute; left: 0; bottom: 0; width: clamp(80px, 15vw, 130px); z-index: 4; cursor: pointer; }
#bunny svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
#zzz { position: absolute; left: 60%; top: 18%; font-size: 54px; animation: zz 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes zz { 0% { transform: translate(0,0) scale(.7); opacity: 0; } 40% { opacity: 1; } 100% { transform: translate(40px,-60px) scale(1.2); opacity: 0; } }
#fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 6; }
.fx { position: absolute; left: 0; top: 0; font-size: 42px; line-height: 1; will-change: transform, opacity; pointer-events: none; }
#bubble, #rBubble {
  position: absolute; left: 50%; top: 2%; transform: translateX(-50%); background: #fff; color: #5a2200; font-weight: 900;
  font-size: clamp(19px, 4vw, 30px); padding: 10px 20px; border-radius: 22px; box-shadow: 0 5px 0 rgba(0,0,0,.2);
  opacity: 0; transition: opacity .25s; z-index: 7; pointer-events: none; max-width: 92%; text-align: center;
}
#bubble.show, #rBubble.show { opacity: 1; }

#controls { width: 100%; max-width: 860px; z-index: 5; display: flex; flex-direction: column; gap: 10px; align-items: center; }
#care { display: flex; gap: clamp(10px, 3vw, 30px); justify-content: center; }
.act {
  position: relative; width: clamp(92px, 21vw, 138px); height: clamp(92px, 21vw, 138px); border: 0; border-radius: 30px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #5a2200; font-weight: 900;
  box-shadow: 0 7px 0 rgba(0,0,0,.28); padding: 0;
}
.act i { font-style: normal; font-size: clamp(38px, 9vw, 58px); line-height: 1; }
.act span { font-size: clamp(16px, 3.6vw, 22px); margin-top: 4px; }
.act em { position: absolute; top: -8px; right: -8px; font-style: normal; font-size: 14px; background: #3b2a8a; color: #fff6b0; border-radius: 999px; padding: 2px 8px; }
.act em.free { background: #2fa84f; color: #fff; }
.act:active, .mbtn:active, .big:active, .sk:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.28); }
#feed { background: #ffd166; } #bath { background: #8fd3ff; color: #0b3a5c; } #pet { background: #ffb3c7; color: #6b1230; }
#menu { display: flex; gap: clamp(6px, 2vw, 16px); justify-content: center; flex-wrap: wrap; }
.mbtn {
  position: relative; border: 0; border-radius: 20px; background: rgba(255,255,255,.92); color: #5a2200; font-weight: 900;
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: clamp(15px, 3.2vw, 20px); box-shadow: 0 5px 0 rgba(0,0,0,.22);
}
.mbtn i { font-style: normal; font-size: 1.5em; }
.mbtn b { background: #e8492f; color: #fff; border-radius: 999px; padding: 0 8px; font-size: .85em; }
.mbtn.ready { background: linear-gradient(135deg, #ff8a3d, #e8492f); color: #fff; animation: pop 1s ease-in-out infinite; }
.mbtn.ready b { background: #fff; color: #e8492f; }

/* 全屏层 */
.ov { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; padding: max(10px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); background: #fff3e0; overflow: hidden; }
.ov.dark { background: radial-gradient(120% 90% at 50% 30%, #3a1838 0%, #1a0b20 60%, #0b0510 100%); color: #fff; }
.ov.black { background: #000; color: #fff; justify-content: center; }
.ov.arena { background: #f4a46a url(img/bg_sky.webp) center 60% / cover no-repeat; color: #fff; }
.ov.night { background: linear-gradient(#0e0b2e, #2a1150); color: #fff; justify-content: center; gap: 10px; }
.ov.parent { background: rgba(20,10,30,.72); justify-content: center; z-index: 40; overflow-y: auto; }
.ovTop { width: 100%; max-width: 1000px; display: flex; align-items: center; gap: 12px; z-index: 3; }
.ovTop h2 { flex: 1; margin: 0; font-size: clamp(22px, 4.6vw, 34px); }
.back { width: 56px; height: 56px; border: 0; border-radius: 18px; background: #fff; color: #5a2200; font-size: 30px; font-weight: 900; box-shadow: 0 5px 0 rgba(0,0,0,.25); flex: none; }
.back.wide { width: auto; padding: 0 16px; font-size: clamp(17px, 3.4vw, 22px); }
.ov.arena .ovTop { justify-content: space-between; }
.big { border: 0; border-radius: 22px; font-size: clamp(20px, 4.2vw, 30px); font-weight: 900; padding: 14px 26px; box-shadow: 0 6px 0 rgba(0,0,0,.3); }
.big.gold { background: #ffd34d; color: #6a2a00; }
.big.fire { background: linear-gradient(135deg, #ffb13d, #e8492f); color: #fff; animation: pop 1.2s ease-in-out infinite; }
.big.soft { background: rgba(255,255,255,.18); color: #fff; box-shadow: none; }
.big:disabled { opacity: .45; animation: none; }

/* 教小火龙 */
#teach { background: #fff3e0 url(img/bg_home.webp) center / cover; }
#teach::before { content: ""; position: absolute; inset: 0; background: rgba(255,246,230,.82); }
#tBody { position: relative; flex: 1; width: 100%; max-width: 900px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; }
.dots { display: flex; gap: 6px; position: relative; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: #e6d3bb; }
.dots i.on { background: #2fa84f; }
#tQ { display: flex; gap: clamp(8px, 2vw, 20px); align-items: center; font-size: clamp(56px, 13vw, 120px); font-weight: 900; color: #5a2200; }
#tAns { min-width: 1.2em; text-align: center; border-bottom: 6px solid #e8492f; color: #e8492f; }
#tHelp { min-height: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: clamp(22px, 4.4vw, 34px); max-width: 100%; }
#tHelp span { letter-spacing: -2px; }
#tHelp .gone { opacity: .25; text-decoration: line-through; }
#tChoices { display: flex; gap: clamp(14px, 4vw, 36px); }
#tChoices button { width: clamp(96px, 22vw, 150px); height: clamp(96px, 22vw, 150px); border: 0; border-radius: 30px; font-size: clamp(46px, 10vw, 76px); font-weight: 900; background: #ffd166; color: #5a2200; box-shadow: 0 8px 0 rgba(0,0,0,.25); }
#tChoices button.ok { background: #2fa84f; color: #fff; }
#tChoices button.no { background: #ddd; color: #999; }
#tSay { font-size: clamp(18px, 3.6vw, 26px); font-weight: 800; color: #8a4a1a; min-height: 1.5em; text-align: center; }

/* 机甲零件 */
#pBody { flex: 1; width: 100%; max-width: 1000px; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; min-height: 0; }
#pRobot { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; }
#pRobot svg { height: 100%; max-width: 100%; overflow: visible; }
#pGlow { position: absolute; inset: 10% 25%; background: radial-gradient(closest-side, rgba(255,140,40,.35), rgba(255,140,40,0)); pointer-events: none; }
#pSlots { display: flex; gap: clamp(6px, 2vw, 14px); justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.slot { width: clamp(62px, 15vw, 96px); text-align: center; font-size: clamp(13px, 2.8vw, 16px); font-weight: 800; color: #c9b8d6; }
.slot .ic { width: 100%; aspect-ratio: 1; border-radius: 18px; border: 3px dashed #6a4a7a; background: rgba(255,255,255,.06) no-repeat; display: flex; align-items: center; justify-content: center; font-size: 32px; color: #6a4a7a; overflow: hidden; }
.slot.got { color: #ffd34d; }
.slot.got .ic { border: 3px solid #ffd34d; background-color: rgba(255,200,80,.15); box-shadow: 0 0 16px rgba(255,170,60,.6); }
#pMsg { min-height: 1.6em; font-size: clamp(17px, 3.4vw, 24px); font-weight: 800; text-align: center; color: #ffe9b8; margin: 8px 0; }
#pBtns { display: flex; gap: 14px; }

/* 变身动画 */
#tfRays { position: absolute; left: 50%; top: 50%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255,190,80,.5) 0deg 8deg, rgba(255,190,80,0) 8deg 20deg); border-radius: 50%; }
#tfRays.on { opacity: 1; transition: opacity .6s; animation: spin 12s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#tfDragon { position: absolute; left: 50%; top: 50%; width: min(60vw, 46vh); aspect-ratio: 400 / 380; transform: translate(-50%, -50%); }
#tfDragon svg { width: 100%; height: 100%; overflow: visible; }
#tfParts { position: absolute; inset: 0; pointer-events: none; }
#tfParts .tp { position: absolute; left: 50%; top: 50%; width: min(26vw, 20vh); aspect-ratio: 1; margin: calc(min(26vw, 20vh) / -2) 0 0 calc(min(26vw, 20vh) / -2); border-radius: 20px; background-repeat: no-repeat; filter: drop-shadow(0 0 14px #ffb13d); }
#tfRobot { position: absolute; left: 50%; top: 52%; height: min(86vh, 130vw); max-width: 96vw; object-fit: contain; transform: translate(-50%, -50%) scale(.2); opacity: 0; filter: drop-shadow(0 0 30px rgba(255,140,40,.9)); }
#tfTitle { position: absolute; left: 0; right: 0; bottom: 10%; text-align: center; font-size: clamp(34px, 8vw, 72px); font-weight: 900; color: #fff;
  text-shadow: 0 0 20px #ff7a00, 0 4px 0 #8a2416; opacity: 0; letter-spacing: 3px; }
#tfGo { position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); right: 20px; }

/* 训练场 */
#field { position: relative; flex: 1; width: 100%; max-width: 1200px; min-height: 0; }
#robotBox { position: absolute; left: 2%; bottom: 0; height: 84%; aspect-ratio: 760 / 1014; max-width: 52%; transition: transform 1.1s cubic-bezier(.4,0,.2,1); z-index: 2; }
#robotBox.flying { transform: translateY(-18%); }
#robotImg { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 10px 16px rgba(0,0,0,.45)); animation: hover 3s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-1.2%); } }
#robotBox.shake { animation: rshake .1s linear 6; }
@keyframes rshake { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-6px); } }
#robotBox.flying.shake { animation: none; }
#jets { position: absolute; left: 25%; right: 25%; bottom: -14%; height: 22%; display: flex; justify-content: space-between; opacity: 0; transition: opacity .4s; }
#robotBox.flying #jets { opacity: 1; }
#jets i { width: 26%; height: 100%; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: radial-gradient(ellipse at 50% 10%, #fff 0%, #ffe066 25%, #ff7a00 55%, rgba(255,60,0,0) 75%); animation: jet .12s linear infinite alternate; }
@keyframes jet { to { transform: scaleY(.8); opacity: .8; } }
#bodyFire { position: absolute; inset: 0; pointer-events: none; }
#targets { position: absolute; inset: 0; z-index: 1; }
.tg { position: absolute; width: clamp(64px, 11vw, 120px); transform-origin: 50% 100%; transition: opacity .3s; }
.tg svg { width: 100%; height: auto; display: block; }
#rfx { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: visible; }
.bolt { position: absolute; left: 0; top: 0; width: 34px; height: 10px; margin: -5px 0 0 -17px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,240,150,0), #fff6a0 40%, #fff); box-shadow: 0 0 10px #ffb13d, 0 0 20px #ff7a00; }
.needle { position: absolute; left: 0; top: 0; width: 46px; height: 10px; margin: -5px 0 0 -23px; background: linear-gradient(90deg, rgba(80,255,120,0), #7dff6a 50%, #eaffd8); clip-path: polygon(0 30%, 75% 30%, 100% 50%, 75% 70%, 0 70%); filter: drop-shadow(0 0 6px #3cff5a); }
.rocket { position: absolute; left: 0; top: 0; font-size: 40px; margin: -20px 0 0 -20px; line-height: 1; }
.boom { position: absolute; left: 0; top: 0; width: 160px; height: 160px; margin: -80px 0 0 -80px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #ffe066 25%, #ff7a00 50%, rgba(255,60,0,0) 70%); }
.flame { position: absolute; left: 0; top: 0; width: 46px; height: 64px; margin: -56px 0 0 -23px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(ellipse at 50% 80%, #fff 0%, #ffe066 25%, #ff7a00 55%, rgba(255,40,0,0) 75%); mix-blend-mode: screen; }
#skills { display: flex; gap: clamp(6px, 2vw, 18px); justify-content: center; z-index: 4; flex-wrap: wrap; }
.sk { border: 0; border-radius: 24px; width: clamp(76px, 17vw, 120px); height: clamp(76px, 17vw, 120px); background: rgba(30,10,20,.78); color: #fff; font-weight: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 0 rgba(0,0,0,.4); border: 3px solid #ffb13d; padding: 0; }
.sk i { font-style: normal; font-size: clamp(32px, 7vw, 50px); line-height: 1; }
.sk span { font-size: clamp(14px, 3vw, 19px); margin-top: 4px; }
.sk.on { background: #e8492f; }
#rBubble { top: 70px; }

/* 图鉴 */
#dexGrid { flex: 1; width: 100%; max-width: 980px; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(100px, 22vw, 150px), 1fr)); gap: 12px; align-content: start; overflow-y: auto; padding: 12px 4px; }
.dx { position: relative; background: #fff; border-radius: 22px; box-shadow: 0 5px 0 rgba(0,0,0,.15); padding: 8px; text-align: center; border: 0; color: #5a2200; font-weight: 900; font-size: clamp(14px, 3vw, 18px); }
.dx .pic { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.dx .pic img, .dx .pic svg { max-width: 88%; max-height: 88%; }
.dx.lockd .pic img { filter: brightness(0) opacity(.55); }
.dx.lockd .q { position: absolute; left: 0; right: 0; top: 28%; font-size: 44px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.dx.next { outline: 4px solid #ffb13d; }
.dx .tag { display: inline-block; margin-top: 4px; background: #ffb13d; color: #fff; border-radius: 999px; padding: 0 8px; font-size: .8em; }
#dexNote { font-size: clamp(15px, 3vw, 19px); font-weight: 700; color: #8a4a1a; text-align: center; padding: 6px; }

/* 睡觉 */
#sleepDragon { width: min(70vw, 50vh); aspect-ratio: 400 / 380; }
#sleepDragon svg { width: 100%; height: 100%; overflow: visible; }
#sleepText { font-size: clamp(28px, 6vw, 48px); font-weight: 900; }
#sleepSub { font-size: clamp(18px, 3.8vw, 26px); opacity: .85; text-align: center; padding: 0 10px; }
.ov.night .mstar { position: absolute; width: 3px; height: 3px; background: #fff; border-radius: 50%; animation: glow 2.6s ease-in-out infinite; }

/* 家长 */
.card { background: #fff; color: #3b1d0a; border-radius: 26px; padding: 20px; width: min(440px, 94vw); text-align: center; margin: auto; }
.card.wide { width: min(760px, 96vw); text-align: left; }
.card h3 { margin: 0 0 6px; font-size: 24px; }
.card .q { font-size: 34px; font-weight: 900; margin: 10px 0; text-align: center; }
.gateIn { font-size: 34px; font-weight: 900; min-height: 48px; border-bottom: 3px solid #ddd; margin: 0 auto 12px; width: 60%; text-align: center; letter-spacing: 4px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pad button { height: 58px; border: 0; border-radius: 14px; background: #f1ebe4; font-size: 26px; font-weight: 800; color: #3b1d0a; }
.ghost { border: 0; background: #f1ebe4; color: #3b1d0a; border-radius: 14px; padding: 10px 18px; font-size: 17px; font-weight: 800; }
.ghost.sm { padding: 6px 12px; font-size: 15px; }
.ghost.danger { color: #b3261e; }
.phead { display: flex; align-items: center; gap: 10px; }
.phead h3 { flex: 1; }
#parentDone { background: #e8492f; color: #fff; }
.tip { font-size: 14px; color: #7a6a5a; margin: 4px 0 12px; }
#tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.task { border: 0; border-radius: 18px; padding: 12px 10px; background: #fff3d6; color: #5a2200; font-size: 18px; font-weight: 900; text-align: left; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 0 #e8cfa4; }
.task i { font-style: normal; font-size: 28px; }
.task small { display: block; font-size: 12px; font-weight: 600; color: #8a6a4a; }
.task.done { background: #e6f5e9; box-shadow: 0 4px 0 #b9dfc1; color: #2a6a3a; }
.task.just { animation: pop .4s; }
#queued { margin: 12px 0 4px; font-size: 15px; font-weight: 800; color: #2a6a3a; min-height: 1.3em; }
details { margin-top: 10px; border-top: 1px solid #eee; padding-top: 8px; }
summary { font-weight: 800; font-size: 16px; cursor: pointer; padding: 6px 0; }
.set label { display: block; margin: 10px 0; font-weight: 700; }
.set input, .set select { font-size: 17px; padding: 6px 10px; border-radius: 10px; border: 1px solid #ccc; margin-left: 6px; }
.log { font-size: 13px; color: #7a6a5a; line-height: 1.6; }
.tiny { font-size: 12px; color: #9a8a7a; }
.row { display: flex; gap: 12px; justify-content: center; align-items: center; }

#flash { position: fixed; inset: 0; background: radial-gradient(circle, #fff 0%, #fff7c2 40%, rgba(255,200,90,0) 75%); opacity: 0; pointer-events: none; z-index: 60; }
#toast { position: fixed; left: 50%; bottom: 18%; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 10px 18px; border-radius: 14px; font-weight: 800; font-size: 17px; opacity: 0; transition: opacity .3s; z-index: 70; pointer-events: none; text-align: center; max-width: 90vw; }
#toast.show { opacity: 1; }

@media (orientation: landscape) and (max-height: 560px) {
  .act { width: 80px; height: 80px; border-radius: 22px; } .act i { font-size: 34px; } .act span { font-size: 14px; }
  #menu .mbtn { padding: 5px 10px; font-size: 14px; }
  #controls { gap: 6px; }
}
