/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --orange: #f07830;
  --orange-light: #ff8c42;
  --orange-bg: #fff5f0;
  --pink-bg: #fff5f5;
  --green-bg: #f5faf5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --text-placeholder: #c0c0c0;
  --bg-page: #f7f8fa;
  --bg-white: #ffffff;
  --bg-input: #f5f6f7;
  --border-light: #eeeeee;
  --border: #e5e5e5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* ===== Main Page ===== */
.page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  height: 44px;
  background: #1a1a1a;
  color: white;
  flex-shrink: 0;
}

.header-back {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-back svg {
  width: 24px;
  height: 24px;
  stroke: white;
  stroke-width: 2.5;
  fill: none;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.header-clock {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-clock svg {
  width: 22px;
  height: 22px;
  stroke: white;
  stroke-width: 1.5;
  fill: none;
}

/* Chat Area */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  background: var(--bg-page);
}

/* Feature Cards */
.feature-cards {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.feature-card {
  flex: 1;
  border-radius: var(--radius-md);
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s;
  min-height: 80px;
  position: relative;
  overflow: hidden;
}

.feature-card:active {
  transform: scale(0.97);
}

.card-pink {
  background: linear-gradient(160deg, #fff5f5 0%, #ffe8e8 100%);
}

.card-orange {
  background: linear-gradient(160deg, #fff8f0 0%, #ffe8d0 100%);
}

.card-green {
  background: linear-gradient(160deg, #f5faf5 0%, #e8f5e8 100%);
}

.card-icon-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-pink .card-icon-dot {
  background: rgba(240, 80, 80, 0.12);
}

.card-orange .card-icon-dot {
  background: rgba(240, 120, 48, 0.12);
}

.card-green .card-icon-dot {
  background: rgba(76, 175, 80, 0.12);
}

.card-icon-dot svg {
  width: 16px;
  height: 16px;
}

.card-pink .card-icon-dot svg { stroke: #e05555; }
.card-orange .card-icon-dot svg { stroke: var(--orange); }
.card-green .card-icon-dot svg { stroke: #4CAF50; }

.card-text-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-desc {
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.card-badge-new {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f07830;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 0 12px 0 8px;
  line-height: 1.2;
}

/* Chat Timestamp */
.chat-timestamp {
  text-align: center;
  font-size: 11px;
  color: #bbb;
  margin: 10px 0;
  line-height: 1;
}

/* Chat Messages */
.chat-message {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.ai-message .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f0e8e0;
}

.message-bubble {
  background: var(--bg-white);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
  padding: 14px 16px;
  max-width: calc(100% - 52px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.message-bubble p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.message-bubble p:last-of-type {
  margin-bottom: 12px;
}

/* Before-After Demo */
.before-after-demo {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 14px 0;
  justify-content: center;
}

.demo-card {
  text-align: center;
  flex: 1;
}

.demo-image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #f0f0f0;
}

.demo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder car illustrations */
.demo-car-before {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #e8dcc8 0%, #d4c4a8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.demo-car-before::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, #c8b898);
}

.demo-car-after {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f8f8f8 0%, #f0f0f0 40%, #e8e8e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.demo-car-after::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.03));
  border-top: 1px solid #e0e0e0;
}

.demo-car-icon {
  font-size: 36px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.demo-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-weight: 500;
}

.demo-arrow {
  font-size: 18px;
  color: #ccc;
  flex-shrink: 0;
  align-self: center;
  margin-bottom: 16px;
}

.try-it-btn {
  background: var(--bg-white);
  color: var(--orange);
  border: 1.5px solid var(--orange);
  border-radius: 20px;
  padding: 7px 20px;
  font-size: 13px;
  cursor: pointer;
  display: inline-block;
  margin-top: 2px;
  font-weight: 500;
}

.try-it-btn:active {
  opacity: 0.7;
}

/* AI Photo Complete Message */
.ai-complete-bubble {
  background: var(--bg-white);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
  padding: 14px 16px;
  max-width: calc(100% - 52px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.ai-complete-bubble .check-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 500;
}

.ai-complete-bubble p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.ai-complete-bubble .result-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(180deg, #f5f5f5 0%, #ececec 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.ai-complete-bubble .result-image::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.02));
}

.ai-complete-bubble .result-car {
  font-size: 56px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
  position: relative;
  z-index: 1;
}

.save-image-btn {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--bg-white);
}

/* Input Bar */
.input-bar {
  padding: 8px 14px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-page);
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 8px 6px 8px 16px;
  border: 1.5px solid var(--orange-light);
  box-shadow: 0 1px 4px rgba(240,120,48,0.06);
}

.input-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-placeholder);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.input-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.icon-mic {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-mic svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-tertiary);
  stroke-width: 1.8;
  fill: none;
}

.icon-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--orange);
}

.icon-send svg {
  width: 16px;
  height: 16px;
  stroke: white;
  stroke-width: 2;
  fill: none;
}

/* ===== Modals ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  position: relative;
  flex-shrink: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  position: absolute;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close svg {
  width: 12px;
  height: 12px;
  stroke: #888;
  stroke-width: 2.5;
  fill: none;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 80px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* ===== Buttons ===== */
.btn-primary {
  background: var(--orange);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-size: 15px;
  cursor: pointer;
  flex: 1;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.btn-primary:active {
  opacity: 0.85;
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-size: 15px;
  cursor: pointer;
  flex: 1;
}

.btn-secondary:active {
  background: #f9f9f9;
}

.full-width {
  flex: unset;
  width: 100%;
}

/* ===== Form Elements ===== */
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  margin-top: 18px;
}

.section-title:first-child {
  margin-top: 2px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 18px;
}

.section-title-row .section-title {
  margin: 0;
}

.upload-bg-link {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.upload-bg-link svg {
  stroke: var(--text-tertiary);
}

.upload-bg-link:active {
  opacity: 0.6;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.input-with-counter {
  position: relative;
}

.text-input {
  width: 100%;
  padding: 11px 50px 11px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg-input);
  outline: none;
  color: var(--text-primary);
}

.text-input::placeholder {
  color: var(--text-placeholder);
}

.text-input:focus {
  background: var(--bg-white);
  box-shadow: inset 0 0 0 1.5px var(--orange-light);
}

.counter {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Upload Button */
.upload-btn {
  width: 80px;
  height: 80px;
  border: none;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg-input);
  gap: 4px;
}

.upload-btn .upload-plus {
  font-size: 22px;
  color: var(--text-tertiary);
  font-weight: 300;
  line-height: 1;
}

.upload-btn .upload-text {
  font-size: 12px;
  color: var(--text-tertiary);
}

.upload-bg-card {
  width: 90px;
  height: 70px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg-input);
  gap: 3px;
}

.upload-bg-card .upload-plus {
  font-size: 20px;
  color: var(--text-tertiary);
  font-weight: 300;
  line-height: 1;
}

.upload-bg-card .upload-text {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* ===== Preview Box ===== */
.preview-box {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin: 14px 0;
}

.preview-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.preview-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.preview-dots .dot1 { background: #f5c5a5; }
.preview-dots .dot2 { background: #e8995b; }
.preview-dots .dot3 { background: var(--orange); }

.preview-text {
  font-size: 13px;
  color: var(--text-primary);
}

/* ===== Style Options ===== */
.style-options {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.style-card {
  flex: 1;
  min-width: 90px;
  text-align: center;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius-md);
  padding: 8px 6px 10px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
}

.style-card.selected {
  border-color: var(--orange);
}

.style-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 6px;
  overflow: hidden;
}

.style-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.style-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--orange);
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.style-check svg {
  width: 10px;
  height: 10px;
  stroke: white;
  stroke-width: 3;
  fill: none;
}

.style-card.selected .style-check {
  display: flex;
}

.style-name {
  font-size: 11px;
  color: var(--text-secondary);
  display: block;
}

.style-sublabel {
  font-size: 9px;
  color: var(--text-tertiary);
  display: block;
}

.custom-card-actions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  justify-content: center;
  display: none;
}

.style-card.selected .custom-card-actions {
  display: flex;
}

.custom-card-btn {
  flex: 1;
  padding: 3px 8px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 9px;
  cursor: pointer;
  color: #666;
  line-height: 1.4;
}

.custom-card-btn:active {
  opacity: 0.6;
}

.custom-card-btn--danger {
  border-color: #e8d0d0;
  color: #e05555;
}

.add-dealership-btn {
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid var(--orange-light);
  border-radius: 10px;
  background: var(--bg-white);
  color: var(--orange);
  font-size: 9px;
  cursor: pointer;
  white-space: nowrap;
  display: none;
  line-height: 1.4;
}

.style-card.selected .add-dealership-btn {
  display: inline-block;
}

/* ===== Search Box ===== */
.search-box {
  position: relative;
  margin-bottom: 10px;
}

.search-input {
  width: 100%;
  padding: 9px 36px 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-input);
  outline: none;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-placeholder);
}

.search-input:focus {
  border-color: var(--orange-light);
  background: var(--bg-white);
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.search-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-tertiary);
  stroke-width: 2;
  fill: none;
}

/* ===== Car List ===== */
.car-list {
  max-height: 220px;
  overflow-y: auto;
  margin: 0 -4px;
}

.car-item {
  display: flex;
  align-items: center;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  gap: 8px;
}

.car-item:active {
  background: #f9f9f9;
}

.car-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
}

.car-item.selected .radio-dot {
  border-color: var(--orange);
  background: var(--orange);
}

.car-item.selected .radio-dot::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

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

.car-name {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.car-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.car-meta span {
  color: var(--text-tertiary);
}

.car-price {
  font-size: 14px;
  color: var(--orange);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.car-price-no {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Status Toggle ===== */
.status-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}

.status-option {
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  background: var(--bg-input);
  color: var(--text-tertiary);
  transition: all 0.15s;
}

.status-option.active {
  background: var(--orange);
  color: white;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px 0 12px;
  font-size: 14px;
  color: var(--text-tertiary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2.5px;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.tab.active {
  color: var(--orange);
  font-weight: 600;
}

.tab.active::after {
  width: 24px;
}

/* ===== Template Scroll ===== */
.template-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.template-card {
  flex: 0 0 96px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.template-card.selected {
  border-color: var(--orange);
}

.template-thumb {
  width: 96px;
  height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 8px;
  position: relative;
}

.template-badge {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.template-text {
  font-size: 12px;
  font-weight: 600;
}

.template-sub {
  font-size: 8px;
  opacity: 0.85;
  text-align: center;
  line-height: 1.3;
}

/* ===== Pill Group ===== */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pill {
  padding: 7px 14px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.pill.active {
  background: var(--orange);
  color: white;
}

.pill:active {
  opacity: 0.8;
}

/* ===== Processing Overlay ===== */
.processing-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 85%;
  max-width: 300px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.processing-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.progress-box {
  background: linear-gradient(135deg, #c9a8e8, #a8c9e8, #e8a8c9);
  border-radius: var(--radius-md);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.progress-icon {
  font-size: 32px;
  margin-bottom: 2px;
}

.progress-text {
  font-size: 22px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.progress-bar-bg {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.35);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: white;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ===== Responsive ===== */
@media (min-width: 431px) {
  body {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 0 30px rgba(0,0,0,0.08);
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ===== Home Indicator ===== */
.home-indicator {
  width: 134px;
  height: 5px;
  background: #1a1a1a;
  border-radius: 3px;
  margin: 8px auto 0;
  opacity: 0.2;
}

/* ===== Result Message Styles ===== */
.result-copy-text {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ===== Mode Options (处理方式) ===== */
.mode-options {
  margin-bottom: 14px;
}

/* Row layout for mode items */
.mode-options-row {
  display: flex;
  gap: 8px;
}

.mode-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-white);
  position: relative;
}

.mode-item:active {
  opacity: 0.85;
}

.mode-item.selected {
  border-color: var(--orange);
  background: #fff8f3;
}

.mode-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.mode-info-icon {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.mode-info-icon:active {
  opacity: 0.6;
}

/* ===== Toggle Switch Row ===== */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 10px;
}

.toggle-label-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ddd;
  border-radius: 24px;
  transition: background-color 0.2s;
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.switch-toggle input:checked + .slider-toggle {
  background-color: var(--orange);
}

.switch-toggle input:checked + .slider-toggle:before {
  transform: translateX(20px);
}

/* ===== Dealership Modal ===== */

.dealership-modal {
  max-width: 380px;
}

.dealership-modal .modal-footer {
  padding: 12px 16px 24px;
}

.dealership-modal .deal-btn-row {
  width: 100%;
}

/* Tab bar: 车行名称 / 车行logo */

.deal-tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.deal-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 10px;
  cursor: pointer;
  position: relative;
}

.deal-tab-label {
  font-size: 15px;
  color: #999;
  font-weight: 500;
  transition: color 0.2s;
}

.deal-tab.active .deal-tab-label {
  color: var(--orange);
  font-weight: 600;
}

.deal-tab-indicator {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  margin-top: 6px;
  transition: background 0.2s;
}

.deal-tab.active .deal-tab-indicator {
  background: var(--orange);
}

/* Labels */

.deal-label {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin-bottom: 6px;
}

/* Text inputs with counter on right */

.deal-input-row {
  display: flex;
  align-items: center;
  background: #f0f1f5;
  border-radius: 8px;
  padding: 0 12px;
  margin-bottom: 14px;
  height: 44px;
}

.deal-text-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  height: 100%;
}

.deal-text-input::placeholder {
  color: #bbb;
}

.deal-counter {
  font-size: 12px;
  color: #bbb;
  white-space: nowrap;
  margin-left: 8px;
}

/* Text style options */

.deal-style-options {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.deal-style-option {
  padding: 8px 16px;
  border-radius: 20px;
  background: #f0f1f5;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}

.deal-style-option.selected {
  background: #fff3ec;
  color: var(--orange);
  font-weight: 500;
}

.deal-style-option:active {
  opacity: 0.8;
}

/* Logo upload section */

.deal-logo-desc {
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
  line-height: 1.5;
}

.deal-link {
  color: #4080ff;
  cursor: pointer;
  font-size: 12px;
}

.deal-upload-box {
  width: 88px;
  height: 88px;
  background: #f0f1f5;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-bottom: 16px;
}

.deal-upload-box:active {
  opacity: 0.7;
}

.deal-upload-plus {
  font-size: 28px;
  color: #999;
  line-height: 1;
}

.deal-upload-text {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* Uploaded logo thumbnail in logo tab */

.deal-logo-thumbnail {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 0 16px;
  border-radius: 12px;
  overflow: visible;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
}

.deal-logo-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.deal-logo-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.deal-logo-delete svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
}

.deal-logo-delete:active {
  background: #999;
}

/* Preview area */

.deal-preview-label {
  text-align: center;
  font-size: 13px;
  color: #bbb;
  margin-bottom: 10px;
}

.deal-preview-box {
  width: 100%;
  height: 220px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
}

.deal-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* Preview edit overlay */

.deal-preview-edit {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s;
}

.deal-preview-edit svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
}

.deal-preview-edit:active {
  background: rgba(0,0,0,0.7);
}

/* Preview loading state: 3 dots + text */

.deal-preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #666;
  font-size: 14px;
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
  animation: dotPulse 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* Placeholder inside deal-preview-box */

.deal-preview-box .wallpaper-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #bbb;
  font-size: 13px;
  border: none;
  width: auto;
  height: auto;
}

/* Button row (two buttons side-by-side) */

.deal-btn-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

/* Secondary button: white bg, orange text/border */

.deal-btn-secondary {
  flex: 1;
  background: #fff;
  color: var(--orange);
  border: 1.5px solid var(--orange);
  border-radius: 12px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.deal-btn-secondary:active {
  background: #fff5ef;
}

/* Primary button */

.deal-btn-primary {
  flex: 1;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.deal-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.deal-btn-primary:active:not(:disabled) {
  opacity: 0.85;
}

/* ===== Toast ===== */

.toast-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  animation: toastFade 2s ease forwards;
}

@keyframes toastFade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== Showcase Card ===== */

/* Showcase card bubble — replaces message-bubble */
.showcase-card {
  background: white;
  border-radius: 4px 12px 12px 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  max-width: calc(100% - 52px);
}

/* Update Banner */
.showcase-update-banner {
  background: linear-gradient(90deg, #fff8f0, #fff5ef);
  border-bottom: 1px solid #ffe8d0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.showcase-update-header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.showcase-update-icon { font-size: 14px; flex-shrink: 0; }
.showcase-update-title { font-size: 12px; font-weight: 700; color: var(--orange); }

.showcase-update-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 4px;
}
.showcase-update-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 10px;
  color: var(--text-primary);
  line-height: 1.4;
}
.showcase-update-item strong { color: var(--orange); font-weight: 600; }
.showcase-update-bullet {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
  margin-top: 4px;
  flex-shrink: 0;
}

/* Carousel Section */
.showcase-carousel {
  padding: 10px 0 8px;
}
.carousel-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 12px 6px;
}

/* Carousel container */
.carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 8px;
  padding: 0 12px 8px;
  -webkit-overflow-scrolling: touch;
}
.carousel-container::-webkit-scrollbar { display: none; }

/* Carousel card */
.carousel-card {
  flex: 0 0 85%;
  scroll-snap-align: center;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-input);
}

/* Card visual area (Before/After) */
.card-visual {
  height: 140px;
  position: relative;
  display: flex;
  overflow: hidden;
}
.card-side {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Card side backgrounds — CSS gradient placeholders until real images are added */
.car-before-side {
  background: linear-gradient(180deg, #c8b090 0%, #a89070 30%, #888 70%, #666 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.car-after-side {
  background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 30%, #ddd 60%, #ccc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.poster-before-side {
  background: linear-gradient(180deg, #d4c5a8 0%, #b8a890 40%, #888 70%, #666 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.poster-after-side {
  background: linear-gradient(180deg, #c0392b, #e74c3c);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
}
.copy-before-side {
  background: linear-gradient(180deg, #e8e8e8, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.copy-after-side {
  background: linear-gradient(180deg, #e8f5e8, #c8e6c9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

/* Poster content inside poster-after-side */
.poster-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}
.poster-badge-lg {
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  margin-bottom: 3px;
}
.poster-sub-text {
  font-size: 8px;
  opacity: 0.85;
  text-align: center;
}
.poster-tag-mini {
  position: absolute;
  bottom: 6px;
  font-size: 7px;
  background: rgba(0,0,0,0.25);
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
}

/* Copy placeholder and result */
.copy-placeholder {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
}
.copy-result { text-align: left; width: 100%; }
.copy-text {
  font-size: 9px;
  color: var(--text-primary);
  line-height: 1.5;
  background: rgba(255,255,255,0.6);
  padding: 8px;
  border-radius: 6px;
}

/* Divider circle */
.card-divider {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-secondary);
  z-index: 3;
}

/* Labels */
.card-label {
  position: absolute;
  bottom: 6px;
  font-size: 8px;
  padding: 1px 8px;
  border-radius: 8px;
  z-index: 2;
  font-weight: 500;
}
.card-label-before {
  left: 8px;
  background: rgba(0,0,0,0.5);
  color: white;
}
.card-label-after {
  right: 8px;
  background: var(--orange);
  color: white;
}

/* Card info area */
.card-info {
  padding: 8px 10px;
  border-top: 1px solid var(--border-light);
}
.showcase-card .card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.showcase-card .card-badge {
  font-size: 7px;
  background: var(--orange);
  color: white;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: 600;
}
.showcase-card .card-desc {
  font-size: 9px;
  color: var(--text-tertiary);
  line-height: 1.4;
  margin-bottom: 6px;
}

/* Card buttons */
.card-btn {
  display: inline-block;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 4px 14px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}
.card-btn:active { opacity: 0.85; }
.card-btn-blue {
  background: linear-gradient(90deg, #2196F3, #1565C0);
}
.card-btn-green {
  background: linear-gradient(90deg, #4CAF50, #2E7D32);
}

/* Carousel indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0 2px;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  transition: all 0.3s;
}
.carousel-dot.active {
  width: 16px;
  background: var(--orange);
}

