:root {
  color-scheme: light;

  /* ── 品牌核心色 ── */
  --brand-black: #0a0a0a;
  --brand-black-soft: #111108;
  --brand-gold: #c4956a;
  --brand-gold-light: #dbb48a;
  --brand-gold-dark: #9a6a3a;
  --brand-ivory: #f8f2eb;
  --brand-ivory-warm: #f0e8dc;

  /* ── 四季标识色 ── */
  --spring-primary: #f5b08a;
  --spring-bg: rgba(245,176,138,0.08);
  --spring-border: rgba(245,176,138,0.25);

  --summer-primary: #94bfe8;
  --summer-bg: rgba(148,191,232,0.08);
  --summer-border: rgba(148,191,232,0.25);

  --autumn-primary: #c4956a;
  --autumn-bg: rgba(196,149,106,0.1);
  --autumn-border: rgba(196,149,106,0.28);

  --winter-primary: #a0b4dc;
  --winter-bg: rgba(160,180,220,0.08);
  --winter-border: rgba(160,180,220,0.25);

  /* ── 背景层次 ── */
  --bg: #f5efe8;
  --bg-warm: #ede6db;
  --panel: #ffffff;
  --panel-warm: #faf6f0;

  /* ── 文字 ── */
  --text: #1a1410;
  --text-soft: #3d3530;
  --muted: #7a706a;
  --muted-light: #a89e98;

  /* ── 线条 ── */
  --line: #e8ddd4;
  --line-strong: #d0c0aa;

  /* ── 保留原有功能色 ── */
  --gold: var(--brand-gold);
  --gold-light: var(--brand-gold-light);
  --gold-dark: var(--brand-gold-dark);
  --gold-bg: var(--autumn-bg);
  --gold-bg-strong: rgba(196,149,106,0.16);
  --gold-border: var(--autumn-border);
  --dark: var(--brand-black);
  --dark-warm: #181410;
  --dark-card: #201c18;
  --danger: #c01828;
  --success: #1a7a48;
  --warning: #c06010;
  --info: #1848c0;
  --rose: #c05a4a;
  --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 24px 48px rgba(28, 25, 23, 0.12);
  --shadow-glow: 0 8px 32px rgba(184, 149, 107, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(184, 149, 107, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(160, 208, 255, 0.06), transparent),
    var(--bg);
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
button, input, select, textarea { font: inherit; }

/* ===== HEADER ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 40px);
  height: 60px;
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(196,149,106,0.12);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, #dbb48a, #9a6a3a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(196,149,106,0.4);
}

.brand-info h1 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 600;
  color: #f5ebe0;
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.brand-en {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  margin-left: 4px;
}

.eyebrow {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin: 2px 0 0;
}

.topnav {
  display: flex;
  gap: 4px;
}

.topnav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  transition: color 0.2s, background 0.2s;
}

.topnav a:hover {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin: 0 -8px 0 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO ===== */
.only-mobile {
  display: none;
}

.hero-section {
  position: relative;
  background: var(--brand-black);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 0% 50%, rgba(196,149,106,0.14) 0%, transparent 65%),
    radial-gradient(ellipse 40% 60% at 100% 30%, rgba(80,80,160,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(228px, 260px) minmax(280px, 380px);
  min-height: 500px;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
  padding: 0 clamp(20px, 4vw, 40px);
}

.hero-content {
  padding: clamp(40px, 6vh, 72px) 0;
  max-width: 500px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(196,149,106,0.1);
  border: 0.5px solid rgba(196,149,106,0.28);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-gold);
}

.hero-kicker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-gold);
  flex-shrink: 0;
}

.hero-title {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  color: #f5ede0;
  line-height: 1.18;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}

