/*
 * 托管补丁 —— 原型包本身不动。跟同系列其余原型同一套分工。
 * ① 不引 Google Fonts  ② 演示角标只在单独打开时出现  ③ 功能视图见下
 */
body {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', Roboto, Helvetica, Arial, sans-serif;
}

.demo-badge {
  position: fixed; z-index: 9; left: 16px; bottom: 16px;
  display: none; align-items: center; gap: 8px;
  padding: 8px 14px 8px 11px; border-radius: 30px;
  background: #1a1a1a; color: #fff; font-size: 11px; line-height: 1;
  text-decoration: none; box-shadow: 0 7px 24px #00000026;
}
.demo-badge b { color: #fb8c42; font-weight: 700; }
.demo-badge span { color: #b8b4b0; }
@media (max-width: 700px) { .demo-badge { display: none !important; } }

/* ══════════════════════════════════════════════════════════════════
 * 功能视图 `?view=feature`
 *
 * 这个原型的 base 跟前两个不太一样，值得说清楚：
 * **左边那张「上传图纸 + 写点什么」的询盘表单，就是 base。**
 * 任何一个网站都有那张表单。我们做的那层做完事情之后，
 * 会**把它自己填满** —— 所以功能视图必须让那张表单一直看得见，
 * 不然最后那一下（表单自己填好了）就白做了。
 *
 * 于是左栏排布跟前两个相反：Hero 压到最小，**表单顶上去**。
 * ══════════════════════════════════════════════════════════════════ */
body.feature-view { height: 100dvh; overflow: hidden; }

body.feature-view .site-header { height: 56px; }
body.feature-view .service-shell {
  margin-top: 34px;
  height: calc(100dvh - 90px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d2ccc5 transparent;
  padding: 8px 34px 50px;
  padding-right: calc(46% + 30px);
}
body.feature-view .service-shell::-webkit-scrollbar { width: 6px; }
body.feature-view .service-shell::-webkit-scrollbar-thumb { border-radius: 10px; background: #d2ccc5; }

/* Hero 压到一行标题 —— 它只需要说明「这是一家切割厂的服务页」，
   剩下的高度全给表单。 */
body.feature-view .hero h1 { margin-top: 8px; font-size: 24px; max-width: none; }
body.feature-view .hero .lede { margin-top: 8px; font-size: 12px; }
body.feature-view .cap-row { display: none; }
body.feature-view .quote-form { margin-top: 20px; padding: 18px 20px 16px; }
body.feature-view .form-head h2 { font-size: 17px; }
body.feature-view .form-head p { font-size: 11px; }
body.feature-view .form-grid { gap: 11px; margin-top: 15px; }
body.feature-view .field input { padding: 9px 11px; font-size: 12px; }
body.feature-view .field textarea { font-size: 11px; line-height: 1.6; }
body.feature-view .form-actions { margin-top: 15px; }

/* 「开始报价」的入口和关闭按钮在这个视图里没有意义 —— 它本来就是开的 */
body.feature-view .quote-trigger,
body.feature-view .quote-panel header > button { display: none; }

body.feature-view .quote-panel {
  top: 90px;
  right: 18px;
  bottom: auto;
  left: auto;
  width: 46%;
  min-width: 340px;
  /* ⚠️ 高度写死。top + bottom 配 auto 高度时 bottom 被忽略，
     面板缩成半截 —— 被切掉的正好是底下那张价格卡。 */
  height: calc(100dvh - 106px);
  min-height: 0;
  max-height: none;
  transform: none;
  visibility: visible;
  opacity: 1;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .16);
}

body.feature-view .quote-panel header { padding: 15px 24px 13px; }
body.feature-view .quote-panel header span { font-size: 10px; }
body.feature-view .quote-panel header h2 { font-size: 20px; }
body.feature-view .quote-content { padding: 16px 24px 22px; }
/*
 * 🔴 **价格卡必须整个落在第一屏。**
 * 最小的那个嵌入框只给面板 448px 的内容高度，而这里要塞下
 * 几何 + 四组配置 + 价格卡。按原样排，价格卡底下那行总价掉出去 86px ——
 * 一个报价器，结论要滚一下才见得到，等于没报。
 *
 * 省下来的 86px 来自两处**布局改动**（不是把字调小，那样只会变得难读）：
 *   · 几何四项 2×2 → 一行四栏（省约 55px）
 *   · 每组配置的标题和选项从上下两行 → 并成一行（四组省约 56px）
 * 改之前先量。
 */
body.feature-view .geometry { grid-template-columns: repeat(4, 1fr); padding: 11px 14px; gap: 0 10px; }
body.feature-view .geometry dd { font-size: 13px; margin-top: 5px; }
body.feature-view .geometry dd em { font-size: 10px; }
body.feature-view .geometry-note { margin-top: 6px; }

body.feature-view .config { margin-top: 13px; gap: 9px; }
body.feature-view .config-row { display: flex; align-items: center; gap: 12px; }
body.feature-view .config-label { flex: none; width: 62px; margin-bottom: 0; }
body.feature-view .chip-row { flex: 1; }
body.feature-view .chip { font-size: 11px; padding: 6px 10px; }
body.feature-view .price-card { margin-top: 14px; padding: 14px 16px; }
body.feature-view .check-row b { font-size: 13px; }
body.feature-view .price-line b i { font-size: 30px; }

/* ── 左边被这一层改写的那一块 ──────────────────────────── */
body.feature-view [data-zone] {
  position: relative;
  outline: 1px dashed #f0b985;
  outline-offset: 6px;
  border-radius: 4px;
  transition: outline-color .5s;
}
body.feature-view [data-zone].zone-touched {
  outline-color: var(--orange);
  animation: zone-pulse .9s ease;
}
@keyframes zone-pulse {
  0% { box-shadow: 0 0 0 0 #ed650033; }
  40% { box-shadow: 0 0 0 10px #ed650000; }
  100% { box-shadow: 0 0 0 0 #ed650000; }
}

/* 两个区域标签。**这是这个视图里信息量最大的两行字。** */
.fv-tag {
  position: fixed; z-index: 4; top: 60px;
  display: none; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 20px;
  font: 500 11px/1 DM Mono, monospace; letter-spacing: .3px; white-space: nowrap;
}
body.feature-view .fv-tag { display: inline-flex; }
.fv-tag:before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.fv-tag-base { left: 34px; background: #efece8; color: #6f6a66; }
.fv-tag-base:before { background: #b9b3ac; }
.fv-tag-built { left: calc(54% - 18px); background: #ed6500; color: #fff; }
.fv-tag-built:before { background: #ffd0aa; }

/* ══ 窄屏：上下分屏 ══════════════════════════════════════
 * 同系列其余原型：**不能让面板铺满**。这个演示的收尾
 * （左边那张表单自己填好了）全发生在面板外面。
 * ⚠️ 上下各半时别忘了减掉站点头那 56px。 */
@media (max-width: 900px) {
  body.feature-view { height: 100dvh; overflow: hidden; }
  body.feature-view .service-shell {
    margin-top: 0;
    height: calc(46dvh - 56px);
    overflow-y: auto;
    padding: 10px 16px 16px;
  }
  /* 手机上半屏只有 300 出头 —— 只留那张表单，公司介绍让位 */
  body.feature-view .hero { display: none; }
  body.feature-view .quote-form { margin-top: 0; padding: 14px 15px 12px; }
  body.feature-view .form-head p { display: none; }
  /*
   * 🔴 姓名 / 公司 / 邮箱在窄屏收起来。
   * 它们三个占掉 250px，而**这一层根本不碰它们** ——
   * 被改写的是下面那两块：附件槽和那个大文本框。
   * 不收起来的话，手机访客永远滚不到「表单自己填好了」那一下，
   * 而那是这个演示的收尾。
   */
  body.feature-view .field[data-basic] { display: none; }
  body.feature-view .form-actions { margin-top: 12px; }

  /* ⚠️ 上面那两条紧凑布局（几何四栏、配置横向）是为**宽屏**功能视图
     省高度用的，375px 宽里两条都会换行排乱 —— 这里退回原来的排法。 */
  body.feature-view .geometry { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  body.feature-view .config-row { display: block; }
  body.feature-view .config-label { width: auto; margin-bottom: 6px; }
  body.feature-view .quote-panel {
    top: auto; bottom: 0; left: 0; right: 0;
    width: auto; min-width: 0;
    height: 54dvh;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -14px 40px rgba(0, 0, 0, .14);
  }
  body.feature-view .fv-tag { display: none; }
  body.feature-view .fv-tag-built {
    display: inline-flex;
    top: auto; bottom: calc(54dvh - 13px);
    left: 50%; transform: translateX(-50%);
    z-index: 8;
  }
  body.feature-view [data-zone] { outline: none; }
}
