:root {
  --stage-navy: #04132e;
  --stage-navy-2: #08234f;
  --stage-gold: #d8b663;
  --stage-gold-soft: #f3d991;
  --stage-ink: #071633;
  --stage-muted: #52627c;
  --stage-surface: rgba(255, 255, 255, 0.92);
  --stage-line: rgba(7, 22, 51, 0.12);
  --stage-shadow: 0 18px 48px rgba(7, 22, 51, 0.12);
  --stage-sidebar: 232px;
  --stage-launcher: 276px;
}

body { background: #edf3f7; }

#app {
  grid-template-columns: var(--stage-sidebar) minmax(0, 1fr);
  background: #f7f8fa;
}

#app.chat-state {
  grid-template-columns: var(--stage-sidebar) minmax(0, 1fr) var(--stage-launcher);
}

#sidebar {
  padding: 28px 14px 16px;
  background: var(--stage-navy);
  border-right: 1px solid rgba(243, 217, 145, 0.2);
}

#sidebar::after { display: none; }
#sidebar .logo { font-size: 24px; }
#sidebar .logo-sub { margin-top: 7px; color: rgba(248, 240, 220, 0.58); }
#sidebar .product-name {
  margin-top: 28px;
  padding: 14px 13px;
  border: 1px solid rgba(243, 217, 145, 0.16);
  border-radius: 10px;
  color: var(--stage-gold-soft);
  background: rgba(255, 255, 255, 0.035);
}
#sidebar .product-sub { margin: 8px 0 15px; }
#brand-list { display: none; }

.side-nav { display: grid; gap: 5px; }
.nav-btn {
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 9px;
  color: rgba(248, 240, 220, 0.76);
}
.nav-btn:hover,
.nav-btn.active {
  color: #fff;
  border-color: rgba(243, 217, 145, 0.2);
  background: #183665;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.assistant-card {
  min-height: 142px;
  margin-bottom: 14px;
  padding: 17px 13px;
  border-radius: 10px;
  border: 1px solid rgba(243, 217, 145, 0.28);
  background: #0b2147;
  box-shadow: inset 0 -38px 55px rgba(216, 182, 99, 0.08);
}
.assistant-card h3 { font-size: 16px; max-width: 150px; }
.assistant-card p { max-width: 146px; }
.assistant-card .g-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--stage-gold-soft);
  border-color: rgba(243, 217, 145, 0.5);
  background: #112955;
}

.lang-row { padding-bottom: 11px; }
.lang-row select { min-height: 38px; border-radius: 8px; }
.side-foot { min-height: 44px; }
.copyright { margin-top: 8px; }

#center {
  position: relative;
  overflow: hidden;
  background: #f5f8fb;
}
#center::before { display: none; }

#topbar {
  min-height: 76px;
  padding: 13px 24px;
  color: #fff;
  background: var(--stage-navy);
  border-bottom: 1px solid rgba(243, 217, 145, 0.24);
  box-shadow: 0 8px 24px rgba(7, 22, 51, 0.16);
}
#topbar .trust,
#demo-badge,
#context-label,
#reset-btn,
#lang-top {
  min-height: 38px;
  border-radius: 9px;
}
#topbar .trust {
  margin-left: auto;
  padding: 8px 13px;
  border: 1px solid rgba(243, 217, 145, 0.2);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.035);
}
#demo-badge {
  padding: 9px 13px;
  color: var(--cream);
  border: 1px solid rgba(243, 217, 145, 0.2);
  background: rgba(255, 255, 255, 0.035);
}
#context-label {
  margin-left: 0;
  padding: 9px 13px;
  color: rgba(248, 240, 220, 0.8);
  border-color: rgba(243, 217, 145, 0.2);
  background: rgba(255, 255, 255, 0.035);
}
#context-label b { color: var(--stage-gold-soft); }
#reset-btn { margin-left: auto; }
#lang-top {
  display: block;
  max-width: 126px;
  color: var(--cream);
  border-color: rgba(243, 217, 145, 0.25);
  background: rgba(255, 255, 255, 0.05);
}
#partner-chip { display: none; }
#home-btn { margin-right: 0; }

#intro,
#scroll,
#suggestions,
#chat-form,
.disclaimer { position: relative; z-index: 2; }
#intro { padding: 0; max-height: none; }
#app:not(.chat-state) #intro { flex: 1; min-height: 0; overflow-y: auto; }
#app:not(.chat-state) #mobile-brands,
#app:not(.chat-state) #suggestions,
#app:not(.chat-state) #mobile-launcher { display: none !important; }

