:root {
  --bg-page: #f5f6fa;
  --bg-card: #ffffff;
  --bg-soft: #f5f6f8;
  --text-main: #1b1e28;
  --text-sub: #666c7c;
  --text-muted: #9399a8;
  --border-light: #ebeef4;
  --accent-grad: linear-gradient(95deg, #7f74ff 0%, #3d98ff 100%);
  --accent-grad-warm: linear-gradient(100deg, #ff7a45 0%, #f54e63 100%);
  --fotile-red: #c93b3b;
  --blue-dot: #4b82ff;
  --green: #22b573;
  --amber: #f59e0b;
  --orange: #f97316;
  --purple: #7c3aed;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 18px rgba(24, 34, 62, 0.05);
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: #e9ecf5;
  overflow: hidden;
}

.desktop-backdrop {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, #eef2ff 0%, #dfe6f6 55%, #d6dfef 100%);
}

.phone-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100%;
  max-height: 900px;
  background: var(--bg-page);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(28, 42, 82, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.7);
}

@media (min-width: 480px) {
  .phone-shell {
    height: min(94vh, 860px);
    border-radius: 30px;
  }
}

/* ==================== VIEWS ==================== */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  opacity: 0;
  pointer-events: none;
  transform: translateX(22px);
  transition: opacity 0.24s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.view.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 2;
}

/* ==================== TOPBAR ==================== */
.topbar {
  height: 54px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 246, 250, 0.92);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
  z-index: 5;
}

.topbar-schedule {
  background: #ffffff;
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.sparkle {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 15px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ==================== VIEW 1: CHAT ==================== */
.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 20px;
  scroll-behavior: smooth;
}

.chat-scroll::-webkit-scrollbar,
.sched-body::-webkit-scrollbar,
.sheet-list::-webkit-scrollbar {
  width: 4px;
}

.chat-scroll::-webkit-scrollbar-thumb,
.sched-body::-webkit-scrollbar-thumb,
.sheet-list::-webkit-scrollbar-thumb {
  background: rgba(120, 130, 155, 0.25);
  border-radius: 4px;
}

.user-bubble-row {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0;
}

.user-bubble {
  max-width: 84%;
  background: linear-gradient(135deg, #dce4ff 0%, #d4dfff 100%);
  color: #1f2544;
  padding: 11px 15px;
  border-radius: 18px 18px 4px 18px;
  font-size: 14.5px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(74, 102, 200, 0.1);
}

.agent-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 10px 0 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(235, 238, 244, 0.8);
}

.welcome-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

.agent-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.welcome-title {
  font-size: 15.5px;
  font-weight: 700;
}

.welcome-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.welcome-desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-sub);
}

.preset-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  border: 1px solid #e3e7f5;
  background: #f6f8ff;
  color: #2f3b66;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.16s;
}

.preset-chip:hover {
  background: #eaf0ff;
  border-color: #b7c8ff;
}

/* 分析结果 & 确认卡片 */
.card-intro {
  font-size: 14px;
  line-height: 1.6;
  color: #2a2f3d;
  margin: 0 0 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  margin: 14px 0 10px;
  color: var(--text-main);
}

.section-heading:first-child {
  margin-top: 0;
}

.analysis-bullets {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.analysis-bullets li {
  font-size: 13.5px;
  color: #2d3342;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.analysis-bullets li::before {
  content: "•";
  color: #4f7cff;
  font-weight: 700;
}

.save-highlight-box {
  background: linear-gradient(135deg, #f3f7ff 0%, #eef5ff 100%);
  border: 1px solid #c9ddff;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0 14px;
}

.save-highlight-top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  color: #1c243c;
}

.save-highlight-sub {
  font-size: 13px;
  color: #4b556d;
  margin-top: 4px;
  padding-left: 24px;
}

.confirm-dish-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 14px;
}

.confirm-dish-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 10px 12px;
}