.hero-title-em {
  font-style: italic;
  background: linear-gradient(135deg, #dbb48a 0%, #c4956a 50%, #a87040 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
  margin: 0 0 20px;
}

.hero-features {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  flex-wrap: wrap;
}

.hero-features li {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hf-num {
  font-weight: 700;
  color: var(--brand-gold);
  font-size: 14px;
}

.hero-season-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.season-strip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 0.5px solid transparent;
}

.season-strip-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.season-strip-swatches {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.season-strip-swatches span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
}

.season-strip-item.spring {
  background: var(--spring-bg);
  border-color: var(--spring-border);
}
.season-strip-item.spring .season-strip-name { color: var(--spring-primary); }
.season-strip-item.spring .season-strip-swatches span:nth-child(1) { background: #f5b08a; }
.season-strip-item.spring .season-strip-swatches span:nth-child(2) { background: #e8c090; }
.season-strip-item.spring .season-strip-swatches span:nth-child(3) { background: #f0d070; }

.season-strip-item.summer {
  background: var(--summer-bg);
  border-color: var(--summer-border);
}
.season-strip-item.summer .season-strip-name { color: var(--summer-primary); }
.season-strip-item.summer .season-strip-swatches span:nth-child(1) { background: #94bfe8; }
.season-strip-item.summer .season-strip-swatches span:nth-child(2) { background: #b8a8d8; }
.season-strip-item.summer .season-strip-swatches span:nth-child(3) { background: #7890b8; }

.season-strip-item.autumn {
  background: var(--autumn-bg);
  border-color: var(--autumn-border);
}
.season-strip-item.autumn .season-strip-name { color: var(--autumn-primary); }
.season-strip-item.autumn .season-strip-swatches span:nth-child(1) { background: #c4956a; }
.season-strip-item.autumn .season-strip-swatches span:nth-child(2) { background: #8a6040; }
.season-strip-item.autumn .season-strip-swatches span:nth-child(3) { background: #5a7a40; }

.season-strip-item.winter {
  background: var(--winter-bg);
  border-color: var(--winter-border);
}
.season-strip-item.winter .season-strip-name { color: var(--winter-primary); }
.season-strip-item.winter .season-strip-swatches span:nth-child(1) { background: #e0e8f8; }
.season-strip-item.winter .season-strip-swatches span:nth-child(2) { background: #a0b4dc; }
.season-strip-item.winter .season-strip-swatches span:nth-child(3) { background: #5060a0; }

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4a870 0%, #a87040 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(196,149,106,0.38),
              0 2px 8px rgba(196,149,106,0.2);
  transition: all 0.25s ease;
}

.hero-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(196,149,106,0.45),
              0 4px 12px rgba(196,149,106,0.25);
}

/* 中间：三张扇形报告预览（独立列，不遮挡人物/文案） */
.hero-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  min-width: 0;
  isolation: isolate;
}

.hero-preview-label {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  text-align: center;
}

.hero-report-stack {
  position: relative;
  width: 220px;
  height: 210px;
  flex-shrink: 0;
}

.hero-report-card {
  position: absolute;
  width: 118px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,0.38);
  border: 1.5px solid rgba(255,255,255,0.14);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-report-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: contain;
  object-position: top center;
  display: block;
  background: #fff;
}

.hero-report-card.card-back {
  top: 28px;
  left: 0;
  transform: rotate(-8deg);
  z-index: 1;
}

.hero-report-card.card-mid {
  top: 0;
  left: 51px;
  transform: rotate(0deg);
  z-index: 3;
}

.hero-report-card.card-front {
  top: 28px;
  left: 102px;
  transform: rotate(8deg);
  z-index: 2;
}

.hero-section:hover .hero-report-card.card-back {
  transform: rotate(-9deg) translateY(-3px);
}

.hero-section:hover .hero-report-card.card-mid {
  transform: translateY(-5px);
}

.hero-section:hover .hero-report-card.card-front {
  transform: rotate(9deg) translateY(-3px);
}

/* 右侧：纯人物图，无叠层 */
.hero-visual {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: 0 0 0 0;
}

.hero-photo-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.92) brightness(0.88);
  transition: filter 0.4s ease;
}

.hero-section:hover .hero-photo {
  filter: saturate(1) brightness(0.92);
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      var(--brand-black) 0%,
      rgba(10,10,10,0.35) 12%,
      transparent 38%
    ),
    linear-gradient(
      180deg,
      rgba(10,10,10,0.25) 0%,
      transparent 22%,
      transparent 78%,
      rgba(10,10,10,0.55) 100%
    );
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 0;
  }

  .hero-content {
    order: 3;
    padding: 20px 16px 28px;
    max-width: 100%;
  }

  .hero-preview {
    order: 2;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px 20px;
  }

  .hero-preview-label {
    margin: 0 0 10px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
  }

  .hero-report-stack {
    width: 210px;
    height: 195px;
  }

  .hero-report-card {
    width: 112px;
  }

  .hero-report-card.card-mid {
    left: 49px;
  }

  .hero-report-card.card-front {
    left: 98px;
  }

  .hero-visual {
    order: 1;
    min-height: 300px;
  }

  .hero-photo-overlay {
    background:
      linear-gradient(180deg, rgba(10,10,10,0.15) 0%, transparent 40%, rgba(10,10,10,0.45) 100%);
  }
}

@media (max-width: 768px) {
  .hero-visual {
    min-height: 260px;
  }

  .hero-report-stack {
    width: 200px;
    height: 180px;
  }

  .hero-report-card {
    width: 104px;
  }

  .hero-report-card.card-back {
    top: 24px;
  }

  .hero-report-card.card-mid {
    top: 0;
    left: 48px;
  }

  .hero-report-card.card-front {
    top: 24px;
    left: 96px;
  }

  .hero-season-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .hero-cta-btn {
    width: 100%;
    justify-content: center;
    min-height: 50px;
  }
}

/* ===== LAYOUT ===== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 4vw, 40px) 48px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.workbench, .side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

.sticky-panel {
  position: sticky;
  top: 76px;
}

/* ===== PROCESS STRIP ===== */
.process-strip {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.process-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--muted);
  transition: all 0.25s ease;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.25s;
}

.step-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.step-text small {
  font-size: 11px;
  color: var(--muted-light);
}

.process-connector {
  width: 24px;
  height: 2px;
  background: var(--line);
  flex-shrink: 0;
}

.process-step.active {
  color: var(--gold-dark);
  background: var(--gold-bg);
}

.process-step.active .step-dot {
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(184, 149, 107, 0.4);
}

.process-step.done {
  color: var(--success);
}

.process-step.done .step-dot {
  background: var(--success);
  color: white;
}

.process-step.done + .process-connector {
  background: var(--success);
  opacity: 0.4;
}

/* ===== PANEL ===== */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  min-width: 0;
}

.panel-elevated {
  transition: box-shadow 0.25s;
}

.panel-elevated:hover {
  box-shadow: var(--shadow-md);
}

.section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.section-head-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  border-radius: var(--radius-md);
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
}

.section-head h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.section-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.65;
}

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

.report-section-intro {
  flex: 1;
  min-width: 0;
}

.report-section-intro h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}

