/* ============ 变量 ============ */
:root {
  --red: #FF3B30;
  --red-dark: #E02A20;
  --yellow: #FFCC00;
  --yellow-soft: #FFE08A;
  --orange: #FF9500;
  --bg: #FFF8EC;
  --bg-soft: #FFFBF2;
  --text: #333333;
  --text-dim: #8A8A8A;
  --title: #000000;
  --line: #F0ECE2;
  --card: #FFFFFF;
  --shadow: 0 8px 24px rgba(255, 59, 48, 0.08);
  --shadow-strong: 0 12px 36px rgba(255, 59, 48, 0.18);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% 10%, #FFE3C7 0%, transparent 60%),
    radial-gradient(1000px 700px at 85% 90%, #FFD2CE 0%, transparent 55%),
    #FFF4DB;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ============ 手机外壳（桌面端预览） ============ */
.device-shell {
  position: relative;
  width: 390px;
  height: 820px;
  background: #111;
  border-radius: 46px;
  padding: 12px;
  box-shadow:
    0 50px 120px rgba(0, 0, 0, 0.35),
    0 10px 30px rgba(255, 59, 48, 0.15),
    inset 0 0 0 2px #2a2a2a;
}
.device-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 26px;
  background: #000;
  border-radius: 16px;
  z-index: 10;
}
.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg);
}

/* 在真机或小屏下直接占满 */
@media (max-width: 480px) {
  body { padding: 0; background: var(--bg); }
  .device-shell { width: 100vw; height: 100vh; padding: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .device-notch { display: none; }
  .device-screen { border-radius: 0; }
}

/* ============ 美食贴纸背景 ============ */
.food-wallpaper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: #FFF8EC;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='620' viewBox='0 0 420 620'>\
<g font-family='Arial' opacity='0.95'>\
<g transform='translate(40,50) rotate(-12)' opacity='0.85'>\
  <circle cx='0' cy='0' r='24' fill='%23FF6B5E'/>\
  <path d='M-10 -18 Q0 -28 10 -18' stroke='%232E7D32' stroke-width='3' fill='none' stroke-linecap='round'/>\
</g>\
<g transform='translate(330,80) rotate(15)' opacity='0.45'>\
  <ellipse cx='0' cy='0' rx='28' ry='20' fill='%23FFE08A'/>\
  <circle cx='0' cy='0' r='10' fill='%23FFB700'/>\
</g>\
<g transform='translate(110,150) rotate(8)' opacity='0.35'>\
  <rect x='-30' y='-14' width='60' height='28' rx='12' fill='%23FF9A66'/>\
  <circle cx='-10' cy='0' r='4' fill='%23fff'/><circle cx='8' cy='0' r='4' fill='%23fff'/>\
</g>\
<g transform='translate(300,210) rotate(-10)' opacity='0.8'>\
  <path d='M-22 -4 Q0 -26 22 -4 Q22 14 0 18 Q-22 14 -22 -4 Z' fill='%23C0392B'/>\
  <circle cx='0' cy='-6' r='4' fill='%23fff' opacity='0.35'/>\
</g>\
<g transform='translate(60,280) rotate(20)' opacity='0.4'>\
  <ellipse cx='0' cy='0' rx='30' ry='14' fill='%23F4B860'/>\
  <path d='M-24 -2 Q0 -10 24 -2' stroke='%23B26A2E' stroke-width='2.5' fill='none'/>\
</g>\
<g transform='translate(220,320) rotate(-6)' opacity='0.75'>\
  <circle cx='0' cy='0' r='22' fill='%23FFCC00' stroke='%23E0B400' stroke-width='2'/>\
  <circle cx='0' cy='0' r='10' fill='%23FFE8A0'/>\
</g>\
<g transform='translate(360,380) rotate(12)' opacity='0.35'>\
  <path d='M-20 10 Q-20 -18 0 -18 Q20 -18 20 10 Z' fill='%237AB648'/>\
  <rect x='-3' y='-22' width='6' height='8' fill='%23754C24'/>\
</g>\
<g transform='translate(120,430) rotate(-18)' opacity='0.85'>\
  <path d='M-26 -4 C-26 -20 -6 -28 0 -14 C6 -28 26 -20 26 -4 C26 14 0 24 0 24 C0 24 -26 14 -26 -4 Z' fill='%23FF3B30'/>\
</g>\
<g transform='translate(310,480) rotate(6)' opacity='0.4'>\
  <rect x='-22' y='-16' width='44' height='32' rx='6' fill='%23F2C14E'/>\
  <path d='M-22 -4 L22 -4' stroke='%23D08A2A' stroke-width='2'/>\
</g>\
<g transform='translate(70,540) rotate(14)' opacity='0.7'>\
  <path d='M-20 0 C-20 -16 20 -16 20 0 C20 14 -20 14 -20 0 Z' fill='%23FFD29B'/>\
  <path d='M-18 -2 L18 -2' stroke='%23B86C3F' stroke-width='2'/>\
</g>\
<g transform='translate(200,580) rotate(-8)' opacity='0.4'>\
  <circle cx='0' cy='0' r='20' fill='%23FF9A66'/>\
  <circle cx='0' cy='0' r='9' fill='%23fff'/>\
</g>\
<g transform='translate(250,20) rotate(22)' opacity='0.35'>\
  <path d='M-14 0 C-14 -14 14 -14 14 0 C14 12 -14 12 -14 0 Z' fill='%23E74C3C'/>\
  <path d='M0 -18 L2 -12 L-2 -12 Z' fill='%232E7D32'/>\
</g>\
<g transform='translate(180,100) rotate(-14)' opacity='0.4'>\
  <ellipse cx='0' cy='0' rx='22' ry='10' fill='%23F6D365'/>\
</g>\
<g transform='translate(20,380) rotate(10)' opacity='0.45'>\
  <circle cx='0' cy='0' r='16' fill='%23FF6B5E' opacity='0.9'/>\
</g>\
</g></svg>");
  background-repeat: repeat;
  background-size: 420px 620px;
  opacity: 1;
}

