/* ============================================================
   选择困难症治愈所 — 全局样式
   暖橙色治愈系 · 全屏滚动 · 响应式
   ============================================================ */

/* ---------- CSS 变量 — 吉卜力童话色板 ---------- */
:root {
  --orange: #FF8C42;
  --orange-light: #FFB380;
  --orange-dark: #E6732C;
  --bg: #E8F0D5;
  --bg-warm: #F5F0E8;
  --card: rgba(255,255,255,0.85);
  --card-solid: #FFFEFC;
  --shadow: rgba(0,0,0,0.04);
  --shadow-md: rgba(0,0,0,0.07);
  --text: #4A3F35;
  --text-light: #8B7B6B;
  --yellow: #FFE4A0;
  --pink: #FFD1D1;
  --mint: #A8D8B9;
  --green1: #8FBC8F;
  --green2: #7BA05B;
  --green3: #6B8E6B;
  --sky: #C9E8F5;
  --earth: #C4956A;
  --cloud: rgba(255,255,255,0.7);
  --gradient-main: linear-gradient(135deg, #FF8C42, #FFB380);
  --gradient-bg: linear-gradient(180deg, #C9E8F5 0%, #E8F0D5 40%, #F5F0E8 100%);
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 10px;
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --glass-border: 1px solid rgba(255,255,255,0.6);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--gradient-bg);
  color: var(--text);
  overflow: hidden;       /* 由 scrollContainer 控制滚动 */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
}

/* ---------- 背景粒子层 ---------- */
#particlesCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Unsplash 图片背景层 ---------- */
.screen-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  filter: brightness(1.05) saturate(0.9);
  background: linear-gradient(180deg, #C9E8F5, #E8F0D5);
}

/* 兼容旧的 SVG 背景（逐步移除） */
.screen-bg {
  display: none;
}

/* ---------- 玻璃卡片全局覆盖 ---------- */
.options-container,
.wheel-options,
.extra-filter-card,
.matrix-table,
.rank-item,
.history-item {
  background: var(--card) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: var(--glass-border);
  border-radius: var(--radius) !important;
  box-shadow: 0 2px 16px var(--shadow) !important;
}

.template-card {
  background: var(--card);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: var(--glass-border);
  border-radius: var(--radius);
}

.scene-card {
  background: var(--card);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow) !important;
}

.scene-card:hover {
  box-shadow: 0 6px 24px var(--shadow-md) !important;
}

/* ---------- 全屏滚动容器 ---------- */
#scrollContainer {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
}

.screen {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
}

.screen-inner {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* 小屏（history, footer）不需要太高 */
#screen-history, #screen-footer {
  min-height: auto;
  min-height: 100vh;
}

/* ---------- 侧边导航点 ---------- */
#navDots {
  position: fixed;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 140, 66, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 2px solid transparent;
}

.dot:hover {
  background: rgba(255, 140, 66, 0.6);
  transform: scale(1.3);
}

.dot.active {
  background: var(--orange);
  border-color: var(--orange-light);
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.5);
  transform: scale(1.3);
}

/* ---------- 通用 Section Header ---------- */
.section-header {
  text-align: center;
}

.section-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
  animation: float 3s ease-in-out infinite;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-light);
}

/* ---------- 按钮系统 ---------- */
.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  border: none;
  padding: 0.85rem 2.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px var(--shadow);
  font-family: var(--font);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--shadow-md);
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-primary.small {
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
}

/* 按钮波纹 */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after {
  width: 300px;
  height: 300px;
}

/* 弹性按钮 */
.btn-bounce {
  animation: btnBounce 2s ease-in-out infinite;
}

/* 文字按钮 */
.btn-text {
  background: none;
  border: 1px solid rgba(139, 111, 94, 0.3);
  color: var(--text-light);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font);
  transition: all 0.2s;
}

.btn-text:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ============================================================
   第1屏：欢迎首页
   ============================================================ */
#screen-home {
  background: linear-gradient(180deg, #FFF5ED 0%, #FFE4CC 50%, #FFF5ED 100%);
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}

/* 大号小橘 */
.hero-mascot {
  margin-bottom: 0.5rem;
}

.hero-orange {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 35% 35%, #FFB380, #FF8C42);
  border-radius: 50%;
  position: relative;
  animation: heroFloat 4s ease-in-out infinite;
  box-shadow:
    0 8px 30px rgba(255, 140, 66, 0.35),
    inset 0 -8px 16px rgba(0,0,0,0.06);
}