.report-section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.selected-report-badge {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  font-size: 13px;
  color: var(--text-soft);
  white-space: nowrap;
}

.selected-report-badge strong {
  color: var(--gold-dark);
  font-weight: 700;
}

/* ===== UPLOAD ===== */
.upload-panel {
  overflow: hidden;
}

.upload-section-head {
  margin-bottom: 16px;
}

.upload-section-intro h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.upload-section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.upload-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
  border: 1.5px dashed rgba(196, 149, 106, 0.38);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 90% 70% at 50% 20%, rgba(196, 149, 106, 0.1), transparent 65%),
    linear-gradient(165deg, #faf7f2 0%, #f4ebe0 50%, #efe5d8 100%);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.upload-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('./assets/mood/upload-mood.jpg') center/cover no-repeat;
  opacity: 0.22;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
}

.upload-box::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: calc(var(--radius-xl) - 10px);
  border: 1px dashed rgba(196, 149, 106, 0.2);
  z-index: 0;
  pointer-events: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.upload-aura {
  display: none;
}

.upload-box:hover,
.upload-box.drag-over {
  border-color: var(--brand-gold);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(196, 149, 106, 0.14);
}

.upload-box:hover::after,
.upload-box.drag-over::after {
  border-color: rgba(196, 149, 106, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.upload-box.drag-over {
  border-style: solid;
  background: linear-gradient(165deg, #f8f2ea 0%, #f0e6d8 100%);
}

.upload-box.drag-over::before {
  opacity: 0.28;
}

.upload-box.has-photo {
  border-style: solid;
  border-color: rgba(196, 149, 106, 0.32);
  background: var(--panel-warm);
  min-height: 0;
  padding: 0;
  display: block;
}

.upload-box.has-photo::before,
.upload-box.has-photo::after {
  display: none;
}

.upload-box.has-photo .upload-placeholder {
  display: none !important;
}

.upload-box.is-uploading {
  border-color: var(--info);
}

.upload-box.is-ready {
  border-color: rgba(26, 122, 72, 0.45);
  box-shadow: 0 8px 28px rgba(26, 122, 72, 0.1);
}

.upload-box input { display: none; }

.upload-placeholder {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 36px 28px;
  max-width: 320px;
}

.upload-icon-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dark);
  box-shadow: 0 6px 20px rgba(196, 149, 106, 0.16);
}

.upload-icon-ring {
  display: none;
}

.upload-placeholder b {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

.upload-placeholder small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.upload-preview-img {
  display: none;
  width: 100%;
  height: auto;
  max-height: min(68vh, 520px);
  object-fit: contain;
  object-position: center center;
  background: var(--panel-warm);
  border-radius: calc(var(--radius-xl) - 2px);
}

.upload-box.has-photo .upload-preview-img {
  display: block;
  max-height: min(72vh, 560px);
}

.upload-change-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.72);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.upload-box.has-photo:hover .upload-change-hint {
  opacity: 1;
}

.upload-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.upload-footer .status-line { margin: 0; }

.upload-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel-warm);
  border: 1px solid var(--line);
  font-size: 13px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.upload-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-light);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.upload-status.is-uploading::before {
  background: var(--info);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.15);
  animation: statusPulse 1.2s ease-in-out infinite;
}