.hero {
  position: relative;
  min-height: calc(100dvh - 76px);
  margin: 0;
  padding: 30px 28px 24px;
  border: 0;
  border-radius: 0;
  background: #fbfaf7 url("/assets/stage-background.webp") center bottom / cover no-repeat;
  box-shadow: none;
}
.hero::before,
.hero::after { display: none; }
.hero-head {
  position: relative;
  z-index: 4;
  max-width: 760px;
  margin: 0 auto 12px;
  text-align: center;
}
.hero-kicker {
  margin-bottom: 7px;
  color: #9a7626;
  font-size: 12px;
  font-weight: 700;
}
.hero h1 {
  margin: 0;
  color: var(--stage-ink);
  font-size: clamp(48px, 5.2vw, 72px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}
.hero .h-ask { margin-top: 12px; color: #9a7626; font-size: 22px; font-weight: 500; }
.hero .h-helper { max-width: 590px; margin: 7px auto 0; color: #293b58; font-size: 13px; line-height: 1.5; }
.start-ask {
  margin-top: 14px;
  padding: 13px 40px;
  border: 1px solid rgba(216, 182, 99, 0.7);
  border-radius: 999px;
  color: #fff;
  background: #08255a;
  box-shadow: 0 12px 28px rgba(6, 27, 67, 0.2);
  font-size: 16px;
  font-weight: 800;
}

.brand-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 410px;
  overflow: hidden;
  border-top: 1px solid rgba(216, 182, 99, 0.18);
  border-bottom: 2px solid rgba(216, 182, 99, 0.68);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 42px rgba(7, 22, 51, 0.05);
}
.brand-panel {
  position: relative;
  min-width: 0;
  min-height: 410px;
  overflow: hidden;
  padding: 62px 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}
.brand-panel + .brand-panel { border-left: 1px solid rgba(255, 255, 255, 0.9); }
.brand-panel.lactoday { color: #087fca; background: rgba(225, 245, 255, 0.54); }
.brand-panel.betterday { color: #5e7a1a; background: rgba(255, 251, 220, 0.34); }
.brand-panel.heragen { color: #00949a; background: rgba(224, 251, 249, 0.48); }
.brand-art {
  position: absolute;
  z-index: 0;
  inset: 82px -20px -42px;
  width: calc(100% + 40px);
  height: calc(100% - 40px);
  display: block;
  pointer-events: none;
  transform-origin: 50% 80%;
}
.brand-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
}
/* Motion V2 叠层（合约 MOTION-V2-IMPLEMENTATION.md）：透明动效层，介于底图(z:0)与文案(z:2)之间。
   默认隐藏——仅桌面 961px+ 开启（下方 @media min-width:961px），≤960/chat 态/减动偏好一律不显示。
   .brand-motion=静止裁剪层；.brand-motion-wrap=唯一被 transform+opacity 动画的 wrapper。 */
.brand-motion { display: none; }
.brand-copy { position: relative; z-index: 2; min-height: 104px; }
.brand-name {
  color: currentColor;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 18px rgba(255, 255, 255, 0.9);
}
.brand-kr {
  margin-top: 6px;
  color: currentColor;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 14px rgba(255, 255, 255, 0.88);
}
.brand-desc-stage {
  max-width: 250px;
  margin-top: 12px;
  color: #173253;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 16px rgba(255, 255, 255, 0.9);
}
.stage-cta {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  min-width: 210px;
  margin: 0;
  padding: 11px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: currentColor;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 9px 24px rgba(7, 22, 51, 0.12);
  font-size: 13px;
  font-weight: 800;
}
.stage-cta:hover { transform: translate(-50%, -2px); }
.stage-cta svg { width: 16px; height: 16px; flex: none; }

.home-modules {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.home-module {
  min-height: 112px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--stage-ink);
  border: 1px solid var(--stage-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(7, 22, 51, 0.08);
}
.home-module:hover { transform: translateY(-2px); border-color: rgba(216, 182, 99, 0.66); }
.home-module .hm-icon {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}
.home-module h4 { margin-bottom: 4px; font-size: 13px; }
.home-module p { color: var(--stage-muted); font-size: 10.8px; line-height: 1.4; }

#app.chat-state #center { background: #f7f9fb; }
#app.chat-state #center::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 76px 0 0;
  pointer-events: none;
  background: url("/assets/stage-background.webp") center / cover no-repeat;
  opacity: 0.28;
}
#app.chat-state #center::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 76px 0 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: left 60%;
  background-size: 36% auto;
  opacity: 0.1;
}
#app.chat-state[data-brand="lactoday"] #center::after { background-image: url("/assets/brand-lactoday.webp"); }
#app.chat-state[data-brand="betterday"] #center::after { background-image: url("/assets/brand-betterday.webp"); }
#app.chat-state[data-brand="heragen"] #center::after { background-image: url("/assets/brand-heragen.webp"); }

#app.chat-state #mobile-brands {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 13px 24px 0;
  overflow: visible;
}
#app.chat-state #mobile-brands button {
  min-width: 0;
  padding: 10px 12px;
  text-align: center;
  color: #243754;
  border: 1px solid var(--stage-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 20px rgba(7, 22, 51, 0.06);
}
#app.chat-state #mobile-brands button.active {
  color: var(--accent);
  border-color: var(--accent);
  background: #fff;
  box-shadow: inset 0 -3px 0 var(--accent), 0 7px 20px rgba(7, 22, 51, 0.07);
}

#app.chat-state #intro { padding: 13px 24px 0; }
.chat-hero { max-width: 650px; margin: 0 auto 12px; text-align: center; }
.chat-hero h1 { color: var(--stage-ink); font-size: 32px; letter-spacing: 0; }
.chat-hero p { margin-top: 5px; color: #966f20; font-size: 14px; }
.ctx-card,
.brand-intro {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(7, 22, 51, 0.1);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(7, 22, 51, 0.08);
}
.ctx-card { padding: 10px 13px; }
.brand-intro { padding: 17px 20px; }
.ctx-hide { margin-right: max(0px, calc((100% - 900px) / 2)); }

#scroll { padding: 15px 24px 8px; }
#messages { width: 100%; max-width: 900px; margin: 0 auto; }
.msg {
  max-width: 78%;
  border-radius: 15px;
  box-shadow: 0 9px 26px rgba(7, 22, 51, 0.08);
}
.msg.user { background: var(--accent); border-bottom-right-radius: 5px; }
.msg.bot { background: rgba(255, 255, 255, 0.96); border-color: rgba(7, 22, 51, 0.1); border-bottom-left-radius: 5px; }

#suggestions { width: 100%; max-width: 940px; margin: 0 auto; padding: 8px 20px; }
#suggestions button { background: rgba(255, 255, 255, 0.94); border-color: rgba(7, 22, 51, 0.12); }
#chat-form { width: 100%; max-width: 950px; margin: 0 auto; padding: 10px 24px 12px; }
#chat-form .field {
  min-height: 52px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(7, 22, 51, 0.1);
}
.send-btn { width: 52px; height: 52px; border-radius: 14px; background: var(--stage-navy-2); }
.disclaimer { padding-bottom: 9px; }

#launcher {
  display: none;
  padding: 18px 14px;
  overflow-y: auto;
  border-left: 1px solid rgba(7, 22, 51, 0.1);
  background: #fbfbfc;
}
#app.chat-state #launcher { display: block; }
#launcher h3 { color: #8a98ad; }
.focus-card,
.module {
  border: 1px solid rgba(7, 22, 51, 0.1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7, 22, 51, 0.06);
}
.focus-card {
  position: relative;
  min-height: 132px;
  margin-bottom: 12px;
  padding: 14px;
  overflow: hidden;
}
.focus-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 20px -24px -45px 42%;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
  opacity: 0.17;
}
#app[data-brand="lactoday"] .focus-card::after { background-image: url("/assets/brand-lactoday.webp"); }
#app[data-brand="betterday"] .focus-card::after { background-image: url("/assets/brand-betterday.webp"); }
#app[data-brand="heragen"] .focus-card::after { background-image: url("/assets/brand-heragen.webp"); }
.focus-card > * { position: relative; z-index: 1; }
.focus-card small { color: #8a98ad; }
.focus-card b { color: var(--accent); font-size: 18px; }
.focus-card p { max-width: 85%; color: var(--stage-muted); }
.module { margin-bottom: 10px; padding: 13px; }
.module .m-icon { border-radius: 50%; }
.module .m-cta { padding: 6px 11px; background: #f7f9fc; }
.help-card { border-radius: 11px; background: var(--stage-navy); }

/* Motion V2 关键帧（合约 §7/§8）：只动叠层 wrapper，绝不动底图。
   35s 一轮 = 前 15s 流动(0%→42.857%)、后 20s 真静止(42.857%→100%)。
   0% / 42.857% / 100% = 同一静止帧(opacity:0, translate 0) —— 无缝、无跳变。
   静止帧 opacity:0 → 激活期 0.35-0.75 之间(不满格) → 收尾先归 0 透明再滑回原位(位移在不可见时完成，无回弹感)。
   定向位移：LactoDay 横向 ~10%、BetterDay 斜向 ~8%、Heragen 右上 ~7%。 */
@keyframes lactoCurrent {
  0%      { opacity: 0;    transform: translate3d(0, 0, 0); }
  9%      { opacity: 0.55; transform: translate3d(2%, 0, 0); }
  21.43%  { opacity: 0.72; transform: translate3d(6%, 0, 0); }
  34%     { opacity: 0.45; transform: translate3d(9%, 0, 0); }
  38%     { opacity: 0;    transform: translate3d(10%, 0, 0); }
  42.857% { opacity: 0;    transform: translate3d(0, 0, 0); }
  100%    { opacity: 0;    transform: translate3d(0, 0, 0); }
}

/* BetterDay Motion V3(合约 BETTERDAY-MOTION-V3-IMPLEMENTATION.md):废除整条油带平移(V2的betterRibbon已删)。
   动效图几何锁死,只让羽化遮罩窗横扫——任何关键帧都不得出现位移。
   遮罩归位(38%→42.857%)发生在 opacity 已归 0 之后,循环边界无可见跳变。 */
@keyframes betterOilLightSweep {
  0% {
    opacity: 0;
    -webkit-mask-position: -90% 50%;
    mask-position: -90% 50%;
    transform: none;
  }
  5% {
    opacity: 0;
    -webkit-mask-position: -78% 50%;
    mask-position: -78% 50%;
    transform: none;
  }
  12% {
    opacity: 0.60;
    -webkit-mask-position: -30% 50%;
    mask-position: -30% 50%;
    transform: none;
  }
  21.43% {
    opacity: 0.90;
    -webkit-mask-position: 45% 50%;
    mask-position: 45% 50%;
    transform: none;
  }
  32% {
    opacity: 0.55;
    -webkit-mask-position: 132% 50%;
    mask-position: 132% 50%;
    transform: none;
  }
  38% {
    opacity: 0;
    -webkit-mask-position: 178% 50%;
    mask-position: 178% 50%;
    transform: none;
  }
  42.857%, 100% {
    opacity: 0;
    -webkit-mask-position: -90% 50%;
    mask-position: -90% 50%;
    transform: none;
  }
}

@keyframes heragenRise {
  0%      { opacity: 0;    transform: translate3d(0, 0, 0); }
  10%     { opacity: 0.5;  transform: translate3d(0.6%, -1.5%, 0); }
  21.43%  { opacity: 0.66; transform: translate3d(1.5%, -4%, 0); }
  34%     { opacity: 0.4;  transform: translate3d(2%, -5.5%, 0); }
  38%     { opacity: 0;    transform: translate3d(2.4%, -6.5%, 0); }
  42.857% { opacity: 0;    transform: translate3d(0, 0, 0); }
  100%    { opacity: 0;    transform: translate3d(0, 0, 0); }
}

@media (min-width: 961px) {
  #app:not(.chat-state) #intro { overflow: hidden; }
  /* P1 修复：Home 列弹性编排 —— 四张功能卡永远保底一屏内，
     品牌舞台作为唯一伸缩层吸收高度差（几何=底部裁切，任何屏高构图一致）。
     纯 flex 实现，不新增任何高度断点。 */
  #app:not(.chat-state) .hero {
    height: calc(100dvh - 76px);
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .hero-head { flex: 0 0 auto; }
  .brand-stage { flex: 1 1 auto; min-height: 220px; }
  /* 视觉回归修复(Codex定位)：index.html 旧版内联 CSS 有 .brand-stage{align-items:end}，
     P1 弹性化后会把三个 panel 钉在舞台底部留出大片空舞台 —— 桌面 Home 强制 stretch 铺满 */
  #app:not(.chat-state) .brand-stage { align-items: stretch; }
  .brand-panel { min-height: 0; }
  .home-modules { flex: 0 0 auto; margin-top: 14px; }
  .home-module { min-height: 96px; }
  /* FIX-PLAN v1.1 B/C：桌面统一几何 —— wide 图 cover + top 锚定，从 panel 顶完整铺入。
     顶部留白只有一个来源（图内烤好的安全区），CSS 端顶部偏移归零。
     高度差异只体现为底部裁切 —— 任何屏高构图一致。 */
  .brand-panel { padding: 36px 22px 20px; }
  .brand-art {
    inset: 0;
    width: 100%;
    height: 100%;
    transform-origin: 50% 0%;
  }
  .brand-art img { object-fit: cover; object-position: top center; }
  /* Motion V2：桌面开启叠层。裁剪层 inset:0 覆盖 panel、overflow:hidden 夹住漂移出界的粒子；
     z:1 介于底图(0)与文案(2)之间；几何(cover + object-position)镜像底图，确保动效与场景对齐。 */
  .brand-motion {
    display: block;
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .brand-motion-wrap {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    will-change: transform, opacity;
  }
  .brand-motion img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
  }
  .brand-panel.lactoday .brand-motion-wrap {
    animation: lactoCurrent 35s cubic-bezier(0.42, 0, 0.58, 1) infinite;
  }
  /* BetterDay Motion V3:混合模式放静止裁剪层(不放内层wrapper)——裁剪层已带每档opacity乘数,
     整层与底图混合后遮罩窗只加暖色液体高光,不会出深棕色带。先 screen 兜底,再 plus-lighter(现代Chromium)。 */
  .brand-panel.betterday .brand-motion {
    mix-blend-mode: screen;
    mix-blend-mode: plus-lighter;
  }
  .brand-panel.betterday .brand-motion-wrap {
    transform: none;
    -webkit-mask-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 0, 0, 0.18) 22%,
      #000 50%,
      rgba(0, 0, 0, 0.18) 78%,
      transparent 100%
    );
    mask-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 0, 0, 0.18) 22%,
      #000 50%,
      rgba(0, 0, 0, 0.18) 78%,
      transparent 100%
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 40% 112%;
    mask-size: 40% 112%;
    animation: betterOilLightSweep 35s linear infinite;
    will-change: opacity, mask-position;
  }
  /* 合约守卫:不支持 CSS mask 的环境 = BetterDay 保持完全静态(隐藏叠层),绝不回退整带平移。
     若不隐藏,无遮罩时动画仍会让整条油带原地淡入淡出,且 wrapper 无动画时默认 opacity:1
     会把油带永久钉在画面上——两种都违反"remain static"。 */
  @supports not ((mask-image: linear-gradient(#000, #000)) or (-webkit-mask-image: linear-gradient(#000, #000))) {
    .brand-panel.betterday .brand-motion { display: none; }
  }
  .brand-panel.heragen .brand-motion-wrap {
    animation: heragenRise 35s cubic-bezier(0.42, 0, 0.58, 1) infinite;
  }
}

@media (min-width: 1200px) and (max-height: 900px) {
  .hero { padding: 18px 28px 14px; }
  .hero-head { margin-bottom: 8px; }
  .hero-kicker { margin-bottom: 5px; }
  .hero h1 { font-size: 62px; }
  .hero .h-ask { margin-top: 8px; font-size: 20px; }
  .hero .h-helper { margin-top: 4px; line-height: 1.35; }
  .start-ask { margin-top: 10px; padding: 11px 38px; }
  /* v1.1：此块只准压缩文字/间距——.brand-art 几何与素材选择一律不进高度断点 */
  .brand-stage { min-height: 340px; }
  .brand-panel { min-height: 340px; }
  .brand-copy { min-height: 90px; }
  .brand-desc-stage { margin-top: 9px; }
  .stage-cta { bottom: 14px; }
  .home-modules { margin-top: 12px; }
  .home-module { min-height: 92px; padding-top: 10px; padding-bottom: 10px; }
}

@media (min-width: 961px) and (max-height: 740px) {
  .hero { padding: 10px 20px; }
  .hero-head { margin-bottom: 6px; }
  .hero-kicker { margin-bottom: 3px; font-size: 10px; }
  .hero h1 { font-size: 48px; }
  .hero .h-ask { margin-top: 4px; font-size: 17px; }
  .hero .h-helper { margin-top: 2px; font-size: 11.5px; line-height: 1.3; }
  .start-ask { margin-top: 6px; padding: 9px 32px; font-size: 14px; }
  /* v1.1：只压缩文字/间距，不碰 .brand-art 几何 */
  .brand-stage { min-height: 280px; }
  .brand-panel { min-height: 280px; }
  .brand-name { font-size: 24px; }
  .brand-kr { margin-top: 4px; font-size: 12px; }
  .brand-desc-stage { margin-top: 6px; font-size: 11px; }
  .stage-cta { bottom: 10px; min-width: 170px; padding: 8px 14px; font-size: 12px; }
  .home-modules { gap: 8px; margin-top: 8px; }
  .home-module { min-height: 64px; padding: 8px 10px; }
  .home-module .hm-icon { width: 38px; height: 38px; }
  .home-module p { display: none; }
}

@media (min-width: 961px) and (max-height: 640px) {
  /* v1.1：只压缩文字/间距，不碰 .brand-art 几何 */
  .hero h1 { font-size: 42px; }
  .hero .h-helper { display: none; }
  .brand-stage,
  .brand-panel { min-height: 245px; }
  .home-module { min-height: 56px; }
}

/* v1.1 compact-desktop 档（961-1399px，只按宽度）：竖版图 + 底部锚定。
   竖版图主体在下部（原设计意图），bottom 锚定后高度差异只裁顶部天空 —— 同样是稳定几何 */
@media (min-width: 961px) and (max-width: 1399px) {
  .brand-art img { object-position: bottom center; }
  .brand-art { transform-origin: 50% 100%; }
  /* 叠层镜像底图锚定：竖版图在此档同样底部锚定 */
  .brand-motion img { object-position: bottom center; }
  /* Codex QA 调优(审 524ccf0)：compact 档竖版图裁进矮舞台后主体偏大，
     给静止裁剪层加品牌 opacity 乘数压强度——不碰 wrapper 动画/关键帧/位移/时序。
     有效强度 = 此静止 opacity × wrapper 动画 opacity(峰值~0.72)。 */
  .brand-panel.lactoday .brand-motion { opacity: 0.55; }
  .brand-panel.betterday .brand-motion { opacity: 0.48; }
  .brand-panel.heragen .brand-motion { opacity: 0.50; }
}

/* Codex QA 调优：wide 档 LactoDay 接近理想；BetterDay 金色油带压过 olive/lemon、
   Heragen 底部气泡抢成第二主体——同样只加静止层 opacity 乘数还原层级。 */
@media (min-width: 1400px) {
  .brand-panel.lactoday .brand-motion { opacity: 0.78; }
  .brand-panel.betterday .brand-motion { opacity: 0.62; }
  .brand-panel.heragen .brand-motion { opacity: 0.68; }
}

/* Motion V2 §9：chat 态无装饰动效（防御性——chat 态本就不渲染 brand-stage） */
#app.chat-state .brand-motion { display: none; }

@media (max-width: 1180px) and (min-width: 961px) {
  :root { --stage-sidebar: 218px; --stage-launcher: 254px; }
  .hero { padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: 50px; }
  .brand-panel { padding-left: 15px; padding-right: 15px; }
  .brand-name { font-size: 23px; }
  .stage-cta { min-width: 176px; }
  .home-module { padding: 11px 10px; gap: 9px; }
}

@media (max-width: 960px) {
  #app,
  #app.chat-state { grid-template-columns: 1fr; }
  #sidebar,
  #launcher { display: none !important; }
  #center { height: 100dvh; }
  #topbar { min-height: 66px; padding: 10px 14px; gap: 8px; }
  #topbar .trust { margin-left: 0; padding: 7px 10px; }
  #topbar .trust span { display: inline; }
  #topbar .trust::after { display: none; }
  #demo-badge,
  #context-label,
  #partner-chip { display: none !important; }
  #reset-btn { margin-left: auto; }
  #lang-top { max-width: 112px; min-width: 92px; }

  #app:not(.chat-state) #intro { overflow-y: auto; }
  .hero { min-height: calc(100dvh - 66px); padding: 26px 14px 28px; background: #fbfaf7; }
  .hero h1 { font-size: 46px; line-height: 0.98; }
  .hero .h-ask { font-size: 19px; }
  .hero .h-helper { max-width: 520px; }
  .brand-stage { grid-template-columns: 1fr; gap: 12px; border: 0; background: transparent; box-shadow: none; overflow: visible; }
  /* MOBILE-HOME-ART-FILL-FIX(P1)：堆叠品牌卡满铺修复。
     宽卡改用 wide 图(picture 已加 ≤960 源)+cover 满铺——旧竖版图 contain 会缩成中间窄条,
     两侧大片留白,CTA 看起来挂在窄条上而非属于整卡构图。 */
  .brand-panel,
  .brand-panel + .brand-panel {
    min-height: clamp(320px, 62vw, 470px);
    padding: 42px 20px 22px;
    border: 1px solid rgba(7, 22, 51, 0.08);
    border-radius: 14px;
  }
  .brand-art {
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .brand-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .brand-copy {
    min-height: 96px;
    text-shadow:
      0 1px 0 rgba(255, 255, 255, 0.98),
      0 0 12px rgba(255, 255, 255, 0.9);
  }
  .stage-cta {
    bottom: 20px;
    width: min(250px, calc(100% - 40px));
    min-width: 0;
  }
  .home-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  #app.chat-state #mobile-brands { display: flex; padding: 10px 14px 2px; gap: 7px; overflow-x: auto; }
  #app.chat-state #mobile-brands button { flex: none; padding: 8px 13px; border-radius: 999px; }
  #app.chat-state #intro { padding: 9px 14px 0; }
  #app.chat-state #center::before { inset: 62px 0 0; opacity: 0.14; }
  .chat-hero { margin-bottom: 9px; }
  .chat-hero h1 { font-size: 25px; }
  .chat-hero p { font-size: 13px; }
  .ctx-card { border-radius: 11px; }
  #scroll { padding: 12px 14px 6px; }
  #suggestions { padding: 7px 14px; }
  #mobile-launcher { padding: 0 14px 7px; }
  #chat-form { max-width: none; padding: 9px 14px 10px; background: rgba(247, 249, 251, 0.97); }
  .disclaimer { padding: 0 14px 7px; }
  .msg { max-width: 88%; }
}

@media (max-width: 520px) {
  #topbar { min-height: 62px; padding: 8px 10px; }
  #topbar .trust { display: none; }
  #home-btn { padding: 7px 9px; }
  #reset-btn { padding: 7px 10px; font-size: 11.5px; }
  #lang-top { min-width: 80px; max-width: 92px; padding: 7px 6px; }
  .hero { min-height: calc(100dvh - 62px); padding: 24px 12px 24px; }
  .hero h1 { max-width: 100%; font-size: 36px; line-height: 1.02; }
  .hero .h-ask { font-size: 18px; }
  .hero .h-helper { font-size: 13px; }
  .start-ask { padding: 12px 32px; font-size: 15px; }
  /* MOBILE-HOME-ART-FILL-FIX：删除旧 302px 覆盖——卡高统一由 ≤960 块的 clamp(320px,62vw,470px) 管,
     此处若保留会在 ≤520 压回 302px 打破契约下限 */
  .brand-name { font-size: 25px; }
  .home-modules { grid-template-columns: 1fr; }
  .home-module { min-height: 92px; }
  .chat-hero h1 { font-size: 24px; }
  .chat-hero p { font-size: 12px; }
  .ctx-sub { white-space: normal; }
  .msg { max-width: 92%; font-size: 13.5px; }
  #suggestions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #suggestions button { flex: none; max-width: 86vw; white-space: normal; }
}

/* Motion V2 §9：减动偏好=无装饰动效，直接隐藏叠层（底图/文案/CTA 全静止不受影响） */
@media (prefers-reduced-motion: reduce) {
  .brand-motion { display: none !important; }
  .brand-motion-wrap { animation: none !important; }
}

/* LANGUAGE-EXPANSION：Hindi 专属字体回退——Inter 不含天城文字形。
   Noto Sans Devanagari 走既有 Google Fonts 请求；Nirmala UI = Windows 系统兜底。
   仅作用于 html[lang="hi"]，其余九语排版不受影响。 */
html[lang="hi"] body,
html[lang="hi"] button,
html[lang="hi"] input,
html[lang="hi"] select {
  font-family: "Noto Sans Devanagari", "Nirmala UI", "Inter", "Segoe UI", sans-serif;
}

/* CLEAN-HOME-NO-ART v1
   Home brand selection is typography-led: no brand bitmap, motion overlay, or
   decorative animation is rendered. Chat visuals and functional motion remain. */
#app:not(.chat-state) .brand-stage {
  border-top-color: rgba(7, 22, 51, 0.08);
  border-bottom-color: rgba(216, 182, 99, 0.62);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 42px rgba(7, 22, 51, 0.07);
}

#app:not(.chat-state) .brand-panel {
  padding: 34px 34px 30px;
  justify-content: center;
}

#app:not(.chat-state) .brand-panel + .brand-panel {
  border-left-color: rgba(7, 22, 51, 0.08);
}