.hero-eye {
  position: absolute;
  width: 14px;
  height: 16px;
  background: #4A3728;
  border-radius: 50%;
  top: 35px;
}

.hero-eye.left  { left: 32px; }
.hero-eye.right { right: 32px; }

.hero-mouth {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 10px;
  border-bottom: 3px solid #4A3728;
  border-radius: 0 0 50% 50%;
}

.hero-blush {
  position: absolute;
  width: 16px;
  height: 10px;
  background: rgba(255, 179, 179, 0.6);
  border-radius: 50%;
  top: 48px;
}

.hero-blush.left  { left: 18px; }
.hero-blush.right { right: 18px; }

.hero-leaf {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 28px;
  background: #A8D8B9;
  border-radius: 50% 50% 50% 0;
  transform-origin: bottom center;
  animation: leafSway 2s ease-in-out infinite;
}

/* 大橘表情气泡 */
.hero-bubble {
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFEFC;
  border: 2px solid var(--orange-light);
  border-radius: 16px;
  padding: 0.4rem 0.8rem;
  font-size: 1.5rem;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  animation: heroBubblePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
}
.hero-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 8px;
  background: #FFFEFC;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 2px solid var(--orange-light);
  border-right: 2px solid var(--orange-light);
}

/* 大橘被点击时弹跳 */
.hero-mascot.bounced .hero-orange {
  animation: mascotJump 0.5s ease-in-out;
}
.hero-mascot { cursor: pointer; }
.hero-mascot:hover .hero-orange { transform: scale(1.06); transition: transform 0.2s; }

@keyframes heroBubblePop {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.6); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 标题 */
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-height: 1.3em;
}

/* 打字机光标 */
.hero-title::after {
  content: '|';
  -webkit-text-fill-color: var(--orange);
  animation: blink 0.8s step-end infinite;
}

.hero-title.typed::after {
  animation: blink 0.8s step-end infinite;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 300px;
}

/* 统计数字 */
.hero-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--orange);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* 向下滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-light);
  animation: hintBounce 2s ease-in-out infinite;
}

.scroll-arrow {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(45deg);
}

/* ============================================================
   第2屏：一键抽签
   ============================================================ */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.preset-chip {
  background: var(--card);
  border: 2px solid transparent;
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: all 0.25s;
  box-shadow: 0 2px 8px var(--shadow);
}

.preset-chip:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-md);
}

.preset-chip:active {
  transform: scale(0.95);
}

/* 选项容器 */
.options-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.2rem;
  background: var(--card);
  border-radius: var(--radius);
  min-height: 60px;
  box-shadow: 0 2px 12px var(--shadow);
  width: 100%;
  max-width: 550px;
  transition: box-shadow 0.3s;
}

.options-container:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.2), 0 4px 20px var(--shadow-md);
}

.option-tag {
  background: linear-gradient(135deg, #FFF5ED, #FFE4CC);
  color: var(--text);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  animation: tagIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 140, 66, 0.2);
}

.option-tag.small {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
}

.option-tag .tag-close {
  cursor: pointer;
  font-weight: bold;
  color: var(--text-light);
  transition: color 0.2s;
  line-height: 1;
}

.option-tag .tag-close:hover {
  color: #e74c3c;
}

.option-input {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  padding: 0.4rem 0.5rem;
  min-width: 150px;
  outline: none;
  font-family: var(--font);
  color: var(--text);
}

.option-input::placeholder {
  color: #c4b5a8;
}

.option-input.small {
  font-size: 0.8rem;
  min-width: 100px;
}

/* 抽签按钮 */
.picker-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.btn-dice {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-main);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  box-shadow: 0 8px 30px rgba(255, 140, 66, 0.4);
  transition: transform 0.2s;
  animation: pulse 2.5s ease-in-out infinite;
  font-family: var(--font);
  position: relative;
  overflow: hidden;
}

.btn-dice:hover {
  transform: scale(1.05);
}

.btn-dice:active {
  transform: scale(0.92);
}

.btn-dice.spinning {
  animation: shake 0.1s ease-in-out infinite;
}

.dice-icon {
  font-size: 2rem;
}

.dice-text {
  font-size: 0.95rem;
}