.upload-status.is-ready::before {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.15);
}

.upload-status.is-ready {
  background: rgba(21, 128, 61, 0.08);
  border-color: rgba(21, 128, 61, 0.2);
  color: var(--success);
}

.upload-status.is-error::before {
  background: var(--danger);
}

.upload-status.is-error {
  background: rgba(185, 28, 28, 0.06);
  border-color: rgba(185, 28, 28, 0.2);
  color: var(--danger);
}

@keyframes uploadBreathe {
  0%, 100% {
    border-color: rgba(184, 149, 107, 0.32);
    box-shadow: 0 4px 20px rgba(184, 149, 107, 0.06);
  }
  50% {
    border-color: rgba(184, 149, 107, 0.62);
    box-shadow: 0 8px 32px rgba(184, 149, 107, 0.14);
  }
}

@keyframes auraPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.35; }
  50% { transform: scale(1.03); opacity: 0.65; }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 0.15; }
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .upload-box,
  .upload-aura,
  .upload-icon-wrap,
  .upload-icon-ring,
  .upload-status.is-uploading::before,
  .hero-photo,
  .hero-content,
  .hero-preview,
  .process-strip,
  .upload-panel,
  .report-sample-card::after,
  .panel-elevated {
    animation: none;
  }

  .hero-cta-btn:hover,
  .panel-elevated:hover,
  .hero-section:hover .hero-report-card {
    transform: none;
  }
}

/* ===== REPORT SAMPLES ===== */
.report-samples {
  margin-bottom: 16px;
  position: relative;
}

.report-samples-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.report-sample-card {
  display: block;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.report-sample-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.report-sample-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow-glow);
}

.sample-img-wrap {
  position: relative;
  width: 100%;
  border-radius: calc(var(--radius-md) - 2px);
  overflow: hidden;
  background: #ebe4da;
}

.sample-img-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.sample-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 10px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(20, 18, 16, 0.78) 100%);
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.sample-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.sample-caption small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.sample-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.report-sample-card.active .sample-check {
  opacity: 1;
  transform: scale(1);
}

/* 报告卡：底部季节色标条 */
.report-sample-card {
  position: relative;
  overflow: hidden;
}

.report-sample-card.active {
  box-shadow: 0 0 0 2px var(--brand-gold),
              0 8px 32px rgba(196,149,106,0.3);
}

.report-sample-card[data-type="color"]::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c4956a, #8a6040, #5a7a40, #a87828);
}

.report-sample-card[data-type="comprehensive"]::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e0e8f8, #a0b4dc, #5060a0, #c01830);
}

.report-sample-card[data-type="facial"]::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #94bfe8, #b8a8d8, #e0a8c0, #7890b8);
}

.report-sample-card[data-type="style"]::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f5b08a, #e8c090, #f0d070, #e09060);
}

.report-sample-card[data-type="hair"]::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #94bfe8, #c8a8c0, #b0a8d0, #8890c8);
}

.samples-scroll-hint {
  display: none;
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.report-samples-fade {
  display: none;
}

.selected-report-line {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  font-size: 14px;
  color: var(--text-soft);
  text-align: center;
}

.selected-report-line strong {
  color: var(--gold-dark);
  font-weight: 700;
}

/* ===== SUBMIT ===== */
.submit-panel {
  background: linear-gradient(145deg, var(--dark) 0%, var(--dark-warm) 100%);
  border: none;
  box-shadow: var(--shadow-lg);
}

.submit-panel .status-line { color: rgba(255, 255, 255, 0.55); margin-top: 12px; }

.primary-btn {
  width: 100%;
  background: linear-gradient(145deg, var(--gold-light), var(--gold-dark));
  color: white;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-md);
  min-height: 52px;
  box-shadow: var(--shadow-glow);
  letter-spacing: 0.03em;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(184, 149, 107, 0.4);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}

.empty-state.compact { padding: 24px 12px; }

.empty-state .empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0 0 4px;
  font-size: 14px;
}

.empty-state strong { color: var(--text-soft); }

.empty-state small {
  font-size: 12px;
  color: var(--muted-light);
  line-height: 1.6;
}

/* ===== STATUS PILL ===== */
.status-pill.online {
  background: rgba(21, 128, 61, 0.12);
  color: var(--success);
}

.status-pill.dev {
  background: rgba(194, 65, 12, 0.12);
  color: var(--warning);
}

/* ===== FOOTER ===== */
.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 40px) 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  gap: 16px;
}

.site-footer nav a {
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s;
}

.site-footer nav a:hover { color: var(--gold-dark); }

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-email-section input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel-warm);
  font-size: 14px;
}

.modal-email-section input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--panel);
}