/* ============ 页面切换 ============ */
.page {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 44px 18px 100px;
  overflow-y: auto;
  overflow-x: hidden;
  animation: fadeUp 0.35s ease;
}
.page.active { display: flex; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ 登录页 ============ */
.page-login {
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background:
    linear-gradient(180deg, rgba(255,248,236,0.35), rgba(255,244,219,0.55));
  /* 让美食贴纸透出 */
}
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.login-card {
  width: 100%;
  max-width: 320px;
  padding: 28px 22px 22px;
  margin-top: -20px;
}
.brand { text-align: center; margin-bottom: 18px; }
.brand-logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFEFC2, #FFD9D5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(255, 59, 48, 0.2);
}
.brand-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--title);
  margin: 4px 0 2px;
  letter-spacing: 0.5px;
}
.brand-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}

/* 表单 */
.login-form { display: flex; flex-direction: column; gap: 12px; }
.field {
  position: relative;
  display: flex;
  align-items: center;
  background: #FFFBF2;
  border: 1.5px solid #F0ECE2;
  border-radius: var(--radius);
  padding: 0 14px;
  height: 46px;
  transition: all 0.2s;
}
.field:focus-within {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}
.field-icon {
  color: var(--orange);
  display: flex;
  margin-right: 10px;
}
.field input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  height: 100%;
  font-family: inherit;
}
.field input::placeholder { color: #B9B4A6; }

/* 勾选框 */
.agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  margin: 2px 0 4px;
  cursor: pointer;
  line-height: 1.5;
}
.agreement input { display: none; }
.agree-mark {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid #D9D3C3;
  border-radius: 4px;
  margin-top: 1px;
  position: relative;
  transition: all 0.2s;
}
.agreement input:checked + .agree-mark {
  background: var(--yellow);
  border-color: var(--yellow);
}
.agreement input:checked + .agree-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.agree-text a { color: var(--orange); text-decoration: none; }