.btn-again {
  background: var(--card);
  border: 2px solid var(--orange-light);
  color: var(--orange-dark);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.btn-again:hover {
  background: #FFF5ED;
}

/* 抽签结果 */
.picker-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  animation: resultReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-emoji {
  font-size: 1.5rem;
}

.result-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--orange-dark);
}

.result-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

.result-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--orange-dark);
}

.result-healing {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* ============================================================
   第3屏：幸运转盘
   ============================================================ */
.wheel-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.wheel-canvas-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wheelCanvas {
  max-width: 100%;
  height: auto;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--orange-dark);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  z-index: 5;
  animation: pointerBob 2s ease-in-out infinite;
}

.wheel-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

.wheel-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow);
  width: 100%;
}

.btn-spin {
  background: var(--gradient-main);
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 4px 20px var(--shadow);
  transition: all 0.2s;
}

.btn-spin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--shadow-md);
}

.btn-spin:active {
  transform: scale(0.96);
}

.btn-spin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wheel-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  animation: resultReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   第4屏：加权抉择器
   ============================================================ */
.mode-switch {
  display: flex;
  background: var(--card);
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 2px 8px var(--shadow);
}

.mode-btn {
  padding: 0.55rem 1.3rem;
  border: none;
  background: transparent;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-light);
  transition: all 0.25s;
}

.mode-btn.active {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 2px 10px var(--shadow);
}

/* 模板卡片网格 */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
  width: 100%;
  max-width: 600px;
}

.template-card {
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 10px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.template-card:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-md);
}

.template-card.selected {
  border-color: var(--orange);
  background: #FFF5ED;
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}

.template-icon {
  font-size: 2rem;
}