@media (max-width: 768px) {
  .topbar {
    height: 56px;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top);
  }

  .nav-toggle { display: flex; }

  .topnav {
    display: none;
    position: fixed;
    top: calc(56px + env(safe-area-inset-top));
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 110;
  }

  .topnav.open { display: flex; }

  .topnav a {
    padding: 14px 16px;
    min-height: 44px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
  }

  .brand-block {
    min-width: 0;
    flex: 1;
  }

  .brand-link {
    min-width: 0;
  }

  .brand-info {
    min-width: 0;
  }

  .brand-info h1 {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .eyebrow {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-logo-mark { width: 34px; height: 34px; font-size: 15px; flex-shrink: 0; }

  .hero-title {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 12px;
  }

  .hero-sub {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .hero-features {
    gap: 10px 14px;
    margin-bottom: 14px;
  }

  .hero-season-strip {
    gap: 6px;
    margin-bottom: 16px;
  }

  .layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px 24px;
    gap: 12px;
    overflow-x: hidden;
  }

  .workbench {
    gap: 12px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
    width: 100%;
  }

  .side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }

  .side-panel-heading {
    padding: 14px 16px;
    flex-direction: row;
    align-items: center;
  }

  .side-panel-heading h2 {
    font-size: 18px;
  }

  .side-panel-body {
    padding: 14px 16px 16px;
  }

  .side-panel-body.empty-state {
    padding: 20px 14px;
  }

  .order-card {
    gap: 12px;
  }

  .order-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .order-actions .secondary-btn,
  .order-actions .danger-btn {
    width: 100%;
  }

  .report-item {
    padding: 12px;
  }

  .report-head .status-badge {
    font-size: 11px;
    min-height: 22px;
    padding: 0 8px;
  }

  .gen-log-body {
    max-height: 140px;
    font-size: 12px;
  }

  .history-item-row {
    flex-direction: column;
    gap: 6px;
  }

  .history-item-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .history-item-top em {
    align-self: flex-start;
  }

  .history-delete-btn {
    width: 100%;
    min-height: 44px;
    align-self: stretch;
  }

  .sticky-panel { position: static; }

  .process-strip {
    flex-direction: row;
    gap: 4px;
    padding: 6px;
  }

  .process-connector { display: none; }

  .process-step {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    min-height: auto;
    padding: 10px 6px;
  }

  .step-dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .step-text strong { font-size: 12px; }
  .step-text small { display: none; }

  .panel { padding: 14px; }

  .upload-panel {
    padding: 14px;
    overflow: hidden;
  }

  #reportSection.panel {
    padding: 14px 0 0;
    overflow: hidden;
  }

  .report-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0 14px;
  }

  .report-section-intro h2 {
    font-size: 17px;
  }

  .selected-report-badge {
    align-self: flex-start;
    padding: 6px 12px;
    font-size: 12px;
  }

  .upload-box {
    min-height: 180px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 100%;
  }

  .upload-box.has-photo {
    min-height: 0;
  }

  .upload-box:hover,
  .upload-box.drag-over {
    transform: none;
  }

  .upload-placeholder {
    padding: 20px 12px;
    gap: 10px;
  }

  .upload-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .upload-box img,
  .upload-preview-img,
  .upload-box.has-photo img {
    max-height: min(55vh, 400px);
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .upload-change-hint {
    opacity: 1;
    bottom: 10px;
    font-size: 11px;
    padding: 6px 12px;
  }

  .upload-section-intro h2 {
    font-size: 17px;
  }

  .process-strip {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .section-head {
    gap: 12px;
    margin-bottom: 16px;
  }

  .section-head-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .section-head h2 { font-size: 18px; }

  .samples-scroll-hint,
  .report-samples-fade {
    display: none !important;
  }

  .report-samples {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .report-samples-track {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
    padding: 0 14px 14px;
    width: 100%;
    max-width: 100%;
  }

  .report-sample-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .report-sample-card:hover {
    transform: none;
    box-shadow: none;
  }

  .sample-img-wrap img {
    max-height: none;
    object-fit: contain;
  }

  .report-sample-card.active {
    box-shadow: 0 0 0 1px var(--gold), var(--shadow-md);
  }

  .test-access-notice {
    margin: 0 16px 16px;
  }

  .submit-panel.mobile-cta-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
  }

  .submit-panel .status-line {
    margin-top: 8px;
    font-size: 12px;
    text-align: center;
  }

  .primary-btn {
    min-height: 48px;
    font-size: 15px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-box {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 92vh;
    animation: modalSlideUp 0.28s ease;
  }

  .modal-box-wide { max-height: 92vh; }

  .modal-header h3 { font-size: 18px; }

  .modal-check-item {
    padding: 12px;
    min-height: 44px;
  }

  .modal-form-grid { grid-template-columns: 1fr; }

  .modal-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .modal-cancel,
  .modal-confirm {
    min-height: 48px;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  }

  .site-footer nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
  }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== NOTICE ===== */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #ead2ae;
  border-radius: var(--radius-md);
  background: #fff8ed;
  color: #6f4b13;
  line-height: 1.6;
  font-size: 14px;
}

.notice-ok {
  border-color: rgba(39,174,96,0.3);
  background: rgba(39,174,96,0.06);
  color: #1a5c38;
}

/* ===== NOTICE ===== */
.notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
}

