/* ===========================================================
   甜甜小厨房 · 卡哇伊设计系统
   =========================================================== */

/* ---------- 1. 基础变量 ---------- */
:root {
  --pink: #ff7eb6;
  --pink-deep: #f4549a;
  --pink-soft: #ffd1e4;
  --pink-bg: #fff5f9;
  --lav: #b79cf0;
  --lav-soft: #e6dcff;
  --mint: #6fd3a3;
  --mint-soft: #d6f5e6;
  --butter: #ffd166;
  --butter-soft: #fff0c8;
  --sky: #7fc8f0;
  --sky-soft: #d9f0ff;
  --ink: #5a3a48;
  --ink-2: #a1848f;
  --ink-3: #cbb3bf;
  --white: #ffffff;
  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --sh: 0 10px 24px rgba(255, 126, 182, 0.16);
  --sh-sm: 0 4px 12px rgba(255, 126, 182, 0.14);
  --sh-lg: 0 18px 40px rgba(255, 126, 182, 0.22);
  --font: 'Quicksand', 'Baloo 2', ui-rounded, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
}

/* ---------- 2. 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: var(--font);
  color: var(--ink);
  background: #ffeaf3;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at 12% 8%, #ffd9ec 0%, transparent 42%),
    radial-gradient(circle at 88% 22%, #e2d6ff 0%, transparent 45%),
    radial-gradient(circle at 20% 92%, #fff0c8 0%, transparent 45%),
    #ffeaf3;
}

button, input { font-family: inherit; color: inherit; border: none; background: none; outline: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* 背景漂浮小装饰 */
.deco-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.deco {
  position: absolute; opacity: .5; animation: floaty 9s ease-in-out infinite;
  filter: saturate(1.2);
}
.deco:nth-child(1) { left: 6%;  top: 14%; font-size: 34px; animation-delay: 0s; }
.deco:nth-child(2) { left: 88%; top: 30%; font-size: 26px; animation-delay: -2s; }
.deco:nth-child(3) { left: 12%; top: 68%; font-size: 30px; animation-delay: -4s; }
.deco:nth-child(4) { left: 82%; top: 78%; font-size: 22px; animation-delay: -1s; }
.deco:nth-child(5) { left: 50%; top: 8%;  font-size: 20px; animation-delay: -3s; }
.deco:nth-child(6) { left: 72%; top: 52%; font-size: 18px; animation-delay: -5s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-22px) rotate(8deg); }
}

/* ---------- 3. 手机外框 ---------- */
.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  background: linear-gradient(180deg, #fffafc 0%, #fff2f7 40%, #fdf0ff 100%);
  box-shadow: 0 0 0 10px #fff, 0 30px 70px rgba(244, 84, 154, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 520px) {
  .phone { margin: 22px 0; border-radius: 42px; min-height: calc(100vh - 44px); height: calc(100vh - 44px); }
}

/* ---------- 4. 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, rgba(255, 250, 252, .96), rgba(255, 250, 252, .72));
  backdrop-filter: blur(14px);
  border-bottom: 2px dashed var(--pink-soft);
}
.topbar-row { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: .5px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; background: linear-gradient(135deg, var(--pink), var(--lav));
  box-shadow: var(--sh-sm); transform: rotate(-8deg);
}
.brand-name { background: linear-gradient(90deg, var(--pink-deep), var(--lav)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.search {
  margin-top: 12px; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 2px solid var(--pink-soft); border-radius: 999px;
  padding: 9px 14px; box-shadow: var(--sh-sm);
}
.search input { flex: 1; font-size: 14px; font-weight: 600; }
.search input::placeholder { color: var(--ink-3); }
.search .s-ico { font-size: 16px; }
.search .s-clear { font-size: 15px; color: var(--ink-3); display: none; }

/* ---------- 5. 页面容器 ---------- */
.main { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 96px; scroll-behavior: smooth; }
.main::-webkit-scrollbar { width: 0; }
.page { animation: pageIn .38s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.sec { padding: 18px 16px 4px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sec-title { display: flex; align-items: center; gap: 7px; font-size: 17px; font-weight: 800; }
.sec-title .dot { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--lav)); box-shadow: 0 0 0 4px var(--pink-soft); }
.sec-more { font-size: 12.5px; font-weight: 700; color: var(--pink-deep); }