/* 按钮 */
.btn {
  height: 48px;
  border-radius: var(--radius);
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #FF5E52, #FF3B30);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 59, 48, 0.32);
}
.btn-primary:disabled {
  background: #F0ECE2;
  color: #C8C2B3;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-yellow {
  background: linear-gradient(135deg, #FFD93F, #FFCC00);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 204, 0, 0.3);
}
.btn-yellow:disabled {
  background: #F0ECE2;
  color: #C8C2B3;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-outline {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
}
.btn-ghost {
  background: #FFF3E0;
  color: #8A6D3B;
}

.login-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.login-links a { color: var(--orange); text-decoration: none; font-weight: 600; }
.login-links .divider { color: #D9D3C3; }

.footer-agreement {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin: 0;
}
.footer-agreement a { color: var(--text-dim); text-decoration: none; }
.footer-agreement span { margin: 0 6px; }

/* ============ 主页 ============ */
.page-home {
  padding: 44px 16px 100px;
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.2), rgba(255, 251, 242, 0.6) 40%);
}
.home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}
.greeting .hello {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}
.greeting .tagline {
  font-size: 20px;
  font-weight: 800;
  color: var(--title);
  margin: 4px 0 0;
}
.avatar-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--yellow);
  border-radius: var(--radius);
  padding: 0 14px;
  height: 44px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  z-index: 20;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap.active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12), var(--shadow);
}
.search-icon { display: flex; margin-right: 10px; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  height: 100%;
  font-family: inherit;
  min-width: 0;
}
.search-input::placeholder { color: #B9B4A6; }
.search-input::-webkit-search-cancel-button { display: none; }

/* 列表页搜索框 */
.search-wrap-list {
  margin-bottom: 12px;
  margin-top: -4px;
}

.search-clear {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: #F0ECE2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* 搜索下拉 */
.search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(255, 59, 48, 0.18), 0 0 0 1px rgba(255, 204, 0, 0.35);
  padding: 10px 0;
  max-height: 340px;
  overflow-y: auto;
  animation: dropIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
  z-index: 30;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.sd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 8px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}
.sd-clear {
  background: none;
  border: none;
  color: var(--orange);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
}
.sd-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sd-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.15s;
}
.sd-list li:active,
.sd-list li:hover { background: #FFFBF2; }
.sd-list li .sd-ic {
  width: 20px;
  color: #C8C2B3;
  display: flex;
  flex-shrink: 0;
}
.sd-list li .sd-text { flex: 1; }
.sd-list li .sd-del {
  width: 20px; height: 20px;
  border: none;
  background: transparent;
  color: #C8C2B3;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.sd-list li .sd-del:hover { background: #FFE0DC; color: var(--red); }

.sd-empty {
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}
.sd-hot {
  padding: 8px 14px 6px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}
.sd-hot-title {
  margin: 4px 0 8px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}
.sd-hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 4px;
}
.sd-tag {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 14px;
  background: #FFF4C7;
  color: #8A6D00;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.sd-tag:active { transform: scale(0.96); background: var(--yellow); color: #fff; }

/* 拍照 */
.camera-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-strong);
  margin-bottom: 16px;
  border: 1.5px solid rgba(255, 204, 0, 0.4);
}
.camera-frame {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #FFFBF2, #FFF1D9);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px dashed rgba(255, 204, 0, 0.7);
}
.camera-frame:hover { border-color: var(--red); }
.camera-corner {
  position: absolute;
  width: 20px; height: 20px;
  border: 3px solid var(--red);
}
.camera-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; border-top-left-radius: 6px; }
.camera-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; border-top-right-radius: 6px; }
.camera-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; border-bottom-left-radius: 6px; }
.camera-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; border-bottom-right-radius: 6px; }

.camera-empty {
  text-align: center;
  padding: 20px;
}
.camera-empty p {
  margin: 10px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
}
.camera-empty .hint {
  font-size: 11px;
  color: var(--text-dim);
}
#previewImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.shutter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shutter-ring {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 3px solid var(--red);
  background: rgba(255, 255, 255, 0.8);
}
.shutter-dot {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF5E52, var(--red));
  box-shadow: 0 4px 10px rgba(255, 59, 48, 0.4);
}
.shutter:active .shutter-dot { transform: scale(0.88); }

