/* ============ FitGenius Web · iOS 风格 ============ */
:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-gray: #f2f2f7;
  --text: #111113;
  --text-2: #6b6b70;
  --text-3: #9a9aa0;
  --blue: #3478f6;
  --blue-soft: #e8eefc;
  --green: #34a853;
  --green-soft: #e9f4ec;
  --orange: #e8862e;
  --orange-soft: #faf1e6;
  --purple: #9d4de0;
  --purple-soft: #f5ecfb;
  --red: #e5484d;
  --red-soft: #fdeeee;
  --sep: #e5e5ea;
  --radius: 18px;
  --tabbar-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
  background: #d8d8de;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* 手机壳容器：桌面上居中呈手机比例，移动端全屏 */
#phone {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
@media (min-width: 500px) {
  body { padding: 24px 0; }
  #phone {
    min-height: calc(100dvh - 48px);
    border-radius: 36px;
    border: 1px solid #c9c9cf;
  }
}

#app {
  padding: 18px 18px calc(var(--tabbar-h) + 34px);
  min-height: 100dvh;
}
@media (min-width: 500px) {
  #app { min-height: calc(100dvh - 48px); }
}

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; }

/* ============ 启动页 ============ */
#splash {
  position: absolute;
  inset: 0;
  z-index: 300;
  background: linear-gradient(160deg, #1d4ed8 0%, #3478f6 45%, #60a5fa 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }

/* 背景呼吸光晕 */
.splash-glow {
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 70%);
  animation: glowPulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
}

.splash-body { position: relative; }
.splash-icon {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  /* 图标 PNG 本身是透明底，补白色卡片底还原 App 图标效果 */
  background: #fff;
  animation: iconBounce 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}
@keyframes iconBounce {
  0% { transform: translateY(-60px) scale(0.6); opacity: 0; }
  55% { transform: translateY(8px) scale(1.06); opacity: 1; }
  75% { transform: translateY(-4px) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

.splash-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 18px;
  animation: fadeUp 0.6s ease-out 0.5s both;
}
.splash-slogan {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 2px;
  margin-top: 10px;
  animation: fadeUp 0.6s ease-out 0.85s both;
}
@keyframes fadeUp {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* 加载进度条：1.8s 播完 */
.splash-progress {
  width: 180px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  margin: 34px auto 0;
  overflow: hidden;
  animation: fadeUp 0.4s ease-out 1s both, progressHide 0.35s ease 2.35s both;
}
.splash-progress i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: #fff;
  transform-origin: left;
  transform: scaleX(0);
  animation: progressFill 1.3s ease-in-out 1.05s forwards;
}
@keyframes progressFill { to { transform: scaleX(1); } }
@keyframes progressHide { to { opacity: 0; transform: translateY(-6px); } }

/* 进入按钮：进度条播完后浮现 */
.splash-enter {
  position: relative;
  margin-top: 30px;
  padding: 16px 44px;
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  animation: fadeUp 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 2.5s both, breathe 2.2s ease-in-out 3.1s infinite;
  transition: transform 0.12s;
}
.splash-enter:active { transform: scale(0.95); }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

.splash-foot {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom));
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
  animation: fadeUp 0.6s ease-out 2.7s both;
}

/* 启动页展示期间锁定滚动 */
body.splash-lock { overflow: hidden; height: 100dvh; }

/* ============ 顶部栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 44px;
}
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  transition: transform 0.12s;
}
.mode-pill:active { transform: scale(0.95); }
.topbar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 700;
}
.topbar { position: relative; }
.topbar-action {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.topbar-action:active { transform: scale(0.94); }

.page-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 6px 0 16px;
}

/* ============ 训练计划 ============ */
.plan-hero {
  margin: -18px -18px 0;
  padding: 0 18px 20px;
  background: linear-gradient(180deg, #e9effc 0%, var(--bg) 100%);
}
.plan-hero .topbar { padding-top: 18px; }
.plan-name { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.plan-cycle { font-size: 17px; color: var(--text-2); margin-top: 6px; }

.schedule-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 18px 0 12px;
}
.schedule-head .label { font-size: 15px; color: var(--text-2); }
.schedule-head .link { font-size: 15px; color: var(--blue); font-weight: 500; }

.day-scroll {
  display: flex; gap: 10px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 2px 18px 14px;
  scrollbar-width: none;
}
.day-scroll::-webkit-scrollbar { display: none; }
.day-card {
  flex: none;
  width: 92px;
  border-radius: 20px;
  background: #ececf0;
  padding: 14px 8px;
  text-align: center;
  transition: transform 0.12s;
}
.day-card:active { transform: scale(0.95); }
.day-card .d-date { font-size: 15px; color: var(--text-2); }
.day-card .d-week { font-size: 17px; font-weight: 600; margin-top: 2px; }
.day-card .d-part { font-size: 17px; font-weight: 700; margin-top: 2px; }
.day-card .d-prog {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text-2); margin-top: 6px;
}
.day-card.rest .d-part { font-weight: 500; color: var(--text); }
.day-card.active { background: var(--blue); color: #fff; }
.day-card.active .d-date, .day-card.active .d-week,
.day-card.active .d-prog { color: rgba(255,255,255,0.85); }

.day-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  border-top: 1px solid var(--sep);
  margin: 0 -18px;
  padding: 18px 18px 6px;
}
.day-detail-head h2 { font-size: 30px; font-weight: 800; }
.day-detail-head .sub { font-size: 17px; color: var(--text-2); margin-top: 4px; }
.day-detail-head .cnt { font-size: 15px; color: var(--text-3); margin-top: 2px; }
.add-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: #111; color: #fff; font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex: none; margin-top: 4px;
}
.add-btn:active { transform: scale(0.94); }