.test-access-notice strong {
  display: block;
  font-size: 13px;
  color: var(--gold-dark);
  margin-bottom: 4px;
}

.test-access-notice p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.test-access-notice.warn {
  background: rgba(230, 126, 34, 0.08);
  border-color: rgba(230, 126, 34, 0.25);
}

.test-access-notice.warn strong {
  color: var(--warning);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.panel-heading h2 {
  margin: 0;
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  font-weight: 700;
}

.side-panel {
  padding: 0;
  overflow: hidden;
}

.side-panel-heading {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-warm) 0%, var(--panel) 100%);
}

.side-panel-body {
  padding: 16px 18px 18px;
  min-width: 0;
}

.side-panel-body.empty-state {
  padding: 32px 18px;
}

.side-panel-body .empty-state.compact {
  padding: 24px 12px;
}

.side-panel-body.history-list {
  display: grid;
  gap: 10px;
}

/* ===== BUTTONS ===== */
button {
  border: 0;
  border-radius: var(--radius-sm);
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.secondary-btn {
  background: #f0ebe3;
  color: var(--text);
}

.danger-btn { background: #fee4e2; color: var(--danger); }

.icon-btn {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel-warm);
  color: var(--text);
  border-radius: var(--radius-sm);
}

/* ===== PILL / BADGE ===== */
.pill, .status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--gold-bg);
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
}

/* ===== STATUS ===== */
.status-line, .empty p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 0;
}

.empty {
  text-align: center;
  padding: 24px 0 16px;
  color: var(--muted);
}

.empty-icon { font-size: 28px; margin-bottom: 8px; }

/* ===== STATUS BADGES ===== */
.status-badge.waiting { background: #fff6df; color: var(--warning); }
.status-badge.running { background: #e8f1ff; color: var(--info); }
.status-badge.success { background: rgba(39,174,96,0.1); color: var(--success); }
.status-badge.danger  { background: #fee4e2; color: var(--danger); }
.status-badge.muted   { background: #eef0f2; color: var(--muted); }

/* ===== ORDER / REPORT CARDS ===== */
.order-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.order-meta {
  min-width: 0;
}

.order-id {
  display: block;
  font-size: 15px;
  line-height: 1.4;
  word-break: break-all;
}

.order-status-line {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.order-card p { margin-bottom: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }

.order-progress {
  margin-top: 2px;
}

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

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e8e0d5;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transition: width 0.3s;
}

.progress-sm { height: 4px; margin-top: 8px; }

.report-grid { display: grid; gap: 12px; }

.report-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--panel-warm);
}

.report-item[data-season="autumn"] {
  border-top: 3px solid var(--autumn-primary);
  background: linear-gradient(180deg, rgba(196,149,106,0.06) 0%, var(--panel-warm) 100%);
}

.report-item[data-season="spring"] {
  border-top: 3px solid var(--spring-primary);
  background: linear-gradient(180deg, rgba(245,176,138,0.06) 0%, var(--panel-warm) 100%);
}

.report-item[data-season="summer"] {
  border-top: 3px solid var(--summer-primary);
  background: linear-gradient(180deg, rgba(148,191,232,0.06) 0%, var(--panel-warm) 100%);
}

.report-item[data-season="winter"] {
  border-top: 3px solid var(--winter-primary);
  background: linear-gradient(180deg, rgba(160,180,220,0.06) 0%, var(--panel-warm) 100%);
}

.report-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.report-head strong {
  font-size: 14px;
  line-height: 1.4;
}

.report-item img {
  width: 100%;
  display: block;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: white;
}

.report-error { margin: 8px 0 0; color: var(--danger); font-size: 13px; }
.report-warn  { margin: 8px 0 0; color: var(--warning); font-size: 13px; }

/* ===== HISTORY ITEMS ===== */
.history-item-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.history-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-warm);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.history-item:hover {
  border-color: var(--gold-border);
}

.history-item:active {
  box-shadow: var(--shadow-sm);
}

.history-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.history-item-top strong {
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
}

.history-item-top em {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-bg);
  color: var(--gold-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.history-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.history-item-meta small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.history-item-price {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.history-delete-btn {
  flex-shrink: 0;
  align-self: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  background: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: var(--radius-md);
}

.history-delete-btn:hover {
  background: #fee4e2;
  border-color: rgba(192, 57, 43, 0.35);
}

/* ===== GEN LOG ===== */
.gen-log {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-warm);
  overflow: hidden;
}

.gen-log-title {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  background: var(--panel-warm);
}

.gen-log-body {
  max-height: 180px;
  overflow: auto;
  padding: 8px 0;
}

.log-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 14px;
  font-size: 12px;
  line-height: 1.5;
}

.log-line time { color: var(--muted); }
.log-line.log-success span { color: var(--success); }
.log-line.log-error span   { color: var(--danger); }
.log-line.log-warn span    { color: var(--warning); }

/* ===== ACTIONS ===== */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-box {
  background: var(--panel);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-box-wide {
  max-width: 560px;
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}

.modal-body-scroll {
  flex: 1;
  overflow-y: auto;
  margin: 0 -8px;
  padding: 0 8px 4px;
  scrollbar-width: thin;
}

.modal-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.modal-flow-section {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-warm);
}

.modal-flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-flow-steps > li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.modal-flow-steps > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.flow-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-bg-strong);
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.flow-step-abroad .flow-step-num {
  background: rgba(230, 126, 34, 0.15);
  color: var(--warning);
}

