/*
 * 托管补丁 —— 原型包本身不动。跟同系列其余原型同一套分工。
 * ① 不引 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 是**日历**和**金额摘要** —— 都在面板外面，
 * 都由右边那层重算。所以同样挂橙色虚线，重算一次脉冲一次。
 *
 * ⚠️ 日历在 46% 的左栏里放不下七列。这里改成四列两行：
 * **不能改成横向滚动** —— 一周的可用性要一眼看完，
 * 「这三天满、那三天空」是这个演示的第一个论点，要滚才看得全就没了。
 * ══════════════════════════════════════════════════════════════════ */
body.feature-view { height: 100dvh; overflow: hidden; }

body.feature-view .site-header { height: 56px; }
body.feature-view .booking-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 40px;
  padding-right: calc(46% + 30px);
}
body.feature-view .booking-shell::-webkit-scrollbar { width: 6px; }
body.feature-view .booking-shell::-webkit-scrollbar-thumb { border-radius: 10px; background: #d2ccc5; }

body.feature-view .booking-head h1 { margin-top: 6px; font-size: 22px; }
body.feature-view .lede { margin-top: 7px; font-size: 12px; }
body.feature-view .calendar-panel { margin-top: 16px; }
body.feature-view .cal-head h2 { font-size: 16px; }
body.feature-view .cal-head p { font-size: 11px; }
/* 七列在这个宽度里每格只有 60px，日期和状态徽章都放不下 */
body.feature-view .calendar { grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
body.feature-view .day { padding: 10px 11px; }
body.feature-view .day-num { font-size: 17px; }
body.feature-view .day-state { margin-top: 8px; }
body.feature-view .cal-why { margin-top: 12px; padding: 13px 15px; }
body.feature-view .why-head b { font-size: 14px; }
body.feature-view .why-grid { gap: 20px; margin-top: 10px; }
body.feature-view .why-grid dd { font-size: 14px; }
body.feature-view .summary-panel { margin-top: 16px; padding: 16px 18px; }
body.feature-view .sum-head h2 { font-size: 15px; }
body.feature-view .sum-total { gap: 26px; margin-top: 12px; padding-top: 12px; }
body.feature-view .sum-total b i { font-size: 19px; }

body.feature-view .book-trigger,
body.feature-view .book-panel header > button { display: none; }

body.feature-view .book-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 .book-panel header { padding: 15px 24px 13px; }
body.feature-view .book-panel header span { font-size: 10px; }
body.feature-view .book-panel header h2 { font-size: 20px; }
body.feature-view .book-content { padding: 15px 24px 20px; }
body.feature-view .step-head span { font-size: 13px; }
body.feature-view .step-head em { font-size: 12px; }
body.feature-view .chip { font-size: 12px; }
body.feature-view .service b { font-size: 13px; }
body.feature-view .wl-card > b { font-size: 19px; }
body.feature-view .pay-card > b i { font-size: 32px; }

/* ── 左边被这一层改写的两块 ────────────────────────────── */
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 .booking-shell {
    margin-top: 0;
    height: calc(48dvh - 56px);
    overflow-y: auto;
    padding: 10px 16px 14px;
  }
  body.feature-view .booking-head { display: none; }
  body.feature-view .calendar-panel { margin-top: 0; }
  body.feature-view .calendar { grid-template-columns: repeat(4, 1fr); }
  body.feature-view .summary-panel { margin-top: 12px; }
  body.feature-view .book-panel {
    top: auto; bottom: 0; left: 0; right: 0;
    width: auto; min-width: 0;
    height: 52dvh;
    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(52dvh - 13px);
    left: 50%; transform: translateX(-50%);
    z-index: 8;
  }
  body.feature-view [data-zone] { outline: none; }
}