.template-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.template-dims {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* 自定义设置 */
.custom-setup {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  max-width: 500px;
}

.setup-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.setup-row label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.setup-input {
  padding: 0.7rem 1rem;
  border: 2px solid rgba(255, 140, 66, 0.2);
  border-radius: var(--radius-xs);
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.setup-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

/* 打分矩阵 */
.score-matrix {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
}

.matrix-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
}

.matrix-table th {
  background: linear-gradient(135deg, #FF8C42, #FFB380);
  color: #fff;
  padding: 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.matrix-table th:first-child {
  background: var(--orange-dark);
  min-width: 80px;
}

.matrix-table td {
  padding: 0.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 140, 66, 0.1);
}

.matrix-table td:first-child {
  font-weight: 600;
  color: var(--text);
  background: #FFFAF5;
}

/* 星星评分 */
.star-rating {
  display: flex;
  gap: 2px;
  justify-content: center;
  cursor: pointer;
}

.star {
  font-size: 1.3rem;
  color: #ddd;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}

.star:hover {
  transform: scale(1.2);
}

.star.active {
  color: var(--yellow);
}

.star.hover {
  color: #FFE08A;
}

/* 分析结果 */
.decider-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  animation: resultReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-ranking {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 500px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--card);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px var(--shadow);
  animation: rankSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: transform 0.2s;
}

.rank-item.winner {
  background: linear-gradient(135deg, #FFF5ED, #FFE4CC);
  border: 2px solid var(--orange);
  box-shadow: 0 4px 20px var(--shadow-md);
  transform: scale(1.03);
}

.rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.rank-badge.gold   { background: #FFD166; color: #7A6200; }
.rank-badge.silver { background: #E0E0E0; color: #666; }
.rank-badge.bronze { background: #FFCDB2; color: #8B4513; }
.rank-badge.normal { background: #f5f5f5; color: #999; }

.rank-name {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
}

.rank-score {
  font-weight: 700;
  color: var(--orange);
  font-size: 1.1rem;
}

.rank-bar-wrap {
  width: 80px;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.rank-bar {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 4px;
  width: 0;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   第5屏：决策历史
   ============================================================ */
.history-list {
  width: 100%;
  max-width: 550px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.history-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

.empty-illustration {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.empty-jar {
  font-size: 2.5rem;
}

.empty-hint {
  font-size: 0.85rem;
  color: #b8a594;
}

.history-item {
  background: var(--card);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: transform 0.2s;
  animation: tagIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-md);
}

.history-type {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.history-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.history-desc {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

.history-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.history-result-item {
  font-weight: 600;
  color: var(--orange-dark);
  font-size: 0.9rem;
}

.btn-reuse {
  background: #FFF5ED;
  border: 1px solid var(--orange-light);
  color: var(--orange-dark);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-reuse:hover {
  background: var(--orange);
  color: #fff;
}

/* ============================================================
   第6屏：Footer
   ============================================================ */
#screen-footer {
  background: linear-gradient(180deg, #FFF5ED, #FFE4CC);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
}

/* Footer 小橘 */
.footer-orange {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle at 35% 35%, #FFB380, #FF8C42);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 4px 16px rgba(255, 140, 66, 0.25);
}

.footer-eye {
  position: absolute;
  width: 9px;
  height: 10px;
  background: #4A3728;
  border-radius: 50%;
  top: 22px;
}

.footer-eye.left  { left: 20px; }
.footer-eye.right { right: 20px; }

.footer-mouth {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 7px;
  border-bottom: 2px solid #4A3728;
  border-radius: 0 0 50% 50%;
}

.footer-quote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
}

.footer-signature {
  font-size: 0.9rem;
  color: var(--text-light);
}

.footer-stats {
  display: flex;
  gap: 2rem;
  margin: 0.5rem 0;
}

.footer-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.footer-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange);
}

.footer-copy {
  font-size: 0.8rem;
  color: #b8a594;
}

/* ============================================================
   吉祥物 "小橘"（固定右下角）
   ============================================================ */
.mascot {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

.mascot:hover {
  transform: scale(1.08);
}

.mascot:active {
  transform: scale(0.9);
}

.mascot-body {
  position: relative;
}

.mascot-orange {
  width: 65px;
  height: 65px;
  background: radial-gradient(circle at 35% 35%, #FFB380, #FF8C42);
  border-radius: 50%;
  position: relative;
  box-shadow:
    0 4px 20px rgba(255, 140, 66, 0.4),
    inset 0 -6px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s;
}

/* 眼睛 */
.mascot-eye {
  position: absolute;
  width: 8px;
  height: 10px;
  background: #4A3728;
  border-radius: 50%;
  top: 20px;
  transition: all 0.2s;
}

.mascot-eye.left  { left: 18px; }
.mascot-eye.right { right: 18px; }

/* 嘴巴 */
.mascot-mouth {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 6px;
  border-bottom: 2.5px solid #4A3728;
  border-radius: 0 0 50% 50%;
  transition: all 0.2s;
}

/* 腮红 */
.mascot-blush {
  position: absolute;
  width: 10px;
  height: 6px;
  background: rgba(255, 179, 179, 0.5);
  border-radius: 50%;
  top: 28px;
  transition: opacity 0.2s;
}

.mascot-blush.left  { left: 10px; }
.mascot-blush.right { right: 10px; }

/* 叶子 */
.mascot-leaf {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 18px;
  background: #A8D8B9;
  border-radius: 50% 50% 50% 0;
  transform-origin: bottom center;
  animation: leafSway 2.5s ease-in-out infinite;
}

/* 手臂 */
.mascot-arm {
  position: absolute;
  width: 14px;
  height: 22px;
  background: var(--orange-light);
  border-radius: 50%;
  top: 32px;
  transition: transform 0.3s;
}

.mascot-arm.left  {
  left: -8px;
  transform: rotate(-20deg);
  transform-origin: top right;
}

.mascot-arm.right {
  right: -8px;
  transform: rotate(20deg);
  transform-origin: top left;
}

/* 对话气泡 */
.mascot-bubble {
  position: absolute;
  bottom: 75px;
  right: 0;
  background: var(--card);
  border: 2px solid var(--orange-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 4px 16px var(--shadow);
  animation: bubbleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 180px;
  white-space: normal;
}

.mascot-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 25px;
  width: 14px;
  height: 8px;
  background: var(--card);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 2px solid var(--orange-light);
  border-right: 2px solid var(--orange-light);
}

/* ---------- 小橘状态动画 ---------- */
.mascot.waving .mascot-arm.right {
  animation: armWave 0.6s ease-in-out 3;
}

.mascot.thinking .mascot-eye {
  height: 6px;
  border-radius: 50%;
}

.mascot.thinking .mascot-mouth {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: #4A3728;
  bottom: 18px;
}

.mascot.excited {
  animation: mascotJump 0.5s ease-in-out;
}

.mascot.sleepy .mascot-eye {
  height: 3px;
  border-radius: 50%;
}

.mascot.sleepy .mascot-mouth {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2.5px solid #4A3728;
  border-top-color: transparent;
}

/* ============================================================
   动画关键帧
   ============================================================ */

/* 浮动 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* 标题浮动 */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-8px) rotate(2deg); }
  66%      { transform: translateY(-3px) rotate(-2deg); }
}

/* 叶子摆动 */
@keyframes leafSway {
  0%, 100% { transform: translateX(-50%) rotate(-5deg); }
  50%      { transform: translateX(-50%) rotate(5deg); }
}

/* 按钮弹性 */
@keyframes btnBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* 脉冲 */
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 30px rgba(255, 140, 66, 0.4); }
  50%      { box-shadow: 0 8px 40px rgba(255, 140, 66, 0.6), 0 0 0 12px rgba(255, 140, 66, 0.08); }
}

/* 抖动 */
@keyframes shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-3px, 2px) rotate(-3deg); }
  50%      { transform: translate(3px, -1px) rotate(3deg); }
  75%      { transform: translate(-2px, -2px) rotate(-2deg); }
}

/* 结果揭晓 */
@keyframes resultReveal {
  0%   { opacity: 0; transform: scale(0.5) translateY(20px); }
  60%  { transform: scale(1.08) translateY(-5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 标签弹入 */
@keyframes tagIn {
  0%   { opacity: 0; transform: scale(0) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 排名滑入 */
@keyframes rankSlideIn {
  0%   { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* 向下提示 */
@keyframes hintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* 指针弹跳 */
@keyframes pointerBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-3px); }
}

/* 气泡弹入 */
@keyframes bubbleIn {
  0%   { opacity: 0; transform: scale(0.5) translateY(5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 手臂挥动 */
@keyframes armWave {
  0%, 100% { transform: rotate(20deg); }
  50%      { transform: rotate(-30deg); }
}

/* 跳跃 */
@keyframes mascotJump {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-20px) scale(1.1); }
  50%  { transform: translateY(-25px) scale(1.05); }
  70%  { transform: translateY(-10px) scale(0.95); }
  100% { transform: translateY(0) scale(1); }
}

/* 光标闪烁 */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ---------- 入场动画类 ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 依次出现 */
.fade-in.stagger-1 { transition-delay: 0.1s; }
.fade-in.stagger-2 { transition-delay: 0.2s; }
.fade-in.stagger-3 { transition-delay: 0.3s; }
.fade-in.stagger-4 { transition-delay: 0.4s; }

/* 从左侧滑入 */
.slide-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 从右侧滑入 */
.slide-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 缩放弹入 */
.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================================
   响应式设计
   ============================================================ */

/* 平板及以下 */
@media (max-width: 768px) {
  .screen {
    padding: 1.5rem 1rem;
  }

  .screen-inner {
    gap: 1rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .section-icon {
    font-size: 2.2rem;
  }

  .hero-orange {
    width: 90px;
    height: 90px;
  }

  .hero-eye {
    width: 10px;
    height: 12px;
    top: 26px;
  }

  .hero-eye.left  { left: 24px; }
  .hero-eye.right { right: 24px; }

  .hero-mouth {
    bottom: 20px;
    width: 16px;
    height: 8px;
  }

  .hero-blush {
    top: 36px;
    width: 12px;
    height: 8px;
  }

  .hero-blush.left  { left: 14px; }
  .hero-blush.right { right: 14px; }

  .hero-title {
    font-size: 1.8rem;
  }

  .btn-dice {
    width: 100px;
    height: 100px;
  }

  .dice-icon {
    font-size: 1.6rem;
  }

  #wheelCanvas {
    width: 300px;
    height: 300px;
  }

  .template-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .template-card {
    padding: 0.7rem;
  }

  .template-icon {
    font-size: 1.5rem;
  }

  .template-name {
    font-size: 0.85rem;
  }

  .template-dims {
    font-size: 0.7rem;
  }

  .mascot-orange {
    width: 50px;
    height: 50px;
  }

  .mascot-eye {
    width: 6px;
    height: 8px;
    top: 15px;
  }

  .mascot-eye.left  { left: 13px; }
  .mascot-eye.right { right: 13px; }

  .mascot-mouth {
    bottom: 11px;
    width: 9px;
    height: 5px;
  }

  .mascot-blush {
    top: 21px;
    width: 8px;
    height: 5px;
  }

  .mascot-blush.left  { left: 7px; }
  .mascot-blush.right { right: 7px; }

  .mascot-leaf {
    width: 8px;
    height: 14px;
    top: -9px;
  }

  .mascot-arm {
    width: 10px;
    height: 16px;
    top: 24px;
  }

  .mascot-bubble {
    bottom: 55px;
    right: -5px;
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  #navDots {
    right: 0.6rem;
    gap: 0.6rem;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  .matrix-table th {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .star {
    font-size: 1.1rem;
  }

  .rank-bar-wrap {
    width: 50px;
  }
}

/* 手机小屏 */
@media (max-width: 400px) {
  .screen {
    padding: 1rem 0.8rem;
  }

  .hero-orange {
    width: 75px;
    height: 75px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .btn-dice {
    width: 85px;
    height: 85px;
  }

  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #wheelCanvas {
    width: 260px;
    height: 260px;
  }

  .preset-chip {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* ============================================================
   首页场景卡片
   ============================================================ */
.scene-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  width: 100%;
  max-width: 550px;
  margin-top: 0.5rem;
}

.scene-card {
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 1rem 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 10px var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.scene-card:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow-md);
}

.scene-card:active {
  transform: scale(0.95);
}

.scene-icon {
  font-size: 2rem;
}

.scene-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.scene-hint {
  font-size: 0.7rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .scene-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
  .scene-card {
    padding: 0.7rem 0.4rem;
  }
  .scene-icon {
    font-size: 1.5rem;
  }
  .scene-name {
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  .scene-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }
  .scene-card {
    padding: 0.6rem 0.3rem;
    border-radius: var(--radius-sm);
  }
}

/* ============================================================
   向导步骤指示器
   ============================================================ */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 400px;
  margin-bottom: 0.5rem;
}

.wiz-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.35;
  transition: all 0.4s;
}

.wiz-step.active {
  opacity: 1;
}

.wiz-step.done {
  opacity: 0.7;
}

.wiz-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #999;
  transition: all 0.4s;
}

.wiz-step.active .wiz-num {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 14px var(--shadow);
}

.wiz-step.done .wiz-num {
  background: var(--mint);
  color: #fff;
}

.wiz-label {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
}

.wiz-line {
  width: 40px;
  height: 2px;
  background: #e0e0e0;
  margin: 0 4px;
  margin-bottom: 18px;
  transition: background 0.4s;
}

.wiz-line.done {
  background: var(--mint);
}

/* ============================================================
   口味偏好卡片
   ============================================================ */
.taste-group {
  width: 100%;
  max-width: 550px;
}

.taste-group-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.taste-hint {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-light);
  background: #f5f5f5;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.taste-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.taste-card {
  background: var(--card);
  border: 2px solid #eee;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 70px;
  flex: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  user-select: none;
}

.taste-card:hover {
  border-color: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.taste-card.selected {
  border-color: var(--orange);
  background: linear-gradient(135deg, #FFF5ED, #FFE4CC);
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.12);
}

.taste-card .tc-emoji {
  font-size: 1.5rem;
}

.taste-card .tc-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.taste-card .tc-desc {
  font-size: 0.65rem;
  color: var(--text-light);
}

/* 更多口味展开 */
.taste-more {
  width: 100%;
  max-width: 550px;
  margin-top: 0.3rem;
}

.taste-more-btn {
  background: none;
  border: 1px dashed rgba(255, 140, 66, 0.4);
  color: var(--text-light);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font);
  width: 100%;
  text-align: left;
  transition: all 0.2s;
}

.taste-more-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: #FFF5ED;
}

.more-arrow {
  float: right;
  transition: transform 0.3s;
}

.more-arrow.open {
  transform: rotate(90deg);
}

.taste-more-content {
  padding: 0.8rem;
  margin-top: 0.5rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.taste-more-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.taste-more-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.taste-more-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.taste-more-chip {
  padding: 0.3rem 0.7rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 50px;
  font-size: 0.8rem;
  cursor: pointer;
  background: #fff;
  color: var(--text-light);
  transition: all 0.2s;
  font-family: var(--font);
}

.taste-more-chip:hover {
  border-color: var(--orange-light);
}

.taste-more-chip.selected {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* ============================================================
   Step 2：补充筛选卡片
   ============================================================ */
.extra-filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  width: 100%;
  max-width: 550px;
}

.extra-filter-card {
  background: var(--card);
  border: 2px solid #eee;
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: default;
}

.extra-filter-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.extra-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.extra-filter-chip {
  padding: 0.25rem 0.6rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 50px;
  font-size: 0.75rem;
  cursor: pointer;
  background: #fff;
  color: var(--text-light);
  transition: all 0.2s;
  font-family: var(--font);
}

.extra-filter-chip:hover {
  border-color: var(--orange-light);
}

.extra-filter-chip.selected {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.step2-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.5rem;
}

.btn-outline {
  background: var(--card);
  border: 2px solid var(--orange-light);
  color: var(--orange-dark);
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.btn-outline:hover {
  background: #FFF5ED;
  border-color: var(--orange);
}

.btn-next {
  margin-top: 0.5rem;
}

/* ============================================================
   Step 3：美食结果卡片
   ============================================================ */
.result-summary {
  font-size: 0.85rem;
}

/* 第一名大卡片 */
.food-hero-card {
  width: 100%;
  max-width: 450px;
  animation: resultReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-food-inner {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow-md);
  border: 3px solid var(--orange);
  position: relative;
}

.hero-food-img-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #FFF5ED, #FFE4CC);
  position: relative;
}

.hero-food-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-food-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, #FFF5ED, #FFE4CC);
}

.hero-food-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gradient-main);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero-food-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-food-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.hero-food-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0.15rem 0 0.3rem 0;
}

.hero-food-score {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-food-stars {
  color: var(--yellow);
  font-size: 1.1rem;
}

.hero-food-pct {
  font-weight: 700;
  color: var(--orange-dark);
  font-size: 1.1rem;
}

.hero-food-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.hero-food-tag {
  background: #FFF5ED;
  color: var(--orange-dark);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* 2-4名小卡片 */
.food-mini-cards {
  display: flex;
  gap: 0.7rem;
  width: 100%;
  max-width: 550px;
  flex-wrap: wrap;
  justify-content: center;
}

.food-mini-card {
  flex: 1;
  min-width: 120px;
  max-width: 170px;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  animation: resultReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.food-mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px var(--shadow-md);
}

.food-mini-img-wrap {
  width: 100%;
  height: 100px;
  overflow: hidden;
  background: linear-gradient(135deg, #FFF5ED, #FFE4CC);
}

.food-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-mini-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.food-mini-info {
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.food-mini-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.food-mini-score {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.food-mini-stars {
  font-size: 0.7rem;
  color: var(--yellow);
}

.food-mini-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange);
}

.food-mini-desc {
  font-size: 0.7rem;
  color: var(--text-light);
  line-height: 1.3;
  margin-top: 0.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   反馈标签
   ============================================================ */
.feedback-area {
  width: 100%;
  max-width: 550px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.feedback-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.feedback-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.feedback-tag {
  padding: 0.4rem 0.8rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 50px;
  font-size: 0.8rem;
  cursor: pointer;
  background: #fff;
  color: var(--text-light);
  transition: all 0.2s;
  font-family: var(--font);
}

.feedback-tag:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: #FFF5ED;
}

.feedback-tag:active {
  transform: scale(0.95);
}

.btn-text {
  background: none;
  border: none;
  color: var(--orange);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-text:hover {
  color: var(--orange-dark);
}

/* ============================================================
   AI 问候气泡
   ============================================================ */
.ai-bubble {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 210;
  max-width: 340px;
  animation: bubbleSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-bubble.bubble-exit {
  animation: bubbleSlideDown 0.3s ease-in forwards;
}

.ai-bubble-inner {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  position: relative;
}

.ai-bubble-inner::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 30px;
  width: 18px;
  height: 10px;
  background: var(--card);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.ai-bubble-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 0.8rem 0;
  padding-right: 0.5rem;
}

.ai-bubble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ai-action-btn {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1.5px solid var(--orange-light);
  background: #FFF5ED;
  color: var(--orange-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.ai-action-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.ai-mood-row {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.ai-mood-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-mood-btn:hover {
  border-color: var(--orange);
  background: #FFF5ED;
  transform: scale(1.1);
}

.ai-bubble-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.ai-bubble-close:hover { opacity: 0.8; }

@keyframes bubbleSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bubbleSlideDown {
  to { opacity: 0; transform: translateY(20px) scale(0.95); }
}

/* ============================================================
   设置面板
   ============================================================ */
.settings-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 220;
  animation: bubbleSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-inner {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.settings-inner h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
} .setting-row input { width: 18px; height: 18px; accent-color: var(--orange); }

/* ============================================================
   详情弹窗
   ============================================================ */
.detail-modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 999; display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.25s ease;
}
.detail-backdrop {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(6px);
}
.detail-card {
  position: relative; z-index: 1;
  background: var(--card); border-radius: 24px; padding: 0;
  max-width: 420px; width: 90%; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: resultReveal 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.detail-card-img { width: 100%; height: 220px; object-fit: cover; border-radius: 24px 24px 0 0; }
.detail-card-emoji { width: 100%; height: 180px; display: flex; align-items: center; justify-content: center; font-size: 5rem; background: linear-gradient(135deg, #FFF5ED, #FFE4CC); border-radius: 24px 24px 0 0; }
.detail-card-body { padding: 1.2rem; }
.detail-card-name { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.detail-card-desc { font-size: 0.9rem; color: var(--text-light); margin: 0.5rem 0 0.8rem; line-height: 1.6; }
.detail-card-score { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.detail-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.detail-card-tag { background: #FFF5ED; color: var(--orange-dark); padding: 0.25rem 0.7rem; border-radius: 50px; font-size: 0.78rem; font-weight: 500; }
.detail-card-actions { display: flex; gap: 0.6rem; }
.detail-card-actions .btn-primary { flex: 1; text-align: center; font-size: 0.9rem; padding: 0.6rem; }

/* 齿轮按钮 */
.btn-gear {
  position: fixed; bottom: 88px; right: 24px; z-index: 201;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.08); background: rgba(255,255,255,0.85);
  font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); opacity: 0.5;
}
.btn-gear:hover { opacity: 1; transform: rotate(30deg); }

/* 音效按钮 */
.btn-sound {
  position: fixed; bottom: 88px; right: 64px; z-index: 201;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.08); background: rgba(255,255,255,0.85);
  font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); opacity: 0.5;
}
.btn-sound:hover { opacity: 1; transform: scale(1.1); }

/* 摇一摇提示 */
.shake-hint {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: var(--orange); color: #fff; padding: 0.5rem 1.2rem;
  border-radius: 50px; font-size: 0.85rem; font-weight: 600;
  animation: resultReveal 0.3s ease, fadeOut 0.5s 1.5s ease forwards;
  pointer-events: none;
}
@keyframes fadeOut { to { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 768px) {
  .ai-bubble { max-width: 280px; right: 12px; bottom: 85px; }
  .detail-card { max-width: 92%; }
  .detail-card-img { height: 170px; }
  .btn-gear { bottom: 72px; right: 12px; }
  .btn-sound { bottom: 72px; right: 50px; }
  .ai-bubble-text { font-size: 0.9rem; }
  .ai-action-btn { font-size: 0.78rem; padding: 0.4rem 0.7rem; }
  .ai-mood-btn { width: 32px; height: 32px; font-size: 1rem; }
  .settings-panel { max-width: 260px; right: 12px; }
}

/* ============================================================
   向导面板切换动画
   ============================================================ */
.wizard-panel {
  transition: opacity 0.3s, transform 0.3s;
}

.wizard-panel.fade-out {
  opacity: 0;
  transform: translateY(-15px);
}

@media (max-width: 768px) {
  .taste-cards {
    gap: 0.4rem;
  }
  .taste-card {
    padding: 0.5rem 0.6rem;
    min-width: 55px;
  }
  .taste-card .tc-emoji {
    font-size: 1.2rem;
  }
  .taste-card .tc-label {
    font-size: 0.75rem;
  }
  .extra-filters {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .hero-food-img-wrap {
    height: 160px;
  }
  .hero-food-name {
    font-size: 1.2rem;
  }
  .food-mini-card {
    min-width: 90px;
    max-width: 140px;
  }
  .food-mini-img-wrap {
    height: 75px;
  }
  .wiz-line {
    width: 25px;
  }
}

@media (max-width: 400px) {
  .taste-cards {
    gap: 0.3rem;
  }
  .taste-card {
    padding: 0.4rem 0.4rem;
    min-width: 48px;
  }
  .extra-filters {
    grid-template-columns: 1fr;
  }
  .hero-food-img-wrap {
    height: 140px;
  }
  .food-mini-cards {
    gap: 0.4rem;
  }
  .food-mini-card {
    min-width: 75px;
    max-width: 110px;
  }
  .food-mini-img-wrap {
    height: 60px;
  }
}