.dish-thumb {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dish-thumb.oven { background: linear-gradient(135deg, #fff1dc, #ffd9a8); color: #c2410c; }
.dish-thumb.steam { background: linear-gradient(135deg, #e0f5ff, #bae6fd); color: #0369a1; }
.dish-thumb.stove { background: linear-gradient(135deg, #e2fae9, #bbf7d0); color: #15803d; }
.dish-thumb.combo { background: linear-gradient(135deg, #f3e8ff, #ddd6fe); color: #6d28d9; }

.svg-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
}

.ico-orange { color: #ea580c; }
.ico-blue { color: #2563eb; }
.ico-green { color: #16a34a; }
.ico-amber { color: #d97706; }
.ico-purple { color: #7c3aed; }
.ico-red { color: #e11d48; }
.ico-slate { color: #64748b; }

.confirm-dish-info {
  flex: 1;
  min-width: 0;
}

.confirm-dish-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
}

.confirm-dish-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.btn-gradient-full {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(84, 118, 255, 0.28);
  transition: transform 0.14s, opacity 0.14s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-gradient-full:active {
  transform: scale(0.985);
}

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

.btn-gradient-sm {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

/* AI 同烹方案卡片 */
.encourage-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5f8ff;
  border: 1px solid #e6eeff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
}

.encourage-visual {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff4eb, #ffe3cf);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.encourage-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.encourage-sub {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 4px;
  line-height: 1.45;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.kpi-box {
  background: #f6f7fb;
  border-radius: 12px;
  padding: 11px 10px;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 5px;
}

.kpi-label::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: var(--fotile-red);
}

.kpi-value {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 6px;
}

/* 烹饪时间线 */
.overview-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.ot-row {
  position: relative;
  padding-left: 16px;
}

.ot-row::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  bottom: -16px;
  border-left: 1.5px dashed #cbd5e8;
}

.ot-row:last-child::before {
  display: none;
}

.ot-dot {
  position: absolute;
  left: 0;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ot-dish-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ot-track {
  position: relative;
  height: 52px;
  background: #f3f5f9;
  border-radius: 12px;
  overflow: hidden;
}

.ot-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
  min-width: 110px;
  border-left: 3.5px solid transparent;
}

.ot-bar-main {
  font-size: 12.5px;
  font-weight: 600;
  color: #1f2430;
  white-space: nowrap;
}

.ot-bar-time {
  font-size: 11.5px;
  color: #5b6375;
  margin-top: 2px;
  white-space: nowrap;
}

.ot-color-0 { background: #eafaf0; border-left-color: #22b573; }
.ot-dot-0 { background: #22b573; }
.ot-color-1 { background: #fff9e6; border-left-color: #f5b400; }
.ot-dot-1 { background: #f5b400; }
.ot-color-2 { background: #fff1eb; border-left-color: #f97316; }
.ot-dot-2 { background: #f97316; }
.ot-color-3 { background: #eef4ff; border-left-color: #4f7cff; }
.ot-dot-3 { background: #4f7cff; }
.ot-color-4 { background: #f5efff; border-left-color: #8b5cf6; }
.ot-dot-4 { background: #8b5cf6; }

/* 食材汇总清单 */
.ing-group {
  margin-bottom: 12px;
}

.ing-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f4f5f8;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
}

.ing-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ing-group-title::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--fotile-red);
}

.ing-toggle-btn {
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--text-sub);
  cursor: pointer;
}

.ing-rows {
  padding: 4px 6px;
}

.ing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 6px;
  border-bottom: 1px solid #f2f3f7;
  font-size: 13.5px;
}

.ing-row:last-child {
  border-bottom: none;
}

.ing-unit {
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.ai-disclaimer {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gantt-link-btn {
  border: none;
  background: #eef3ff;
  color: #3f6bf5;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

/* 底部输入区 */
.chat-footer {
  background: rgba(245, 246, 250, 0.96);
  backdrop-filter: blur(12px);
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(230, 234, 244, 0.8);
  flex-shrink: 0;
}

.selected-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.selected-tray-list {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.selected-tag {
  background: #e9efff;
  color: #2f55d4;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.selected-tag button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
}

.tray-clear {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.quick-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  overflow-x: auto;
}

.quick-pill {
  border: 1px solid #e7eaf2;
  background: #ffffff;
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(20, 30, 60, 0.04);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.pill-dot.blue { background: #3b82f6; }
.pill-dot.pink { background: #ec4899; }
.pill-dot.orange { background: #f97316; }

.input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e3e7f2;
  border-radius: 999px;
  padding: 5px 6px 5px 15px;
  box-shadow: 0 4px 12px rgba(24, 34, 62, 0.05);
}

.chat-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text-main);
}

.send-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==================== VIEW 2: 一键排菜 ==================== */
.schedule-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sched-tab {
  position: relative;
  height: 46px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sched-tab.active {
  color: var(--text-main);
  font-weight: 700;
  background: linear-gradient(180deg, #fff6f6 0%, #ffffff 100%);
}

.smile-indicator {
  width: 18px;
  height: 6px;
  border-bottom: 2.5px solid transparent;
  border-radius: 0 0 12px 12px;
  margin-top: 2px;
}

.sched-tab.active .smile-indicator,
.dish-tab.active .smile-indicator {
  border-bottom-color: var(--fotile-red);
}

.sched-body {
  display: none;
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
  padding: 14px 14px 92px;
}

.sched-body.active {
  display: block;
}

.global-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f6f8ff;
  border: 1px solid #e4ecff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: #36415c;
}

.advance-prep-box {
  background: #fff8eb;
  border: 1px solid #fde1ad;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #7c4d08;
  line-height: 1.55;
}

.advance-prep-title {
  font-weight: 700;
  margin-bottom: 4px;
}

/* 全局视图虚线时间轴 */
.timeline-list {
  position: relative;
}

.tl-item {
  position: relative;
  padding-left: 20px;
  padding-bottom: 16px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 0;
  border-left: 1.5px dashed #b9cbf7;
}

.tl-item:last-child::before {
  display: none;
}

.tl-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue-dot);
  box-shadow: 0 0 0 3px rgba(75, 130, 255, 0.16);
}

.tl-time-label {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}

.tl-card {
  background: #f6f7f9;
  border-radius: 14px;
  padding: 12px 14px;
}

.tl-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.tl-stage-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tl-recipe-pill {
  font-size: 11.5px;
  color: #4b556d;
  background: #e9ecf4;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.tl-step-lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tl-step-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #2c3240;
}

.circle-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.2px solid #4b82ff;
  color: #4b82ff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.tl-params-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #e2e6ef;
}

.param-tag {
  font-size: 11.5px;
  background: #ffffff;
  color: #36415c;
  padding: 3px 9px;
  border-radius: 8px;
  border: 1px solid #e6eaf3;
}

.finish-banner {
  margin-top: 6px;
  background: #f1fbf4;
  border: 1px solid #ccefd6;
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.finish-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff1f2;
  color: #e11d48;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.finish-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #166534;
}

.finish-sub {
  font-size: 12.5px;
  color: #3a6b4c;
  margin-top: 2px;
}

/* 菜单视图 */
.dish-tabs-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  border-bottom: 1px solid #f0f2f7;
  margin-bottom: 14px;
}

.dish-tab {
  border: none;
  background: transparent;
  font-size: 14.5px;
  color: var(--text-sub);
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px;
}

.dish-tab.active {
  color: var(--text-main);
  font-weight: 700;
}

.menu-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 14px 0 10px;
}

.menu-ing-bar {
  background: #f3f4f6;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  margin: 10px 0 4px;
}

.menu-step-block {
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f8;
}

.menu-step-title {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.menu-step-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #2f3544;
}

.menu-param-card {
  margin-top: 10px;
  background: #f6f7fa;
  border-radius: 12px;
  padding: 11px 12px;
}

.menu-param-card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.menu-param-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.menu-param-cell {
  background: #ffffff;
  border-radius: 9px;
  padding: 7px 8px;
  text-align: center;
}

.menu-param-k {
  font-size: 11px;
  color: var(--text-muted);
}

.menu-param-v {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

/* 末尾固定：开始做菜按钮 */
.schedule-bottom-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 28%, #ffffff 100%);
  z-index: 6;
}

.btn-start-cooking {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 999px;
  background: var(--accent-grad-warm);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(245, 78, 99, 0.32);
  transition: transform 0.14s;
}

.btn-start-cooking:active {
  transform: scale(0.98);
}

/* ==================== VIEW 3: 沉浸式上下卡片流跟做模式 ==================== */
.view-cook {
  background: linear-gradient(180deg, #f3f5fb 0%, #eaEEF7 100%);
  color: var(--text-main);
}

.cook-topbar {
  position: relative;
  height: 56px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  z-index: 20;
}

.cook-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #e6eaf4;
  border-radius: 50%;
  background: #f7f8fc;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}

.cook-icon-btn:hover {
  background: #edf0f9;
}

.cook-status-center {
  text-align: center;
}

.cook-clock-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
  animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.cook-sep {
  color: var(--text-muted);
}

.cook-step-counter {
  font-size: 11.5px;
  color: var(--text-sub);
  margin-top: 1px;
}

.cook-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.speed-chip {
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #d9e2ff;
  background: #eef3ff;
  color: #3b63f6;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

/* 顶部通知浮窗 */
.toast-banner {
  position: absolute;
  top: 64px;
  left: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: #161b29;
  border: 1px solid #fde2e2;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 14px 34px rgba(28, 42, 82, 0.18);
  z-index: 30;
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s;
}

.toast-banner.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-banner.show.vibrate {
  animation: toast-vibrate 0.46s ease-in-out 0.1s;
}

.toast-banner.show.vibrate .toast-icon {
  animation: toast-icon-ring 0.46s ease-in-out 0.1s;
}

@keyframes toast-vibrate {
  0%, 100% { transform: translate3d(0, 0, 0); }
  15% { transform: translate3d(-5px, 0, 0); }
  30% { transform: translate3d(5px, 0, 0); }
  45% { transform: translate3d(-4px, 0, 0); }
  60% { transform: translate3d(4px, 0, 0); }
  75% { transform: translate3d(-2px, 0, 0); }
  90% { transform: translate3d(2px, 0, 0); }
}

@keyframes toast-icon-ring {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(14deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .toast-banner.show.vibrate,
  .toast-banner.show.vibrate .toast-icon {
    animation: none;
  }
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff1e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #e11d48;
}

.toast-msg {
  font-size: 13.5px;
  line-height: 1.4;
  color: #1e2433;
  margin-top: 2px;
}

.toast-close {
  border: none;
  background: transparent;
  color: #7c8498;
  font-size: 14px;
  cursor: pointer;
}

/* 后台设备状态条 */
.active-devices-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 14px 2px;
  flex-shrink: 0;
  z-index: 15;
}

.dev-pill {
  background: #ffffff;
  border: 1px solid #e1e7f5;
  color: #334155;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(24, 34, 62, 0.05);
}

/* 上下滑动卡片流容器（居中吸附，上下露头） */
.cards-snap-container {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  padding: 22vh 20px 26vh 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: none;
  position: relative;
}

.cards-snap-container::-webkit-scrollbar {
  display: none;
}

.cook-slide {
  flex-shrink: 0;
  width: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: normal;
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 18px 16px;
  border: 1.5px solid #e8ecf5;
  box-shadow: 0 6px 20px rgba(28, 42, 82, 0.06);
  transform: scale(0.93);
  opacity: 0.56;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.16s ease,
              box-shadow 0.16s ease,
              border-color 0.16s ease;
  cursor: pointer;
  position: relative;
}

.cook-slide.is-active {
  transform: scale(1);
  opacity: 1;
  border-color: #c5d6ff;
  box-shadow: 0 16px 38px rgba(45, 72, 145, 0.14), 0 2px 8px rgba(45, 72, 145, 0.06);
  cursor: default;
}

.cook-slide.is-completed:not(.is-active) {
  opacity: 0.48;
  background: #f8fbf9;
  border-color: #d6f0df;
}

.cook-slide.slide-device.is-active {
  border-color: #fed7aa;
  box-shadow: 0 16px 38px rgba(234, 88, 12, 0.12);
}

.cook-slide.slide-idle {
  background: linear-gradient(180deg, #f3fcf6 0%, #ffffff 42%);
  border-color: #cbeed8;
}

.cook-slide.slide-idle.is-active {
  border-color: #86efac;
  box-shadow: 0 16px 38px rgba(22, 163, 74, 0.14);
}

.cook-slide.slide-done {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 45%);
  border-color: #fde68a;
}

.cook-slide.slide-done.is-active {
  border-color: #facc15;
  box-shadow: 0 16px 38px rgba(202, 138, 4, 0.14);
}

/* 卡片头部：完全呼应全局视图的图标+阶段名+菜名胶囊 */
.slide-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.slide-head-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.slide-stage-icon {
  font-size: 18px;
  line-height: 1;
}

.slide-stage-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.slide-recipe-pill {
  font-size: 12px;
  font-weight: 600;
  color: #4b556d;
  background: #eef1f7;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.slide-recipe-pill.idle {
  background: #dcfce7;
  color: #15803d;
}

.slide-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.slide-status-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: #3f6bf5;
}

.slide-status-tag.done {
  background: #dcfce7;
  color: #15803d;
}

/* 卡片主体：带蓝色圆圈序号的步骤文本 + 虚线分隔参数胶囊 */
.slide-step-body {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
}

.slide-circle-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #4b82ff;
  color: #4b82ff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.cook-slide.is-completed .slide-circle-num {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
}

.slide-title {
  font-size: 16.5px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.slide-param-divider {
  border-top: 1px dashed #e5e9f2;
  padding-top: 11px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.slide-param-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #384259;
  background: #f6f8fc;
  border: 1px solid #e6ebf5;
  padding: 5px 11px;
  border-radius: 999px;
}

.slide-dur-badge {
  font-size: 12.5px;
  font-weight: 700;
  color: #4b82ff;
  font-variant-numeric: tabular-nums;
}

/* 空闲等待卡片专属（紧凑清爽浅色卡片风格） */
.idle-card-center {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.idle-mini-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #4ade80;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: breatheRing 2.6s ease-in-out infinite;
}

@keyframes breatheRing {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(34, 197, 94, 0.16); }
  50% { transform: scale(1.04); box-shadow: 0 0 24px rgba(34, 197, 94, 0.32); }
}

.idle-countdown {
  font-size: 17px;
  font-weight: 800;
  color: #15803d;
  font-variant-numeric: tabular-nums;
}

.idle-countdown-sub {
  font-size: 10px;
  color: #4d7c5f;
}

.idle-text-col {
  flex: 1;
  min-width: 0;
}

.idle-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #14532d;
  margin: 0 0 4px;
}

.idle-desc {
  font-size: 12.5px;
  color: #3f6b50;
  line-height: 1.45;
  margin: 0;
}

.idle-running-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.idle-running-item {
  background: #f7f9fc;
  border: 1px solid #e7ecf5;
  border-radius: 11px;
  padding: 8px 11px;
}

.idle-running-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #334155;
  margin-bottom: 5px;
}

.idle-progress-track {
  height: 5px;
  background: #e5eaf3;
  border-radius: 999px;
  overflow: hidden;
}

.idle-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #3b82f6);
  border-radius: 999px;
  transition: width 0.4s linear;
}

.next-preview-box {
  background: #f2f6ff;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  color: #2c4a8f;
  margin-bottom: 12px;
  line-height: 1.45;
}

/* 卡片底部操作区（仅当前聚焦卡片高亮完整显示，非聚焦卡片收起更清爽） */
.slide-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-step-done {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 6px 16px rgba(79, 124, 255, 0.25);
  transition: transform 0.14s;
}

.btn-step-done:active {
  transform: scale(0.985);
}

.btn-step-done.completed {
  background: linear-gradient(95deg, #16a34a 0%, #22c55e 100%);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.24);
}

.btn-idle-notify {
  width: 100%;
  height: 40px;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: #ecfdf3;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.idle-secondary-row {
  display: flex;
  gap: 8px;
}

.btn-ghost-sm {
  flex: 1;
  height: 34px;
  border: 1px solid #e3e8f2;
  border-radius: 999px;
  background: #f8f9fc;
  color: var(--text-sub);
  font-size: 12px;
  cursor: pointer;
}

/* 右侧竖向快速滑动条 */
.vertical-rail {
  position: absolute;
  right: 0;
  top: 54%;
  transform: translateY(-50%);
  width: 30px;
  height: 52%;
  min-height: 180px;
  max-height: 360px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 7px 10px 10px;
  z-index: 22;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: ns-resize;
}

.rail-track {
  position: relative;
  width: 6px;
  height: 100%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  transition: width 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.vertical-rail.dragging .rail-track,
.vertical-rail.highlight .rail-track {
  width: 9px;
  background: rgba(75, 130, 255, 0.24);
  box-shadow: 0 0 0 4px rgba(75, 130, 255, 0.12);
}

.rail-dots-layer {
  position: absolute;
  inset: 4px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.rail-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.45);
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.rail-dot.idle-dot {
  background: #86efac;
}

.rail-dot.done-dot {
  background: #22c55e;
}

.rail-dot.active {
  background: #4b82ff;
  transform: scale(1.2);
}

.rail-thumb {
  position: absolute;
  left: 50%;
  top: 0%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5c8fff, #3b6ef5);
  box-shadow: 0 2px 8px rgba(59, 110, 245, 0.42);
  pointer-events: none;
  transition: top 0.12s ease-out, width 0.15s ease, height 0.15s ease;
}

.vertical-rail.dragging .rail-thumb {
  transition: none;
  width: 13px;
  height: 32px;
  box-shadow: 0 4px 14px rgba(59, 110, 245, 0.55);
}

.vertical-rail.highlight .rail-thumb {
  animation: rail-thumb-pulse 0.85s ease-in-out 2;
}

@keyframes rail-thumb-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.28); }
}

/* 拖动右侧滑条时的悬浮步数气泡 */
.rail-scrub-bubble {
  position: absolute;
  right: 38px;
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  background: rgba(22, 27, 41, 0.92);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  padding: 7px 12px;
  border-radius: 12px;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.25);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.rail-scrub-bubble.show {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* 进入跟做界面时的右侧滑动引导提示 */
.rail-guide-tip {
  position: absolute;
  right: 36px;
  top: 54%;
  transform: translateY(-50%) translateX(8px);
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 13px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.34);
  z-index: 26;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.rail-guide-tip.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.rail-guide-tip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #4f46e5;
}

.rail-guide-arrow {
  display: inline-block;
  animation: rail-arrow-nudge 1s ease-in-out infinite;
}

@keyframes rail-arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

/* ==================== 底部抽屉弹窗 ==================== */
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 35, 0.45);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
}

.bottom-sheet {
  width: 100%;
  max-height: 78%;
  background: #ffffff;
  color: var(--text-main);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetUp 0.22s ease;
}

@keyframes sheetUp {
  from { transform: translateY(40px); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-light);
}

.sheet-title {
  font-size: 15.5px;
  font-weight: 700;
}

.sheet-search {
  padding: 10px 14px;
}

.sheet-search input {
  width: 100%;
  height: 38px;
  border: 1px solid #e1e5f0;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13.5px;
  outline: none;
  background: #f6f7fb;
}

.sheet-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 14px 14px;
}

.picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 10px;
  border-bottom: 1px solid #f2f4f8;
  cursor: pointer;
}

.picker-item.selected {
  background: #f3f7ff;
  border-radius: 10px;
}

.picker-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #c5cde0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
}

.picker-item.selected .picker-check {
  background: #4b82ff;
  border-color: #4b82ff;
}

.sheet-footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-selected-info {
  font-size: 13.5px;
  color: var(--text-sub);
}

.drawer-step-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
  border-bottom: 1px solid #f2f4f8;
  cursor: pointer;
}

.drawer-step-idx {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4361ee;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-step-idx.idle {
  background: #e6faee;
  color: #16a34a;
}

.drawer-step-idx.done {
  background: #22c55e;
  color: #ffffff;
}

/* Loading dots */
.loading-card {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #dce4ff;
  border-top-color: #4b82ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 自然语言 AI 回复 & 动态重排卡片 ==================== */
.ai-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-reply-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.ai-md {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-main);
  word-break: break-word;
}

.ai-md p {
  margin: 0 0 8px;
}

.ai-md p:last-child {
  margin-bottom: 0;
}

.ai-md ul {
  margin: 4px 0 8px;
  padding-left: 18px;
}

.ai-md li {
  margin-bottom: 4px;
}

.ai-md strong {
  color: #1f2937;
  font-weight: 700;
}

.replan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.replan-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.replan-actions-row .btn-gradient-full {
  flex: 1;
}

.btn-outline-sm {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid #dbe2f0;
  background: #ffffff;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline-sm:active {
  background: #f5f7fb;
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== 「这顿怎么做？」本餐确认卡 ==================== */
.pref-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.pref-card-sub {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-bottom: 12px;
  line-height: 1.5;
}

.pref-dish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.pref-dish-box {
  background: #f7f9fc;
  border: 1px solid #e9eef7;
  border-radius: 12px;
  padding: 10px 12px;
}

.pref-dish-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.pref-dish-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.pref-mem-tag {
  font-size: 11px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 2px 7px;
  border-radius: 999px;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pref-dim-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
}

.pref-dim-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  min-width: 32px;
  padding-top: 4px;
  flex-shrink: 0;
}

.pref-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pref-pill {
  border: 1px solid #d9e1f0;
  background: #ffffff;
  color: var(--text-main);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.14s;
}

.pref-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.pref-note-input {
  width: 100%;
  margin-top: 4px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid #dce3f0;
  background: #ffffff;
  font-size: 12.5px;
  color: var(--text-main);
  outline: none;
  box-sizing: border-box;
}

.pref-note-input:focus {
  border-color: #3b82f6;
}

.pref-save-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-sub);
  margin: 6px 0 12px;
  cursor: pointer;
  user-select: none;
}

.pref-save-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
}

.pref-actions {
  display: flex;
  gap: 8px;
}

.pref-actions .btn-gradient-full {
  flex: 1.25;
}

.pref-actions .btn-outline-sm {
  flex: 1;
}

.pref-card-done {
  opacity: 0.72;
  pointer-events: none;
}

.adjustments-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.adjustments-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 6px;
}

.adjustments-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
  color: #14532d;
  line-height: 1.55;
}
