/* 乡巴佬神笔 · HTML 原型共通样式
   配合 Tailwind CDN 使用，定义手机壳、品牌色、田园水墨背景与通用组件。 */

:root {
  --sb-green: #4CAF50;
  --sb-green-dark: #3d9142;
  --sb-green-deep: #2f7d34;
  --sb-orange: #FF9800;
  --sb-gray-bg: #F5F5F5;
  --sb-ink: #1f2937;
  --sb-muted: #6b7280;
  --sb-line: #e5e7eb;
}

/* ---------- 页面外壳（手机居中） ---------- */
body {
  margin: 0;
  background: #e9ebee;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--sb-ink);
  -webkit-font-smoothing: antialiased;
}

.sb-stage {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px 48px;
}

/* 手机屏：375 × 812，圆角+阴影 */
.sb-phone {
  position: relative;
  width: 375px;
  min-height: 812px;
  background: var(--sb-gray-bg);
  border-radius: 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18), 0 0 0 10px #111 inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 顶部刘海/状态栏占位 */
.sb-statusbar {
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sb-ink);
  position: relative;
  z-index: 5;
}
.sb-statusbar .sb-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 26px;
  background: #111;
  border-radius: 0 0 18px 18px;
}

/* 可滚动内容区 */
.sb-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sb-body::-webkit-scrollbar { width: 0; }

/* ---------- 田园水墨背景条 ---------- */
.sb-hero {
  position: relative;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(129, 199, 132, .35), transparent 60%),
    linear-gradient(180deg, #f3f8f0 0%, var(--sb-gray-bg) 100%);
  background-image: url("rural.svg"), linear-gradient(180deg, #f3f8f0 0%, var(--sb-gray-bg) 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: right top, center;
  background-size: 220px auto, cover;
}

/* ---------- 顶部品牌栏 ---------- */
.sb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 10px;
}
.sb-logo {
  height: 34px;
  width: auto;
}
.sb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sb-green);
  border: 1px solid #d5ead6;
}

/* 返回箭头顶栏 */
.sb-navbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 10px;
}
.sb-back {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sb-ink);
  text-decoration: none;
  font-size: 20px;
}
.sb-navtitle { font-size: 16px; font-weight: 600; }

/* ---------- 卡片 ---------- */
.sb-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(31, 41, 55, .06);
  padding: 18px;
}

/* ---------- 主按钮 ---------- */
.sb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: var(--sb-green);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(76, 175, 80, .28);
  transition: transform .05s ease, background .2s ease;
}
.sb-btn:active { transform: translateY(1px); }
.sb-btn-ghost {
  background: #fff;
  color: var(--sb-green);
  border: 1.5px solid var(--sb-green);
  box-shadow: none;
}
.sb-btn-orange {
  background: var(--sb-orange);
  box-shadow: 0 8px 18px rgba(255, 152, 0, .28);
}

/* 底部固定操作条 */
.sb-actionbar {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(245,245,245,0), var(--sb-gray-bg) 30%);
}
.sb-hint {
  text-align: center;
  font-size: 12px;
  color: var(--sb-muted);
  margin-top: 8px;
}

/* ---------- 选择标签（药丸/方块） ---------- */
.sb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid var(--sb-line);
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.sb-chip.is-active {
  background: var(--sb-green);
  border-color: var(--sb-green);
  color: #fff;
  font-weight: 600;
}
.sb-chip.is-active .sb-check { display: inline; }
.sb-check { display: none; }

/* 段落标题 */
.sb-label {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
}

/* 表单输入 */
.sb-input, .sb-textarea, .sb-select {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--sb-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--sb-ink);
  background: #fff;
  outline: none;
}
.sb-input:focus, .sb-textarea:focus, .sb-select:focus { border-color: var(--sb-green); }
.sb-textarea { resize: none; }

/* ---------- 步骤进度 ---------- */
.sb-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 18px 0;
}
.sb-steps .line { flex: 1; height: 3px; border-radius: 3px; background: #d7e2d8; }
.sb-steps .line.done { background: var(--sb-green); }
.sb-steps .dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: #d7e2d8; color: #fff;
}
.sb-steps .dot.done { background: var(--sb-green); }

/* ---------- 底部 TabBar ---------- */
.sb-tabbar {
  flex: 0 0 auto;
  display: flex;
  background: #fff;
  border-top: 1px solid #eef0f2;
  padding: 8px 0 calc(6px + env(safe-area-inset-bottom));
}
.sb-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #9ca3af;
  text-decoration: none;
}
.sb-tab.is-active { color: var(--sb-green); font-weight: 600; }
.sb-tab svg { width: 22px; height: 22px; }

/* ---------- 小工具 ---------- */
.sb-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}
.sb-badge-green { background: #e8f5e9; color: var(--sb-green-deep); }
.sb-badge-orange { background: #fff3e0; color: #e65100; }
.sb-price { color: var(--sb-orange); font-weight: 800; }
.sb-fire { color: var(--sb-orange); }

/* menu 索引页专用 */
.sb-index-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.sb-index-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease;
}
.sb-index-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0,0,0,.14); }
.sb-index-card .thumb {
  height: 132px;
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  display: flex; align-items: center; justify-content: center;
  color: var(--sb-green); font-size: 34px;
}
.sb-index-card .meta { padding: 12px 14px; }
.sb-index-card .meta h3 { margin: 0 0 4px; font-size: 15px; }
.sb-index-card .meta p { margin: 0; font-size: 12px; color: var(--sb-muted); }

/* ---------- 引导视频弹窗 ---------- */
.sb-video-mask {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, .62);
  display: flex; align-items: center; justify-content: center;
  padding: 0 20px;
}
.sb-video-box {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .4);
}
.sb-video-box video {
  display: block;
  width: 100%;
  max-height: 68vh;
  background: #000;
}
.sb-video-title {
  padding: 12px 14px 4px;
  background: #000; color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.sb-video-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(0, 0, 0, .5); color: #fff;
  font-size: 16px; line-height: 30px; text-align: center;
}

/* 帮助中心：观看引导视频按钮 */
.sb-video-entry {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: #eef7ee; color: var(--sb-green-deep);
  font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 1px solid #d9ecd9;
}