#app:not(.chat-state) .brand-panel.lactoday {
  background: #f3fbfe;
  color: #0676bd;
}

#app:not(.chat-state) .brand-panel.betterday {
  background: #fcfcf6;
  color: #587516;
}

#app:not(.chat-state) .brand-panel.heragen {
  background: #f2fbfa;
  color: #00898e;
}

#app:not(.chat-state) .brand-panel::after {
  content: "";
  position: absolute;
  right: 42px;
  bottom: 0;
  left: 42px;
  height: 4px;
  background: currentColor;
  opacity: 0.82;
}

#app:not(.chat-state) .brand-copy {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#app:not(.chat-state) .brand-category {
  max-width: 100%;
  margin-bottom: 22px;
  color: #68778d;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

#app:not(.chat-state) .brand-name {
  color: currentColor;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: none;
}

#app:not(.chat-state) .brand-kr {
  margin-top: 7px;
  color: currentColor;
  font-size: 14px;
  text-shadow: none;
}

#app:not(.chat-state) .brand-rule {
  width: 32px;
  height: 2px;
  margin: 22px 0 19px;
  background: currentColor;
  opacity: 0.72;
}

#app:not(.chat-state) .brand-desc-stage {
  max-width: 290px;
  margin-top: 0;
  color: #173253;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.5;
  text-shadow: none;
}