/* ---------- 6. 轮播 ---------- */
.carousel { position: relative; margin: 14px 16px 4px; }
.car-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.car-track::-webkit-scrollbar { display: none; }
.slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: center;
  border-radius: var(--r-xl); padding: 18px; min-height: 132px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; overflow: hidden; box-shadow: var(--sh);
}
.slide::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .45), transparent 45%);
}
.slide-txt { position: relative; z-index: 2; }
.slide-txt h3 { font-size: 20px; line-height: 1.3; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, .14); white-space: pre-line; }
.slide-txt p { margin-top: 6px; font-size: 12.5px; opacity: .95; font-weight: 600; }
.slide-tags { margin-top: 9px; display: flex; gap: 6px; }
.slide-tags span { background: rgba(255, 255, 255, .28); border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; }
.slide-emoji { position: relative; z-index: 2; font-size: 58px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18)); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-9px) rotate(6deg); } }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink-soft); transition: .3s; }
.dots i.on { width: 20px; background: var(--pink); }

/* ---------- 7. 双入口 ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.duo-card {
  border-radius: var(--r-lg); padding: 14px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--sh); text-align: left; transition: transform .2s;
}
.duo-card:active { transform: scale(.96); }
.duo-card .e { font-size: 30px; }
.duo-card h4 { font-size: 15px; font-weight: 800; margin-top: 6px; }
.duo-card p { font-size: 11.5px; opacity: .92; font-weight: 600; }
.duo-card .c { position: absolute; right: -6px; bottom: -8px; font-size: 42px; opacity: .3; }

/* ---------- 8. 分类 chip ---------- */
.chips { display: flex; gap: 9px; overflow-x: auto; padding: 4px 16px 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 5px;
  background: #fff; border: 2px solid var(--pink-soft); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 800;
  transition: .2s; box-shadow: 0 3px 0 var(--pink-soft);
}
.chip .e { font-size: 15px; }
.chip.on { background: linear-gradient(135deg, var(--pink), var(--lav)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(255, 126, 182, .4); transform: translateY(-1px); }

/* ---------- 9. 菜品网格 ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 0 16px; }
.card {
  background: #fff; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-sm); text-align: left; position: relative;
  transition: transform .18s, box-shadow .18s; animation: pop .4s both;
}
.card:active { transform: scale(.95); box-shadow: var(--sh); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.card-art {
  position: relative; height: 108px; display: grid; place-items: center;
  overflow: hidden;
}
.card-art::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .5), transparent 55%);
}
.plate {
  position: relative; width: 74px; height: 74px; border-radius: 50%;
  background: #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, .16), inset 0 0 0 5px rgba(255, 255, 255, .6);
  display: grid; place-items: center; font-size: 36px;
}
.plate::after {
  content: ''; position: absolute; inset: 8px; border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .04);
}
/* 多个 emoji 摆盘（art 字段用的，可选） */
.plate.multi { font-size: 21px; letter-spacing: -1px; line-height: 1; }
.hero-plate.multi { font-size: 27px; letter-spacing: -1px; }
.result-art.multi { font-size: 34px; letter-spacing: -1px; }
.plate.pile, .hero-plate.pile, .result-art.pile { display: flex; flex-direction: column; align-items: center; }
.plate.pile span, .hero-plate.pile span, .result-art.pile span { display: block; white-space: nowrap; line-height: 1.05; margin-top: -2px; }
.plate.pile { font-size: 26px; }
.hero-plate.pile { font-size: 30px; }
.result-art.pile { font-size: 32px; }
.card-art .spark { position: absolute; font-size: 15px; animation: twinkle 2.4s ease-in-out infinite; }
.card-art .sp1 { top: 9px; left: 12px; }
.card-art .sp2 { top: 14px; right: 14px; animation-delay: .8s; }
.card-art .sp3 { bottom: 8px; right: 26px; animation-delay: 1.5s; font-size: 11px; }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(25deg); } }
.card-badge {
  position: absolute; top: 8px; left: 8px; background: rgba(255, 255, 255, .92);
  border-radius: 999px; padding: 3px 9px; font-size: 10.5px; font-weight: 800; color: var(--pink-deep);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}