.flow-step-body {
  flex: 1;
  min-width: 0;
}

.flow-step-body strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.flow-step-body p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.flow-step-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--warn, #b45309);
  line-height: 1.45;
}

.modal-callout {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 13px;
  line-height: 1.5;
}

.modal-callout p { margin: 4px 0; }
.modal-callout a { color: var(--accent, #6366f1); }

.modal-cross-border-section {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.modal-cross-border-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
}

.modal-cross-border-list li { margin-bottom: 6px; }

.legal-steps-compact {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.legal-steps-compact li { margin-bottom: 4px; }

.flow-step-abroad .flow-step-body strong {
  color: var(--warning);
}

.modal-forbidden-section {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: var(--radius-md);
  background: rgba(192, 57, 43, 0.04);
}

.modal-forbidden-list {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.7;
}

.modal-forbidden-list li {
  margin-bottom: 4px;
}

.modal-forbidden-note {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-forbidden-note a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-consent-check {
  margin: 16px 0 0;
  flex-shrink: 0;
}

.required-badge {
  padding: 1px 8px;
  background: rgba(192, 57, 43, 0.1);
  border-radius: 20px;
  font-size: 11px;
  color: var(--danger);
  font-weight: 600;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header { text-align: center; margin-bottom: 16px; flex-shrink: 0; }

.modal-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gold-bg-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}

.modal-header h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.modal-checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.modal-check-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--panel-warm);
  transition: border-color 0.2s, background 0.2s;
  font-weight: 400;
}

.modal-check-item:has(input:checked) {
  border-color: var(--gold-border);
  background: var(--gold-bg);
}

.modal-check-item input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--gold);
}

.modal-check-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.modal-check-text a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-decoration-color: var(--gold-border);
  text-underline-offset: 2px;
}

.modal-email-section { margin-bottom: 20px; }

.modal-email-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.optional-badge {
  padding: 1px 8px;
  background: var(--line);
  border-radius: 20px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.modal-email-section input[type="email"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel-warm);
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.2s;
}

.modal-email-section input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--panel);
}

.modal-email-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 16px;
}

.modal-cancel {
  background: var(--panel-warm);
  color: var(--muted);
  border: 1px solid var(--line);
  min-height: 48px;
}

.modal-confirm {
  min-height: 48px;
}

.modal-status { text-align: center; margin-top: 8px; }

/* ===== EXPIRY / DOWNLOAD ===== */
.expiry-banner {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--gold-bg);
  color: var(--gold-dark);
}

.expiry-banner.danger {
  background: rgba(192, 57, 43, 0.08);
  color: var(--danger);
}

.expiry-hint {
  display: block;
  color: var(--warning);
}

.report-download-btn {
  margin-top: 8px;
  width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 20px 24px 40px;
  }

  .side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .layout {
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 20px; }

  .report-sample-card {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
}

/* ===== LEGAL PAGES ===== */
.legal-body .topbar {
  align-items: flex-start;
  height: auto;
  padding: 24px 40px;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 14px;
}

.legal-nav a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 42px 48px;
}

.legal-doc {
  padding: 28px 32px;
  line-height: 1.75;
}

.legal-doc h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 20px;
}

.legal-doc h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 16px;
}

.legal-doc p,
.legal-doc li {
  color: #444;
}

.legal-lead {
  font-size: 16px;
  color: var(--text);
}

.legal-callout {
  padding: 16px 18px;
  margin-bottom: 20px;
  border-left: 4px solid var(--gold);
  background: var(--gold-bg);
  border-radius: var(--radius-md);
}

