* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { overscroll-behavior: none; margin: 0; }
body {
  font-family: 'Noto Sans SC', system-ui, sans-serif;
  background: linear-gradient(160deg, #FFE9F4 0%, #EAF4FF 45%, #EAFBF0 100%);
  background-attachment: fixed;
}
#main::-webkit-scrollbar { width: 0; height: 0; }
#main { scrollbar-width: none; -ms-overflow-style: none; }
#app-frame { background: linear-gradient(160deg, #FFF6FB, #F3F8FF) !important; }

/* ===== 侧边栏导航（糖果色 + emoji） ===== */
.nav-item {
  width: 3rem; height: 3rem; border-radius: 1.1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; color: #9A8AA0; transition: all .22s cubic-bezier(.34,1.56,.64,1); cursor: pointer;
}
.nav-item.active { color: #fff; transform: scale(1.06); }
.nav-item:not(.active):hover { background: rgba(255,255,255,.75); color: #7A6A80; }
.nav-emoji { font-size: 1.3rem; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.12)); }
.nav-label { font-size: .5rem; line-height: 1; font-weight: 800; }

/* ===== 头像 / 吉祥物 chip ===== */
.avatar-chip {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #fff;
  box-shadow: 0 6px 16px rgba(255,111,181,.25); display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.mascot-chip {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; background: #fff;
  box-shadow: 0 6px 16px rgba(255,111,181,.2); display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.dot { width: .7rem; height: .7rem; border-radius: 50%; }
.page-title { font-size: 1.12rem; font-weight: 900; color: #3A2E3F; }
.page-sub { font-size: .7rem; color: #9A8AA0; margin-top: 2px; }

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: 1.4rem; padding: 1rem; box-shadow: 0 8px 28px rgba(255,111,181,.12); border: 1px solid rgba(255,255,255,.7); }

/* ===== 英雄卡片 ===== */
.hero { position: relative; overflow: hidden; color: #fff; border: none; }
.hero-mascot { position: absolute; right: -8px; top: -14px; opacity: .96; }
.float { animation: float 3.2s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-9px) rotate(3deg); } }

/* ===== emoji 图标 chip ===== */
.ico { width: 2.1rem; height: 2.1rem; border-radius: .85rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }

/* ===== 标签（糖果色） ===== */
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.tag-olive { background: #E6F7EE; color: #1FA971; }
.tag-orange { background: #FFEAD9; color: #F0722B; }
.tag-green { background: #EAF0FF; color: #5B7CF0; }

/* ===== 按钮 ===== */
.btn-primary { background: linear-gradient(135deg,#FF8FB1,#FF6FB5); color: #fff; border-radius: 999px; padding: 9px 18px; font-size: .875rem; font-weight: 800; box-shadow: 0 8px 20px rgba(255,111,181,.35); transition: transform .12s; cursor: pointer; border: none; }
.btn-primary:active { transform: scale(.95); }
.btn-outline { border: 2px solid #FFB3D1; color: #FF6FB5; background: #fff; border-radius: 999px; padding: 7px 16px; font-size: .875rem; font-weight: 800; transition: transform .12s; cursor: pointer; }
.btn-outline:active { transform: scale(.95); }
.btn-soft { background: linear-gradient(135deg,#FFD45E,#FFB03C); color: #fff; border-radius: 999px; padding: 9px 18px; font-size: .875rem; font-weight: 800; box-shadow: 0 8px 20px rgba(255,176,60,.35); cursor: pointer; border: none; }
.btn-soft:active { transform: scale(.95); }

/* ===== 输入框 ===== */
.input { width: 100%; background: #FBF1F7; border-radius: .9rem; padding: 11px 13px; font-size: .875rem; color: #3A2E3F; outline: none; border: 2px solid transparent; transition: all .15s; }
.input:focus { border-color: #FFB3D1; background: #fff; box-shadow: 0 0 0 3px rgba(255,111,181,.15); }
.input::placeholder { color: #BCAEC0; }

/* ===== 复选框 ===== */
.check-circle { width: 1.3rem; height: 1.3rem; border-radius: 999px; border: 2px solid #E2D8E6; display: flex; align-items: center; justify-content: center; transition: all .2s; cursor: pointer; flex-shrink: 0; }
.check-circle.done { background: linear-gradient(135deg,#FF8FB1,#FF6FB5); border-color: transparent; color: #fff; }

/* ===== 进度环 ===== */
.progress-ring { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: #F3E9F1; stroke-width: 8; }
.progress-ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }

/* ===== 书籍封面 ===== */
.book-cover { position: relative; border-radius: .85rem; overflow: hidden; box-shadow: 0 8px 24px rgba(255,111,181,.18); display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; color: #fff; padding: .5rem; aspect-ratio: 3/4; }

/* ===== 底部弹窗 ===== */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top-left-radius: 1.8rem; border-top-right-radius: 1.8rem; padding: 1.25rem; z-index: 50; transform: translateY(100%); transition: transform .3s cubic-bezier(.34,1.56,.64,1); max-height: 85vh; overflow-y: auto; box-shadow: 0 -10px 40px rgba(255,111,181,.15); }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(58,46,63,.35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(2px); }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet.open { transform: translateY(0); }

/* ===== 页面切换弹入 ===== */
.page { animation: pop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }

/* ===== 标签页 ===== */
.tab-item { flex: 1; padding: .5rem; font-size: .75rem; font-weight: 800; color: #9A8AA0; border-radius: 999px; transition: all .2s; cursor: pointer; text-align: center; }
.tab-item.active { background: linear-gradient(135deg,#FF8FB1,#FF6FB5); color: #fff; box-shadow: 0 6px 16px rgba(255,111,181,.3); }

/* ===== 横向滚动 ===== */
.h-scroll { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }

/* ===== Toast ===== */
.app-toast { position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg,#FF6FB5,#B388EB); color: #fff; font-size: .75rem; font-weight: 800; padding: .6rem 1.1rem; border-radius: 999px; box-shadow: 0 10px 28px rgba(255,111,181,.4); z-index: 60; animation: pop .2s ease; }

/* ===== 拨动开关 ===== */
.toggle { width: 2.6rem; height: 1.4rem; border-radius: 999px; position: relative; transition: background .2s; cursor: pointer; }
.toggle .knob { position: absolute; top: .18rem; width: 1.05rem; height: 1.05rem; background: #fff; border-radius: 999px; transition: left .2s; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.toggle.on { background: linear-gradient(135deg,#FF8FB1,#FF6FB5); }
.toggle.on .knob { left: 1.4rem; }
.toggle.off { background: #E2D8E6; }
.toggle.off .knob { left: .18rem; }

/* ===== 浮动按钮 ===== */
.fab-bounce { animation: fabBounce 2.4s ease-in-out infinite; }
@keyframes fabBounce { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.04); } }

/* ===== 小星仔装饰 ===== */
.deco-star { animation: float 4s ease-in-out infinite; }
.mascot-float { animation: float 3.6s ease-in-out infinite; }
