/* B 手账插画风：配色与线条来自 art/b/style.json */
:root {
  --outline: #89533D; --outline-soft: #B98170; --outline-pink: #C87883;
  --paper: #FFF8E8; --text: #78482F; --text2: #A87560; --accent: #F18FA7; --shadow: rgba(217, 174, 162, 0.55);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #FADDD8; font-family: "PingFang SC", "Hiragino Sans GB", sans-serif; color: var(--text); -webkit-user-select: none; user-select: none; overflow: hidden; }
button { font-family: inherit; border: 0; background: none; padding: 0; color: inherit; cursor: pointer; }
#app { position: relative; width: 100%; max-width: 430px; height: 100%; margin: 0 auto; overflow: hidden; }
.bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url(./assets/b/bg_home.jpg) center top / cover no-repeat; }
#cv { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }

/* 手账纸片：奶油纸 + 暖棕细线 + 偏移色块阴影（不用模糊阴影） */
.paper { background: var(--paper); border: 1.2px solid var(--outline-soft); box-shadow: 1px 1.5px 0 var(--shadow); }

.top { position: absolute; top: 4.4%; left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; z-index: 5; }
.me { display: flex; align-items: center; gap: 6px; }
.ava { width: 52px; height: 52px; border-radius: 50%; padding: 2px; background: var(--paper); border: 1.2px solid var(--outline); box-shadow: 1px 1.5px 0 var(--shadow); }
.ava img { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; outline: 1px dashed #D49A88; outline-offset: -3px; }
.lv { padding: 4px 8px 6px; border-radius: 12px; }
.lv i { width: 46px !important; }
.lv b { display: block; font-size: 13px; font-weight: 900; color: var(--text); line-height: 1.2; }
.lv i, .progress i { display: block; width: 70px; height: 6px; margin-top: 3px; border-radius: 3px; background: #F6DCDC; border: 1px solid #E9B7B7; overflow: hidden; }
.lv s, .progress s { display: block; height: 100%; background: #F58E9F; }
.coin { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 4px 0 0; border-radius: 19px; }
.coin img { width: 40px; margin-left: -10px; }
.coin b { font-size: 15px; font-weight: 900; min-width: 38px; }
.plus { width: 28px; height: 28px; border-radius: 14px; background: linear-gradient(180deg, #FFAAB6, #F58E9F); border: 1.1px solid var(--outline-pink); color: #FFF8E8; font-weight: 900; font-size: 18px; line-height: 24px; }

.logo { position: absolute; left: 50%; top: 3.6%; width: 40%; transform: translateX(-46%) rotate(-2deg); z-index: 6; }
.st { position: absolute; z-index: 4; pointer-events: none; }
.cat { right: 3%; top: 9.2%; width: 20%; z-index: 5; }
.jar { right: -3%; top: 51.5%; width: 21%; z-index: 3; }
.note { position: absolute; right: 1%; top: 63%; width: 25%; z-index: 4; transform: rotate(4deg); }
.note img { width: 100%; display: block; }
.note-txt { position: absolute; left: 16%; right: 10%; top: 22%; display: flex; flex-direction: column; gap: 4px; font-size: 10px; }
.note-txt b { font-size: 11px; font-weight: 900; color: var(--text); }
.note-txt span { padding-left: 13px; position: relative; color: var(--text); font-weight: 700; }
.note-txt span::before { content: ""; position: absolute; left: 0; top: 2px; width: 8px; height: 8px; border: 1px solid var(--outline-soft); border-radius: 2px; background: #FFF; }
.note-txt span.ok::after { content: "✓"; position: absolute; left: 1px; top: -3px; font-size: 10px; font-weight: 900; color: #F58E9F; }

.bag { position: absolute; left: -11%; top: 40%; width: 46%; z-index: 5; transform: rotate(-14deg); }
.progress { position: absolute; right: 2%; top: 76.5%; display: none; width: 30%; padding: 8px 8px 9px; border-radius: 6px; z-index: 4; transform: rotate(4deg); text-align: center; }
.progress canvas { width: 70px; height: 70px; display: block; margin: 0 auto 4px; }
.progress b { font-size: 11px; font-weight: 900; }
.progress i { width: 100%; }
.tulip { right: -4%; bottom: 16%; width: 22%; z-index: 4; }

.cta { position: absolute; left: 50%; bottom: 12.4%; transform: translateX(-50%); width: 64%; height: 60px; border-radius: 30px; z-index: 6;
  background: linear-gradient(180deg, #FFAAB6, #F58E9F); border: 1.2px solid var(--outline-pink); box-shadow: 1px 3px 0 #D77F87; }
.cta::before { content: ""; position: absolute; top: 4px; left: 4px; right: 4px; bottom: 4px; border-radius: 26px; border: 1px dashed #FFF8E8; }
.cta span { position: relative; font-size: 26px; font-weight: 900; letter-spacing: 4px; color: #FFF8E8; -webkit-text-stroke: 1px var(--outline-pink); paint-order: stroke fill; }
.cta:active { transform: translateX(-50%) translateY(2px); box-shadow: 1px 1px 0 #D77F87; }
.tape { width: 22%; z-index: 7; }
.t1 { left: 14%; bottom: 19.6%; transform: rotate(-24deg); }
.t2 { right: 12%; bottom: 12.4%; transform: rotate(18deg); }

.dock { position: absolute; left: 10px; right: 10px; bottom: 2.2%; display: flex; gap: 8px; z-index: 6; }
.dock button { position: relative; flex: 1; height: 84px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 7px; }
.dock button::before { content: ""; position: absolute; top: 4px; left: 4px; right: 4px; bottom: 4px; border-radius: 12px; border: 1px dashed #D49A88; pointer-events: none; }
.dock i { position: absolute; left: 50%; top: -14px; width: 70px; height: 62px; transform: translateX(-50%); background: center / contain no-repeat; }
.dock b { font-size: 13px; font-weight: 900; color: var(--text); }

.clasp { left: 56%; top: 50.6%; width: 12%; z-index: 5; transform: rotate(8deg); transform-origin: 50% 0; animation: swing 3.2s ease-in-out infinite; }
@keyframes swing { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-4deg); } }
.bowl { left: -5%; top: 66%; width: 26%; z-index: 4; }

/* ---------- 页面框架 ---------- */
#cv { z-index: 2; touch-action: none; }
.scr { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 3; pointer-events: none; }
.scr button, .scr .plist, .scr img#h-bag { pointer-events: auto; }
.scr.full { pointer-events: auto; }
.snd { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 19px; z-index: 20; font-size: 16px; }
body[data-scr="home"] .snd { bottom: auto; top: 10px; right: auto; left: 50%; transform: translateX(-50%); opacity: 0; pointer-events: none; }
.toast { position: absolute; left: 50%; top: 46%; transform: translate(-50%, 10px); padding: 10px 16px; border-radius: 16px; font-size: 14px; font-weight: 800; z-index: 30; opacity: 0; transition: all 0.2s; pointer-events: none; width: max-content; max-width: 84%; text-align: center; line-height: 1.45; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 顶栏（工作台 / 熨烫 / 图纸本） */
.bar { position: absolute; top: 44px; left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 5; }
.back { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 17px; font-size: 16px; font-weight: 900; }
.bar .title { display: flex; flex-direction: column; align-items: center; padding: 4px 14px; border-radius: 14px; font-size: 12px; min-width: 120px; }
.bar .title b { font-size: 15px; font-weight: 900; }
.combo { padding: 6px 10px; border-radius: 14px; font-size: 13px; font-weight: 900; color: #F58E9F; visibility: hidden; }
.tip { position: absolute; left: 50%; top: 86px; transform: translateX(-50%); padding: 5px 14px; border-radius: 14px; font-size: 13px; font-weight: 800; z-index: 5; white-space: nowrap; pointer-events: none; }
.heat { display: block; width: 110px; height: 7px; margin-top: 3px; border-radius: 4px; background: #F6DCDC; border: 1px solid #E9B7B7; overflow: hidden; }
.heat s { display: block; height: 100%; width: 0; background: #9DBB70; transition: width 0.15s; }
.heat s.hot { background: #F2A33A; }

/* 图纸本 */
#s-book { background: rgba(255, 244, 236, 0.55); }
#s-book .title { padding: 6px 16px; font-size: 16px; }
.plist { position: absolute; top: 92px; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 14px 30px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-content: flex-start; }
.pcard { position: relative; width: calc(50% - 6px); padding: 10px 10px 12px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pcard::before { content: ""; position: absolute; top: 4px; left: 4px; right: 4px; bottom: 4px; border-radius: 12px; border: 1px dashed #D49A88; pointer-events: none; }
.pcard canvas { border-radius: 10px; background: #F6F1F4; }
.pcard b { font-size: 15px; font-weight: 900; }
.pcard .info { font-size: 11px; color: var(--text2); }
.pcard .dots { display: flex; gap: 4px; }
.pcard .dots i { width: 12px; height: 12px; border-radius: 6px; border: 1px solid rgba(137, 83, 61, 0.35); }
.pcard .dots i.miss { border-style: dashed; }
.pcard .foot { font-size: 13px; font-weight: 900; color: #F6B73C; letter-spacing: 1px; }
.pcard.lock canvas { opacity: 0.7; }
.pcard.lock .foot { font-size: 11px; color: #C87883; letter-spacing: 0; }

/* 结算 */
.dim { background: rgba(120, 72, 47, 0.28); display: flex; align-items: center; justify-content: center; }
.rcard { position: relative; width: 318px; max-width: 92%; padding: 18px 16px 16px; border-radius: 20px; text-align: center; animation: pop 0.35s ease-out; }
.rname { font-size: 20px; font-weight: 900; }
.stars { margin: 6px 0 8px; font-size: 34px; letter-spacing: 6px; }
.stars i { font-style: normal; color: #E8DCD6; display: inline-block; }
.stars i.on { color: #F6B73C; animation: star 0.4s ease-out both; }
#r-work { display: block; margin: 0 auto; border-radius: 12px; background: #F6F1F4; border: 1.2px solid var(--outline-soft); }
.small { margin: 6px 0 0; font-size: 12px; color: var(--text2); }
.gain { display: flex; justify-content: center; gap: 22px; margin-top: 10px; font-size: 14px; font-weight: 800; }
.gain span { display: flex; align-items: center; gap: 4px; }
.gain img { width: 30px; }
.gain b { font-size: 18px; color: #F58E9F; }
.lvup { margin: 4px 0 0; min-height: 16px; font-size: 13px; font-weight: 900; color: #F58E9F; }
.rbtns { display: flex; gap: 10px; margin-top: 10px; }
.rbtns button { flex: 1; height: 46px; border-radius: 23px; font-size: 16px; font-weight: 900; }
.btn1 { background: linear-gradient(180deg, #FFAAB6, #F58E9F); border: 1.2px solid var(--outline-pink); box-shadow: 1px 3px 0 #D77F87; color: #FFF8E8; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes star { 0% { transform: scale(0.2); opacity: 0; } 70% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1); } }

/* ---------- M2-A：盲袋角标、今日计划领奖、拆盲袋、小卖部 ---------- */
.bagn { position: absolute; left: 21%; top: 41%; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #F58E9F; color: #FFF8E8; font-size: 13px; font-weight: 900; line-height: 22px; text-align: center; border: 1.2px solid #FFF8E8; box-shadow: 1px 1.5px 0 var(--shadow); z-index: 6; pointer-events: none; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.claim { margin-top: 3px; padding: 3px 6px; border-radius: 10px; font-size: 10px; font-weight: 900; color: #FFF8E8; background: linear-gradient(180deg, #FFAAB6, #F58E9F); border: 1px solid var(--outline-pink); pointer-events: auto; animation: bob 1s ease-in-out infinite; }
.note .claim { position: relative; }
.note { pointer-events: auto; }

.gbtns { position: absolute; left: 0; right: 0; bottom: 9%; display: flex; justify-content: center; z-index: 5; }
.gbtns button { width: 62%; height: 52px; border-radius: 26px; font-size: 18px; font-weight: 900; letter-spacing: 2px; }

#s-shop { background: rgba(255, 244, 236, 0.55); }
.pcoin { display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 10px 0 2px; border-radius: 17px; }
.pcoin img { width: 30px; }
.pcoin b { font-size: 15px; font-weight: 900; }
.slist { position: absolute; top: 92px; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 14px 30px; pointer-events: auto; }
.sitem { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 12px; border-radius: 16px; }
.sitem::before { content: ""; position: absolute; top: 4px; left: 4px; right: 4px; bottom: 4px; border-radius: 12px; border: 1px dashed #D49A88; pointer-events: none; }
.sicon { width: 58px; height: 58px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: #FBF4F1; }
.sicon img { max-width: 50px; max-height: 50px; }
.sicon .emo { font-style: normal; font-size: 30px; }
.stxt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stxt b { font-size: 16px; font-weight: 900; }
.stxt span { font-size: 12px; font-weight: 800; }
.stxt small { font-size: 11px; color: var(--text2); }
.sbuy { flex: none; display: flex; align-items: center; gap: 2px; height: 38px; padding: 0 12px 0 4px; border-radius: 19px; font-size: 15px; font-weight: 900; color: #FFF8E8; background: linear-gradient(180deg, #FFAAB6, #F58E9F); border: 1.2px solid var(--outline-pink); box-shadow: 1px 2px 0 #D77F87; }
.sbuy img { width: 28px; }
.sbuy.poor { filter: grayscale(0.6); opacity: 0.75; }
.sbuy.max { padding: 0 14px; background: #EADFD8; color: var(--text2); border-color: var(--outline-soft); box-shadow: none; }

/* M2-B：今日图纸、豆子不够 */
.pcard.daily { border-color: #F58E9F; box-shadow: 0 0 0 2px rgba(245, 142, 159, 0.5), 1px 1.5px 0 var(--shadow); }
.dtag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(-3deg); padding: 2px 8px; border-radius: 10px; background: #F58E9F; color: #FFF8E8; font-size: 11px; font-weight: 900; font-style: normal; white-space: nowrap; z-index: 2; }
.pcard.short .foot { font-size: 11px; color: #E39A3B; letter-spacing: 0; }
/* 分豆装瓶入口 + 完成面板 */
#h-bowl { pointer-events: auto; cursor: pointer; }
.bowltag { position: absolute; left: 4%; top: 64.5%; padding: 1px 7px; border-radius: 9px; background: #FFF8E8; border: 1px solid var(--outline-soft); font-size: 11px; font-weight: 900; z-index: 5; transform: rotate(-6deg); pointer-events: none; animation: bob 1.4s ease-in-out infinite; }
.odone { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; background: rgba(120, 72, 47, 0.25); pointer-events: auto; z-index: 8; }
.olist { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 4px; font-size: 15px; font-weight: 800; }
.olist span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.olist i { width: 14px; height: 14px; border-radius: 7px; border: 1px solid rgba(137, 83, 61, 0.4); }

/* ---------- M2-C：小摊入口、日记、图鉴、小摊、找色号 ---------- */
#h-jar { pointer-events: auto; cursor: pointer; }
.jartag { position: absolute; right: 2%; top: 60.5%; padding: 1px 7px; border-radius: 9px; background: #FFF8E8; border: 1px solid var(--outline-soft); font-size: 11px; font-weight: 900; z-index: 5; transform: rotate(5deg); pointer-events: none; animation: bob 1.6s ease-in-out infinite; }
#h-note { cursor: pointer; }
.notelink { font-style: normal; font-size: 9px; font-weight: 900; color: #F58E9F; margin-top: 1px; }

.cwrap { position: absolute; top: 92px; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 14px 30px; }
.cprog { height: 8px; border-radius: 4px; background: #F6DCDC; border: 1px solid #E9B7B7; overflow: hidden; margin: 4px 0 10px; }
.cprog s { display: block; height: 100%; background: #F58E9F; }
.cinfo { padding: 10px 12px; border-radius: 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 3px; min-height: 58px; }
.cinfo b { font-size: 15px; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.cinfo b i { width: 14px; height: 14px; border-radius: 7px; border: 1px solid rgba(137, 83, 61, 0.4); }
.cinfo span { font-size: 12px; color: var(--text2); }
.cgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 4px; }
.ccell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 10px; }
.ccell span { font-size: 11px; font-weight: 800; }
.ccell.lock span { color: #C9B7BD; }
.ccell.on { background: rgba(245, 142, 159, 0.18); }

.dscroll { position: absolute; top: 96px; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px 30px; }
.dwrap { padding: 16px 14px; border-radius: 18px; text-align: center; }
.dstreak { font-size: 18px; font-weight: 900; }
.dcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0 6px; }
.dcal b { font-size: 12px; color: var(--text2); }
.dday { position: relative; height: 40px; border-radius: 10px; background: #FBF4F1; display: flex; align-items: center; justify-content: center; }
.dday em { font-style: normal; font-size: 13px; font-weight: 800; }
.dday.future em { color: #D9C9C9; }
.dday.today { box-shadow: 0 0 0 2px #F58E9F; }
.dday.stamp em { position: absolute; left: 4px; top: 2px; font-size: 10px; }
.dday i { font-style: normal; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 14px; border: 2px solid #F58E9F; color: #F58E9F; font-size: 15px; transform: rotate(-12deg); background: rgba(255, 255, 255, 0.7); }

.tq { bottom: 4%; }
.tplist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 50vh; overflow-y: auto; margin: 10px 0 4px; }
.tw { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; }
.tw span { font-size: 11px; font-weight: 800; }
.tw.on { opacity: 0.5; }
.qbar { pointer-events: none; }
.qscore { display: block; font-size: 24px; font-weight: 900; margin-top: 8px; color: #F58E9F; }
.dworks { margin-top: 12px; padding: 12px; border-radius: 18px; }
.dworks b { font-size: 14px; font-weight: 900; }
.dwlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dwlist canvas { border-radius: 10px; background: #F6F1F4; border: 1px solid rgba(185, 129, 112, 0.5); }

/* ---------- M3：我的作品、海报、拼同款、画图纸 ---------- */
#s-works, #s-follow { background: rgba(255, 244, 236, 0.55); }
.klist { position: absolute; top: 92px; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 14px 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; }
.kw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 14px; animation: pop 0.3s ease-out both; }
.kw::before { content: ""; position: absolute; top: 3px; left: 3px; right: 3px; bottom: 3px; border-radius: 11px; border: 1px dashed #D49A88; pointer-events: none; }
.kw canvas { border-radius: 8px; background: #F6F1F4; }
.kw b { font-size: 12px; font-weight: 900; }
.kw i { font-style: normal; font-size: 11px; color: #F6B73C; letter-spacing: 1px; }
.kw .mine { position: absolute; top: -4px; right: -2px; padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 900; color: #FFF8E8; background: #BBA1D9; transform: rotate(6deg); }
.kempty { grid-column: 1 / -1; text-align: center; padding: 60px 0; color: var(--text2); font-weight: 800; }
#k-work { display: block; margin: 0 auto; border-radius: 12px; background: #F6F1F4; border: 1.2px solid var(--outline-soft); }
.xbtn { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border-radius: 15px; border: 0; background: transparent; font-size: 22px; color: var(--text2); }
.postcard { width: 300px; max-width: 86%; text-align: center; animation: pop 0.35s ease-out; }
.postcard img { width: 100%; border-radius: 14px; box-shadow: 2px 6px 0 rgba(120, 72, 47, 0.25); display: block; }
.pnote { color: #FFF8E8; font-weight: 800; text-shadow: 0 1px 2px rgba(120, 72, 47, 0.6); }

.fwrap { position: absolute; top: 92px; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 14px 30px; }
.fcard { padding: 14px; border-radius: 18px; margin-bottom: 12px; }
.fcard > b { display: block; font-size: 15px; font-weight: 900; margin-bottom: 8px; }
.fcard textarea { width: 100%; box-sizing: border-box; border: 1.2px dashed #D49A88; border-radius: 12px; background: #FFFCF5; padding: 8px 10px; font: 600 13px/1.5 "PingFang SC", sans-serif; color: var(--text); resize: none; outline: none; pointer-events: auto; }
.fcard .btn1 { width: 100%; height: 44px; border-radius: 22px; font-size: 16px; font-weight: 900; margin-top: 8px; }
.fdiy { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 18px; margin-bottom: 12px; text-align: left; }
.fdiy i { font-style: normal; font-size: 28px; width: 46px; height: 46px; border-radius: 23px; background: #FDE3E7; display: flex; align-items: center; justify-content: center; }
.fdiy span { flex: 1; display: flex; flex-direction: column; }
.fdiy b { font-size: 15px; font-weight: 900; }
.fdiy small { font-size: 12px; color: var(--text2); }
.fdiy em { font-style: normal; font-size: 22px; color: var(--text2); }
.flist { position: static; padding: 0; overflow: visible; }
.ysave { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 14px; font-weight: 900; background: linear-gradient(180deg, #FFAAB6, #F58E9F); border: 1.2px solid var(--outline-pink); box-shadow: 1px 2px 0 #D77F87; color: #FFF8E8; }
#y-nm { width: 100%; box-sizing: border-box; margin-top: 12px; height: 42px; border: 1.2px dashed #D49A88; border-radius: 12px; background: #FFFCF5; padding: 0 12px; font: 800 16px "PingFang SC", sans-serif; color: var(--text); text-align: center; outline: none; }
.scr textarea, .scr input { pointer-events: auto; }
/* 小卖部店员 */
.keeper { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; pointer-events: none; z-index: 1; }
.keeper img { height: min(150px, 58%); animation: bob 2.4s ease-in-out infinite; }
.ksay { margin: 0 0 6px; padding: 7px 14px; border-radius: 16px; font-size: 13px; font-weight: 800; position: relative; }
.ksay::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; background: inherit; border-right: 1px solid var(--outline-soft); border-bottom: 1px solid var(--outline-soft); transform: translateX(-50%) rotate(45deg); }
#s-shop .slist { z-index: 2; }
.ftry { display: block; margin: 10px auto 0; border: 0; background: transparent; font-size: 13px; font-weight: 800; color: #E07A92; text-decoration: underline dotted; }
.fdiy i img { height: 38px; transform: rotate(-20deg); }

/* ---------- M3-B：痛包 + 挂件 ---------- */
#h-clasp { pointer-events: auto; cursor: pointer; }
.claspt { position: absolute; left: 66%; top: 54%; padding: 1px 7px; border-radius: 9px; background: #FFF8E8; border: 1px solid var(--outline-soft); font-size: 11px; font-weight: 900; z-index: 6; transform: rotate(4deg); pointer-events: none; animation: bob 1.5s ease-in-out infinite; }
.abtns { bottom: 3.5%; }
.mstep { text-align: left; font-weight: 900; margin-top: 10px; }
.mworks { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px; -webkit-overflow-scrolling: touch; }
.mworks button { flex: none; padding: 4px; border-radius: 12px; border: 1.2px solid transparent; background: #FBF4F1; }
.mworks button.on { border-color: #F58E9F; background: #FDE3E7; box-shadow: 0 0 0 2px rgba(245, 142, 159, 0.35); }
.mhw { display: flex; gap: 8px; margin-top: 4px; }
.mhw button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; border: 1.2px solid transparent; background: #FBF4F1; font-size: 11px; font-weight: 800; color: var(--text); }
.mhw button img { height: 44px; }
.mhw button.on { border-color: #F58E9F; background: #FDE3E7; }
.mhw button em { font-style: normal; color: #E39A3B; font-weight: 900; }
#a-mcv { display: block; margin: 8px auto 0; }
.tw .hwi { height: 26px; }
.abtns { left: 18px; right: 62px; gap: 10px; }
.abtns button { width: auto; flex: 1; height: 48px; font-size: 16px; letter-spacing: 1px; }
.chead { grid-column: 1 / -1; margin: 8px 2px 0; font-size: 13px; font-weight: 900; color: var(--text); text-align: left; }
.chead.hid { color: #C07BD0; margin-top: 14px; }
.ccell.glit span { font-size: 10px; color: #C07BD0; }
.ccell.glit:not(.lock) span { color: var(--text); font-size: 11px; }

/* ---------- 社交：分享面板、暗号 ---------- */
.sheet { z-index: 25; align-items: flex-end; }
.shcard { position: relative; width: 100%; max-width: 480px; box-sizing: border-box; border-radius: 22px 22px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); text-align: center; animation: up 0.28s ease-out; }
@keyframes up { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
#sh-img { display: block; height: min(38vh, 320px); margin: 8px auto 4px; border-radius: 12px; box-shadow: 1px 4px 0 rgba(120, 72, 47, 0.18); }
.shgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.shgrid button { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: transparent; padding: 4px 0; min-height: 64px; }
.shgrid img { width: 46px; height: 46px; object-fit: contain; padding: 4px; border-radius: 16px; background: #FBF1EE; }
.shgrid span { font-size: 12px; font-weight: 900; color: var(--text); }
.xrow { display: flex; gap: 8px; }
.xrow input { flex: 1; min-width: 0; height: 44px; box-sizing: border-box; border: 1.2px dashed #D49A88; border-radius: 12px; background: #FFFCF5; padding: 0 10px; font: 800 14px "PingFang SC", sans-serif; color: var(--text); outline: none; }
.xgo { width: 84px; height: 44px; border-radius: 22px; font-size: 15px; font-weight: 900; }
.xhint { color: #C07BD0; }
.xcode { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 14px; background: #FDE3E7; }
.xcode em { font-style: normal; font-size: 24px; font-weight: 900; letter-spacing: 2px; color: #D4568A; }
.xcode button { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; font-weight: 900; }
.xmine .rbtns button { height: 44px; }
.xhid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.xh { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: #FBF4F1; }
.xh canvas { border-radius: 8px; }
.xh b { font-size: 12px; font-weight: 900; }
.xh small { font-size: 10px; color: #C07BD0; text-align: center; line-height: 1.3; }
.xh.got small { color: #8DBB70; }
.secretcap { position: absolute; left: 50%; top: calc(var(--safe-top, 56px) + 50px); transform: translateX(-50%); }
/* 暗号入口（首页猫咪贴纸）+ 新手小手 */
#h-secret { pointer-events: auto; cursor: pointer; }
.sectag { position: absolute; right: 21%; top: 10.4%; display: flex; align-items: center; gap: 2px; padding: 1px 8px 1px 3px; border-radius: 10px; background: #FFF8E8; border: 1px solid #C07BD0; color: #9B5BB0; font-size: 11px; font-weight: 900; z-index: 6; transform: rotate(-4deg); pointer-events: none; animation: bob 1.3s ease-in-out infinite; }
.sectag img { width: 16px; height: 16px; object-fit: contain; }
.guide { position: absolute; z-index: 12; width: 0; height: 0; pointer-events: none; }
.guide img { position: absolute; left: -12px; top: 0; width: 44px; animation: poke 0.9s ease-in-out infinite; filter: drop-shadow(1px 2px 0 rgba(120, 72, 47, 0.25)); }
@keyframes poke { 0%, 100% { transform: translateY(6px); } 50% { transform: translateY(-4px); } }
.gbub { position: absolute; top: 58px; white-space: nowrap; padding: 6px 12px; border-radius: 15px; background: #F58E9F; color: #FFF8E8; font-size: 13px; font-weight: 900; box-shadow: 1px 2px 0 #D77F87; }
.gbub.up { top: -46px; }
/* 图纸本章节 */
.btabs { position: absolute; top: 90px; left: 0; right: 0; display: flex; gap: 6px; overflow-x: auto; padding: 2px 12px 8px; -webkit-overflow-scrolling: touch; z-index: 4; pointer-events: auto; scrollbar-width: none; }
.btabs::-webkit-scrollbar { display: none; }
.btab { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 5px 10px; border-radius: 14px; border: 1.2px solid var(--outline-soft); background: var(--paper); box-shadow: 1px 1.5px 0 var(--shadow); color: var(--text); }
.btab b { font-size: 14px; font-weight: 900; }
.btab small { font-size: 10px; color: var(--text2); }
.btab.on { background: linear-gradient(180deg, #FFAAB6, #F58E9F); border-color: var(--outline-pink); color: #FFF8E8; }
.btab.on small { color: #FFF1F3; }
#s-book .plist { top: 146px; }
.bhead { width: 100%; margin: 0; font-size: 13px; font-weight: 900; color: #C07BD0; text-align: center; }
.bjump { width: 100%; margin: 0 0 2px; }
.rshare { display: flex; gap: 10px; margin-top: 10px; }
.rshare button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; border-radius: 16px; border: 1.2px dashed #E3A2B0; background: #FFF1F3; font-size: 14px; font-weight: 900; color: #C8506F; }
.rshare img { width: 28px; height: 28px; object-fit: contain; }

.xrow .xgo { width: 84px; flex: none; margin-top: 0; }
/* 设置 */
#set { z-index: 26; }
#s-home .ava { pointer-events: auto; cursor: pointer; }
.setcard { text-align: left; }
.setcard .rname { display: block; text-align: center; margin-bottom: 6px; }
.setrow { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; border-bottom: 1px dashed #EBCFC6; font-size: 15px; font-weight: 800; }
.setrow input { width: 22px; height: 22px; accent-color: #F58E9F; pointer-events: auto; }
.setbtn { display: block; width: 100%; margin-top: 8px; height: 42px; border-radius: 14px; border: 1.2px solid var(--outline-soft); background: #FFFCF5; font-size: 14px; font-weight: 800; color: var(--text); }
.setbtn.warn { color: #C8506F; border-color: #E3A2B0; }
.setp { line-height: 1.55; }
.dbadges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.dbadge { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 8px; border-radius: 12px; background: #FBF4F1; }
.dbadge img { width: 46px; height: 46px; filter: grayscale(1) opacity(0.45); }
.dbadge.got img { filter: none; animation: pop 0.4s ease-out; }
.dbadge b { font-size: 12px; font-weight: 900; }
.dbadge small { font-size: 10px; color: var(--text2); text-align: center; }
.dbadge i { display: block; width: 80%; height: 5px; border-radius: 3px; background: #F0E2E0; overflow: hidden; margin-top: 2px; }
.dbadge s { display: block; height: 100%; background: #F58E9F; }
.dbadge.got i { display: none; }
/* 传说大作 */
.btab.legend { background: linear-gradient(180deg, #FFF3D6, #F6DFA6); border-color: #C79A4A; color: #8A5A1A; }
.btab.legend small { color: #A0702A; }
.llock { position: absolute; left: 14px; right: 14px; bottom: 3%; padding: 12px 14px; border-radius: 18px; z-index: 5; pointer-events: auto; }
.llock > b { display: block; font-size: 14px; font-weight: 900; margin-bottom: 6px; }
.lrow { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 0; }
.lrow b { display: block; font-size: 13px; font-weight: 800; color: var(--text); }
.lrow.ok b { color: #5E9B4E; }
.lrow span { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.lrow i { flex: 1; height: 7px; border-radius: 4px; background: #F0E2E0; overflow: hidden; }
.lrow s { display: block; height: 100%; background: linear-gradient(90deg, #F6CE74, #E8A93C); }
.lrow em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--text2); min-width: 44px; text-align: right; }
.lbtns { position: absolute; left: 16px; right: 16px; bottom: 4%; z-index: 5; }
.ltip { text-align: center; font-weight: 800; }
.pulse { animation: bob 0.9s ease-in-out infinite; }
.lparts { position: absolute; left: 14px; right: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; z-index: 5; pointer-events: auto; }
.lpart { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 14px; }
.lpart b { font-size: 14px; font-weight: 900; }
.lpart small { font-size: 11px; color: var(--text2); }
.lpart.ok { background: #EEF6E6; }
.lpart.ok small { color: #5E9B4E; }
.lpart.short small { color: #C8506F; }