#app:not(.chat-state) .brand-support {
  max-width: 290px;
  margin-top: 12px;
  color: #738095;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
}

#app:not(.chat-state) .stage-cta {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  min-width: min(210px, 100%);
  margin-top: 31px;
  padding: 11px 17px;
  box-shadow: none;
}

#app:not(.chat-state) .stage-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(7, 22, 51, 0.09);
}

@media (min-width: 961px) and (max-height: 900px) {
  #app:not(.chat-state) .brand-panel { padding-top: 18px; padding-bottom: 18px; }
  #app:not(.chat-state) .brand-category { margin-bottom: 12px; }
  #app:not(.chat-state) .brand-rule { margin-top: 13px; margin-bottom: 12px; }
  #app:not(.chat-state) .brand-support { margin-top: 7px; }
  #app:not(.chat-state) .stage-cta { margin-top: 17px; padding-top: 9px; padding-bottom: 9px; }
}

@media (min-width: 961px) and (max-height: 820px) {
  #app:not(.chat-state) .brand-support { display: none; }
  #app:not(.chat-state) .brand-category { margin-bottom: 9px; }
  #app:not(.chat-state) .brand-rule { margin-top: 10px; margin-bottom: 10px; }
  #app:not(.chat-state) .stage-cta { margin-top: 13px; }
}