.legal-callout-warn {
  border-left-color: var(--warning);
  background: #fff8eb;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 14px;
}

.legal-table th,
.legal-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--panel-warm);
}

.legal-steps {
  padding-left: 22px;
}

.legal-steps li {
  margin-bottom: 10px;
}

blockquote,
.legal-consent-quote {
  margin: 14px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--line-strong);
  background: var(--panel-warm);
  color: #444;
}

@media (max-width: 640px) {
  .legal-main {
    padding: 18px;
  }

  .legal-doc {
    padding: 18px;
  }

  .legal-table {
    display: block;
    overflow-x: auto;
  }
}

/* ===== ADMIN DASHBOARD ===== */
.admin-body {
  background: linear-gradient(180deg, #f3efe8 0%, var(--bg) 220px);
}

.admin-topbar nav a.active {
  color: #f5e8d0;
  background: rgba(255, 255, 255, 0.08);
}

.admin-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--dark-warm), var(--dark));
  color: #f5f0e8;
  border: none;
}

.admin-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.admin-hero h2 {
  margin: 0 0 8px;
  font-family: 'Noto Serif SC', serif;
  font-size: 28px;
  color: #fff;
}

.admin-summary {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.admin-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.admin-refresh-btn {
  min-width: 120px;
}

.admin-auto-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.admin-stat-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.admin-stat-card.gold { border-top: 3px solid var(--gold); }
.admin-stat-card.info { border-top: 3px solid var(--info); }
.admin-stat-card.success { border-top: 3px solid var(--success); }
.admin-stat-card.danger { border-top: 3px solid var(--danger); }

.admin-stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.admin-stat-value {
  font-size: 32px;
  line-height: 1;
  font-family: 'Noto Serif SC', serif;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.admin-panel .panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-panel .panel-heading h2 {
  margin: 0;
  font-size: 18px;
}

.muted-pill {
  background: var(--panel-warm);
  color: var(--muted);
}

.warning-pill {
  background: #fff6df;
  color: var(--warning);
}

.success-pill {
  background: #e8f8ef;
  color: var(--success);
}

.admin-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.admin-service-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-warm);
}

.admin-service-card.status-ready { border-left: 3px solid var(--success); }
.admin-service-card.status-mock { border-left: 3px solid var(--warning); }
.admin-service-card.status-pending,
.admin-service-card.status-disabled { border-left: 3px solid var(--muted-light); }

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

.admin-service-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-service-card code {
  font-size: 11px;
  color: var(--gold-dark);
  background: var(--gold-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-kv {
  margin: 0;
}

.admin-kv-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

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

.admin-kv-row dt {
  color: var(--muted);
  font-weight: 500;
}

.admin-kv-row dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-warm);
  font-weight: 600;
}

.admin-table tr:hover td {
  background: rgba(201, 169, 110, 0.04);
}

.admin-table tr.row-muted td {
  opacity: 0.55;
}

.admin-empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px !important;
}

.danger-text { color: var(--danger); }

.order-id {
  font-size: 11px;
  background: var(--panel-warm);
  padding: 2px 6px;
  border-radius: 4px;
}

.report-cell {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}

.admin-api-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.admin-api-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-warm);
  transition: border-color 0.2s, transform 0.2s;
}

.admin-api-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-1px);
}

.admin-api-card strong {
  font-size: 14px;
}

.admin-api-card span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.admin-api-card code {
  font-size: 11px;
  color: var(--gold-dark);
}

@media (max-width: 1024px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-api-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .admin-layout { padding: 16px 16px 40px; }
  .admin-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px;
  }
  .admin-hero-actions {
    width: 100%;
    align-items: stretch;
  }
  .admin-services { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-api-links { grid-template-columns: 1fr; }
  .admin-kv-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ===== ENTRANCE ANIMATIONS ===== */

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

@keyframes expandWidth {
  from { width: 0; opacity: 0; }
  to   { width: 100%; opacity: 1; }
}

@keyframes kenBurns {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

.hero-photo {
  animation: kenBurns 8s ease-out forwards;
}

.hero-content {
  animation: fadeUp 0.7s ease 0.1s both;
}

.hero-preview {
  animation: fadeUp 0.6s ease 0.35s both;
}

.process-strip {
  animation: fadeUp 0.5s ease 0.2s both;
}

.upload-panel {
  animation: fadeUp 0.5s ease 0.3s both;
}

.report-sample-card::after {
  animation: expandWidth 0.4s ease 0.1s both;
}

.panel-elevated {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.panel-elevated:hover {
  box-shadow: 0 12px 40px rgba(28,25,23,0.1);
  transform: translateY(-2px);
}
