/* ==========================================================
   魔法合成小镇 · mobile merge game
   原生 CSS，无框架；主色 #FF8A3D
   ========================================================== */
:root{
  --orange:#FF8A3D;
  --orange-deep:#E56E1B;
  --orange-soft:#FFB25E;
  --cream:#FFF6E4;
  --parch:#F4E2BE;
  --parch-deep:#E7CD9E;
  --green:#67BE43;
  --green-deep:#3F8E2C;
  --blue:#4FA9F5;
  --blue-deep:#257BC8;
  --gold:#FFC93C;
  --brown:#8A5A2B;
  --brown-deep:#633D17;
  --ink:#4A3217;
  --ink-soft:#7C5B31;
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-t:env(safe-area-inset-top,0px);
  --font:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;min-height:100%}
body{
  font-family:var(--font);
  color:var(--ink);
  background:#315f36;
  overscroll-behavior-y:none;
  -webkit-user-select:none;user-select:none;
  -webkit-touch-callout:none;
}
button{font-family:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0;outline:none;touch-action:manipulation}
input{font-family:inherit}
img{display:block;max-width:100%}
[hidden]{display:none !important}
.app{position:relative;z-index:1;width:100%;max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flow-root}

/* ================= 场景底图 ================= */
.bg{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.bg-sky{position:absolute;inset:0;background:linear-gradient(180deg,#84D3FF 0%,#C6EDFF 18%,#B9E3A2 36%,#79BA52 58%,#5A9B3B 100%)}
.bg-scene{
  position:absolute;left:0;right:0;top:0;height:min(38vh,310px);
  background:url("images/gen/scene-castle.jpg") center top / auto 100% no-repeat;
  filter:saturate(1.06) brightness(1.02);
  -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 70%,rgba(0,0,0,.72) 84%,transparent 100%);
  mask-image:linear-gradient(180deg,#000 0%,#000 70%,rgba(0,0,0,.72) 84%,transparent 100%);
}
.bg-sun{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 14%,rgba(255,247,190,.55),rgba(255,247,190,0) 38%)}
.bg-vignette{position:absolute;inset:0;background:
  linear-gradient(180deg,rgba(17,48,34,.26) 0%,rgba(17,48,34,0) 20%,rgba(17,48,34,0) 55%,rgba(22,55,30,.35) 100%),
  radial-gradient(ellipse at 50% 45%,rgba(0,0,0,0) 52%,rgba(10,35,20,.28) 100%);
}
.bg-motes{position:absolute;inset:0;overflow:hidden}
.bg-motes i{position:absolute;display:block;width:5px;height:5px;border-radius:50%;background:rgba(255,246,180,.8);box-shadow:0 0 8px rgba(255,240,160,.9);animation:moteFloat linear infinite}
@keyframes moteFloat{
  0%{transform:translate3d(0,20px,0) scale(.6);opacity:0}
  18%{opacity:.9}
  80%{opacity:.5}
  100%{transform:translate3d(30px,-120px,0) scale(1.1);opacity:0}
}

/* ================= 顶部状态栏 ================= */
.hud{
  position:relative;z-index:8;
  display:flex;align-items:center;gap:8px;
  margin:calc(8px + var(--safe-t)) 10px 0;
  padding:7px 8px;
  border-radius:18px;
  background:linear-gradient(180deg,rgba(22,60,45,.8),rgba(13,43,33,.7));
  border:1px solid rgba(255,255,255,.2);
  box-shadow:0 8px 22px rgba(10,30,20,.3),inset 0 1px 0 rgba(255,255,255,.18);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
}
.player{display:flex;align-items:center;gap:7px;flex:1;min-width:0;text-align:left;color:#fff}
.player:active{transform:scale(.98)}
.avatar{
  position:relative;flex:none;width:40px;height:40px;border-radius:50%;overflow:hidden;
  border:2px solid #FFD98A;box-shadow:0 0 0 2px rgba(70,35,0,.35),0 2px 6px rgba(0,0,0,.3);
}
.avatar img{width:100%;height:100%;object-fit:cover}
.player-copy{display:flex;flex-direction:column;min-width:0;gap:1px}
.player-copy b{font-size:13px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:76px;text-shadow:0 1px 2px rgba(0,0,0,.35)}
.player-copy small{font-size:9px;color:#FFE1A8;opacity:.96;line-height:1;white-space:nowrap}
.xp{display:block;width:66px;height:4px;border-radius:3px;background:rgba(0,0,0,.35);overflow:hidden;margin-top:2px;box-shadow:inset 0 1px 1px rgba(0,0,0,.4)}
.xp i{display:block;height:100%;width:0;background:linear-gradient(90deg,#FFE174,#FFB03A);border-radius:3px;transition:width .3s}
.level-pill{
  display:inline-flex;align-items:center;gap:1px;flex:none;
  padding:1px 4px;border-radius:8px;background:rgba(255,193,58,.18);
  color:#FFE174;font-size:10px;border:1px solid rgba(255,220,100,.35);
}
.level-pill .mp-icon{width:11px;height:11px}
.res-row{display:flex;gap:4px;flex:none}
.res{
  display:flex;align-items:center;gap:3px;height:30px;padding:0 4px;border-radius:10px;
  background:linear-gradient(180deg,rgba(8,38,30,.55),rgba(5,28,22,.72));
  border:1px solid rgba(255,255,255,.13);color:#FFF7DF;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.1);
}
.res:active{transform:scale(.95)}
.res .mp-icon{width:17px;height:17px}
.res.coin .mp-icon{color:#FFD34A}
.res.gem .mp-icon{color:#7FE7FF}
.res.wish .mp-icon{color:#FFB1E0}
.res b{font-size:11px;font-weight:800;letter-spacing:-.2px}
.res-plus{
  display:flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:50%;
  background:linear-gradient(180deg,#83D957,#4CAB2D);color:#fff;font-size:12px;font-weight:900;line-height:1;
  box-shadow:0 1px 0 #357A20,inset 0 1px 0 rgba(255,255,255,.4);margin-left:1px;
}

/* ================= 场景 / 侧边按钮 ================= */
.scene{position:relative;z-index:5;height:172px;flex:none;pointer-events:none}
.scene-badge{
  position:absolute;left:50%;bottom:4px;transform:translateX(-50%);
  display:flex;align-items:center;gap:3px;padding:3px 9px 3px 6px;border-radius:20px;
  background:rgba(24,62,44,.6);border:1px solid rgba(255,240,190,.3);
  color:#FFF3CE;font-size:9px;font-weight:800;letter-spacing:.02em;
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);white-space:nowrap;
}
.scene-badge .mp-icon{width:13px;height:13px;color:#FFD66A}
.rail{position:absolute;top:2px;display:flex;flex-direction:column;gap:6px;pointer-events:auto}
.rail-left{left:8px}
.rail-right{right:8px;top:8px}
.rail-btn{
  position:relative;width:50px;height:50px;border-radius:15px;
  border:2px solid #FFF0C8;
  background:linear-gradient(180deg,rgba(255,250,236,.98),rgba(248,226,184,.96));
  box-shadow:0 4px 0 rgba(128,78,26,.5),0 6px 12px rgba(30,20,0,.22),inset 0 1px 0 #fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;color:#7A4A1C;
}
.rail-btn:active{transform:translateY(3px);box-shadow:0 1px 0 rgba(128,78,26,.5),0 3px 6px rgba(30,20,0,.2)}
.rail-ico{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:10px;background:linear-gradient(180deg,#FFD87A,#F2A136);color:#7A3E10;box-shadow:inset 0 1px 0 #FFF3C9}
.rail-ico .mp-icon{width:20px;height:20px}
.rail-ico.pet-ico{padding:0;overflow:hidden;background:#fff}
.rail-ico.pet-ico img{width:100%;height:100%;object-fit:cover;border-radius:9px}
.rail-ico.map-ico{background:linear-gradient(180deg,#9BE57A,#56B53B);color:#23651A}
.rail-ico.season-ico{background:linear-gradient(180deg,#FFD36A,#E89822);color:#6B3C06}
.rail-ico.music-ico{position:relative;background:linear-gradient(180deg,#CBB9FF,#8870E8);color:#FFF8E7}
.rail-btn small{font-size:9px;line-height:1;font-weight:800;margin-top:1px;color:#7A4A1C;letter-spacing:.02em}
/* 音乐开关 */
.sound-btn .snd-off{display:none}
.sound-btn.off .snd-on{display:none}
.sound-btn.off .snd-off{display:inline-block}
.sound-btn.off .music-ico{background:linear-gradient(180deg,#D8D2C6,#A79C8C);color:#6B6154}
.sound-btn.off small{color:#8E7A5C}
.sound-btn.wait{animation:sndGlow 1.9s ease-in-out infinite}
@keyframes sndGlow{
  0%,100%{box-shadow:0 4px 0 rgba(128,78,26,.5),0 6px 12px rgba(30,20,0,.22),inset 0 1px 0 #fff}
  50%{box-shadow:0 4px 0 rgba(128,78,26,.5),0 0 0 4px rgba(255,214,106,.26),0 6px 14px rgba(30,20,0,.25),inset 0 1px 0 #fff}
}
.sound-btn.playing .music-ico::after{
  content:"";position:absolute;right:-2px;top:-2px;width:8px;height:8px;border-radius:50%;
  background:#77E06A;border:1.5px solid #FFF7DC;box-shadow:0 1px 3px rgba(0,0,0,.3);
  animation:dotPulse 1.4s infinite;
}
.rail-timer{
  position:absolute;bottom:-5px;left:50%;transform:translateX(-50%);
  font-style:normal;font-size:8px;font-weight:900;color:#FFF3D6;background:#4B3420;
  border:1px solid rgba(255,225,170,.45);border-radius:6px;padding:1px 4px;white-space:nowrap;
  box-shadow:0 1px 2px rgba(0,0,0,.3);
}
.dot{position:absolute;top:-4px;right:-4px;width:13px;height:13px;border-radius:50%;background:#FF4D4D;border:2px solid #FFF3D6;box-shadow:0 1px 3px rgba(0,0,0,.35);animation:dotPulse 1.4s infinite}
@keyframes dotPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.16)}}

/* ================= 棋盘主卡 ================= */
.board-card{
  position:relative;z-index:6;flex:none;
  margin:0 10px;padding:9px 9px 7px;border-radius:24px;
  background:
    repeating-linear-gradient(92deg,rgba(150,90,30,.05) 0 2px,rgba(255,255,255,0) 2px 9px),
    linear-gradient(180deg,#FFF8E7 0%,#F8E6C2 55%,#EFD6A8 100%);
  border:3px solid #C1853E;
  box-shadow:0 12px 26px rgba(50,25,0,.33),inset 0 0 0 2px #FFEDC2,inset 0 -6px 0 rgba(160,100,30,.14);
}
.board-card::after{
  content:"";position:absolute;inset:3px;border-radius:20px;border:1px dashed rgba(160,105,40,.22);pointer-events:none;
}
.board-head{position:relative;z-index:2;display:flex;align-items:center;gap:6px;margin-bottom:6px}
.gen-chip{display:flex;align-items:center;gap:7px;flex:1;min-width:0;padding:4px 6px;border-radius:14px;background:rgba(255,255,255,.55);border:1px solid rgba(170,110,40,.25);box-shadow:inset 0 1px 0 #fff}
.gen-thumb{display:flex;align-items:center;justify-content:center;flex:none;width:38px;height:38px;border-radius:12px;background:linear-gradient(180deg,#FCEBCB,#EAD2A6);border:1px solid #D5AE74;overflow:hidden}
.gen-thumb img{width:94%;height:94%;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(90,50,10,.22))}
.gen-copy{flex:1;min-width:0;display:flex;flex-direction:column}
.gen-copy b{font-size:12px;color:#5A3A16;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gen-copy small{display:flex;gap:5px;align-items:center;margin-top:1px;font-size:9px;color:#8C6A3E;line-height:1}
.gen-copy small i{font-style:normal;font-weight:900;color:#E0701F}
.gen-meter{display:block;height:5px;border-radius:4px;background:rgba(120,80,30,.18);margin-top:3px;overflow:hidden;box-shadow:inset 0 1px 1px rgba(90,50,10,.16)}
.gen-meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,#FFC44D,#FF8A3D);border-radius:4px;transition:width .18s linear}
.upgrade-btn{
  flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;
  width:52px;height:46px;border-radius:13px;
  background:linear-gradient(180deg,#FFB24B,#F07E1F);border:2px solid #FFE0A8;
  box-shadow:0 3px 0 #B85B12,inset 0 1px 0 rgba(255,255,255,.4);
  color:#fff;font-size:11px;font-weight:900;text-shadow:0 1px 1px rgba(120,50,0,.35);
}
.upgrade-btn .mp-icon{width:15px;height:15px}
.upgrade-btn:active{transform:translateY(2px);box-shadow:0 1px 0 #B85B12,inset 0 1px 0 rgba(255,255,255,.4)}
.upgrade-btn.max{background:linear-gradient(180deg,#BDA77F,#8C7148);box-shadow:0 3px 0 #6A522E;font-size:9px}
.board-shell{
  position:relative;padding:8px;border-radius:18px;
  background:linear-gradient(180deg,#DDB87C,#CEA364);
  border:2px solid #A97136;
  box-shadow:inset 0 2px 7px rgba(90,50,10,.25),0 2px 0 rgba(255,255,255,.35);
}
.board{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;position:relative;z-index:1}
.cell{
  position:relative;aspect-ratio:1/.9;border-radius:9px;padding:0;
  background:linear-gradient(160deg,#FFF9EA,#F1DEBB 55%,#E9D2A6);
  border:1px solid rgba(160,110,50,.22);
  box-shadow:inset 0 1px 0 #FFFDF4,inset 0 -2px 2px rgba(150,100,40,.12);
  display:flex;align-items:center;justify-content:center;overflow:visible;
  touch-action:none;transition:transform .1s,box-shadow .12s;
}
.cell::after{
  content:"";position:absolute;inset:22%;border-radius:50%;
  background:radial-gradient(circle,rgba(160,195,100,.13),transparent 70%);pointer-events:none;
}
.cell:active{transform:scale(.96)}
.cell.bonus{background:linear-gradient(160deg,#FFF0C2,#F6D382);border-color:#E3A83F;box-shadow:inset 0 0 0 2px rgba(255,180,60,.35),inset 0 1px 0 #FFF8DC}
.cell.selected{outline:3px solid #FF8A3D;outline-offset:-2px;z-index:4;box-shadow:0 0 16px rgba(255,138,61,.75)}
.cell.drop-target{outline:3px dashed #67BE43;outline-offset:-2px}
.cell.wrong{animation:wrongShake .28s}
@keyframes wrongShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
.item{
  position:relative;width:96%;height:96%;display:flex;align-items:center;justify-content:center;
  filter:drop-shadow(0 3px 2px rgba(80,45,10,.24));pointer-events:none;transform-origin:50% 78%;
}
.item img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.item .lv{
  position:absolute;right:0;bottom:0;min-width:15px;height:15px;padding:0 2px;border-radius:7px;
  background:linear-gradient(180deg,#8B5A2B,#5C3814);color:#FFF1CE;font-size:9px;font-weight:900;
  display:flex;align-items:center;justify-content:center;border:1px solid rgba(255,230,170,.55);
  font-style:normal;box-shadow:0 1px 2px rgba(0,0,0,.3);
}
.item .lv-high{background:linear-gradient(180deg,#FFD75A,#E08B1B);color:#5A2E00;border-color:#FFF0B0}
.item.lv-high::before{
  content:"";position:absolute;inset:6%;border-radius:50%;
  background:radial-gradient(circle,rgba(255,220,90,.4),transparent 70%);
  animation:glowPulse 2s ease-in-out infinite;pointer-events:none;
}
@keyframes glowPulse{0%,100%{opacity:.5;transform:scale(.94)}50%{opacity:1;transform:scale(1.06)}}
.item.pop{animation:itemPop .32s cubic-bezier(.2,1.5,.4,1)}
@keyframes itemPop{0%{transform:scale(.55)}70%{transform:scale(1.14)}100%{transform:scale(1)}}
.item.spawn{animation:itemSpawn .34s cubic-bezier(.2,1.4,.4,1)}
@keyframes itemSpawn{0%{transform:translateY(10px) scale(.35);opacity:0}100%{transform:translateY(0) scale(1);opacity:1}}
.chain-candy img{filter:hue-rotate(-17deg) saturate(1.24) brightness(1.02)}
.chain-forest img{filter:hue-rotate(13deg) saturate(.96) brightness(.97)}
.chain-sea img{filter:hue-rotate(148deg) saturate(1.06) brightness(1.01)}
.album-cell.unknown img{filter:brightness(0) opacity(.14) !important}
.chain-candy .item img{filter:hue-rotate(-17deg) saturate(1.24) brightness(1.02)}
.chain-forest .item img{filter:hue-rotate(13deg) saturate(.96) brightness(.97)}
.chain-sea .item img{filter:hue-rotate(148deg) saturate(1.06) brightness(1.01)}

/* 广告气泡 */
.ad-bubble{
  position:absolute;z-index:7;display:flex;align-items:center;gap:4px;
  height:40px;padding:2px 6px 2px 3px;border-radius:12px;
  border:2px solid #FFF4CB;
  background:linear-gradient(180deg,#FFFFFF,#FFE7B0);
  box-shadow:0 0 0 3px rgba(255,190,60,.3),0 0 18px rgba(255,200,80,.75),0 3px 0 rgba(160,95,20,.32);
  color:#3A2A14;
}
.ad-bubble:active{transform:translateY(2px) scale(.98)}
.ad-play{
  flex:none;display:flex;align-items:center;justify-content:center;width:25px;height:25px;border-radius:8px;
  background:linear-gradient(180deg,#69C6FF,#2E8BE8);border:1.5px solid #fff;color:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.25);
}
.ad-play .mp-icon{width:20px;height:20px}
.ad-txt{display:flex;flex-direction:column;line-height:1;align-items:flex-start}
.ad-txt b{font-size:12px;font-weight:900;color:#E07818;letter-spacing:-.2px}
.ad-txt small{font-size:8px;font-weight:800;color:#8B5A2B;margin-top:1px}
/* 广告福利坞：4 个激励点位排在棋盘下方，完全不遮挡合成格 */
.ad-dock{
  position:relative;z-index:4;
  display:grid;grid-template-columns:repeat(4,1fr);gap:5px;
  margin-top:7px;padding:4px;border-radius:14px;
  background:linear-gradient(180deg,rgba(255,250,236,.78),rgba(236,207,158,.68));
  border:1px solid rgba(170,112,44,.3);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 2px 4px rgba(110,65,15,.08);
}
.ad-chip{
  position:relative;display:flex;align-items:center;justify-content:center;gap:4px;
  height:38px;padding:0 4px;border-radius:10px;overflow:visible;
  border:1.5px solid #FFE0A0;
  background:linear-gradient(180deg,#FFFDF4 0%,#FFE9B8 100%);
  box-shadow:0 2px 0 rgba(168,102,24,.3),0 0 0 1.5px rgba(255,255,255,.35),0 0 10px rgba(255,190,80,.22),inset 0 1px 0 #fff;
  color:#5A3A16;transition:transform .08s,box-shadow .08s;
}
.ad-chip::before{content:"";position:absolute;inset:-4px -2px;border-radius:13px}
.ad-chip:active{transform:translateY(2px);box-shadow:0 0 0 rgba(168,102,24,.3),inset 0 1px 0 #fff}
.ad-chip .ad-play{width:23px;height:23px;border-radius:7px;background:linear-gradient(180deg,#7ED0FF,#2E8BE8);border:1.5px solid #fff;box-shadow:0 1px 2px rgba(20,70,130,.3)}
.ad-chip .ad-play .mp-icon{width:17px;height:17px}
.ad-chip .ad-txt{display:flex;flex-direction:column;line-height:1;align-items:flex-start;min-width:0}
.ad-chip .ad-txt b{font-size:11px;font-weight:900;color:#E07818;letter-spacing:-.2px;white-space:nowrap}
.ad-chip .ad-txt small{font-size:7.5px;font-weight:800;color:#8B5A2B;margin-top:1px;white-space:nowrap}
.ad-dock .ad-timer{top:-7px;right:-3px;left:auto;bottom:auto;transform:none;z-index:3;font-size:7px;padding:0 3px}
.ad-double{
  position:relative;flex:none;margin-left:auto;
  height:29px;padding:1px 7px 1px 2px;border-radius:10px;
  background:linear-gradient(180deg,#FFF9DE,#FFD66E);
  border-color:#FFF7D4;box-shadow:0 0 0 2px rgba(255,190,60,.22),0 0 12px rgba(255,205,80,.65),0 2px 0 rgba(160,95,20,.24);
}
.ad-double:active{transform:translateY(2px) scale(.98)}
.ad-double .ad-play{width:23px;height:23px;background:linear-gradient(180deg,#FFC85A,#F08C1E);border-color:#FFF5CB}
.ad-double .ad-play .mp-icon{width:18px;height:18px;color:#fff}
.ad-double .ad-txt b{color:#B95A0A;font-size:13px}
.ad-double .ad-txt small{font-size:8px}
.ad-ready{
  position:absolute;top:-8px;right:0;font-style:normal;white-space:nowrap;
  font-size:7px;font-weight:900;color:#fff;background:#FF4D4D;border:1.5px solid #FFF3D6;
  border-radius:6px;padding:0 3px;box-shadow:0 1px 3px rgba(0,0,0,.3);animation:dotPulse 1.4s infinite;
}
.board-foot .ad-double .ad-play{width:21px;height:21px}
.board-foot .ad-double .ad-play .mp-icon{width:17px;height:17px}
.board-foot .ad-double .ad-txt b{font-size:12px}
.board-foot .ad-double .ad-txt small{font-size:7px}
.board-foot .board-hint{display:none}
.ad-timer{
  position:absolute;bottom:-9px;left:50%;transform:translateX(-50%);
  font-style:normal;font-size:8px;font-weight:900;color:#fff;background:#5D3A16;
  padding:1px 5px;border-radius:6px;white-space:nowrap;border:1px solid #FFE6B0;
}
.board-full{
  position:absolute;inset:8px;z-index:9;border-radius:14px;
  background:rgba(255,248,230,.94);border:2px solid #E0A24A;
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  text-align:center;padding:12px;box-shadow:inset 0 0 30px rgba(220,160,70,.25);
}
.full-ico{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background:#FFE2AE;color:#C97617;margin-bottom:2px}
.full-ico .mp-icon{width:24px;height:24px}
.board-full b{font-size:15px;color:#5A3A16}
.board-full small{font-size:10px;color:#8C6A3E;line-height:1.35}
.full-actions{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap;justify-content:center}
.select-bar{
  display:flex;align-items:center;gap:5px;margin-top:6px;padding:4px 5px;border-radius:12px;
  background:linear-gradient(180deg,#FFF7E3,#F7E6C6);border:1.5px solid #E0B36B;
  box-shadow:inset 0 1px 0 #fff;animation:selIn .18s ease;
}
@keyframes selIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.select-info{display:flex;align-items:center;gap:4px;flex:1;min-width:0}
.select-info img{width:28px;height:28px;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(80,45,10,.25))}
.select-info b{font-size:10px;color:#5A3A16;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.select-store,.select-cancel{
  flex:none;height:28px;padding:0 8px;border-radius:8px;font-size:9px;font-weight:900;
  display:flex;align-items:center;gap:2px;
}
.select-store{background:linear-gradient(180deg,#FFD985,#E59A2C);color:#6A3A0B;border:1px solid #FFF0BC;box-shadow:0 2px 0 #A96A15}
.select-store .mp-icon{width:13px;height:13px}
.select-cancel{background:rgba(150,105,50,.12);color:#7A4A1C;border:1px solid rgba(150,105,50,.25)}
.select-store:active,.select-cancel:active{transform:translateY(1px);box-shadow:none}
.board-foot{display:flex;align-items:center;gap:6px;margin-top:5px;font-size:9px;color:#7C5B31;min-height:22px}
.cell-count{display:flex;align-items:center;gap:2px;font-weight:800;flex:none}
.cell-count .mp-icon{width:12px;height:12px}
.bag-mini{
  display:flex;align-items:center;gap:2px;height:22px;padding:0 6px;border-radius:8px;
  background:rgba(255,255,255,.55);border:1px solid rgba(160,105,40,.3);
  font-size:9px;font-weight:800;color:#7A4A1C;
}
.bag-mini .mp-icon{width:12px;height:12px}
.bag-mini b{font-size:8px;color:#A06A2C;font-weight:800;margin-left:1px}
.bag-mini:active{transform:scale(.95)}
.board-hint{margin-left:auto;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ================= 当前订单 ================= */
.order-peek{
  position:relative;z-index:6;flex:none;margin:7px 10px 0;padding:6px 7px;
  border-radius:18px;min-height:64px;
  background:linear-gradient(180deg,rgba(255,250,238,.97),rgba(249,232,197,.95));
  border:2px solid #E0B978;
  box-shadow:0 6px 14px rgba(50,25,0,.2),inset 0 1px 0 #fff;
  display:flex;align-items:center;gap:8px;
}
.order-thumb{
  flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:13px;
  background:linear-gradient(180deg,#F7E4BC,#E7CB98);border:1px solid #D3A96E;overflow:hidden;position:relative;
}
.order-thumb img{width:94%;height:94%;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(80,45,10,.25))}
.order-info{flex:1;min-width:0;display:flex;flex-direction:column}
.order-info b{font-size:12px;color:#5A3A16;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}
.order-info small{font-size:9px;color:#8C6A3E;line-height:1.2;margin-top:1px}
.order-rewards{display:flex;gap:3px;margin-top:3px}
.reward-chip{display:inline-flex;align-items:center;gap:1px;padding:1px 4px;border-radius:6px;background:rgba(255,255,255,.7);border:1px solid rgba(170,115,45,.22);font-size:8px;font-weight:800;color:#8A5A24}
.reward-chip .mp-icon{width:11px;height:11px}
.reward-chip.coin .mp-icon{color:#EFA51F}
.reward-chip.star .mp-icon{color:#E986C4}
.order-go{
  flex:none;min-width:58px;height:34px;padding:0 9px;border-radius:11px;
  background:linear-gradient(180deg,#FFB24B,#EF7E1D);border:2px solid #FFE1A6;
  box-shadow:0 3px 0 #B45A12;color:#fff;font-size:11px;font-weight:900;
  display:flex;align-items:center;justify-content:center;gap:2px;text-shadow:0 1px 1px rgba(100,40,0,.35);
}
.order-go:active{transform:translateY(2px);box-shadow:0 1px 0 #B45A12}
.order-go.ready{background:linear-gradient(180deg,#8FE05C,#4FAF2E);box-shadow:0 3px 0 #2F7A1F;border-color:#E9FFD0}
.order-go.ready:active{box-shadow:0 1px 0 #2F7A1F}
.order-more{
  flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;
  width:30px;height:48px;border-radius:10px;background:rgba(255,255,255,.5);border:1px solid rgba(150,100,40,.24);
  font-size:8px;font-weight:800;color:#8A5A24;
}
.order-more .mp-icon{width:16px;height:16px}
.order-empty{flex:1;display:flex;align-items:center;gap:6px;color:#8C6A3E;font-size:11px;font-weight:700}
.home-space{height:calc(96px + var(--safe-b))}

/* ================= 底部操作 ================= */
.bottom-bar{
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  width:100%;max-width:480px;margin:0 auto;
  padding:8px 14px calc(8px + var(--safe-b));
  background:linear-gradient(180deg,rgba(31,61,33,0),rgba(29,59,33,.55) 30%,rgba(22,48,27,.9));
  pointer-events:none;
}
.bottom-bar>*{pointer-events:auto}
.big-btn{
  position:relative;border:3px solid #FFF1CA;border-radius:19px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;
  box-shadow:0 5px 0 rgba(90,50,15,.45),0 8px 16px rgba(0,0,0,.25),inset 0 2px 0 rgba(255,255,255,.5);
  color:#fff;overflow:visible;
}
.big-btn:active{transform:translateY(3px);box-shadow:0 2px 0 rgba(90,50,15,.45),0 4px 8px rgba(0,0,0,.22),inset 0 2px 0 rgba(255,255,255,.4)}
.big-btn .mp-icon{width:28px;height:28px}
.big-btn small{font-size:9px;font-weight:900;text-shadow:0 1px 1px rgba(0,0,0,.28);line-height:1;margin-top:1px}
.big-btn.shop{width:60px;height:60px;background:linear-gradient(180deg,#8AD2FF,#2F90EA)}
.big-btn.shop .mp-icon{filter:drop-shadow(0 1px 1px rgba(0,60,120,.4))}
.big-btn.bag{width:60px;height:60px;background:linear-gradient(180deg,#FFDA86,#DE9428);color:#6A3A0B}
.big-btn.play{flex:1;max-width:210px;height:60px;flex-direction:row;gap:8px;background:linear-gradient(180deg,#93E45F,#4FAF2E);border-color:#F3FFD6;text-shadow:0 1px 2px rgba(20,70,10,.35)}
.play-circle{display:flex;align-items:center;justify-content:center;width:37px;height:37px;border-radius:50%;background:rgba(255,255,255,.2);border:2px solid rgba(255,255,255,.72);box-shadow:inset 0 1px 3px rgba(255,255,255,.35)}
.play-circle .mp-icon{width:26px;height:26px}
.play-copy{display:flex;flex-direction:column;align-items:flex-start;line-height:1}
.play-copy b{font-size:21px;font-weight:900;letter-spacing:-.5px}
.play-copy small{font-size:9px;font-weight:900;opacity:.96;margin-top:1px}
.big-badge{
  position:absolute;top:-5px;right:-5px;min-width:19px;height:19px;padding:0 4px;border-radius:10px;
  background:#FF4D4D;border:2px solid #FFF3D6;color:#fff;font-style:normal;font-size:10px;font-weight:900;
  display:flex;align-items:center;justify-content:center;box-shadow:0 2px 5px rgba(0,0,0,.35);
}
.big-count{
  position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 4px;border-radius:10px;
  background:#4A3217;border:2px solid #FFF3D6;color:#FFE7A8;font-style:normal;font-size:9px;font-weight:900;
  display:flex;align-items:center;justify-content:center;
}

/* ================= 子页面 ================= */
.sub-screen{
  position:relative;z-index:2;min-height:100vh;min-height:100dvh;
  padding:calc(10px + var(--safe-t)) 12px calc(20px + var(--safe-b));
  background:linear-gradient(180deg,rgba(18,48,34,.5) 0%,rgba(20,54,36,.82) 42%,rgba(17,48,32,.92) 100%);
  color:#5A3A16;
}
.sub-top{display:flex;align-items:center;gap:10px;margin-bottom:10px;color:#fff}
.back-btn{
  flex:none;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;
  background:linear-gradient(180deg,#FFF9EA,#F2DDB4);border:2px solid #FFF0C8;color:#7A4A1C;
  box-shadow:0 4px 0 rgba(90,50,15,.35),0 5px 10px rgba(0,0,0,.2);
}
.back-btn:active{transform:translateY(2px);box-shadow:0 2px 0 rgba(90,50,15,.35)}
.back-btn .mp-icon{width:24px;height:24px}
.sub-title{flex:1;min-width:0}
.eyebrow{display:block;font-size:8px;letter-spacing:.22em;color:#FFE1A8;font-weight:900;line-height:1.2}
.sub-title h1{margin:0;font-size:21px;line-height:1.1;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.35);letter-spacing:.02em}
.sub-res{
  flex:none;display:flex;align-items:center;gap:3px;height:30px;padding:0 8px;border-radius:10px;
  background:rgba(20,55,40,.6);border:1px solid rgba(255,240,190,.28);color:#FFE7A8;font-size:12px;font-weight:900;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
}
.sub-res .mp-icon{width:17px;height:17px;color:#FFD05A}
.card{
  border-radius:18px;background:linear-gradient(180deg,#FFF8E8,#F7E5C2);
  border:2px solid #DDB273;box-shadow:0 6px 14px rgba(0,0,0,.2),inset 0 1px 0 #fff;
  padding:10px;margin-bottom:10px;
}
.card-head{display:flex;align-items:center;gap:6px;margin-bottom:8px}
.card-head h3{margin:0;font-size:13px;color:#5A3A16;flex:1}
.card-head .mp-icon{width:18px;height:18px;color:#E08321}
.card-head small{font-size:9px;color:#8C6A3E;font-weight:700}
.town-banner{position:relative;height:150px;border-radius:20px;overflow:hidden;border:3px solid #E7C27C;box-shadow:0 8px 18px rgba(0,0,0,.25);margin-bottom:10px}
.town-banner img{width:100%;height:100%;object-fit:cover;object-position:center 42%}
.town-banner-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.02) 20%,rgba(24,45,25,.72) 100%)}
.town-banner-copy{position:absolute;left:12px;right:12px;bottom:9px;color:#fff;display:flex;flex-direction:column;gap:1px}
.town-banner-copy small{font-size:9px;color:#FFE1A8;font-weight:800;letter-spacing:.08em}
.town-banner-copy b{font-size:16px;text-shadow:0 2px 4px rgba(0,0,0,.35)}
.town-banner-copy span{font-size:9px;opacity:.92}
.region-list{display:flex;flex-direction:column;gap:8px}
.region-item{
  position:relative;display:flex;align-items:center;gap:9px;padding:9px;border-radius:16px;
  background:linear-gradient(180deg,#FFF9EB,#F6E3BF);border:2px solid #DDB273;
  box-shadow:0 5px 10px rgba(0,0,0,.16),inset 0 1px 0 #fff;
}
.region-item.locked{opacity:.92}
.region-thumb{flex:none;width:68px;height:68px;border-radius:14px;overflow:hidden;background:linear-gradient(180deg,#F7E6C5,#E9CE9B);border:1px solid #D3A96E;display:flex;align-items:center;justify-content:center;position:relative}
.region-thumb img{width:94%;height:94%;object-fit:contain;filter:drop-shadow(0 3px 3px rgba(80,45,10,.25))}
.region-thumb .chain-candy img{filter:hue-rotate(-17deg) saturate(1.24)}
.region-thumb .chain-forest img{filter:hue-rotate(13deg) saturate(.96)}
.region-thumb .chain-sea img{filter:hue-rotate(148deg) saturate(1.06)}
.region-thumb .lock-ico{position:absolute;inset:0;background:rgba(50,35,20,.45);display:flex;align-items:center;justify-content:center;color:#FFF0C8}
.region-thumb .lock-ico .mp-icon{width:26px;height:26px}
.region-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.region-copy .r-top{display:flex;align-items:center;gap:4px}
.region-copy b{font-size:13px;color:#5A3A16}
.region-copy .tag{font-size:8px;font-weight:800;color:#fff;background:#79BE58;border-radius:5px;padding:1px 4px}
.region-copy p{margin:0;font-size:9px;color:#8C6A3E;line-height:1.3}
.region-copy .buff{font-size:9px;font-weight:800;color:#D9761B}
.region-actions{flex:none;display:flex;flex-direction:column;gap:4px;align-items:stretch}
.region-actions .btn-primary,.region-actions .btn-ghost{height:32px;padding:0 10px;font-size:10px;border-radius:9px}
.region-actions .active-tag{height:32px;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:900;color:#4F9B36;background:rgba(103,190,67,.16);border:1px dashed #67BE43;border-radius:9px}

/* 萌宠 */
.pet-hero{display:flex;align-items:center;gap:10px;padding:10px;border-radius:18px;background:linear-gradient(180deg,rgba(255,249,235,.96),rgba(247,229,195,.94));border:2px solid #DDB273;box-shadow:0 6px 14px rgba(0,0,0,.18);margin-bottom:10px}
.pet-hero-img{flex:none;display:flex;align-items:center;justify-content:center;width:76px;height:76px;border-radius:18px;overflow:hidden;border:2px solid #FFF0C8;box-shadow:0 4px 8px rgba(0,0,0,.2);background:linear-gradient(180deg,#FFF2D2,#F4D7A4)}
.pet-hero-img img{width:100%;height:100%;object-fit:cover}
.pet-hero-copy{flex:1;min-width:0}
.pet-hero-copy small{font-size:8px;color:#A0763E;font-weight:800;letter-spacing:.1em}
.pet-hero-copy b{display:block;font-size:16px;color:#5A3A16;line-height:1.1}
.pet-hero-copy span{display:inline-block;font-size:9px;font-weight:900;color:#D9761B;margin-top:2px}
.pet-hero-copy p{margin:3px 0 0;font-size:9px;color:#8C6A3E;line-height:1.35}
.pet-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pet-card{position:relative;padding:8px;border-radius:16px;background:linear-gradient(180deg,#FFF9EB,#F6E3BF);border:2px solid #DDB273;box-shadow:0 5px 10px rgba(0,0,0,.16);display:flex;flex-direction:column;gap:5px}
.pet-card.active{border-color:#67BE43;box-shadow:0 0 0 2px rgba(103,190,67,.3),0 5px 10px rgba(0,0,0,.16)}
.pet-card-top{display:flex;align-items:center;gap:6px}
.pet-avatar{flex:none;width:44px;height:44px;border-radius:50%;overflow:hidden;border:2px solid #FFE1A3;background:linear-gradient(180deg,#D9F0FF,#A9D6FF);display:flex;align-items:center;justify-content:center;color:#4E86B8}
.pet-avatar img{width:100%;height:100%;object-fit:cover}
.pet-avatar .mp-icon{width:27px;height:27px}
.pet-card-top b{font-size:12px;color:#5A3A16;display:block;line-height:1.1}
.pet-card-top small{font-size:8px;color:#8C6A3E;display:block;line-height:1.2;margin-top:1px}
.pet-card p{margin:0;font-size:9px;color:#8C6A3E;line-height:1.35;min-height:24px}
.pet-shards{display:flex;align-items:center;gap:3px;font-size:8px;color:#8C6A3E;font-weight:800}
.shard-dots{display:flex;gap:2px}
.shard-dots i{display:block;width:10px;height:10px;border-radius:50%;background:rgba(160,110,50,.2);border:1px solid rgba(160,110,50,.25)}
.shard-dots i.on{background:linear-gradient(180deg,#FFD36A,#E89822);border-color:#C77E12}
.pet-btn{height:30px;border-radius:9px;font-size:10px;font-weight:900}
.pet-btn.on{background:rgba(103,190,67,.16);border:1px dashed #67BE43;color:#4F9B36}
.pet-btn.locked{background:rgba(140,110,70,.12);border:1px dashed rgba(140,110,70,.35);color:#9B7A50}

/* 赛季 */
.season-score-card{display:flex;align-items:center;gap:10px}
.season-medal{flex:none;width:62px;height:62px;border-radius:50%;background:radial-gradient(circle,#FFF3C2,#FFC93C 60%,#E28A1B);display:flex;align-items:center;justify-content:center;color:#7A4306;border:3px solid #FFF4C9;box-shadow:0 4px 10px rgba(120,70,10,.3)}
.season-medal .mp-icon{width:34px;height:34px}
.season-copy{flex:1}
.season-copy b{display:block;font-size:15px;color:#5A3A16}
.season-copy small{display:block;font-size:9px;color:#8C6A3E;margin-top:2px}
.season-rankbar{height:8px;border-radius:5px;background:rgba(140,100,50,.18);overflow:hidden;margin-top:5px}
.season-rankbar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#FFD36A,#FF8A3D);border-radius:5px;transition:width .4s}
.album-chain{margin-bottom:10px}
.album-chain:last-child{margin-bottom:0}
.album-chain-head{display:flex;align-items:center;gap:5px;margin-bottom:5px}
.album-chain-head b{font-size:11px;color:#5A3A16}
.album-chain-head span{font-size:8px;color:#8C6A3E;margin-left:auto;font-weight:800}
.album-row{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-bottom:4px}
.album-cell{position:relative;aspect-ratio:1/1;border-radius:8px;background:linear-gradient(160deg,#FFF9EA,#EDD8B2);border:1px solid rgba(160,110,50,.22);display:flex;align-items:center;justify-content:center;overflow:hidden;padding:1px}
.album-cell img{width:94%;height:94%;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(80,45,10,.2))}
.album-cell.unknown img{filter:brightness(0) opacity(.14)}
.album-cell .a-lv{position:absolute;right:1px;bottom:1px;font-size:7px;font-weight:900;color:#8A5A24;background:rgba(255,255,255,.7);border-radius:4px;padding:0 2px}
.album-cell.unknown .a-lv{color:rgba(120,90,50,.5)}
.task-row{display:flex;align-items:center;gap:7px;padding:7px 0;border-bottom:1px dashed rgba(160,110,50,.25)}
.task-row:last-child{border-bottom:0;padding-bottom:0}
.task-copy{flex:1;min-width:0}
.task-copy b{display:block;font-size:11px;color:#5A3A16;line-height:1.2}
.task-copy small{display:block;font-size:8px;color:#8C6A3E;margin-top:1px}
.task-progress{height:5px;border-radius:3px;background:rgba(140,100,50,.18);overflow:hidden;margin-top:3px}
.task-progress i{display:block;height:100%;background:linear-gradient(90deg,#8FE05C,#4FAF2E);border-radius:3px}
.task-reward{flex:none;font-size:8px;font-weight:900;color:#8A5A24;text-align:right;line-height:1.35}
.task-claim{flex:none;height:28px;padding:0 9px;border-radius:8px;font-size:10px;font-weight:900;background:linear-gradient(180deg,#FFB24B,#EF7E1D);color:#fff;border:1px solid #FFE1A6;box-shadow:0 2px 0 #B45A12}
.task-claim:active{transform:translateY(1px);box-shadow:none}
.task-claim.done{background:rgba(140,110,70,.12);color:#9B7A50;border:1px dashed rgba(140,110,70,.3);box-shadow:none}
.rank-row{display:flex;align-items:center;gap:7px;padding:6px 0;border-bottom:1px dashed rgba(160,110,50,.2);font-size:10px;color:#6A4A24}
.rank-row:last-child{border-bottom:0;padding-bottom:0}
.rank-row.me{background:rgba(255,201,60,.16);border-radius:8px;padding:6px;margin:2px -4px;border-bottom:0}
.rank-no{flex:none;width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:900;background:rgba(160,110,50,.15);color:#7A4A1C}
.rank-row:nth-child(1) .rank-no{background:linear-gradient(180deg,#FFE174,#E8A21E);color:#5A2E00}
.rank-row:nth-child(2) .rank-no{background:linear-gradient(180deg,#E7EDF5,#B7C6D8);color:#44546A}
.rank-row:nth-child(3) .rank-no{background:linear-gradient(180deg,#F0C08E,#C98644);color:#5A2E00}
.rank-name{flex:1;font-weight:800;color:#5A3A16}
.rank-score{font-size:9px;font-weight:900;color:#D9761B}
.page-note{display:flex;align-items:flex-start;gap:4px;font-size:9px;color:rgba(255,246,220,.72);line-height:1.4;margin:8px 2px 0}
.page-note .mp-icon{width:13px;height:13px;flex:none;margin-top:1px}

/* ================= 通用按钮 ================= */
.btn-primary,.btn-green,.btn-ghost,.btn-ad,.btn-danger{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;
  min-height:38px;padding:0 13px;border-radius:11px;font-size:11px;font-weight:900;
  border:2px solid #FFE1A6;color:#fff;
  background:linear-gradient(180deg,#FFB24B,#EF7E1D);
  box-shadow:0 3px 0 #B45A12,inset 0 1px 0 rgba(255,255,255,.35);
  text-shadow:0 1px 1px rgba(100,40,0,.3);
}
.btn-primary:active,.btn-green:active,.btn-ghost:active,.btn-ad:active{transform:translateY(2px);box-shadow:0 1px 0 rgba(90,50,15,.4)}
.btn-primary .mp-icon,.btn-green .mp-icon,.btn-ghost .mp-icon,.btn-ad .mp-icon{width:16px;height:16px}
.btn-green{background:linear-gradient(180deg,#8FE05C,#4FAF2E);border-color:#E9FFD0;box-shadow:0 3px 0 #2F7A1F}
.btn-ghost{background:linear-gradient(180deg,#FFFDF6,#F2E2C2);border-color:#D9B47C;color:#7A4A1C;box-shadow:0 3px 0 rgba(150,100,50,.4);text-shadow:none}
.btn-ad{background:linear-gradient(180deg,#7AC9FF,#2F90EA);border-color:#DDF3FF;box-shadow:0 3px 0 #1C69B5}
.btn-danger{background:linear-gradient(180deg,#FF9C7A,#E55431);border-color:#FFD9CA;box-shadow:0 3px 0 #AB3216}
.btn-sm{min-height:31px;padding:0 9px;font-size:10px;border-radius:9px}
.btn-wide{width:100%}
.btn-primary:disabled,.btn-green:disabled,.btn-ghost:disabled,.btn-ad:disabled,.btn-danger:disabled{opacity:.55;filter:saturate(.55);box-shadow:none;transform:none}

/* ================= 弹层 / 底部面板 ================= */
.sheet-mask,.modal-mask{
  position:fixed;inset:0;z-index:100;display:flex;align-items:flex-end;justify-content:center;
  background:rgba(12,30,20,.56);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  padding:0;
}
.modal-mask{align-items:center;padding:18px}
.sheet,.modal-card{
  width:100%;max-width:480px;
  background:linear-gradient(180deg,#FFFAEE,#F6E3BF);
  border:0;border-top:4px solid #E7B96B;
  border-radius:26px 26px 0 0;
  box-shadow:0 -10px 34px rgba(0,0,0,.4);
  padding:8px 14px calc(18px + var(--safe-b));
  max-height:88dvh;overflow-y:auto;
  animation:sheetIn .26s cubic-bezier(.2,.9,.3,1);
  -webkit-overflow-scrolling:touch;
}
.modal-card{
  border:3px solid #E7B96B;border-radius:24px;padding:16px;
  max-width:370px;max-height:82dvh;
  animation:modalIn .24s cubic-bezier(.2,1.2,.4,1);
}
@keyframes sheetIn{from{transform:translateY(100%)}to{transform:translateY(0)}}
@keyframes modalIn{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
.sheet-grab{width:42px;height:4px;border-radius:3px;background:rgba(140,100,50,.35);margin:1px auto 6px}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 2px 8px;position:sticky;top:-8px;z-index:3;background:#FFFAEE;box-shadow:0 5px 8px rgba(246,227,191,.55)}
.sheet-head h2{margin:0;font-size:17px;color:#5A3A16;letter-spacing:.02em}
.sheet-x{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:rgba(150,105,50,.12);color:#7A4A1C}
.sheet-x .mp-icon{width:18px;height:18px}
.sheet-body{padding-bottom:4px}

/* 商城 */
.shop-wallet{display:flex;gap:6px;margin-bottom:10px}
.wallet-chip{flex:1;display:flex;align-items:center;gap:4px;padding:6px 8px;border-radius:11px;background:rgba(255,255,255,.65);border:1px solid rgba(170,115,45,.25);font-size:12px;font-weight:900;color:#5A3A16}
.wallet-chip .mp-icon{width:18px;height:18px;color:#EF9D1D}
.wallet-chip.gem .mp-icon{color:#3EB6D8}
.wallet-chip small{font-size:8px;color:#8C6A3E;font-weight:700;margin-left:auto}
.wallet-chip.bag .mp-icon{color:#B67925}
.shop-hero{
  position:relative;display:flex;align-items:center;gap:8px;padding:9px 10px;margin-bottom:10px;border-radius:16px;
  background:linear-gradient(120deg,#FFF1C3,#FFD36A 55%,#F6A93E);border:2px solid #FFF5D2;
  box-shadow:0 4px 10px rgba(140,80,10,.22),inset 0 1px 0 rgba(255,255,255,.65);overflow:hidden;
}
.shop-hero::after{content:"";position:absolute;right:-16px;top:-22px;width:74px;height:74px;border-radius:50%;background:rgba(255,255,255,.24)}
.shop-hero-ico{flex:none;display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:linear-gradient(180deg,#FFFDF4,#FFE7A8);border:1px solid #E8B35C;color:#D67715;box-shadow:0 2px 4px rgba(130,70,10,.18)}
.shop-hero-ico .mp-icon{width:26px;height:26px}
.shop-hero-copy{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.1}
.shop-hero-copy small{font-size:7px;font-weight:900;letter-spacing:.18em;color:#A76009;opacity:.8}
.shop-hero-copy b{font-size:14px;color:#5A2E00;margin-top:1px}
.shop-hero-copy em{font-style:normal;font-size:9px;font-weight:800;color:#8A4A08;margin-top:2px}
.shop-hero-bag{position:relative;z-index:1;flex:none;display:flex;align-items:center;gap:3px;height:30px;padding:0 8px;border-radius:9px;background:rgba(255,255,255,.75);border:1px solid rgba(160,100,30,.28);font-size:9px;font-weight:900;color:#7A4306;box-shadow:0 2px 0 rgba(160,100,30,.2)}
.shop-hero-bag .mp-icon{width:14px;height:14px}
.shop-hero-bag:active{transform:translateY(1px);box-shadow:none}
.shop-section-head{display:flex;align-items:center;gap:5px;margin:11px 1px 7px}
.shop-section-head .mp-icon{width:17px;height:17px;color:#E08321}
.shop-section-head h3{margin:0;font-size:13px;color:#5A3A16}
.shop-section-head small{margin-left:auto;font-size:8px;font-weight:800;color:#9A7440;background:rgba(255,255,255,.55);border:1px solid rgba(160,110,50,.2);border-radius:6px;padding:1px 5px}
.shop-ad-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.ad-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:8px;border-radius:14px;background:linear-gradient(180deg,#FFFDF6,#F7E7C9);border:2px solid #E4BE7E;box-shadow:0 3px 7px rgba(80,45,10,.12);overflow:hidden}
.ad-card.featured{border-color:#F2A33C;background:linear-gradient(180deg,#FFFBEA,#FFE7B5)}
.ad-card.featured::after{content:"";position:absolute;right:-18px;bottom:-18px;width:54px;height:54px;border-radius:50%;background:radial-gradient(circle,rgba(255,190,60,.3),transparent 70%)}
.ad-card-top{display:flex;align-items:center;justify-content:space-between;width:100%}
.ad-card-ico{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(180deg,#FFD985,#F1A63B);border:1px solid #FFF0C4;color:#8A4506;box-shadow:0 2px 3px rgba(140,80,10,.18)}
.ad-card-ico .mp-icon{width:21px;height:21px}
.ad-card-tag{font-size:7px;font-weight:900;color:#fff;background:linear-gradient(180deg,#7AC9FF,#2F90EA);border:1px solid #DDF3FF;border-radius:5px;padding:1px 4px;letter-spacing:.02em}
.ad-card b{font-size:11px;color:#5A3A16;line-height:1.15}
.ad-card small{font-size:8px;color:#8C6A3E;line-height:1.3;min-height:21px}
.ad-card .shop-buy{margin-top:2px}
.ad-card-note{font-style:normal;font-size:7px;font-weight:800;color:#A47B45;line-height:1.2;min-height:9px}
.shop-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.shop-item{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:9px 7px 8px;border-radius:15px;background:linear-gradient(180deg,#FFFDF7,#F6E6C7);border:2px solid #DDB273;box-shadow:0 4px 8px rgba(0,0,0,.12);text-align:center}
.shop-item.hot{border-color:#F2A33C;box-shadow:0 0 0 2px rgba(255,170,60,.18),0 4px 8px rgba(0,0,0,.12)}
.shop-ico{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:14px;background:linear-gradient(180deg,#FFF0C9,#F0D49E);border:1px solid #DDB273;color:#C97617;margin-bottom:1px}
.shop-ico .mp-icon{width:30px;height:30px}
.shop-ico img{width:82%;height:82%;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(80,45,10,.22))}
.shop-item b{font-size:11px;color:#5A3A16;line-height:1.1}
.shop-item small{font-size:8px;color:#8C6A3E;line-height:1.3;min-height:21px}
.shop-buy{width:100%;height:30px;border-radius:9px;font-size:10px;font-weight:900;background:linear-gradient(180deg,#FFB24B,#EF7E1D);color:#fff;border:1px solid #FFE1A6;box-shadow:0 2px 0 #B45A12;display:flex;align-items:center;justify-content:center;gap:3px;text-shadow:0 1px 1px rgba(100,40,0,.3)}
.shop-buy:active{transform:translateY(1px);box-shadow:none}
.shop-buy.ad{background:linear-gradient(180deg,#7AC9FF,#2F90EA);border-color:#DDF3FF;box-shadow:0 2px 0 #1C69B5}
.shop-buy.owned{background:rgba(103,190,67,.16);border:1px dashed #67BE43;color:#4F9B36;box-shadow:none;text-shadow:none}
.shop-buy .mp-icon{width:13px;height:13px}
.shop-tip{display:flex;align-items:center;gap:3px;font-size:9px;color:#8C6A3E;margin-top:9px;line-height:1.4}

/* 背包 */
.bag-tabs{display:flex;gap:6px;margin-bottom:9px}
.bag-tab{flex:1;height:35px;border-radius:10px;background:rgba(255,255,255,.5);border:1px solid rgba(170,115,45,.25);font-size:10px;font-weight:900;color:#8C6A3E;display:flex;align-items:center;justify-content:center;gap:3px}
.bag-tab .mp-icon{width:15px;height:15px}
.bag-tab.on{background:linear-gradient(180deg,#FFB24B,#EF7E1D);border-color:#FFE1A6;color:#fff;box-shadow:0 2px 0 #B45A12}
.bag-meta{display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#8C6A3E;margin-bottom:6px}
.bag-cap{display:flex;align-items:center;gap:6px;margin-bottom:7px;padding:6px 8px;border-radius:10px;background:rgba(255,255,255,.55);border:1px solid rgba(170,115,45,.22)}
.bag-cap-copy{display:flex;align-items:center;gap:3px;flex:none;font-size:9px;font-weight:900;color:#7A4A1C}
.bag-cap-copy .mp-icon{width:14px;height:14px;color:#C97617}
.bag-cap-bar{flex:1;height:7px;border-radius:4px;background:rgba(140,100,50,.18);overflow:hidden;box-shadow:inset 0 1px 1px rgba(90,50,10,.18)}
.bag-cap-bar i{display:block;height:100%;background:linear-gradient(90deg,#FFC44D,#FF8A3D);border-radius:4px;transition:width .25s}
.bag-cap b{flex:none;font-size:9px;color:#8C6A3E}
.bag-toolbar{display:flex;align-items:center;gap:4px;margin-bottom:7px}
.bag-toolbar>span{flex:1;font-size:8px;color:#8C6A3E}
.bag-toolbar button{display:flex;align-items:center;gap:2px;height:25px;padding:0 7px;border-radius:8px;background:rgba(255,255,255,.6);border:1px solid rgba(170,115,45,.25);font-size:8px;font-weight:900;color:#7A4A1C}
.bag-toolbar button:disabled{opacity:.45}
.bag-toolbar button .mp-icon{width:12px;height:12px}
.bag-toolbar button:active{transform:translateY(1px)}
.bag-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.bag-cell{position:relative;padding:3px 2px;border-radius:12px;background:linear-gradient(180deg,#FFFDF7,#F3E1C0);border:1px solid #DDB273;display:flex;flex-direction:column;align-items:center;gap:0;min-height:78px;overflow:hidden}
.bag-cell::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 22%,rgba(255,255,255,.85),transparent 60%);pointer-events:none}
.bag-cell img{position:relative;width:46px;height:46px;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(80,45,10,.22));margin-top:1px}
.bag-cell b{position:relative;font-size:8px;color:#5A3A16;line-height:1.1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.bag-cell small{position:relative;font-size:7px;color:#8C6A3E;font-weight:800}
.bag-cell.empty{justify-content:center;gap:2px;background:rgba(255,255,255,.28);border:1px dashed rgba(170,115,45,.32);box-shadow:none}
.bag-cell.empty .mp-icon{width:21px;height:21px;color:rgba(160,110,50,.4)}
.bag-cell.empty small{color:rgba(140,100,60,.5);font-size:7px}
.bag-cell .take{position:absolute;z-index:2;top:2px;right:2px;width:20px;height:20px;border-radius:50%;background:linear-gradient(180deg,#8FE05C,#4FAF2E);color:#fff;display:flex;align-items:center;justify-content:center;border:1px solid #E9FFD0;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.bag-cell .take .mp-icon{width:13px;height:13px}
.bag-cell .take:active{transform:scale(.9)}
.bag-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:4px;margin:12px 0 2px;padding:20px 16px;border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.55),rgba(255,247,228,.35));border:2px dashed rgba(170,115,45,.34)}
.bag-empty-ico{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;background:linear-gradient(180deg,#FFEFC6,#F3D69D);border:2px solid #E6C281;color:#C48932;box-shadow:0 4px 10px rgba(140,90,20,.14)}
.bag-empty-ico .mp-icon{width:36px;height:36px}
.bag-empty-state b{font-size:14px;color:#5A3A16}
.bag-empty-state small{font-size:9px;color:#8C6A3E;line-height:1.45;max-width:250px}
.bag-empty-actions{display:flex;gap:6px;margin-top:7px;width:100%}
.bag-empty-actions .btn-primary,.bag-empty-actions .btn-ghost{flex:1;min-height:34px}
.bag-actions{display:flex;gap:6px;margin-top:9px}
.bag-actions .btn-ghost,.bag-actions .btn-ad,.bag-actions .btn-primary{flex:1;min-height:34px}
.bag-ad-row{display:flex;align-items:center;gap:7px;margin-top:9px;padding:7px;border-radius:12px;background:linear-gradient(180deg,#FFFDF7,#F6E5C4);border:2px solid #E4BE7E;box-shadow:0 3px 7px rgba(80,45,10,.1)}
.bag-ad-ico{flex:none;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:linear-gradient(180deg,#FFD985,#F1A63B);border:1px solid #FFF0C4;color:#8A4506}
.bag-ad-ico .mp-icon{width:22px;height:22px}
.bag-ad-copy{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.15}
.bag-ad-copy b{font-size:10px;color:#5A3A16}
.bag-ad-copy small{font-size:8px;color:#8C6A3E;margin-top:1px}
.prop-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px dashed rgba(160,110,50,.22)}
.prop-row:last-child{border-bottom:0}
.prop-ico{flex:none;display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:linear-gradient(180deg,#FFF0C9,#F0D49E);border:1px solid #DDB273;color:#B46A14}
.prop-ico .mp-icon{width:24px;height:24px}
.prop-copy{flex:1}
.prop-copy b{display:block;font-size:11px;color:#5A3A16}
.prop-copy small{display:block;font-size:8px;color:#8C6A3E;margin-top:1px}
.prop-count{flex:none;font-size:11px;font-weight:900;color:#D9761B}
.prop-use{flex:none;height:29px;padding:0 9px;border-radius:8px;font-size:10px;font-weight:900;background:linear-gradient(180deg,#8FE05C,#4FAF2E);color:#fff;border:1px solid #E9FFD0;box-shadow:0 2px 0 #2F7A1F}
.prop-use:disabled{opacity:.45;box-shadow:none}
.prop-buy{flex:none;height:29px;padding:0 8px;border-radius:8px;font-size:9px;font-weight:900;background:rgba(255,255,255,.6);color:#7A4A1C;border:1px solid rgba(170,115,45,.28)}
.prop-buy:active{transform:translateY(1px)}
.shop-ad-grid .ad-card:last-child:nth-child(odd){grid-column:1/-1}
.bag-note{font-size:9px;color:#8C6A3E;line-height:1.4;margin-top:8px}

/* 订单面板 */
.order-sheet-head{display:flex;align-items:center;gap:6px;margin-bottom:8px}
.order-sheet-head .count-pill{margin-left:auto;font-size:9px;font-weight:900;color:#7A4A1C;background:rgba(255,255,255,.6);border:1px solid rgba(160,105,40,.25);border-radius:8px;padding:2px 6px}
.order-card{
  position:relative;display:flex;align-items:center;gap:8px;padding:8px;margin-bottom:8px;border-radius:15px;
  background:linear-gradient(180deg,#FFFDF7,#F6E5C4);border:2px solid #DDB273;box-shadow:0 3px 7px rgba(0,0,0,.12);
}
.order-card.elite{border-color:#E8A83C;box-shadow:0 0 0 2px rgba(255,190,70,.18),0 3px 7px rgba(0,0,0,.12)}
.order-card-thumb{flex:none;display:flex;align-items:center;justify-content:center;width:58px;height:58px;border-radius:13px;background:linear-gradient(180deg,#F7E6C5,#E9CE9B);border:1px solid #D3A96E;overflow:hidden}
.order-card-thumb img{width:94%;height:94%;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(80,45,10,.25))}
.order-card-copy{flex:1;min-width:0}
.order-card-copy .oc-top{display:flex;align-items:center;gap:4px}
.order-card-copy b{font-size:12px;color:#5A3A16;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.elite-tag{flex:none;font-size:7px;font-weight:900;color:#fff;background:linear-gradient(180deg,#FFB24B,#E57B17);border-radius:5px;padding:1px 4px}
.order-card-copy small{display:block;font-size:8px;color:#8C6A3E;margin-top:2px}
.order-card-rewards{display:flex;gap:3px;margin-top:3px;flex-wrap:wrap}
.order-card-btns{flex:none;display:flex;flex-direction:column;gap:4px;align-items:stretch}
.order-card-btns button{height:29px;padding:0 8px;border-radius:8px;font-size:9px;font-weight:900}
.order-card-btns .double{background:linear-gradient(180deg,#FFD36A,#E89822);color:#5A2E00;border:1px solid #FFF0B0;box-shadow:0 2px 0 #B36E0D;display:flex;align-items:center;justify-content:center;gap:2px}
.order-card-btns .double .mp-icon{width:13px;height:13px}
.order-card-btns .deliver{background:linear-gradient(180deg,#8FE05C,#4FAF2E);color:#fff;border:1px solid #E9FFD0;box-shadow:0 2px 0 #2F7A1F}
.order-card-btns .deliver:disabled{background:rgba(140,110,70,.14);color:#9B7A50;border:1px dashed rgba(140,110,70,.3);box-shadow:none}
.order-sheet-actions{display:flex;gap:6px;margin-top:4px}
.order-sheet-actions .btn-ghost,.order-sheet-actions .btn-ad{flex:1;min-height:36px}
.order-sheet-actions small{font-size:8px;font-weight:800;opacity:.8}

/* 中心弹窗 */
.modal-title{display:flex;align-items:center;gap:6px;font-size:17px;font-weight:900;color:#5A3A16;margin:0 0 6px}
.modal-title .mp-icon{width:22px;height:22px;color:#E08321}
.modal-desc{font-size:11px;color:#7C5B31;line-height:1.5;margin:0 0 12px}
.modal-btns{display:flex;gap:7px;margin-top:12px}
.modal-btns>*{flex:1}
.ad-stage{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  padding:18px 10px;border-radius:16px;background:linear-gradient(180deg,#3D2C16,#22190D);
  color:#FFE9B0;margin-bottom:8px;overflow:hidden;border:2px solid #7A5A2A;
}
.ad-stage .ad-screen{width:100%;height:78px;border-radius:10px;background:linear-gradient(135deg,#1B2A4A,#284568 45%,#172033);display:flex;align-items:center;justify-content:center;color:#8ED4FF;font-size:10px;font-weight:800;letter-spacing:.08em;box-shadow:inset 0 0 20px rgba(0,0,0,.5)}
.ad-stage .ad-screen .mp-icon{width:32px;height:32px;margin-right:4px}
.ad-count{font-size:26px;font-weight:900;color:#FFD76A;line-height:1;font-variant-numeric:tabular-nums}
.ad-stage small{font-size:9px;opacity:.75}
.nick-input{width:100%;height:42px;border-radius:11px;border:2px solid #D9B47C;background:rgba(255,255,255,.75);padding:0 11px;font-size:14px;color:#5A3A16;outline:none;margin-bottom:4px}
.nick-input:focus{border-color:#FF8A3D;box-shadow:0 0 0 3px rgba(255,138,61,.18)}
.reward-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}
.reward-box{display:flex;align-items:center;gap:5px;padding:7px;border-radius:10px;background:rgba(255,255,255,.6);border:1px solid rgba(160,105,40,.22);font-size:10px;font-weight:900;color:#5A3A16}
.reward-box .mp-icon{width:20px;height:20px;color:#E09A1F}
.reward-box img{width:30px;height:30px;object-fit:contain}
.reward-box small{display:block;font-size:8px;color:#8C6A3E;font-weight:700}
.tut-list{display:flex;flex-direction:column;gap:7px;margin:4px 0 10px}
.tut-row{display:flex;align-items:flex-start;gap:7px;font-size:10px;color:#6A4A24;line-height:1.4}
.tut-num{flex:none;display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:linear-gradient(180deg,#FFD36A,#E89822);color:#5A2E00;font-size:10px;font-weight:900;border:1px solid #FFF0B0}

/* ================= 提示 / 特效 / 拖拽 ================= */
.toast{
  position:fixed;left:50%;bottom:calc(104px + var(--safe-b));z-index:200;
  transform:translateX(-50%) translateY(8px);
  background:rgba(40,27,13,.94);color:#FFF4D8;border:1px solid rgba(255,220,150,.35);
  padding:8px 14px;border-radius:12px;font-size:12px;font-weight:800;line-height:1.35;
  max-width:82vw;text-align:center;opacity:0;pointer-events:none;
  transition:opacity .2s,transform .2s;box-shadow:0 6px 18px rgba(0,0,0,.35);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
body[data-view="home"] .toast{top:calc(66px + var(--safe-t));bottom:auto}
.fx-layer{position:fixed;inset:0;z-index:150;pointer-events:none;overflow:hidden}
.fx-spark{position:absolute;width:7px;height:7px;border-radius:50%;pointer-events:none;animation:sparkFly .68s ease-out forwards}
@keyframes sparkFly{0%{transform:translate(0,0) scale(1);opacity:1}100%{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0}}
.fx-text{position:absolute;font-size:15px;font-weight:900;color:#fff;text-shadow:0 2px 0 rgba(120,60,0,.55),0 0 8px rgba(255,220,120,.8);pointer-events:none;animation:textFloat .9s ease-out forwards;white-space:nowrap}
@keyframes textFloat{0%{opacity:0;transform:translate(-50%,8px) scale(.7)}22%{opacity:1;transform:translate(-50%,0) scale(1.08)}100%{opacity:0;transform:translate(-50%,-42px) scale(1)}}
.fx-coin{position:absolute;width:16px;height:16px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#FFF6B0,#FFC93C 55%,#D98A12);border:1px solid #B36E0D;box-shadow:0 0 6px rgba(255,200,60,.7);pointer-events:none;animation:coinUp .7s ease-out forwards}
@keyframes coinUp{0%{opacity:1;transform:translate(0,0) scale(.7)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1.2)}}
.drag-ghost{position:fixed;z-index:300;width:62px;height:62px;pointer-events:none;transform:translate(-50%,-58%);filter:drop-shadow(0 10px 8px rgba(0,0,0,.35))}
.drag-ghost img{width:100%;height:100%;object-fit:contain}
.flash{animation:flashCell .4s}
@keyframes flashCell{0%,100%{box-shadow:none}50%{box-shadow:inset 0 0 22px rgba(255,220,90,.9)}}

/* ================= 响应式 ================= */
@media (max-height:740px){
  .scene{height:144px}
  .rail{top:2px;gap:4px}
  .rail-btn{width:46px;height:44px}
  .rail-ico{width:26px;height:26px}
  .rail-ico .mp-icon{width:18px;height:18px}
  .rail-btn small{font-size:8px}
  .board-card{padding:7px}
  .board-shell{padding:6px}
  .order-peek{display:none}
  .ad-chip{height:35px}
  .home-space{height:calc(84px + var(--safe-b))}
}
@media (max-height:700px){
  .hud{margin:calc(4px + var(--safe-t)) 8px 0;padding:5px 6px;border-radius:15px;gap:6px}
  .avatar{width:34px;height:34px}
  .player-copy b{font-size:12px}
  .player-copy small{font-size:8px}
  .xp{width:54px;height:3px}
  .level-pill{font-size:9px}
  .res{height:27px;border-radius:9px}
  .res .mp-icon{width:15px;height:15px}
  .res b{font-size:10px}
  .res-plus{width:13px;height:13px;font-size:10px}
  .scene{height:136px}
  .rail{top:2px;gap:3px}
  .rail-right{top:2px}
  .rail-btn{width:42px;height:42px;border-radius:12px;border-width:1.5px;box-shadow:0 3px 0 rgba(128,78,26,.5),0 4px 8px rgba(30,20,0,.18),inset 0 1px 0 #fff}
  .rail-ico{width:23px;height:23px;border-radius:8px}
  .rail-ico .mp-icon{width:16px;height:16px}
  .rail-btn small{font-size:8px;margin-top:0}
  .rail-timer{font-size:7px;padding:0 3px}
  .scene-badge{bottom:1px;font-size:8px;padding:2px 7px 2px 5px}
  .board-card{margin:0 8px;padding:6px;border-radius:20px}
  .board-head{margin-bottom:4px;gap:4px}
  .gen-chip{padding:3px 5px;border-radius:11px;gap:5px}
  .gen-thumb{width:30px;height:30px;border-radius:9px}
  .gen-copy b{font-size:11px}
  .gen-copy small{font-size:8px}
  .upgrade-btn{width:46px;height:38px;border-radius:10px;font-size:10px}
  .upgrade-btn .mp-icon{width:13px;height:13px}
  .board-shell{padding:5px;border-radius:15px}
  .board{gap:3px}
  .cell{aspect-ratio:1/.78;border-radius:7px}
  .item .lv{min-width:13px;height:13px;font-size:8px}
  .board-foot{min-height:17px;margin-top:3px;font-size:8px}
  .bag-mini{height:19px;font-size:8px}
  .board-hint{font-size:8px}
  .ad-bubble{height:33px;padding:2px 5px 2px 2px;border-radius:10px}
  .ad-play{width:21px;height:21px}
  .ad-play .mp-icon{width:17px;height:17px}
  .ad-txt b{font-size:11px}
  .ad-txt small{font-size:7px}
  .ad-dock{margin-top:5px;padding:3px;gap:4px;border-radius:12px}
  .ad-chip{height:33px;gap:3px;padding:0 3px;border-radius:9px}
  .ad-chip .ad-play{width:20px;height:20px;border-radius:6px}
  .ad-chip .ad-play .mp-icon{width:15px;height:15px}
  .ad-chip .ad-txt b{font-size:10px}
  .ad-chip .ad-txt small{font-size:7px}
  .ad-dock .ad-timer{font-size:6px;top:-6px}
  .ad-double{height:25px;padding:0 5px 0 1px}
  .ad-double .ad-play{width:18px;height:18px}
  .ad-double .ad-play .mp-icon{width:14px;height:14px}
  .ad-double .ad-txt b{font-size:10px}
  .ad-ready{font-size:6px;padding:0 2px;top:-7px;right:0}
  .select-bar{margin-top:4px}
  .home-space{height:calc(78px + var(--safe-b))}
  .bottom-bar{padding:5px 10px calc(5px + var(--safe-b))}
  .big-btn{width:53px;height:53px;border-radius:16px;border-width:2.5px}
  .big-btn .mp-icon{width:24px;height:24px}
  .big-btn.play{height:53px;max-width:200px}
  .play-circle{width:32px;height:32px}
  .play-circle .mp-icon{width:22px;height:22px}
  .play-copy b{font-size:18px}
  .play-copy small{font-size:8px}
  .toast{bottom:calc(74px + var(--safe-b));font-size:11px}
}
@media (min-height:850px){
  .scene{height:196px}
  .rail-btn{width:54px;height:58px;border-radius:16px}
  .rail-ico{width:32px;height:32px}
  .rail-ico .mp-icon{width:21px;height:21px}
  .rail-btn small{font-size:9px}
  .scene-badge{bottom:8px}
  .board-card{padding:11px 10px 9px}
  .board{gap:5px}
  .cell{aspect-ratio:1/1;border-radius:10px}
  .board-head{margin-bottom:7px}
  .gen-thumb{width:42px;height:42px}
  .gen-copy b{font-size:13px}
  .toast{bottom:calc(108px + var(--safe-b))}
}
@media (max-height:600px){
  .scene{height:118px}
  .rail{top:0;gap:2px}
  .rail-btn{width:38px;height:36px;border-radius:11px;border-width:1.5px}
  .rail-ico{width:21px;height:21px;border-radius:7px}
  .rail-ico .mp-icon{width:15px;height:15px}
  .rail-btn small{font-size:7px}
  .rail-timer{font-size:6px;padding:0 2px}
  .scene-badge{bottom:2px}
  .board-foot{display:none}
  .home-space{height:calc(74px + var(--safe-b))}
}
@media (max-width:360px){
  .hud{gap:5px;padding:6px}
  .player-copy b{max-width:58px;font-size:12px}
  .res{padding:0 3px}
  .res .mp-icon{width:15px;height:15px}
  .res b{font-size:10px}
  .ad-bubble{padding:2px 4px 2px 2px;height:36px}
  .ad-play{width:22px;height:22px}
  .ad-txt b{font-size:11px}
  .board-hint{display:none}
  .ad-dock{gap:3px;padding:3px}
  .ad-chip{gap:2px;padding:0 2px}
  .ad-chip .ad-play{width:18px;height:18px}
  .ad-chip .ad-play .mp-icon{width:14px;height:14px}
  .ad-chip .ad-txt b{font-size:10px}
  .ad-chip .ad-txt small{font-size:6.5px}
}
@media (min-width:520px){
  body{background:#203a21}
  .app{box-shadow:0 0 60px rgba(0,0,0,.45)}
  .bottom-bar{left:50%;right:auto;transform:translateX(-50%)}
}

.album-cell.unknown img{filter:brightness(0) opacity(.14) !important}

/* ==========================================================
   8.0 梦幻童话主题 · 浅粉 / 浅蓝 / 奶黄 / 薄荷绿
   仅调整视觉层，棋盘尺寸与交互逻辑保持不变
   ========================================================== */
:root{
  --orange:#FF8A3D;
  --orange-deep:#F27322;
  --pink:#FFB7D5;
  --pink-deep:#F27FAE;
  --pink-soft:#FFE5F0;
  --sky:#A9DFFA;
  --sky-deep:#66B9EA;
  --sky-soft:#E7F7FF;
  --mint:#A8E8CB;
  --mint-deep:#5CC99B;
  --mint-soft:#E9FBF3;
  --butter:#FFE3A3;
  --butter-soft:#FFF7DF;
  --lav:#D9C9FF;
  --lav-soft:#F4EEFF;
  --ink:#5A4258;
  --ink-soft:#9A809B;
  --line-pink:rgba(255,183,213,.42);
  --font:"Yuanti SC","YouYuan","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}

/* ---------- 字体与底色 ---------- */
body{
  font-family:var(--font);
  color:var(--ink);
  background:linear-gradient(180deg,#FFE9F4 0%,#EDF8FF 42%,#E9FBF2 100%);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input{font-family:var(--font)}
.app{max-width:480px}

/* ---------- 梦幻天空背景 ---------- */
.bg-sky{background:
  radial-gradient(120% 60% at 12% 4%,rgba(255,214,233,.95) 0%,rgba(255,214,233,0) 58%),
  radial-gradient(95% 55% at 92% 8%,rgba(197,235,255,.9) 0%,rgba(197,235,255,0) 62%),
  radial-gradient(100% 55% at 50% 100%,rgba(196,245,220,.9) 0%,rgba(196,245,220,0) 66%),
  linear-gradient(180deg,#FFEAF5 0%,#F2FAFF 40%,#E9FBF2 74%,#DFF7EA 100%);
}
.bg-scene{
  height:min(33vh,286px);
  filter:saturate(.9) brightness(1.1) contrast(.96);
  -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 62%,rgba(0,0,0,.66) 80%,transparent 100%);
  mask-image:linear-gradient(180deg,#000 0%,#000 62%,rgba(0,0,0,.66) 80%,transparent 100%);
}
.bg-tint{
  position:absolute;inset:0;
  background:
    linear-gradient(180deg,rgba(255,226,241,.28) 0%,rgba(226,245,255,.16) 34%,rgba(255,255,255,0) 58%,rgba(255,240,248,.2) 100%),
    radial-gradient(70% 42% at 50% 30%,rgba(255,255,255,.22),rgba(255,255,255,0) 70%);
}
.bg-sun{background:radial-gradient(ellipse at 50% 8%,rgba(255,250,218,.75),rgba(255,250,218,0) 40%)}
.bg-vignette{background:
  linear-gradient(180deg,rgba(255,255,255,.22) 0%,rgba(255,255,255,0) 22%,rgba(255,255,255,0) 62%,rgba(255,225,240,.36) 100%),
  radial-gradient(ellipse at 50% 44%,rgba(255,255,255,0) 54%,rgba(210,170,205,.16) 100%);
}
.bg-deco{position:absolute;inset:0;overflow:hidden}
.bg-deco .orb{position:absolute;display:block;border-radius:50%;filter:blur(3px);opacity:.55}
.bg-deco .o1{width:190px;height:190px;left:-74px;top:120px;background:radial-gradient(circle at 40% 40%,#FFD3E7,rgba(255,211,231,0) 70%)}
.bg-deco .o2{width:210px;height:210px;right:-88px;top:250px;background:radial-gradient(circle at 50% 50%,#BFE8FF,rgba(191,232,255,0) 70%)}
.bg-deco .o3{width:150px;height:150px;left:-40px;bottom:120px;background:radial-gradient(circle at 50% 50%,#C8F5DF,rgba(200,245,223,0) 70%)}
.bg-deco .o4{width:180px;height:180px;right:-70px;bottom:40px;background:radial-gradient(circle at 50% 50%,#FFE8B5,rgba(255,232,181,0) 72%)}
.bg-deco .cloud{position:absolute;display:block;width:118px;height:42px;opacity:.72;filter:blur(1px);animation:cloudDrift 34s ease-in-out infinite alternate}
.bg-deco .cloud::before,.bg-deco .cloud::after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.92)}
.bg-deco .cloud::before{width:52px;height:52px;left:16px;bottom:0;box-shadow:34px -12px 0 -6px rgba(255,255,255,.92),64px 2px 0 -10px rgba(255,255,255,.9)}
.bg-deco .cloud::after{width:96px;height:22px;left:9px;bottom:0;border-radius:20px}
.bg-deco .c1{left:-24px;top:96px}
.bg-deco .c2{right:-30px;top:188px;transform:scale(.82);animation-delay:-12s;opacity:.5}
.bg-deco .c3{left:38%;top:42px;transform:scale(.6);opacity:.4;animation-delay:-22s}
@keyframes cloudDrift{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(24px,0,0)}}
.bg-deco .twinkle{
  position:absolute;display:block;width:12px;height:12px;background:#FFF6D2;
  clip-path:polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%);
  filter:drop-shadow(0 0 6px rgba(255,238,178,.95));opacity:.85;animation:twinkle 3.6s ease-in-out infinite;
}
.bg-deco .t1{left:8%;top:24%}
.bg-deco .t2{right:10%;top:32%;width:9px;height:9px;animation-delay:-1.1s}
.bg-deco .t3{left:18%;top:46%;width:8px;height:8px;animation-delay:-2s;opacity:.65}
.bg-deco .t4{right:20%;top:56%;width:10px;height:10px;animation-delay:-.7s;opacity:.6}
.bg-deco .t5{left:48%;top:30%;width:7px;height:7px;animation-delay:-1.6s;opacity:.55}
@keyframes twinkle{0%,100%{transform:scale(.72) rotate(0deg);opacity:.35}50%{transform:scale(1.18) rotate(16deg);opacity:.95}}
.bg-motes i{background:rgba(255,255,255,.92);box-shadow:0 0 9px rgba(255,240,196,.95)}
@keyframes moteFloat{
  0%{transform:translate3d(0,20px,0) scale(.55);opacity:0}
  18%{opacity:.9}
  80%{opacity:.45}
  100%{transform:translate3d(28px,-120px,0) scale(1.05);opacity:0}
}

/* ---------- 顶部玩家栏：奶油玻璃 ---------- */
.hud{
  margin:calc(9px + var(--safe-t)) 12px 0;
  padding:8px 9px;
  border-radius:23px;
  background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,247,251,.8));
  border:1.5px solid rgba(255,255,255,.96);
  box-shadow:0 10px 24px rgba(186,140,176,.2),inset 0 1px 0 #fff,inset 0 -2px 0 rgba(255,196,220,.22);
  -webkit-backdrop-filter:blur(18px) saturate(1.12);backdrop-filter:blur(18px) saturate(1.12);
}
.player{color:var(--ink)}
.player:active{transform:scale(.985)}
.avatar{
  width:41px;height:41px;border:2.5px solid #FFD4E5;
  box-shadow:0 0 0 2px rgba(255,255,255,.92),0 4px 10px rgba(196,132,166,.26);
}
.player-copy b{color:#4E394E;font-size:13px;font-weight:800;text-shadow:0 1px 0 rgba(255,255,255,.9);max-width:82px}
.player-copy small{color:#B18BAE;font-weight:700}
.xp{background:rgba(222,188,214,.3);box-shadow:inset 0 1px 2px rgba(150,100,140,.18)}
.xp i{background:linear-gradient(90deg,#FFC6DE,#FFAD8B,#FF8A3D)}
.level-pill{
  background:linear-gradient(180deg,#FFF3CE,#FFDE96);
  color:#9A6416;border:1px solid #FFF8E3;font-weight:900;
  box-shadow:0 2px 4px rgba(200,150,70,.2),inset 0 1px 0 #fff;
}
.level-pill .mp-icon{color:#F0A32C}
.res{
  background:linear-gradient(180deg,#FFFFFF,#FFF7FB);
  border:1px solid rgba(255,255,255,.98);color:#5A4258;
  box-shadow:0 3px 8px rgba(188,146,178,.16),inset 0 1px 0 #fff;
}
.res b{color:#5A4258;font-weight:900}
.res.coin .mp-icon{color:#F5B32D}
.res.gem .mp-icon{color:#5BBEE8}
.res.wish .mp-icon{color:#F58FBE}
.res-plus{
  background:linear-gradient(180deg,#C3F4DC,#79DBB1);color:#2F7154;
  box-shadow:0 2px 0 #55B98D,inset 0 1px 0 rgba(255,255,255,.7);font-weight:900;
}

/* ---------- 场景按钮 ---------- */
.scene{height:174px}
.scene-badge{
  background:rgba(255,255,255,.74);border:1px solid rgba(255,255,255,.95);
  color:#8A617F;box-shadow:0 3px 10px rgba(170,120,155,.2);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);font-weight:800;
}
.scene-badge .mp-icon{color:#F5A93C}
.rail-btn{
  width:52px;height:53px;border-radius:17px;border:2px solid #fff;
  background:linear-gradient(180deg,#FFFFFF,#FFF3F8);
  box-shadow:0 4px 0 rgba(214,166,190,.46),0 8px 16px rgba(166,116,152,.2),inset 0 1px 0 #fff;
  color:#876079;
}
.rail-btn:active{transform:translateY(3px);box-shadow:0 1px 0 rgba(214,166,190,.46),0 4px 8px rgba(166,116,152,.16)}
.rail-ico{
  width:31px;height:31px;border-radius:11px;
  background:linear-gradient(180deg,#FFE4F0,#FFC5DC);color:#C25E8B;
  box-shadow:inset 0 1px 0 #fff,0 2px 4px rgba(220,150,190,.2);
}
.rail-ico .mp-icon{width:20px;height:20px}
.rail-ico.pet-ico{border:1.5px solid #FFE0EC}
.rail-ico.map-ico{background:linear-gradient(180deg,#D9F8E7,#9BE6C5);color:#2E8A64}
.rail-ico.season-ico{background:linear-gradient(180deg,#FFF2C6,#FFDA8A);color:#A76A17}
.rail-ico.music-ico{background:linear-gradient(180deg,#EFE5FF,#D3BEFF);color:#7A5AC4}
.rail-btn small{color:#8A617F;font-weight:800}
.rail-timer{background:linear-gradient(180deg,#FFB7D5,#F27FAE);color:#fff;border:1.5px solid #fff;box-shadow:0 2px 5px rgba(196,100,150,.3)}
.dot{background:#FF7BA8;border-color:#fff;box-shadow:0 1px 4px rgba(220,80,130,.45)}
.rail-btn.off .music-ico{background:linear-gradient(180deg,#EEE8EE,#CFC5CF);color:#8D7A8B}
.sound-btn.off small{color:#A08CA0}
.sound-btn.wait{animation:sndGlowSoft 2.2s ease-in-out infinite}
@keyframes sndGlowSoft{
  0%,100%{box-shadow:0 4px 0 rgba(214,166,190,.46),0 8px 16px rgba(166,116,152,.2),inset 0 1px 0 #fff}
  50%{box-shadow:0 4px 0 rgba(214,166,190,.46),0 0 0 5px rgba(255,206,228,.35),0 8px 18px rgba(166,116,152,.22),inset 0 1px 0 #fff}
}
.sound-btn.playing .music-ico::after{background:#7EE0B3;border-color:#fff}

/* ---------- 合成主卡：棉花糖奶油 ---------- */
.board-card{
  margin:0 12px;padding:10px 10px 8px;border-radius:28px;
  background:
    radial-gradient(120% 60% at 12% 0%,rgba(255,214,231,.38),rgba(255,214,231,0) 62%),
    radial-gradient(110% 60% at 100% 0%,rgba(206,238,255,.42),rgba(206,238,255,0) 60%),
    linear-gradient(180deg,#FFFEFC 0%,#FFFAF8 46%,#FFF5EA 100%);
  border:2px solid #FFFFFF;
  box-shadow:
    0 16px 34px rgba(182,140,172,.25),
    0 4px 10px rgba(182,140,172,.12),
    0 0 0 1px rgba(255,197,220,.3),
    inset 0 2px 0 #FFFFFF,
    inset 0 -8px 18px rgba(255,227,190,.28);
}
.board-card::after{inset:5px;border-radius:23px;border:1.5px dashed rgba(255,183,213,.42)}
.board-head{gap:7px;margin-bottom:7px}
.gen-chip{
  padding:5px 7px;border-radius:16px;
  background:linear-gradient(180deg,#FFFFFF,#FFF8FB);
  border:1px solid #FFE2EE;
  box-shadow:0 3px 8px rgba(200,150,180,.1),inset 0 1px 0 #fff;
}
.gen-thumb{
  width:39px;height:39px;border-radius:14px;
  background:linear-gradient(180deg,#FFF6FB,#FFE7F1);
  border:1px solid #FFD6E6;
  box-shadow:inset 0 1px 0 #fff;
}
.gen-copy b{color:#5A4258;font-weight:800}
.gen-copy small{color:#A98EA8}
.gen-copy small i{color:#F27FAE}
.gen-meter{background:rgba(255,188,214,.26);box-shadow:inset 0 1px 1px rgba(190,120,160,.12)}
.gen-meter i{background:linear-gradient(90deg,#FFC8DF,#FFAD8B,#FF8A3D);box-shadow:0 0 6px rgba(255,160,120,.35)}
.upgrade-btn{
  width:53px;height:47px;border-radius:15px;
  background:linear-gradient(180deg,#FFBC7C,#FF8A3D);
  border:2px solid #FFF1E2;
  box-shadow:0 4px 0 #E47A2C,0 7px 12px rgba(255,138,61,.22),inset 0 1px 0 rgba(255,255,255,.55);
  font-weight:900;
}
.upgrade-btn:active{transform:translateY(2px);box-shadow:0 1px 0 #E47A2C,0 3px 6px rgba(255,138,61,.18)}
.upgrade-btn.max{background:linear-gradient(180deg,#CBBBD3,#A793B1);box-shadow:0 3px 0 #8A7594}

/* 棋盘：薄荷 + 樱粉的软糖容器 */
.board-shell{
  padding:9px;border-radius:21px;
  background:
    radial-gradient(80% 90% at 8% 0%,rgba(212,246,233,.9),rgba(212,246,233,0) 72%),
    radial-gradient(90% 95% at 100% 0%,rgba(255,225,239,.92),rgba(255,225,239,0) 72%),
    linear-gradient(180deg,#F3FBF7 0%,#FFF7FA 52%,#FFF3E6 100%);
  border:1.5px solid #FFFFFF;
  box-shadow:inset 0 2px 8px rgba(190,155,185,.16),inset 0 -1px 0 rgba(255,255,255,.9),0 2px 4px rgba(190,155,185,.1);
}
.board{grid-template-columns:repeat(6,1fr);gap:5px}
.cell{
  aspect-ratio:1/.92;border-radius:13px;
  background:linear-gradient(170deg,rgba(255,255,255,.98),rgba(255,250,247,.9));
  border:1px solid rgba(255,255,255,.98);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 0 rgba(226,204,214,.22),
    0 2px 5px rgba(190,155,180,.1);
  transition:transform .12s,box-shadow .18s,background .18s;
}
.cell::after{inset:18%;background:radial-gradient(circle,rgba(255,255,255,.7),rgba(255,255,255,0) 72%)}
.cell:active{transform:scale(.95)}
.cell.bonus{
  background:linear-gradient(170deg,#F3FFF9,#DDF9EC);
  border-color:#CBF2DF;
  box-shadow:inset 0 0 0 1.5px rgba(124,220,177,.35),inset 0 1px 0 #fff,0 2px 5px rgba(120,200,165,.12);
}
/* 等级色阶：物品底板与角标随等级变化 */
.cell.tier-1{background:linear-gradient(170deg,#FFFFFF,#F0FCF6);box-shadow:inset 0 1px 0 #fff,inset 0 0 0 1.5px rgba(168,232,203,.34),0 2px 5px rgba(140,205,175,.1)}
.cell.tier-2{background:linear-gradient(170deg,#FFFFFF,#EEF9FF);box-shadow:inset 0 1px 0 #fff,inset 0 0 0 1.5px rgba(169,223,250,.4),0 2px 5px rgba(135,190,225,.1)}
.cell.tier-3{background:linear-gradient(170deg,#FFFFFF,#FFFAE8);box-shadow:inset 0 1px 0 #fff,inset 0 0 0 1.5px rgba(255,227,163,.6),0 2px 5px rgba(220,190,120,.1)}
.cell.tier-4{background:linear-gradient(170deg,#FFFFFF,#FFF1F8);box-shadow:inset 0 1px 0 #fff,inset 0 0 0 2px rgba(255,183,213,.55),0 0 10px rgba(255,183,213,.22),0 2px 5px rgba(210,150,185,.1)}
.cell.tier-5{background:linear-gradient(170deg,#FFFDF4,#FFF1D6);box-shadow:inset 0 1px 0 #fff,inset 0 0 0 2px rgba(255,210,120,.7),0 0 14px rgba(255,200,100,.32),0 2px 5px rgba(210,170,100,.12)}
.cell.selected{
  outline:3px solid #FF9A4F;outline-offset:-2px;z-index:4;
  box-shadow:0 0 0 5px rgba(255,183,213,.35),0 0 18px rgba(255,138,61,.55),inset 0 1px 0 #fff;
  transform:scale(1.02);
}
.cell.drop-target{outline:3px dashed #5CC99B;outline-offset:-2px;box-shadow:0 0 14px rgba(92,201,155,.4)}
.cell.wrong{animation:wrongShakeSoft .3s}
@keyframes wrongShakeSoft{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
.item{
  width:99%;height:99%;
  filter:drop-shadow(0 4px 3px rgba(115,75,100,.2)) saturate(1.04);
}
.item img{filter:drop-shadow(0 1px 0 rgba(255,255,255,.7))}
.item .lv{
  right:1px;bottom:1px;min-width:16px;height:16px;border-radius:9px;
  font-size:9px;font-weight:900;border:1.5px solid #fff;
  box-shadow:0 2px 4px rgba(120,80,110,.22);
  font-family:var(--font);
}
.item.tier-1 .lv{background:linear-gradient(180deg,#D8F8E8,#8FE0B8);color:#2E6E51}
.item.tier-2 .lv{background:linear-gradient(180deg,#DCF4FF,#8ED3F2);color:#256280}
.item.tier-3 .lv{background:linear-gradient(180deg,#FFF3C7,#FFD46E);color:#795312}
.item.tier-4 .lv{background:linear-gradient(180deg,#FFDCEC,#FF9FC7);color:#8A2F59}
.item.tier-5 .lv{background:linear-gradient(145deg,#FFF1B8,#FFC24D 55%,#FF9F7A);color:#6B3708;border-color:#FFF9DC;box-shadow:0 0 8px rgba(255,190,80,.6),0 2px 4px rgba(150,90,20,.25)}
.item.tier-4::before,.item.tier-5::before{
  content:"";position:absolute;inset:4%;border-radius:50%;
  background:radial-gradient(circle,rgba(255,190,220,.34),rgba(255,190,220,0) 68%);
  animation:glowPulse 2.6s ease-in-out infinite;pointer-events:none;
}
.item.tier-5::before{background:radial-gradient(circle,rgba(255,214,120,.42),rgba(255,214,120,0) 70%)}
.item.lv-high::before{background:radial-gradient(circle,rgba(255,200,230,.38),rgba(255,200,230,0) 70%)}
.item.tier-5.lv-high::before{background:radial-gradient(circle,rgba(255,214,120,.48),rgba(255,214,120,0) 72%)}
.item.pop{animation:itemPopSoft .34s cubic-bezier(.2,1.5,.4,1)}
@keyframes itemPopSoft{0%{transform:scale(.55) rotate(-4deg)}70%{transform:scale(1.15) rotate(2deg)}100%{transform:scale(1) rotate(0)}}
.item.spawn{animation:itemSpawnSoft .36s cubic-bezier(.2,1.4,.4,1)}
@keyframes itemSpawnSoft{0%{transform:translateY(12px) scale(.32);opacity:0}100%{transform:translateY(0) scale(1);opacity:1}}

/* 选中条 / 满格遮罩 */
.select-bar{
  background:linear-gradient(180deg,#FFFFFF,#FFF5FA);
  border:1.5px solid #FFD9E8;box-shadow:0 4px 10px rgba(200,150,180,.14),inset 0 1px 0 #fff;
}
.select-info b{color:#5A4258}
.select-store{background:linear-gradient(180deg,#FFD1E3,#F58FBE);color:#7A2F57;border:1px solid #FFF2F8;box-shadow:0 2px 0 #D06C9B}
.select-cancel{background:rgba(255,255,255,.7);color:#8A6A86;border:1px solid #F2DCE8}
.board-full{
  background:rgba(255,251,250,.96);border:2px solid #FFD4E5;
  box-shadow:inset 0 0 34px rgba(255,190,220,.28),0 8px 18px rgba(180,130,165,.18);
}
.full-ico{background:linear-gradient(180deg,#FFE8F2,#FFD0E4);color:#D06C9B}
.board-full b{color:#5A4258}
.board-full small{color:#A98EA8}
.board-foot{color:#A98EA8;gap:7px}
.cell-count .mp-icon{color:#B79BB3}
.bag-mini{
  background:linear-gradient(180deg,#FFFFFF,#FFF6FB);border:1px solid #FFE0EC;
  color:#8A617F;box-shadow:0 2px 5px rgba(200,150,180,.12);
}
.bag-mini b{color:#C77FA5}
.board-hint{color:#B79BB3}

/* 广告福利坞：奶油小卡 */
.ad-dock{
  margin-top:8px;padding:5px;gap:6px;border-radius:17px;
  background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(255,244,249,.72));
  border:1px solid #FFFFFF;
  box-shadow:0 4px 12px rgba(190,145,175,.12),inset 0 1px 0 #fff;
}
.ad-chip{
  height:40px;border-radius:13px;border:1.5px solid #FFE3ED;
  background:linear-gradient(180deg,#FFFFFF,#FFF7F2);
  box-shadow:0 3px 0 rgba(226,175,195,.32),inset 0 1px 0 #fff;
  color:#7A5572;
}
.ad-chip:active{transform:translateY(2px);box-shadow:0 0 0 rgba(0,0,0,0),inset 0 1px 0 #fff}
.ad-chip .ad-play,.ad-play{
  background:linear-gradient(180deg,#9CD8F8,#5AAEE8);border:1.5px solid #fff;
  color:#fff;box-shadow:0 2px 4px rgba(80,140,190,.26);
}
.ad-chip .ad-txt b{color:#F0804A}
.ad-chip .ad-txt small{color:#A98EA8}
.ad-dock .ad-timer,.ad-timer{
  background:linear-gradient(180deg,#FFB4D3,#F27FAE);color:#fff;border:1px solid #fff;
  box-shadow:0 2px 5px rgba(200,100,150,.3);
}
.ad-double{
  background:linear-gradient(180deg,#FFF9E4,#FFE1A4);
  border:2px solid #FFF6DA;
  box-shadow:0 0 0 2px rgba(255,210,130,.3),0 0 12px rgba(255,210,130,.4),0 3px 0 rgba(210,160,90,.32);
}
.ad-double .ad-play{background:linear-gradient(180deg,#FFD27C,#FF9A3D);border-color:#FFF8E3}
.ad-double .ad-txt b{color:#C46A1E}
.ad-double .ad-txt small{color:#A98A6C}
.ad-ready{background:#FF8FB6;border-color:#fff;box-shadow:0 2px 5px rgba(200,100,150,.3)}

/* 当前订单 */
.order-peek{
  margin:8px 12px 0;padding:8px;border-radius:21px;min-height:68px;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,248,251,.9));
  border:1.5px solid #fff;
  box-shadow:0 9px 22px rgba(185,142,175,.2),inset 0 1px 0 #fff;
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
}
.order-thumb{
  width:46px;height:46px;border-radius:15px;
  background:linear-gradient(180deg,#FFF7FB,#FFE7F1);
  border:1px solid #FFD8E6;box-shadow:inset 0 1px 0 #fff;
}
.order-info b{color:#5A4258;font-weight:800}
.order-info small{color:#A98EA8}
.reward-chip{
  background:rgba(255,255,255,.82);border:1px solid #FFE4EE;color:#9A7592;
}
.reward-chip.coin .mp-icon{color:#F0A72D}
.reward-chip.star .mp-icon{color:#EE8DBB}
.order-go{
  border-radius:13px;border:2px solid #FFF1E4;
  background:linear-gradient(180deg,#FFBC7C,#FF8A3D);
  box-shadow:0 3px 0 #E0792C,0 5px 10px rgba(255,138,61,.2);
}
.order-go.ready{background:linear-gradient(180deg,#B9F0D4,#6ED2A6);box-shadow:0 3px 0 #47A97F;border-color:#EEFFF7;color:#2C6B4F;text-shadow:none}
.order-more{background:rgba(255,255,255,.75);border:1px solid #FFE2ED;color:#B189A4}
.order-empty{color:#A98EA8}

/* ---------- 底部操作栏：漂浮奶油 Dock ---------- */
.bottom-bar{
  padding:10px 14px calc(10px + var(--safe-b));
  background:linear-gradient(180deg,rgba(255,248,252,0) 0%,rgba(255,248,252,.66) 26%,rgba(255,250,246,.95) 100%);
}
.big-btn{
  border:3px solid #FFFFFF;
  box-shadow:0 6px 0 rgba(196,150,170,.4),0 12px 22px rgba(170,120,150,.22),inset 0 2px 0 rgba(255,255,255,.6);
}
.big-btn:active{transform:translateY(3px);box-shadow:0 2px 0 rgba(196,150,170,.4),0 5px 10px rgba(170,120,150,.18),inset 0 2px 0 rgba(255,255,255,.5)}
.big-btn.shop{background:linear-gradient(180deg,#A6DEFF,#67B8EE)}
.big-btn.shop .mp-icon{filter:drop-shadow(0 1px 1px rgba(40,100,150,.35))}
.big-btn.bag{background:linear-gradient(180deg,#FFE6A8,#FFC65F);color:#7A4E13}
.big-btn.play{
  background:linear-gradient(180deg,#FFBC7C,#FF8A3D);
  border-color:#FFF6EE;text-shadow:0 1px 2px rgba(150,60,10,.32);
  box-shadow:0 6px 0 #DB7228,0 12px 22px rgba(255,120,50,.24),inset 0 2px 0 rgba(255,255,255,.48);
}
.big-btn.play:active{box-shadow:0 2px 0 #DB7228,0 5px 10px rgba(255,120,50,.2)}
.play-circle{background:rgba(255,255,255,.22);border:2px solid rgba(255,255,255,.8)}
.big-badge{background:#FF7FAE;border-color:#fff;box-shadow:0 2px 6px rgba(200,80,130,.35)}
.big-count{background:#7A5D7B;border-color:#fff;color:#FFF1DA}
.home-space{height:calc(101px + var(--safe-b))}

/* ---------- 子页面：浅色童话卡 ---------- */
.sub-screen{
  background:linear-gradient(180deg,rgba(255,245,251,.44) 0%,rgba(247,253,255,.86) 34%,rgba(238,252,246,.95) 100%);
  color:var(--ink);
}
.sub-top{color:var(--ink)}
.sub-title .eyebrow{color:#D27FA5;text-shadow:0 1px 0 rgba(255,255,255,.85)}
.sub-title h1{color:#4E394E;text-shadow:0 1px 0 rgba(255,255,255,.9),0 2px 8px rgba(255,255,255,.7)}
.back-btn{
  background:linear-gradient(180deg,#FFFFFF,#FFF3F8);border:2px solid #fff;color:#8A617F;
  box-shadow:0 4px 0 rgba(206,160,184,.4),0 7px 14px rgba(170,120,150,.16);
}
.sub-res{
  background:rgba(255,255,255,.82);border:1px solid #fff;color:#8A617F;
  box-shadow:0 3px 8px rgba(180,140,170,.14);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
}
.sub-res .mp-icon{color:#F0A83A}
.card{
  border-radius:22px;
  background:linear-gradient(180deg,#FFFFFF,#FFF9FB 58%,#FFF4EB);
  border:1.5px solid #fff;
  box-shadow:0 9px 22px rgba(180,140,170,.16),inset 0 1px 0 #fff;
}
.card-head h3{color:#5A4258}
.card-head .mp-icon{color:#E98CB5}
.card-head small{color:#A98EA8}
.town-banner{border:3px solid #fff;border-radius:23px;box-shadow:0 10px 22px rgba(170,130,160,.22)}
.town-banner-shade{background:linear-gradient(180deg,rgba(90,60,90,0) 26%,rgba(70,45,75,.66) 100%)}
.town-banner-copy small{color:#FFE7F1}
.region-item,.pet-card,.pet-hero{
  background:linear-gradient(180deg,#FFFFFF,#FFF7FA 60%,#FFF2E9);
  border:1.5px solid #fff;
  box-shadow:0 6px 14px rgba(180,140,170,.14),inset 0 1px 0 #fff;
}
.region-thumb,.pet-hero-img,.pet-avatar{border-color:#FFE1EE;background:linear-gradient(180deg,#FFF7FB,#FFEAF2)}
.region-copy b,.pet-card-top b,.pet-hero-copy b,.season-copy b{color:#5A4258}
.region-copy p,.pet-card p,.pet-hero-copy p,.season-copy small{color:#A98EA8}
.region-copy .buff,.pet-hero-copy span{color:#E57CA5}
.region-copy .tag{background:linear-gradient(180deg,#B9F0D4,#6ED2A6);color:#2C6B4F}
.region-actions .active-tag{color:#2F8A64;background:rgba(168,232,203,.24);border-color:#7BD5AE}
.pet-card.active{border-color:#6ED2A6;box-shadow:0 0 0 3px rgba(168,232,203,.35),0 6px 14px rgba(140,190,165,.18)}
.pet-btn.on{color:#2F8A64;background:rgba(168,232,203,.22);border-color:#7BD5AE}
.season-medal{background:radial-gradient(circle,#FFF7CF,#FFD777 62%,#F2A33C);border-color:#FFF9DF;box-shadow:0 5px 12px rgba(200,150,70,.24)}
.season-rankbar{background:rgba(220,190,215,.28)}
.season-rankbar i{background:linear-gradient(90deg,#FFCFDF,#FF9B6A)}
.album-cell{background:linear-gradient(160deg,#FFFFFF,#FFF4F9);border:1px solid #FFE4EE}
.album-cell .a-lv{background:rgba(255,255,255,.85);color:#B083A5}
.task-row,.rank-row{border-bottom-color:rgba(220,185,210,.34)}
.task-copy b,.rank-name{color:#5A4258}
.task-copy small,.rank-row{color:#A98EA8}
.task-progress{background:rgba(220,190,215,.28)}
.task-progress i{background:linear-gradient(90deg,#A8E8CB,#6ED2A6)}
.task-claim{border-color:#FFE9D8;box-shadow:0 2px 0 #DDB06C}
.task-claim.done{background:rgba(200,180,205,.16);color:#A38EA5;border-color:rgba(200,180,205,.3)}
.rank-no{background:rgba(220,190,215,.24);color:#8A617F}
.rank-row.me{background:rgba(255,210,230,.24)}
.page-note{color:rgba(122,92,120,.72)}

/* ---------- 通用按钮 / 弹层 ---------- */
.btn-primary,.btn-green,.btn-ghost,.btn-ad,.btn-danger{border-radius:13px}
.btn-primary{background:linear-gradient(180deg,#FFBC7C,#FF8A3D);border-color:#FFF1E4;box-shadow:0 3px 0 #E0792C}
.btn-green{background:linear-gradient(180deg,#B9F0D4,#6ED2A6);border-color:#EEFFF7;box-shadow:0 3px 0 #47A97F;color:#2C6B4F;text-shadow:none}
.btn-ghost{background:linear-gradient(180deg,#FFFFFF,#FFF6FA);border-color:#FFE0EC;color:#8A617F;box-shadow:0 3px 0 rgba(214,170,190,.4)}
.btn-ad{background:linear-gradient(180deg,#9CD8F8,#5AAEE8);border-color:#EEFAFF;box-shadow:0 3px 0 #3C8FC9}
.sheet-mask,.modal-mask{background:rgba(70,45,72,.42);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.sheet,.modal-card{
  background:linear-gradient(180deg,#FFFDFC 0%,#FFF8FB 56%,#FFF3EB 100%);
  border-top:4px solid #FFD8E6;
  box-shadow:0 -10px 34px rgba(130,85,120,.28);
}
.modal-card{border:2.5px solid #fff;box-shadow:0 16px 38px rgba(130,85,120,.3),inset 0 1px 0 #fff}
.sheet-grab{background:rgba(210,170,200,.4)}
.sheet-head{background:#FFFDFC;box-shadow:0 5px 10px rgba(255,245,250,.8)}
.sheet-head h2,.modal-title{color:#5A4258}
.sheet-x{background:rgba(255,214,232,.4);color:#B06A90}
.nick-input{border-color:#FFD8E6;background:rgba(255,255,255,.9);color:#5A4258}
.nick-input:focus{border-color:#FF9E6C;box-shadow:0 0 0 3px rgba(255,138,61,.16)}
.shop-hero{background:linear-gradient(120deg,#FFF3D6,#FFE1A4 55%,#FFC47A);border-color:#FFF9E7}
.shop-hero-copy b{color:#6B4213}
.shop-item,.ad-card,.bag-cell,.order-card,.prop-row,.bag-ad-row,.bag-cap{
  background:linear-gradient(180deg,#FFFFFF,#FFF8FB 60%,#FFF3EA);
  border-color:#FFE3ED;box-shadow:0 4px 10px rgba(180,140,170,.12);
}
.shop-item b,.ad-card b,.order-card-copy b,.bag-cell b,.prop-copy b,.bag-ad-copy b{color:#5A4258}
.shop-item small,.ad-card small,.order-card-copy small,.prop-copy small,.bag-ad-copy small{color:#A98EA8}
.shop-buy{background:linear-gradient(180deg,#FFBC7C,#FF8A3D);border-color:#FFF1E4;box-shadow:0 2px 0 #E0792C}
.bag-tab.on{background:linear-gradient(180deg,#FFBC7C,#FF8A3D);border-color:#FFF1E4;box-shadow:0 2px 0 #E0792C}
.bag-toolbar button,.prop-buy,.bag-cap{background:rgba(255,255,255,.78);border-color:#FFE2ED;color:#8A617F}
.bag-cell.empty{background:rgba(255,255,255,.5);border-color:#FFE0EC}
.prop-use{background:linear-gradient(180deg,#B9F0D4,#6ED2A6);color:#2C6B4F;border-color:#EEFFF7;box-shadow:0 2px 0 #47A97F}
.order-card.elite{border-color:#FFD08A;box-shadow:0 0 0 3px rgba(255,220,150,.3),0 4px 10px rgba(190,150,100,.14)}
.order-card-thumb{background:linear-gradient(180deg,#FFF8FC,#FFE9F2);border-color:#FFD8E6}
.order-card-btns .deliver{background:linear-gradient(180deg,#B9F0D4,#6ED2A6);color:#2C6B4F;box-shadow:0 2px 0 #47A97F;border-color:#EEFFF7}
.order-card-btns .double{background:linear-gradient(180deg,#FFE4A4,#FFC45F);border-color:#FFF8E3;box-shadow:0 2px 0 #D9A03F}
.reward-box,.tut-row,.ad-stage{color:#6A4A65}
.reward-box{background:rgba(255,255,255,.8);border-color:#FFE3ED}
.tut-num{background:linear-gradient(180deg,#FFE4A4,#FFC45F);border-color:#FFF8E3;color:#795312}
.toast{background:rgba(94,63,88,.94);border-color:rgba(255,220,235,.4);color:#FFF7FC;box-shadow:0 8px 20px rgba(90,55,80,.3)}
.drag-ghost{filter:drop-shadow(0 12px 10px rgba(150,90,130,.4))}

/* ---------- 合成星光特效 ---------- */
.fx-burst{
  position:absolute;width:var(--size);height:var(--size);
  transform:translate(-50%,-50%);pointer-events:none;z-index:1;
}
.fx-burst .halo{
  position:absolute;inset:0;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.95) 0%,var(--tint) 22%,rgba(255,183,213,.32) 44%,rgba(255,183,213,0) 70%);
  animation:haloOut .62s ease-out forwards;mix-blend-mode:screen;
}
.fx-burst .ring{
  position:absolute;left:34%;top:34%;width:32%;height:32%;border-radius:50%;
  border:2.5px solid var(--tint);opacity:0;
  animation:ringOut .72s cubic-bezier(.15,.72,.3,1) forwards;
  box-shadow:0 0 14px var(--tint);
}
.fx-burst .ring.r2{left:40%;top:40%;width:20%;height:20%;border-width:1.5px;border-style:dashed;animation-delay:.07s}
.fx-burst .core-star{
  position:absolute;left:50%;top:50%;width:34%;height:34%;
  transform:translate(-50%,-50%) scale(0) rotate(0deg);
  background:linear-gradient(180deg,#FFFFFF,var(--tint));
  clip-path:polygon(50% 0,62% 35%,100% 50%,62% 65%,50% 100%,38% 65%,0 50%,38% 35%);
  filter:drop-shadow(0 0 10px rgba(255,255,255,.95));
  animation:coreStar .78s cubic-bezier(.2,.9,.3,1) forwards;
}
.fx-burst.big .core-star{width:40%;height:40%}
.fx-burst.huge .core-star{width:46%;height:46%}
.fx-star{
  position:absolute;left:50%;top:50%;width:13%;height:13%;
  clip-path:polygon(50% 0,62% 35%,100% 50%,62% 65%,50% 100%,38% 65%,0 50%,38% 35%);
  opacity:0;animation:starFly .82s ease-out forwards;
}
.fx-burst.big .fx-star{width:11%;height:11%}
@keyframes haloOut{0%{transform:scale(.22);opacity:.95}55%{opacity:.72}100%{transform:scale(1.28);opacity:0}}
@keyframes ringOut{0%{transform:scale(.35);opacity:.9}100%{transform:scale(3.2);opacity:0}}
@keyframes coreStar{
  0%{transform:translate(-50%,-50%) scale(0) rotate(-40deg);opacity:0}
  28%{transform:translate(-50%,-50%) scale(1.15) rotate(8deg);opacity:1}
  70%{transform:translate(-50%,-58%) scale(.9) rotate(18deg);opacity:.96}
  100%{transform:translate(-50%,-88%) scale(.45) rotate(28deg);opacity:0}
}
@keyframes starFly{
  0%{transform:translate(-50%,-50%) scale(.15) rotate(0deg);opacity:0}
  14%{opacity:1}
  100%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(var(--sc)) rotate(var(--rot));opacity:0}
}
.fx-spark{box-shadow:0 0 7px currentColor}
.fx-text{font-family:var(--font);text-shadow:0 2px 0 rgba(150,80,120,.35),0 0 10px rgba(255,220,240,.9)}
.fx-coin{box-shadow:0 0 8px rgba(255,210,110,.85)}

/* ---------- 新版响应式收口 ---------- */
@media (max-height:740px){
  .scene{height:146px}
  .board-card{padding:8px 8px 7px;border-radius:24px}
  .board-shell{padding:7px;border-radius:18px}
  .board{gap:4px}
  .cell{border-radius:11px}
  .ad-chip{height:37px}
  .home-space{height:calc(89px + var(--safe-b))}
}
@media (max-height:700px){
  .hud{margin:calc(5px + var(--safe-t)) 9px 0;padding:6px 7px;border-radius:19px}
  .scene{height:138px}
  .board-card{margin:0 9px;padding:7px;border-radius:22px}
  .board{gap:3px}
  .cell{border-radius:9px}
  .item .lv{min-width:14px;height:14px;border-radius:8px}
  .board-shell{padding:6px;border-radius:16px}
  .ad-dock{margin-top:6px;padding:4px;gap:5px;border-radius:14px}
  .ad-chip{height:35px;border-radius:11px}
  .home-space{height:calc(82px + var(--safe-b))}
  .bottom-bar{padding:6px 11px calc(6px + var(--safe-b))}
}
@media (max-height:600px){
  .scene{height:120px}
  .board-card{padding:6px;border-radius:20px}
  .cell{border-radius:8px}
  .home-space{height:calc(77px + var(--safe-b))}
}
@media (max-width:360px){
  .hud{gap:5px;padding:6px;border-radius:19px}
  .res{padding:0 3px}
  .rail-btn{width:46px;height:48px}
  .board-card{margin:0 8px}
  .ad-dock{gap:4px;padding:4px}
  .ad-chip{padding:0 2px;gap:2px}
  .ad-chip .ad-play{width:20px;height:20px}
  .order-peek{margin:7px 8px 0;padding:7px}
}
@media (min-height:850px){
  .scene{height:198px}
  .rail-btn{width:55px;height:60px;border-radius:18px}
  .board-card{padding:11px 10px 9px}
  .board{gap:6px}
  .cell{border-radius:14px;aspect-ratio:1/1}
}
@media (prefers-reduced-motion:reduce){
  .bg-deco .cloud,.bg-deco .twinkle,.item.tier-4::before,.item.tier-5::before,.sound-btn.wait{animation:none !important}
}