@media (min-width: 961px) and (max-height: 700px) {
  #app:not(.chat-state) .brand-category,
  #app:not(.chat-state) .brand-support {
    display: none;
  }
  #app:not(.chat-state) .brand-rule { margin-top: 9px; margin-bottom: 9px; }
  #app:not(.chat-state) .brand-desc-stage { font-size: 11px; line-height: 1.35; }
  #app:not(.chat-state) .stage-cta { margin-top: 12px; padding-top: 8px; padding-bottom: 8px; }
}

@media (max-width: 960px) {
  #app:not(.chat-state) .brand-panel,
  #app:not(.chat-state) .brand-panel + .brand-panel {
    min-height: clamp(230px, 58vw, 280px);
    padding: 28px 20px 24px;
  }

  #app:not(.chat-state) .brand-category { margin-bottom: 13px; font-size: 10px; }
  #app:not(.chat-state) .brand-rule { margin-top: 13px; margin-bottom: 12px; }
  #app:not(.chat-state) .brand-desc-stage { max-width: 330px; }
  #app:not(.chat-state) .brand-support { max-width: 330px; margin-top: 7px; }
  #app:not(.chat-state) .stage-cta {
    width: min(250px, calc(100% - 40px));
    margin-top: 18px;
  }
}

@media (max-width: 520px) {
  #app:not(.chat-state) .brand-panel,
  #app:not(.chat-state) .brand-panel + .brand-panel {
    min-height: 244px;
  }

  #app:not(.chat-state) .brand-category { margin-bottom: 10px; }
  #app:not(.chat-state) .brand-rule { margin-top: 10px; margin-bottom: 9px; }
  #app:not(.chat-state) .brand-desc-stage { font-size: 12px; line-height: 1.42; }
  #app:not(.chat-state) .brand-support { font-size: 10px; }
  #app:not(.chat-state) .stage-cta { margin-top: 14px; }
}