.card-fav { position: absolute; top: 6px; right: 6px; font-size: 19px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .18)); z-index: 3; }
.card-body { padding: 9px 11px 12px; }
.card-name { font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 5px; }
.card-desc { font-size: 11.5px; color: var(--ink-2); font-weight: 600; margin-top: 4px; line-height: 1.5; height: 34px; overflow: hidden; }
.card-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.mini { font-size: 10.5px; font-weight: 700; color: var(--ink-2); background: var(--pink-bg); border-radius: 999px; padding: 3px 8px; }
.mini.v { color: #7a5ad6; background: var(--lav-soft); }
.mini.m { color: #e08a2e; background: var(--butter-soft); }
.mini.g { color: #2f9e6e; background: var(--mint-soft); }
.card-play { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; font-weight: 800; color: var(--pink-deep); }

/* ---------- 10. 详情页 ---------- */
.hero { position: relative; padding: 20px 16px 24px; color: #fff; overflow: hidden; }
.hero h1 { font-size: 25px; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .16); }
.hero .sub { margin-top: 6px; font-size: 13px; font-weight: 600; opacity: .96; }
.hero-art { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.hero-plate {
  width: 92px; height: 92px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 46px; box-shadow: 0 10px 20px rgba(0, 0, 0, .2), inset 0 0 0 6px rgba(255, 255, 255, .55);
  animation: bob 3.4s ease-in-out infinite;
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { background: rgba(255, 255, 255, .26); border: 1px solid rgba(255, 255, 255, .45); border-radius: 14px; padding: 6px 10px; }
.stat b { font-size: 15px; display: block; }
.stat span { font-size: 10.5px; opacity: .9; }
.back-btn {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .28);
  display: grid; place-items: center; font-size: 17px; color: #fff; margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, .5);
}

.panel {
  background: #fff; margin: 14px 16px; border-radius: var(--r-lg); padding: 16px;
  box-shadow: var(--sh-sm); border: 2px solid #fff;
}
.panel h3 { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.panel h3 .e { font-size: 18px; }

.ing-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ing-pill {
  background: var(--pink-bg); border: 1.5px dashed var(--pink-soft); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 5px;
}

.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 11px; align-items: flex-start; }
.step-no {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--lav)); color: #fff; font-size: 12.5px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(255, 126, 182, .35);
}
.step-tx { font-size: 13.5px; line-height: 1.65; font-weight: 600; padding-top: 2px; }

.tip-box {
  margin-top: 12px; background: var(--butter-soft); border: 2px dashed var(--butter);
  border-radius: var(--r-md); padding: 11px 13px; font-size: 12.5px; font-weight: 700; line-height: 1.6; color: #8a6a2a;
}

/* 做法（视频）卡片 */
.methods { display: flex; flex-direction: column; gap: 12px; }
.method {
  border: 2px solid var(--pink-soft); border-radius: var(--r-lg); padding: 12px;
  background: linear-gradient(135deg, #fff, var(--pink-bg));
}
.method-top { display: flex; align-items: center; gap: 11px; }
.play-btn {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-deep), var(--lav)); color: #fff;
  display: grid; place-items: center; font-size: 18px; box-shadow: 0 6px 14px rgba(244, 84, 154, .4);
  transition: .2s; position: relative;
}
.play-btn::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(244, 84, 154, .35); animation: ring 1.8s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.play-btn:active { transform: scale(.9); }
.method-name { font-size: 14.5px; font-weight: 800; }
.method-desc { font-size: 12px; color: var(--ink-2); font-weight: 600; margin-top: 3px; }
.vid-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.vid {
  display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800;
  padding: 7px 11px; border-radius: 999px; color: #fff; box-shadow: var(--sh-sm);
  transition: .18s;
}
.vid:active { transform: scale(.93); }
.vid.bili { background: linear-gradient(135deg, #ff9ecb, #ff6b9d); }
.vid.dy   { background: linear-gradient(135deg, #6a6a78, #33333d); }
.vid.xg   { background: linear-gradient(135deg, #ffb057, #ff7a2f); }
.vid.yt   { background: linear-gradient(135deg, #ff8080, #e03e3e); }
.vid.xhs  { background: linear-gradient(135deg, #ff8a8a, #f0304f); }
.vid.embed, .vid.direct { background: linear-gradient(135deg, #ff5c8a, #8b5ad6); }
.vid-note { font-size: 10.5px; color: var(--ink-3); font-weight: 700; margin-top: 8px; }

/* 内嵌播放器 */
.player-wrap { margin-top: 11px; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-sm); background: #000; }
.player-wrap iframe { width: 100%; height: 200px; border: 0; display: block; }

/* ---------- 11. 魔法厨房 ---------- */
.kitchen-hero {
  margin: 14px 16px 0; padding: 16px; border-radius: var(--r-xl); color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--lav)); box-shadow: var(--sh);
  position: relative; overflow: hidden;
}
.kitchen-hero h2 { font-size: 19px; font-weight: 800; }
.kitchen-hero p { font-size: 12.5px; font-weight: 600; opacity: .95; margin-top: 5px; }
.kitchen-hero .deco-e { position: absolute; right: 12px; top: 8px; font-size: 46px; opacity: .9; animation: bob 3s ease-in-out infinite; }

.pot-area { padding: 14px 16px 6px; }
.pot {
  position: relative; border-radius: 40px 40px 46px 46px; padding: 16px 14px 20px;
  background: linear-gradient(180deg, #fff, #fff6fa);
  border: 3px dashed var(--pink-soft); box-shadow: var(--sh-sm);
  min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: .25s;
}
.pot.over { border-color: var(--pink); background: var(--pink-bg); transform: scale(1.03); box-shadow: var(--sh); }
.pot.ready { border-style: solid; border-color: var(--mint); background: var(--mint-soft); }
.pot-steam { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-size: 20px; opacity: 0; }
.pot.ready .pot-steam { animation: steam 1.6s ease-in-out infinite; }
@keyframes steam { 0% { opacity: 0; transform: translate(-50%, 8px); } 50% { opacity: .9; transform: translate(-50%, -8px); } 100% { opacity: 0; transform: translate(-50%, -18px); } }
.pot-slots { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.slot {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--pink); display: grid; place-items: center;
  font-size: 25px; box-shadow: var(--sh-sm); animation: pop .35s both; cursor: grab;
}
.slot .nm { position: absolute; bottom: -17px; font-size: 10px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.slot .rm {
  position: absolute; top: -5px; right: -5px; width: 19px; height: 19px; border-radius: 50%;
  background: #ff6b8a; color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 800;
  border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .18);
}
.pot-empty { text-align: center; color: var(--ink-3); font-weight: 700; font-size: 13px; }
.pot-empty .big { font-size: 44px; display: block; margin-bottom: 6px; animation: bob 2.6s ease-in-out infinite; }
.pot-guess { margin-top: 12px; font-size: 12.5px; font-weight: 800; text-align: center; }
.pot-guess .g-name { color: var(--pink-deep); }
.fire-btn {
  margin: 14px auto 4px; display: flex; align-items: center; gap: 8px; justify-content: center;
  background: linear-gradient(135deg, #ff9d5c, #ff5c8a); color: #fff; font-weight: 800; font-size: 15px;
  padding: 12px 30px; border-radius: 999px; box-shadow: 0 10px 22px rgba(255, 92, 138, .38);
  transition: .2s;
}
.fire-btn[disabled] { background: #e2d3da; color: #fff; box-shadow: none; cursor: not-allowed; }
.fire-btn:not([disabled]):active { transform: scale(.94); }

.tray { padding: 6px 16px 0; }
.tray-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.ing-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 62px; padding: 8px 4px; border-radius: 16px; background: #fff;
  border: 2px solid var(--pink-soft); box-shadow: 0 3px 0 var(--pink-soft);
  transition: .15s; user-select: none; touch-action: none; cursor: grab;
}
.ing-chip .e { font-size: 24px; }
.ing-chip .n { font-size: 10.5px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.ing-chip.picked { opacity: .34; filter: grayscale(1); }
.ing-chip:active { transform: scale(.9); }
.ing-chip.wiggle { animation: wiggle .4s; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg) translateY(-4px); } 75% { transform: rotate(8deg) translateY(-4px); } }

/* 拖拽时的浮块 */
.drag-ghost {
  position: fixed; z-index: 999; pointer-events: none; width: 62px; padding: 8px 4px;
  border-radius: 16px; background: #fff; border: 2.5px solid var(--pink);
  box-shadow: var(--sh-lg); text-align: center; transform: translate(-50%, -50%) scale(1.15) rotate(-6deg);
}
.drag-ghost .e { font-size: 26px; }
.drag-ghost .n { font-size: 10.5px; font-weight: 800; color: var(--ink-2); }

.hint { margin: 10px 16px 0; font-size: 11.5px; color: var(--ink-2); font-weight: 700; text-align: center; line-height: 1.6; }
.hint b { color: var(--pink-deep); }

/* 结果弹层 */
.sheet-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(90, 58, 72, .45);
  backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center;
  animation: fade .25s both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, #fffafc, #fff2f7); border-radius: 32px 32px 0 0;
  padding: 20px 18px 26px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
  animation: sheetUp .4s cubic-bezier(.2, .9, .3, 1.15) both;
}
.sheet::-webkit-scrollbar { display: none; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-bar { width: 44px; height: 5px; border-radius: 99px; background: var(--pink-soft); margin: -8px auto 14px; }
.result-top { text-align: center; }
.result-badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--mint), #35b585);
}
.result-badge.creative { background: linear-gradient(135deg, var(--lav), #8b6ad8); }
.result-art { width: 104px; height: 104px; border-radius: 50%; background: #fff; margin: 12px auto 0; display: grid; place-items: center; font-size: 52px; box-shadow: var(--sh); animation: pop .5s both; }
.result-top h2 { font-size: 22px; font-weight: 800; margin-top: 12px; }
.result-top p { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: 6px; line-height: 1.6; }
.result-used { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.used-pill { background: #fff; border: 1.5px dashed var(--pink-soft); border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti span { position: absolute; font-size: 22px; animation: fall linear forwards; }
@keyframes fall {
  0% { transform: translateY(-30px) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

/* ---------- 12. 我的 ---------- */
.profile { margin: 16px; padding: 20px; border-radius: var(--r-xl); color: #fff; background: linear-gradient(135deg, var(--pink), var(--lav)); box-shadow: var(--sh); text-align: center; position: relative; overflow: hidden; }
.avatar { width: 78px; height: 78px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 40px; margin: 0 auto 10px; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); border: 4px solid rgba(255, 255, 255, .6); }
.profile h2 { font-size: 19px; font-weight: 800; }
.profile p { font-size: 12px; opacity: .95; font-weight: 600; margin-top: 4px; }
.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.p-stat { background: rgba(255, 255, 255, .24); border-radius: 16px; padding: 9px; border: 1px solid rgba(255, 255, 255, .4); }
.p-stat b { font-size: 18px; display: block; }
.p-stat span { font-size: 10.5px; opacity: .92; }

.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge-i { background: #fff; border-radius: 18px; padding: 11px 6px; text-align: center; box-shadow: var(--sh-sm); border: 2px solid #fff; }
.badge-i .e { font-size: 26px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .12)); }
.badge-i .n { font-size: 10.5px; font-weight: 800; margin-top: 4px; color: var(--ink-2); }
.badge-i.lock { filter: grayscale(1); opacity: .55; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1.5px dashed var(--pink-soft); }
.list-item:last-child { border-bottom: none; }
.list-ico { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; background: var(--pink-bg); }
.list-tx b { font-size: 14px; font-weight: 800; display: block; }
.list-tx span { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.list-arrow { margin-left: auto; color: var(--ink-3); font-size: 16px; }

.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty .e { font-size: 56px; display: block; margin-bottom: 10px; animation: bob 2.6s ease-in-out infinite; }
.empty p { font-size: 13px; font-weight: 700; }

.pill-tabs { display: flex; gap: 8px; padding: 0 16px 12px; }

/* ---------- 13. 底部导航 ---------- */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px);
  border-top: 2px solid var(--pink-soft); padding: 8px 6px 12px;
  box-shadow: 0 -6px 20px rgba(244, 84, 154, .1);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--ink-3); position: relative; }
.tab .e { font-size: 22px; filter: grayscale(1); opacity: .6; transition: .2s; }
.tab .n { font-size: 11px; font-weight: 800; }
.tab.on { color: var(--pink-deep); }
.tab.on .e { filter: none; opacity: 1; transform: translateY(-3px) scale(1.18); }
.tab.on::after { content: ''; position: absolute; top: -8px; width: 22px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--lav)); }

/* ---------- 14. 悬浮提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 108px; transform: translateX(-50%); z-index: 400;
  background: rgba(90, 58, 72, .92); color: #fff; font-size: 13px; font-weight: 700;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--sh); animation: toastIn .3s both;
  max-width: 80vw; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

.fab {
  position: absolute; right: 16px; bottom: 96px; z-index: 40;
  width: 52px; height: 52px; border-radius: 50%; display: none; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--lav)); color: #fff; font-size: 22px;
  box-shadow: var(--sh-lg);
}
.fab.show { display: grid; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