/* 功能四宫格 */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.feature-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.feature-card:active { transform: scale(0.97); }
.f-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.f-yellow { background: #FFF4C7; }
.f-red { background: #FFE0DC; }
.f-orange { background: #FFE8CC; }
.f-pink { background: #FFD9D5; }
.f-title { margin: 0; font-size: 13px; font-weight: 700; color: var(--title); }
.f-desc { margin: 2px 0 0; font-size: 11px; color: var(--text-dim); }

/* 推荐 */
.recommend-block { margin-bottom: 8px; }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}
.block-head h2 { font-size: 17px; font-weight: 800; color: var(--title); margin: 0; }
.block-more { font-size: 11px; color: var(--text-dim); }

.recommend-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.recommend-list::-webkit-scrollbar { display: none; }
.rec-card {
  flex: 0 0 136px;
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.2s;
  border: 1px solid rgba(255, 204, 0, 0.3);
}
.rec-card:active { transform: scale(0.97); }
.rec-thumb {
  width: 100%;
  height: 90px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--yellow-soft), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.rec-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent 60%);
}
.rec-name { margin: 0; font-size: 13px; font-weight: 700; color: var(--title); }
.rec-level {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #FFF4C7;
  color: var(--orange);
}

/* 底部导航 —— 固定在屏幕底部，跨页面通用 */
.bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid #F0ECE2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  box-shadow: 0 -6px 20px rgba(255, 59, 48, 0.06);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.bottom-bar.hide {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.bar-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #A8A296;
  cursor: pointer;
  font-family: inherit;
  padding: 6px;
}
.bar-item.active { color: var(--red); font-weight: 700; }
.bar-shoot {
  transform: translateY(-12px);
}
.shoot-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF5E52, var(--red));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(255, 59, 48, 0.45);
  border: 3px solid #fff;
}

/* ============ 子页面统一 ============ */
.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.sub-header h2 { margin: 0; font-size: 17px; font-weight: 800; color: var(--title); }
.sub-header span { display: inline-block; width: 34px; }
.sub-header-clear h2 { color: #fff; }
.back-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.back-btn-light {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
}

/* 我的页 */
.me-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #FFEFC2 0%, #FFD9D5 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.me-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(255, 59, 48, 0.12);
}
.me-name { margin: 0; font-size: 17px; font-weight: 800; color: var(--title); }
.me-sub { margin: 4px 0 0; font-size: 12px; color: var(--orange); }