.exercise-list { padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.exercise {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 2px;
}
.ex-check {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2.5px solid #c7c7cc;
  margin-top: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
  transition: all 0.15s;
}
.exercise.done .ex-check { background: var(--green); border-color: var(--green); }
.ex-body { flex: 1; min-width: 0; }
.ex-name { font-size: 21px; font-weight: 700; }
.exercise.done .ex-name { color: var(--text-3); text-decoration: line-through; }
.ex-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: 18px; row-gap: 4px;
  margin-top: 6px;
  font-size: 17px; color: var(--text);
}
.ex-meta .m { display: inline-flex; align-items: center; gap: 7px; }
.ex-meta .m .ico { color: var(--text-2); font-size: 15px; }
.ex-note { font-size: 15px; color: var(--text-2); margin-top: 6px; }
.ex-more {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  color: var(--blue); font-size: 20px; margin-top: 6px;
  display: flex; align-items: center; justify-content: center;
}

.rest-hint {
  text-align: center;
  color: var(--text-2);
  padding: 60px 20px;
  font-size: 17px;
  line-height: 1.7;
}
.rest-hint .big { font-size: 44px; display: block; margin-bottom: 10px; }

/* ============ 统计 ============ */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  border-radius: 22px;
  padding: 20px 18px;
}
.stat-card .ico { font-size: 24px; }
.stat-card .num { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin-top: 10px; }
.stat-card .lbl { font-size: 15px; color: var(--text-2); margin-top: 4px; }
.sc-blue { background: var(--blue-soft); }
.sc-green { background: var(--green-soft); }
.sc-orange { background: var(--orange-soft); }
.sc-purple { background: var(--purple-soft); }
.sc-red { background: var(--red-soft); }

.panel {
  background: #ececf0;
  border-radius: 24px;
  padding: 20px 18px;
  margin-bottom: 20px;
}
.panel h3 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }

.chip-row {
  display: flex; gap: 10px; overflow-x: auto;
  margin: 0 -18px; padding: 0 18px 14px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  background: #dfdfe4;
  color: var(--text);
  font-size: 15px; font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
}
.chip.active { background: var(--green); color: #fff; }

.trend-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; margin-bottom: 6px;
}
.trend-head .name { color: var(--text-2); }
.trend-head .delta { color: var(--text-2); }
.trend-head .delta b { color: var(--green); }

.chart-wrap { width: 100%; }
.chart-wrap svg { display: block; width: 100%; height: auto; }

.section-title { font-size: 20px; font-weight: 800; margin: 4px 0 10px; }
.section-text { font-size: 16px; color: var(--text-2); line-height: 1.6; margin-bottom: 20px; }

