:root {
  /* 对齐主站「案例展示」浅色暖调（室内设计案例展示 variables.scss / Home.vue） */
  --bg: #F3EFE7;                /* 米杏底 */
  --bg-top: #FBF9F4;            /* airy 渐变顶 */
  --surface: #FBF9F4;           /* 浅米面 */
  --ink: #2B2622;              /* 主文字 */
  --text-secondary: #5E564B;
  --muted: #978D7F;
  --border: #E7E0D2;
  --border-strong: #D9D1C2;
  --gold: #C9B79E;             /* 香槟金（深蒙版上的强调/数字） */
  --gold-deep: #8A7355;        /* 暖咖（浅底上的强调/小标签） */
  --accent: #9C3D2E;           /* 绛红，仅低分/错误点缀 */
  --success: #4A7C59;
  --dark: #1F1B17;            /* 墨色：圆形按钮 / 图上蒙版 */
  --cta-bg: #FFFFFF;          /* 主 CTA 米白底 */
  --cta-ink: #315f7c;         /* 主 CTA 深青字（对齐主站 cta-btn） */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-pill: 100px;
  --shadow-sm: 0 1px 4px rgba(43, 38, 34, 0.05);
  --shadow-md: 0 4px 14px rgba(43, 38, 34, 0.08);
  --shadow-lg: 0 10px 30px rgba(43, 38, 34, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --app-max: 430px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 38%);
  background-attachment: fixed;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.app-shell {
  min-height: 100vh;
  padding: var(--safe-top) 0 calc(28px + var(--safe-bottom));
}

.workspace,
.site-topbar {
  width: 100%;
  max-width: var(--app-max);
  margin-left: auto;
  margin-right: auto;
}

/* 顶栏：圆形返回（浅底深图标） */
.site-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 8px;
}

.top-back {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(43, 38, 34, 0.06);
  color: var(--ink);
  font-size: 21px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.18s ease;
}

.top-back:hover {
  background: rgba(43, 38, 34, 0.12);
}

.topbar-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
}

h2,
p {
  margin: 0;
}

/* 满屏大图 hero */
.hero-stage {
  position: relative;
  width: 100%;
  height: calc(100vh - 56px - var(--safe-top));
  height: calc(100svh - 56px - var(--safe-top));
  min-height: 460px;
  overflow: hidden;
  background: #EAE3D6;
}

.image-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

#dropZone {
  position: absolute;
  inset: 0;
  display: block;
}

/* 模糊铺底：填满画面又不裁切原图（对齐 StyleMatch card-blur） */
.image-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px) brightness(0.7) saturate(1.05);
  transform: scale(1.2);
  z-index: 0;
  user-select: none;
  -webkit-user-drag: none;
}

#previewImage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.34));
  user-select: none;
  -webkit-user-drag: none;
}

/* 上传提示 */
.upload-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  background: rgba(31, 27, 23, 0.4);
  color: #fff;
  text-align: center;
  z-index: 2;
  transition: opacity 0.18s ease;
}

.upload-hint-plus {
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  position: relative;
  font-size: 0;
}

.upload-hint-plus::before,
.upload-hint-plus::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.upload-hint-plus::before { width: 24px; height: 2px; }
.upload-hint-plus::after { width: 2px; height: 24px; }

.upload-hint-text {
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.88);
}

.image-panel.has-user-preview .upload-hint {
  opacity: 0;
  pointer-events: none;
}

/* 顶部文案叠层（顶部渐变蒙版保证可读） */
.hero-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 22px 22px 48px;
  background: linear-gradient(180deg, rgba(31, 27, 23, 0.58) 0%, rgba(31, 27, 23, 0) 100%);
  color: #fff;
  pointer-events: none;
}

.hero-en {
  font-size: 11px;
  letter-spacing: 4px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.hero-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.22;
}

.hero-sub {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 280px;
}

/* 底部叠层：评分浮层 + CTA（底部渐变蒙版，无毛玻璃） */
.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 80px 18px calc(18px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(31, 27, 23, 0) 0%, rgba(31, 27, 23, 0.9) 62%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
}

.hero-overlay {
  color: #fff;
}

.summary-label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.score-emphasis {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 56px;
  line-height: 1;
  font-weight: 600;
}

.score-emphasis small {
  font-family: var(--font-sans);
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  font-weight: 600;
}

#overallScore.band-high { color: var(--gold); }
#overallScore.band-mid { color: #fff; }
#overallScore.band-low { color: #E89B90; }

.style-emphasis {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.style-emphasis span {
  display: block;
}

.style-emphasis span + span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

/* 底部 CTA：胶囊 + 圆形箭头（对齐参考 Get Started + 圆按钮） */
.cta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.cta-form {
  flex: 1;
  display: flex;
  justify-content: center;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* CTA 尺寸对齐案例展示页（.hero-match / .intro-start）：padding 17/24，max-width 320 */
#submitBtn,
.cta-consult {
  width: 100%;
  padding: 17px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: opacity 0.2s ease, transform 0.15s ease;
}

#submitBtn {
  max-width: 320px;
}

.cta-consult {
  flex: 1;
}

#submitBtn:active,
.cta-consult:active,
.cta-round:active {
  opacity: 0.88;
  transform: scale(0.985);
}

#submitBtn:disabled {
  cursor: wait;
  opacity: 0.6;
}

.cta-round {
  width: 54px;
  height: 54px;
  min-width: 54px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.cta-round:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 分项评分（浅色卡片，对齐 poster-card 浅面） */
.result-section,
.evidence-section {
  margin: 26px 18px 0;
  animation: fadeSlideUp 0.4s ease both;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink);
}

.section-head > span {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--muted);
}

.sort-toggle {
  min-width: 84px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

.sort-toggle:hover {
  border-color: var(--gold-deep);
  color: var(--gold-deep);
}

.debug-badge {
  color: var(--gold-deep);
  border-color: var(--gold-deep);
}

.score-sections {
  display: grid;
  gap: 12px;
}

.metric-section {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.metric-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.metric-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.35;
}

.metric-score {
  min-width: 80px;
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.metric-score.band-high { color: var(--success); }
.metric-score.band-mid { color: var(--ink); }
.metric-score.band-low { color: var(--accent); }

.metric-score span { font-size: 22px; }

.metric-score small {
  margin-left: 2px;
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: 12px;
}

.metric-section p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.metric-section strong {
  color: var(--ink);
  font-weight: 600;
}

.debug-scores {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
}

.debug-scores span {
  display: block;
  white-space: normal;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.evidence-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.evidence-card h3 {
  margin: 0 0 10px;
  color: var(--gold-deep);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.evidence-card code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.error-box {
  margin: 18px 18px 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: var(--accent);
  background: #FBEDE9;
  border: 1px solid #E6C4BC;
  white-space: pre-wrap;
}