.me-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.me-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.me-list li:last-child { border-bottom: none; }
.me-list li:active { background: #FFFBF2; }
.me-ic {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: #FFFBF2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.me-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.me-count {
  font-size: 12px;
  color: var(--orange);
  background: #FFF4C7;
  padding: 2px 8px;
  border-radius: 8px;
}
.me-arrow { color: #C8C2B3; font-size: 18px; }

.btn-logout { width: 100%; height: 46px; }
.copyright {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin: 16px 0 0;
}

/* 列表页 */
.list-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 204, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s;
}
.list-item:active { transform: scale(0.98); }
.list-thumb {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--yellow-soft), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.list-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent 60%);
}
.list-info { flex: 1; }
.list-name { margin: 0; font-size: 15px; font-weight: 700; color: var(--title); }
.list-meta { margin: 4px 0 0; font-size: 11px; color: var(--text-dim); }
.list-arrow { color: #C8C2B3; font-size: 20px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state .emp-ic {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow-soft), #FFE8CC);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.empty-state p {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}

/* 会员订阅页 */
.page-vip {
  background: linear-gradient(180deg, #FF5E52 0%, var(--red) 45%, #FFB347 100%);
  color: #fff;
}
.vip-hero {
  text-align: center;
  padding: 20px 0 24px;
  color: #fff;
}
.vip-crown {
  width: 80px; height: 80px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vip-hero h3 { margin: 0; font-size: 22px; font-weight: 800; }
.vip-hero p { margin: 6px 0 0; font-size: 13px; opacity: 0.9; }

.vip-benefits {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #fff;
  padding: 8px 0;
}
.benefit + .benefit { border-top: 1px dashed rgba(255,255,255,0.25); }
.b-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--red);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.benefit p { margin: 0; flex: 1; }

.vip-plans {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.plan-card {
  background: #fff;
  color: var(--title);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border: 2px solid transparent;
}
.plan-card.plan-active {
  border-color: var(--yellow);
  transform: scale(1.03);
  background: linear-gradient(180deg, #FFF9E4, #fff);
}
.plan-tag { margin: 0; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.plan-price {
  margin: 6px 0 2px;
  font-size: 24px;
  font-weight: 800;
  color: var(--red);
}
.plan-price span { font-size: 13px; margin-right: 2px; }
.plan-desc { margin: 0; font-size: 10px; color: var(--text-dim); }
.plan-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  background: var(--yellow);
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 10px;
}

.btn-subscribe {
  width: 100%;
  height: 52px;
  background: var(--yellow);
  color: var(--red);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(255, 204, 0, 0.5);
}
.vip-note {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  margin: 12px 0;
}

/* ============ 弹窗通用 ============ */
[hidden] { display: none !important; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: maskIn 0.2s ease;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 86%;
  max-width: 320px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  animation: popIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.modal-card h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--red);
  text-align: center;
}
.modal-card .field { margin-bottom: 10px; }
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.modal-actions .btn { flex: 1; height: 44px; font-size: 14px; }
.modal-text {
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.modal-content {
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
  overflow-y: auto;
  max-height: 50vh;
  padding: 4px 2px;
}
.modal-content h4 { color: var(--red); font-size: 14px; margin: 12px 0 6px; }
.modal-content p { margin: 0 0 8px; }

/* 菜谱详情底部弹出 */
.sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 14px 18px 100px;
  max-height: 88%;
  overflow-y: auto;
  animation: sheetIn 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
  box-shadow: 0 -20px 40px rgba(0,0,0,0.15);
}
@keyframes sheetIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-handle {
  width: 40px; height: 4px;
  background: #E5DECC;
  border-radius: 2px;
  margin: 2px auto 14px;
}
.sheet-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #F5F2E8;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recipe-head h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
}
.recipe-meta { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 600;
}
.chip-level { background: #FFF4C7; color: #B38600; }
.chip-allergy { background: #FFE0DC; color: var(--red); }

.recipe-video {
  position: relative;
  width: 100%;
  height: 170px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  margin-bottom: 16px;
}
#recipeVideo { width: 100%; height: 100%; object-fit: cover; display: block; background: #111; }
.video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--yellow-soft), var(--orange));
  color: #fff;
  gap: 4px;
}
.video-fallback p { margin: 6px 0 0; font-weight: 700; }
.video-fallback span { font-size: 11px; opacity: 0.9; }

.recipe-section h3 {
  margin: 16px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--title);
  position: relative;
  padding-left: 12px;
}
.recipe-section h3::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 4px;
  height: 16px;
  background: var(--red);
  border-radius: 2px;
}
.steps {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 10px 10px 38px;
  margin-bottom: 8px;
  background: #FFFBF2;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 10px; top: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-tip {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #FFF4C7, #FFEDB3);
  border-radius: 12px;
  margin: 14px 0;
  border-left: 3px solid var(--yellow);
}
.recipe-tip p { margin: 0; font-size: 12px; color: #8A6D00; line-height: 1.6; flex: 1; }
.tip-ic { font-size: 16px; }

.recipe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.act-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
}
.act-btn:active { transform: scale(0.95); }
.act-btn.on.act-like { background: #FFE0DC; color: var(--red); border-color: var(--red); }
.act-btn.on.act-dislike { background: #EEEEEE; color: #555; border-color: #999; }
.act-btn.on.act-collect { background: #FFF4C7; color: #B38600; border-color: var(--yellow); }

/* ============ Toast ============ */
.toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  max-width: 80%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ============ 滚动条隐藏 ============ */
.page::-webkit-scrollbar { width: 0; display: none; }
.page { scrollbar-width: none; }