/* ============ AI 助手 ============ */
.chat-page { display: flex; flex-direction: column; min-height: calc(100dvh - 36px - var(--tabbar-h)); }
.chat-banner {
  background: #fdf3e3;
  color: #b06a10;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.chat-scroll { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-bottom: 90px; }
.msg { max-width: 82%; }
.msg .bubble {
  padding: 14px 16px;
  border-radius: 20px;
  font-size: 16.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.ai { align-self: flex-start; }
.msg.ai .bubble { background: #e4e4e9; border-bottom-left-radius: 6px; }
.msg.user { align-self: flex-end; }
.msg.user .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.msg .time { font-size: 12.5px; color: var(--text-3); margin: 4px 6px 8px; }
.msg.user .time { text-align: right; }
.msg .bubble b { font-weight: 700; }
.msg .img-bubble { padding: 5px; position: relative; white-space: normal; font-size: 0; }
.msg .img-bubble img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  border-radius: 16px;
}
/* 标注图左上角的评分角标（仿 App 的关键帧标注样式） */
.img-tag {
  position: absolute;
  top: 14px; left: 14px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-align: left;
  pointer-events: none;
}
.img-tag b {
  color: #35e05a;
  font-size: 17px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.img-tag span {
  color: #fff;
  font-size: 12.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 仿相册选择器 */
.gallery-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.gallery-head h3 { margin-bottom: 0; }
.gallery-cancel { color: var(--blue); font-size: 16px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  transition: transform 0.12s;
}
.gallery-item:active { transform: scale(0.96); }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.g-badge {
  position: absolute;
  right: 6px; bottom: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 8px;
}
.gallery-tip {
  font-size: 13px; color: var(--text-3);
  margin-top: 14px; text-align: center;
  padding-bottom: 6px;
}

.typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #9a9aa0; animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.suggest-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.suggest {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14.5px;
  color: var(--blue);
}

.chat-inputbar {
  position: fixed;
  bottom: calc(var(--tabbar-h) + 18px);
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, 100%);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(242,242,247,0), var(--bg) 35%);
}
.chat-inputbar input {
  flex: 1;
  border: 1px solid #d7d7dc;
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.chat-inputbar input:focus { border-color: var(--blue); }
.send-btn {
  flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.send-btn:disabled { background: #c3c3c9; }
.img-btn {
  flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.img-btn:disabled { opacity: 0.4; }

/* ============ 饮食 ============ */
.date-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.date-row .lbl { font-size: 20px; font-weight: 600; }
.date-chip {
  background: #e4e4e9;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 17px; font-weight: 600;
}

.meal-panel {
  background: var(--card);
  border-radius: 26px;
  padding: 22px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.meal-panel h3 { font-size: 20px; font-weight: 800; }
.macro-line {
  display: flex; flex-wrap: wrap;
  column-gap: 20px; row-gap: 4px;
  margin-top: 12px;
  font-size: 17px;
}
.macro-line b { font-weight: 700; }
.meal-summary {
  font-size: 16.5px; color: var(--text-2);
  line-height: 1.7; margin-top: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sep);
}
.meal-entry { padding: 16px 0; border-bottom: 1px solid var(--sep); }
.meal-entry:last-child { border-bottom: none; padding-bottom: 4px; }
.meal-entry .row1 {
  display: flex; align-items: baseline; justify-content: space-between;
}
.meal-entry .type { font-size: 19px; font-weight: 700; }
.meal-entry .kcal { font-size: 19px; font-weight: 600; }
.meal-entry .desc { font-size: 16.5px; color: var(--text-2); margin-top: 6px; }
.meal-photo {
  margin-top: 10px;
  width: 108px; height: 108px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  background: linear-gradient(135deg, #fbe8d6, #f6d5c0);
}
.meal-entry .del { font-size: 13.5px; color: var(--red); margin-top: 8px; }

.analyze-wrap {
  position: sticky;
  bottom: calc(var(--tabbar-h) + 26px);
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
.analyze-btn {
  background: var(--blue); color: #fff;
  font-size: 17px; font-weight: 600;
  padding: 15px 22px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(52, 120, 246, 0.35);
}
.analyze-btn:active { transform: scale(0.97); }

/* ============ 我的 ============ */
.profile-head {
  display: flex; align-items: center; gap: 16px;
  background: var(--card);
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 16px;
}
.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--blue-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  flex: none;
}
.profile-head .name { font-size: 22px; font-weight: 800; }
.profile-head .sub { font-size: 15px; color: var(--text-2); margin-top: 3px; }

.info-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border-radius: 20px;
  padding: 16px 6px;
  margin-bottom: 16px;
  text-align: center;
}
.info-grid .v { font-size: 19px; font-weight: 700; }
.info-grid .k { font-size: 13px; color: var(--text-2); margin-top: 3px; }

.list-group {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}
.list-item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px;
  font-size: 16.5px;
  border-bottom: 1px solid var(--sep);
  text-align: left;
}
.list-item:last-child { border-bottom: none; }
.list-item .li-ico { font-size: 18px; width: 26px; text-align: center; }
.list-item .li-label { flex: 1; }
.list-item .li-value { color: var(--text-3); font-size: 15px; }
.list-item .chev { color: #c7c7cc; }

.disclaimer {
  font-size: 13px; color: var(--text-3);
  line-height: 1.7; padding: 4px 8px 20px;
  text-align: center;
}

/* ============ 底部 Tab ============ */
#tabbar {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, calc(100% - 28px));
  height: var(--tabbar-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 50;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 13px;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
}
.tab .tab-icon { font-size: 21px; line-height: 1; filter: grayscale(1); }
.tab.active { background: #ececf0; color: var(--blue); font-weight: 600; }
.tab.active .tab-icon { filter: none; }

/* ============ 弹层 ============ */
#modal-root:empty { display: none; }
.overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.18s;
}
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  width: min(460px, 100%);
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 86dvh;
  overflow-y: auto;
  animation: slideUp 0.22s ease-out;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0.5; } }
.sheet h3 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #d7d7dc;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--card);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.sheet-actions { display: flex; gap: 12px; margin-top: 8px; }
.btn {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  font-size: 17px; font-weight: 600;
  text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-plain { background: #e4e4e9; }
.btn:active { transform: scale(0.97); }

/* ============ Toast ============ */
#toast {
  position: fixed;
  left: 50%; bottom: calc(var(--tabbar-h) + 40px);
  transform: translateX(-50%) translateY(10px);
  background: rgba(20, 20, 22, 0.88);
  color: #fff;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 200;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.fade-in { animation: pageIn 0.2s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
