/* ============ 设计变量 ============ */
:root {
  --bg: #F6F3ED;
  --bg-soft: #EFEAE1;
  --surface: #FFFFFF;
  --ink: #23201C;
  --ink-2: #6B6459;
  --ink-3: #9A917F;
  --line: #E7DFD2;
  --line-soft: #F0EADF;
  --accent: #A9603F;
  --accent-soft: #F3E7DE;
  --accent-2: #2F5C4F;
  --gold: #C8A96A;
  --danger: #B4443A;
  --ok: #3D7A5B;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(58, 47, 33, .04), 0 8px 28px rgba(58, 47, 33, .06);
  --serif: "Optima", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: rgba(150, 139, 117, .38); border-radius: 8px; }

/* ============ 通用组件 ============ */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 18px 72px; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12.5px; }
.hr { height: 1px; background: var(--line); margin: 26px 0; border: 0; }

.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); padding: 10px 18px; border-radius: 999px; cursor: pointer;
  transition: .18s ease; font-size: 14.5px; white-space: nowrap;
  /* 🔴🔴 v1.16.16 需求 1（用户报障根因）：`.btn` 必须自带 display，
     否则 `<a class="btn btn--block">` 这种用法**永远铺不满宽度** ——
     `<a>` 默认是 display:inline，而 inline 元素**忽略 width**，
     于是 `.btn--block { width:100% }` 静默失效。
     v1.16.15 的问卷页「体验顾问后台」入口正是 `<a class="btn btn--block btn--sm">`，
     用户报障「宽度要和提交问卷按钮一样宽」，真因就在这里（不是样式没写，
     是写了但被 inline 忽略）。
     用 inline-flex：既保留「按钮内容按内容宽」的默认观感（不影响其它 <a class=btn>），
     又让 width/height 生效；`align-items/justify-content` 保证文字垂直居中。 */
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1.2; text-align: center;
}
a.btn { text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--primary { background: var(--ink); border-color: var(--ink); color: #FAF7F2; }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: #8E4F33; border-color: #8E4F33; color: #fff; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 13px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
/* 🔴 v1.16.16：block 态补 `display:flex` —— 保证 `<a class="btn btn--block">`
   也一定是块级（inline-flex + width:100% 已能铺满，这里再钉死一次，
   并让内部文字天然居中，不依赖 text-align）。 */
.btn--block { width: 100%; display: flex; text-align: center; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}

.chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 14px; font-size: 13.5px; cursor: pointer; color: var(--ink-2);
  transition: .15s ease; user-select: none; line-height: 1.5;
}
.chip:hover { border-color: #D3C7B4; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #FAF7F2; }
.chip--accent.is-on { background: var(--accent); border-color: var(--accent); }

.field { margin-bottom: 20px; }
.field__label { font-size: 14px; font-weight: 600; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.field__label .req { color: var(--accent); font-size: 12px; }
.field__unit { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.field__hint { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; line-height: 1.5; }
.input, .textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 11px 13px; outline: none; transition: .15s ease;
}
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
.num-row { display: flex; align-items: center; gap: 8px; }
.num-row .input { max-width: 150px; }
.custom-add { display: flex; gap: 8px; margin-top: 9px; }
.custom-add .input { flex: 1; max-width: none; }

/* ============ 页码抬头 ============ */
.page-head { padding: 34px 0 22px; text-align: center; }
.page-head__brand { font-family: var(--serif); font-size: 13px; letter-spacing: .32em; color: var(--accent); text-transform: uppercase; }
.page-head__title { font-size: 27px; margin: 10px 0 8px; }
.page-head__desc { color: var(--ink-2); font-size: 14px; }

/* ============ 表单分段 ============ */
.step { margin-bottom: 18px; overflow: hidden; }
.step__head { display: flex; align-items: baseline; gap: 10px; padding: 16px 20px 12px; }
.step__no { font-family: var(--serif); font-size: 13px; color: var(--gold); letter-spacing: .2em; }
.step__title { font-size: 17px; }
.step__desc { font-size: 12.5px; color: var(--ink-3); }
.step__body { padding: 4px 20px 22px; }

/* ============ 色板选择器 ============ */
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; }
.sw {
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 4px 6px; text-align: center;
  background: var(--surface); cursor: pointer; transition: .15s ease; position: relative;
}
.sw:hover { border-color: #D3C7B4; }
.sw.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(35,32,28,.12); }
.sw__dot { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 5px; border: 1px solid rgba(0,0,0,.08); }
.sw__n { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.sw.is-on .sw__n { color: var(--ink); font-weight: 600; }
.sw__tick { position: absolute; top: 4px; right: 6px; font-size: 11px; color: var(--accent); }
/* 🔴 2026-10-21 三色互斥：被其它组（主色/加分色/避雷色）已选中的颜色置灰不可选。
   客户问卷页（form.js）与后台到店登记（admin.js）共用这一套。 */
.sw.is-off {
  opacity: .38;
  filter: grayscale(1);
  cursor: not-allowed;
  border-style: dashed;
}
.sw.is-off:hover { border-color: var(--line); }

/* ============ 照片上传 ============ */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shot {
  border: 1px dashed var(--line); border-radius: 12px; aspect-ratio: 3/4; overflow: hidden;
  position: relative; background: var(--bg-soft); display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer; text-align: center; padding: 8px;
}
.shot input { display: none; }
.shot__plus { font-size: 24px; color: var(--ink-3); line-height: 1; }
.shot__cap { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.35; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot__del {
  position: absolute; top: 5px; right: 5px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(35,32,28,.62); color: #fff; border: none; cursor: pointer; line-height: 20px; font-size: 14px;
}

/* ============ 提交条 ============ */
.submitbar { position: sticky; bottom: 0; padding: 12px 0 18px; background: linear-gradient(to top, var(--bg) 62%, rgba(246,243,237,0)); }
.errbox {
  border: 1px solid #EBB9B2; background: #FBF0EE; color: var(--danger);
  border-radius: var(--radius-sm); padding: 10px 13px; font-size: 13px; margin-bottom: 12px;
}
.done { text-align: center; padding: 40px 24px; }
.done__icon { font-size: 40px; }
.done__title { font-size: 21px; margin: 12px 0 8px; }
.done__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 19px; letter-spacing: .12em;
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; display: inline-block; margin: 14px 0;
}

/* 🆕 v1.16.16 需求 1：「体验顾问后台」入口按钮（问卷页 + 提交成功页共用）。
   用户要求「宽度与上方提交问卷按钮一样宽，并且需要非常明显」。
   宽度由 .btn--block（width:100%）保证；这里负责**醒目**：
   金色描边 + 极淡暖底 + 细投影，视觉重量介于主按钮与 ghost 之间 ——
   够引导，又不会被误认成「提交问卷」。
   🔴 必须留在 style.css：问卷页 index.html **只加载 style.css**（客户页刻意轻量，
      不引 admin-hud.css），写进 admin-hud.css 在问卷页上根本不会生效。
   🔴 必须写在 .btn 规则**之后**（同特异度按源码顺序，后者生效），否则描边被盖掉。
   深浅两主题一律走 CSS 变量，不硬编码颜色（项目铁律）。 */
.btn--admin-cta {
  margin-top: 10px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--accent) 52%, var(--line));
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 16%, transparent);
}
.btn--admin-cta:hover {
  color: #fff; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 34%, transparent);
}
.done .btn--admin-cta { margin-top: 22px; }

/* ============ 后台布局（左右结构） ============ */
.layout { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

/* 左侧菜单 */
.sidebar {
  flex: 0 0 248px; width: 248px; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  transition: width .22s ease, flex-basis .22s ease; position: relative; z-index: 30;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.sidebar__logo { font-family: var(--serif); font-size: 17px; letter-spacing: .18em; color: var(--ink); white-space: nowrap; }
.sidebar__name { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; flex: 1; transition: opacity .18s ease; }
.sidebar__collapse {
  margin-left: auto; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-soft); color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
  transition: .15s ease; flex: 0 0 auto;
}
.sidebar__collapse:hover { color: var(--accent); border-color: var(--accent); }
.layout.is-collapsed .sidebar__collapse { transform: rotate(180deg); }

.sidebar__nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar .subnav__btn.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 0; background: transparent; padding: 11px 12px; border-radius: 10px; cursor: pointer;
  color: var(--ink-2); font-size: 14px; transition: .15s ease; white-space: nowrap;
}
.sidebar .subnav__btn.menu-item:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar .subnav__btn.menu-item.is-on {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
  box-shadow: none; position: relative;
}
.sidebar .subnav__btn.menu-item.is-on::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 3px; background: var(--accent);
}
.menu-ico { display: inline-flex; flex: 0 0 auto; color: var(--ink-3); }
.sidebar .subnav__btn.menu-item.is-on .menu-ico { color: var(--accent); }

.sidebar__foot { padding: 14px 16px 18px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.sidebar__who { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.sidebar__who-k { font-size: 11.5px; color: var(--ink-3); }
.sidebar__who #who { font-weight: 600; word-break: break-all; }

/* 移动端遮罩 */
.nav-scrim { position: fixed; inset: 0; background: rgba(35,32,28,.4); opacity: 0; pointer-events: none; transition: opacity .22s ease; z-index: 28; }
.layout.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

/* 右侧内容 */
.layout__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 22px;
  background: rgba(246,243,237,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 25;
}
.topbar__menu {
  display: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; flex: 0 0 auto;
}
.topbar__title { font-family: var(--serif); font-size: 17px; font-weight: 600; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__spacer { flex: 1 1 auto; min-width: 8px; }
.topbar__actions { display: flex; gap: 8px; flex-wrap: nowrap; flex: 0 0 auto; }
.content { flex: 1 1 auto; overflow-y: auto; padding: 22px 24px 70px; }

/* 收起态（桌面） */
.layout.is-collapsed .sidebar { flex-basis: 72px; width: 72px; }
.layout.is-collapsed .sidebar__name,
.layout.is-collapsed .menu-txt,
.layout.is-collapsed .sidebar__foot { display: none; }
.layout.is-collapsed .sidebar__brand { padding: 18px 10px 14px; }
.layout.is-collapsed .sidebar__nav { align-items: center; padding: 14px 8px; }
.layout.is-collapsed .sidebar .subnav__btn.menu-item { justify-content: center; padding: 11px 0; gap: 0; }
/* 收起态只保留父级图标：二级菜单整体隐藏、箭头隐藏。
   （二级菜单项是裸文字按钮，没有 .menu-txt 包裹，不隐藏会被压成竖排一列） */
.layout.is-collapsed .menu-sub,
.layout.is-collapsed .menu-caret { display: none; }
.layout.is-collapsed .sidebar .menu-group { width: 100%; }
/* 折叠按钮在收起态改绝对定位：否则会与已隐藏的 .sidebar__name 争空间，
   把侧栏撑到 104px 并冒出横向滚动条 */
.layout.is-collapsed .sidebar__brand { position: relative; }
.layout.is-collapsed .sidebar__collapse { position: absolute; right: 8px; top: 16px; }

/* 移动端：侧栏改为抽屉式 */
@media (max-width: 860px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100%; width: 248px; flex-basis: 248px;
    transform: translateX(-100%); transition: transform .26s ease; box-shadow: 0 0 40px rgba(35,32,28,.18);
  }
  .layout.nav-open .sidebar { transform: translateX(0); }
  .topbar__menu { display: inline-flex; }
  .topbar__actions .btn { padding: 6px 11px; font-size: 12.5px; }
  .topbar__title { font-size: 16px; }
  .content { padding: 16px 14px 70px; }
  .sidebar__collapse { display: none; }
  .layout.is-collapsed .sidebar { flex-basis: 248px; width: 248px; }
  .layout.is-collapsed .sidebar__name,
  .layout.is-collapsed .menu-txt,
  .layout.is-collapsed .sidebar__foot { display: revert; }
  /* 移动端是抽屉式展开，不存在收起态：二级菜单与箭头必须恢复显示 */
  .layout.is-collapsed .menu-sub { display: flex; padding-left: 30px; }
  .layout.is-collapsed .menu-caret { display: inline; }
}
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat__k { font-size: 12.5px; color: var(--ink-3); }
.stat__v { font-family: var(--serif); font-size: 26px; line-height: 1.25; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { max-width: 240px; }

.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-3);
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #FBF8F3; cursor: pointer; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--ink-2); }
.tag--done { background: #EAF3ED; border-color: #C6E0CF; color: var(--ok); }
.tag--wait { background: #FBF1E7; border-color: #ECD6BE; color: #93602F; }
.tag--warn { background: #FCEFE8; border-color: #EDC9B6; color: #A8562F; }

/* 抽屉详情 */
.scrim { position: fixed; inset: 0; background: rgba(35,32,28,.35); opacity: 0; pointer-events: none; transition: .22s ease; z-index: 40; }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%); background: var(--bg);
  z-index: 50; transform: translateX(102%); transition: transform .28s cubic-bezier(.22,.8,.2,1);
  display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(58,47,33,.12);
}
.drawer.is-on { transform: translateX(0); }
.drawer__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.minicard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.minicard__k { font-size: 12px; color: var(--ink-3); }
.minicard__v { font-size: 15px; font-weight: 600; }

.streambox {
  background: #211E1A; color: #E8E2D7; border-radius: var(--radius-sm); padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.7;
  max-height: 220px; overflow-y: auto; white-space: pre-wrap; word-break: break-all;
}
.shots-view { display: flex; gap: 10px; flex-wrap: wrap; }
.shots-view img { width: 120px; height: 160px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); }
.shots-view figcaption { font-size: 11.5px; color: var(--ink-3); text-align: center; margin-top: 4px; }
figure { margin: 0; }

/* ============ 登录 ============ */
.loginbox { max-width: 400px; margin: 8vh auto 0; }
.tabs { display: flex; gap: 4px; background: var(--bg-soft); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 999px; cursor: pointer;
  color: var(--ink-2); font-size: 13.5px; transition: .15s ease;
}
.tabs button.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.otp-row { display: flex; gap: 8px; }
.otp-row .input { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 14px);
  background: var(--ink); color: #F7F4EE; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; z-index: 200; opacity: 0; transition: .24s ease; box-shadow: 0 10px 30px rgba(35,32,28,.24);
  max-width: 86vw; text-align: center;
}
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.toast--err { background: var(--danger); }
.toast--ok { background: var(--ok); }

.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 顾问管理弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(35,32,28,.42); }
.modal__box {
  position: relative; background: var(--bg); width: min(680px, 100%); max-height: 88vh; overflow: hidden;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(35,32,28,.22); display: flex; flex-direction: column;
}
.modal__head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; background: var(--surface); }
.modal__body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }

/* ============ 客户档案 / 子导航 ============ */
.subnav { display: flex; gap: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 18px; width: fit-content; }
.subnav__btn { border: 0; background: transparent; padding: 7px 18px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-size: 13.5px; transition: .15s ease; }
.subnav__btn.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

.tag--brief { background: #EAF0FB; border-color: #C3D4F0; color: #3B5C99; }
.tag--full { background: #F1EAFB; border-color: #D9C7EF; color: #6B3B99; }

/* 个人详情分区 */
.psec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.psec__h { font-family: var(--serif); font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.psec__h .tiny { font-weight: 400; }
.pgrid { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 13.5px; }
.pgrid dt { color: var(--ink-3); }
.pgrid dd { margin: 0; color: var(--ink); word-break: break-word; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.tile { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.tile b { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 3px; }
.tile span { font-size: 14px; }

/* 标签编辑器 */
.taged { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tagpill { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 6px 3px 11px; font-size: 12.5px; color: var(--ink-2); }
.tagpill button { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; }
.tagpill button:hover { color: var(--danger); }
.taged-add { display: flex; gap: 6px; }
.taged-add .input { max-width: 200px; }

/* 到店记录 */
.pvisits { display: flex; flex-direction: column; gap: 8px; }
.pvisit { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--bg-soft); }
.pvisit b { font-size: 13.5px; }
.pvisit .tiny { color: var(--ink-3); }

.pedit-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.pedit-row .input { max-width: 220px; }
.hr { height: 0; border: 0; border-top: 1px solid var(--line-soft); margin: 16px 0; }

/* 二级菜单 */
.menu-group { display: flex; flex-direction: column; }
.menu-sub { display: flex; flex-direction: column; padding-left: 30px; gap: 2px; }
.sidebar .menu-item--sub {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 7px 14px; border-radius: 8px; cursor: pointer; color: var(--ink-2);
  font-size: 13px; transition: .15s ease;
}
.sidebar .menu-item--sub:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar .menu-item--sub.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.menu-caret { margin-left: auto; font-size: 11px; color: var(--ink-3); transition: transform .15s ease; }
.sidebar .menu-item--parent.is-on .menu-caret { transform: rotate(90deg); color: var(--accent); }

/* 子标签（与 admin-hud.css 的同名规则保持同口径：tab 行与内容间距 18px，需求 4） */
.subtabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.subtab { border: 0; background: transparent; padding: 9px 14px; cursor: pointer; color: var(--ink-3); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtab.is-on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* 权限勾选 */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding: 4px 0; cursor: pointer; }
.chk input { width: 16px; height: 16px; }

/* 多选弹层（门店 / 店长） */
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 8px; background: var(--bg-soft); }
.pick-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.pick-item:hover { background: var(--surface); }
.pick-item input { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .drawer { width: 100%; }
  .kv { grid-template-columns: 84px 1fr; }
  .shots { grid-template-columns: repeat(3, 1fr); }
  .tbl-wrap { overflow-x: auto; }
  .tbl { min-width: 720px; }
}

/* 用户自己补充的选项（穿搭场景 / 面料顾虑 / 避雷元素 / 颜色名）。
   ⚠️ 这类项必须与固定项一起渲染出来 —— 否则用户点了「添加」却看不到任何变化。
   用虚线边 + 浅底与固定项区分，右上角 × 可移除。 */
.chip--custom {
  border-style: dashed;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  display: inline-flex;
  align-items: center;
}
.chip--custom .chip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  margin-left: 5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .10);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.chip--custom .chip__x:hover { background: #B4453B; color: #fff; }
.chip--custom.is-on .chip__x { background: rgba(255, 255, 255, .28); color: #fff; }
.sw--custom { border-style: dashed; }

/* 问卷链接锁定门店（顾问预约专属服务）：只读展示，不给下拉 */
.store-locked {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in srgb, var(--line) 35%, transparent);
}
.store-locked__name { font-weight: 600; font-size: 14px; }
.store-locked__tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  color: var(--ink-2, var(--ink)); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card, #fff) 70%, transparent);
}

/* 自绘下拉 .fsel（2026-10-21）：门店项 = 图标+名称+地理位置；顾问项 = 头像+名称+编号。
   原生 select 在移动端样式不可控，且 option 承载不了富内容（图标/头像）。 */
.fsel-host { position: relative; }
.fsel__btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 46px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card, #fff); color: var(--ink);
  font-size: 14px; text-align: left; cursor: pointer;
}
.fsel__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fsel-host.is-open .fsel__btn { border-color: var(--accent); }
.fsel__cur { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.fsel__ph { color: var(--ink-3); }
.fsel__ico { flex: none; color: var(--accent); }
.fsel__t { font-weight: 600; }
.fsel__s { font-size: 12px; color: var(--ink-3); }
.fsel__ava {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  object-fit: cover; background: var(--line);
}
.fsel__ava--ini {
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
  background: hsl(28 20% 62%);
}
.fsel__list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card, #fff);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
}
.fsel__item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; border: 0; background: transparent;
  color: var(--ink); font-size: 14px; text-align: left; cursor: pointer;
}
.fsel__item + .fsel__item { border-top: 1px solid var(--line); }
.fsel__item.is-on { background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* 身体数据参考范围提示（随性别切换） */
.field__ref {
  margin-top: 6px; font-size: 12px; color: var(--ink-3);
  padding: 3px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  display: inline-block;
}

/* ============================================================
   自定义下拉框（2026-10-22 需求 10）—— 全站统一替代原生 <select>
   ------------------------------------------------------------
   原生 select 的弹层是操作系统画的，深色模式下白底蓝高亮、还没法加图标，
   放在这套莫兰迪界面里非常割裂。这里用「原生 select 当值容器 + 自绘面板」，
   行为（.value / change 事件）与原生完全一致，见 common.js 的 enhanceSelect。
   ============================================================ */
.csel { position: relative; display: inline-block; width: 100%; min-width: 0; vertical-align: middle; }
.csel > select { display: none !important; }
.csel__btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 38px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font-size: 14px; text-align: left; cursor: pointer;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.csel__btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.csel__btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }
.csel__btn[disabled] { opacity: .5; cursor: not-allowed; }
.csel__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel__btn.is-empty .csel__t { color: var(--ink-3); }
.csel__ar { flex: 0 0 auto; color: var(--ink-3); transition: transform .18s; }
.csel.is-open .csel__ar { transform: rotate(180deg); }
/* 🔴 2026-10-22 需求 17：面板由 common.js **传送到 document.body** 后由 JS 定位。
   传送的原因：`.toolbar` / `.card` 的 backdrop-filter 会为后代创建包含块，
   面板若留在 .csel 里，fixed 的包含块会从「视口」变成那个祖先 → 整体偏移，
   且 z-index 被锁在祖先的层叠上下文里 → 被列表卡片盖住。
   挂到 body 后：body 自身无 transform/filter/backdrop-filter（html,body margin:0）
   → fixed 包含块回到视口；z-index 1200 在 body 层直接压过 modal(60) / dialog(90) / drawer(1150)。 */
.csel__panel {
  position: fixed; left: 0; top: 0; z-index: 1200;
  max-height: 264px; overflow-y: auto; padding: 5px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(40, 32, 22, .18);
}
/* 「向上翻」已由 common.js 的 cselPlace() 用 transform 完成（面板是 fixed 定位） */
.csel__o {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink);
  font-size: 13.5px; text-align: left; cursor: pointer;
}
.csel__ot { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel__o:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.csel__o.is-on { background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 600; }
.csel__o[disabled] { opacity: .38; cursor: not-allowed; }
.csel__ck { color: var(--accent); flex: 0 0 auto; }
.csel__empty { padding: 12px; font-size: 13px; color: var(--ink-3); text-align: center; }
/* 深色模式：面板/按钮都要换成暗底浅字，绝不能用白底 */
[data-theme="dark"] .csel__btn {
  background: #221E1A; border-color: #3A342C; color: #EDE6DA;
}
[data-theme="dark"] .csel__btn:hover { border-color: #6B5C48; }
[data-theme="dark"] .csel__panel {
  background: #221E1A; border-color: #3A342C;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
[data-theme="dark"] .csel__o { color: #E7DFD2; }
[data-theme="dark"] .csel__o:hover { background: rgba(168, 132, 96, .18); }
[data-theme="dark"] .csel__o.is-on { background: rgba(168, 132, 96, .28); }
[data-theme="dark"] .csel__ar, [data-theme="dark"] .csel__empty { color: #9A917F; }

/* 🆕 v1.16.61 需求 1：模型下拉的「免费 / 积分倍率」徽章。
   显式写两套主题色，不用任何不确定存在的令牌；相邻行一律留 gap / margin / line-height。 */
.csel__credit {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; line-height: 1.7;
  white-space: nowrap; font-variant-numeric: tabular-nums;
  background: #EAF1FB; color: #2C5E9E; border: 1px solid #B9CFEA;
}
.csel__credit.is-free { background: #E4F4EC; color: #1F7A52; border-color: #9CD4B5; }
.csel__credit.is-unknown { background: #F0ECE6; color: #7A6E5C; border-color: #D6CBBB; }
[data-theme="dark"] .csel__credit { background: #233247; color: #9EC4F2; border-color: #3C5675; }
[data-theme="dark"] .csel__credit.is-free { background: #1D3A2D; color: #8EDCB2; border-color: #35654A; }
[data-theme="dark"] .csel__credit.is-unknown { background: #302C26; color: #B4A891; border-color: #4A4337; }
/* 按钮态：名称省略、徽章固定不缩；只在真有徽章时才切成 flex，旧下拉零影响 */
.csel__t.has-credit { display: flex; align-items: center; gap: 8px; }
.csel__tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   全局媒体查看器（2026-10-22 需求 5）
   点击放大 + 滚轮缩放 + 缩放按钮 + 拖拽平移；图片与视频通用。
   ============================================================ */
.lbx { position: fixed; inset: 0; z-index: 9000; display: block; opacity: 0; transition: opacity .2s; }
.lbx[hidden] { display: none; }
.lbx.is-on { opacity: 1; }
.lbx__scrim { position: absolute; inset: 0; background: rgba(16, 14, 12, .9); backdrop-filter: blur(4px); }
.lbx__box { position: absolute; inset: 0; display: block; }
/* 🔴 2026-10-22 需求 6：图片的缩放要在**整个浏览器窗口**里发生，
   不能被一个矩形容器裁掉。stage 因此改成铺满视口（inset:0）+ overflow:visible，
   放大后的图片可以一直溢出到窗口边缘之外（拖拽也能拖到看不见的地方）。 */
.lbx__stage {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  overflow: visible; touch-action: none;
  /* 🔴 v1.16.28 第 4 项：底部留一条「说明文字 + 工具条」的安全区。
     说明文字是浮层（不占布局），只靠 max-height 压不住 —— 1:1 的商品图会一路
     铺到底、把文字盖住。这里把**居中区域**整体上移 110px，图片再大也停在
     文字上方。（box-sizing 必须 border-box：inset:0 定了高度，content-box
     加 padding 会把容器撑到视口外，等于没上移。）
     🔴 v1.16.54 第 3 项：工具条改两行后高度从 ~46 涨到 ~86，安全区跟着抬到
     122（86 + 底部 20 + 12 间隙），否则图片下半截会被第二行盖住。 */
  box-sizing: border-box; padding-bottom: 122px;
}
.lbx__stage.is-drag { cursor: grabbing; }
.lbx__media {
  /* 🔴 v1.16.28 第 4 项：原来 84vh 会顶到说明文字上（图片盖住文字、又没有底板，
     浅色商品图上的浅色文字几乎看不见）。降到 70vh，配合 stage 的底部安全区，
     保证任何比例的图都不会压到说明文字。
     🔴 v1.16.54 第 3 项：矮视口（横屏手机 / 小窗）再叠加一项 calc 上限，
     让「图片 + 说明 + 两行工具条」永远塞得进一屏，绝不叠在一起。 */
  max-width: 92vw; max-height: min(70vh, calc(100vh - 250px));
  border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  transform-origin: center center; will-change: transform;
  user-select: none; -webkit-user-drag: none;
}
.lbx__stage:not(.is-drag) .lbx__media { cursor: zoom-in; }
/* 说明文字改为浮层，不占布局（否则会把图片挤到窗口偏上） */
.lbx__cap {
  /* 🔴 v1.16.28 第 4 项：说明文字必须有**底板**，并且抬到图片下沿之外。
     旧版只有一行裸文字（bottom:72px、无背景），图片一放大就压上来，
     在白底商品图上等于消失。现在用深色胶囊底板 + 描边，任何底图都读得清。 */
  position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); z-index: 4;
  max-width: 76vw; color: #F3ECE0; font-size: 13px; line-height: 1.5; text-align: center;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(24, 20, 16, .86);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .38);
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 有缩略图条时说明再抬高一档（缩略图在 bottom:118px，高 44px + 内边距） */
.lbx.has-thumbs .lbx__cap { bottom: 186px; }
.lbx.has-thumbs .lbx__stage { padding-bottom: 196px; }
.lbx.has-thumbs .lbx__media { max-height: min(64vh, calc(100vh - 330px)); }
.lbx__bar {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 8px;
  border-radius: 20px; background: rgba(38, 33, 27, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .45);
  max-width: calc(100vw - 24px);
}
/* 🆕 v1.16.54 第 3 项：工具条拆两行 —— 第一行「上一张 / 计数 / 下一张」，
   第二行「缩小 · 百分比 · 放大 · 1:1 · 关闭」。每行 nowrap 居中，
   窄屏也不会互相压住，也不把「1:1」或「关闭」挤成两行。 */
.lbx__barrow {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-wrap: nowrap; white-space: nowrap;
}
.lbx__barrow--nav:empty { display: none; }
.lbx__btn {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: #F1E9DC; font-size: 17px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lbx__btn:hover { background: rgba(255, 255, 255, .14); }
.lbx__btn--x { margin-left: 4px; font-size: 14px; }
.lbx__zoom { min-width: 46px; text-align: center; color: #E9E1D4; font-size: 12px; font-variant-numeric: tabular-nums; }
body.lbx-open { overflow: hidden; }

/* ============ 草稿恢复提示条（2026-10-23 需求 1） ============
   问卷草稿按「归属链接」作用域隔离 + 2 小时时效后，仍可能发生
   「同一条链接、同一台设备」的恢复（客户自己刷新继续填）。
   这条提示让恢复**可见**：写明数据来自上次未提交的填写，
   并给「清空重填」出口 —— 门店共享设备上换人填写时，
   下一个人看到提示就知道该清空，不会莫名其妙提交别人的资料。 */
.draftbar {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 13px; color: var(--ink-2); line-height: 1.5;
}
.draftbar__ico {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-style: normal;
  font-family: Georgia, serif;
}
.draftbar__t { flex: 1; min-width: 0; }
.draftbar__acts { flex: none; display: flex; align-items: center; gap: 6px; }
.draftbar__btn {
  appearance: none; cursor: pointer;
  border: 1px solid var(--accent); border-radius: 999px;
  background: transparent; color: var(--accent);
  padding: 4px 12px; font-size: 12.5px; white-space: nowrap;
  transition: .15s ease;
}
.draftbar__btn:hover { background: var(--accent); color: #fff; }
.draftbar__x {
  appearance: none; cursor: pointer; border: 0; background: transparent;
  color: var(--ink-3); font-size: 16px; line-height: 1; padding: 4px;
}
.draftbar__x:hover { color: var(--ink); }

/* ══════════════════════════════════════════════════════════
   v1.16.23 商品图查看器 · 图集模式（主图 + 副图切换）
   ⚠️ 追加在所有断点块之后，不插中间。
   ══════════════════════════════════════════════════════════ */
.lbx__bar-sp { width: 10px; }
.lbx__count { min-width: 52px; text-align: center; color: #E9E1D4; font-size: 12px; font-variant-numeric: tabular-nums; }
.lbx__thumbs {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 118px; z-index: 3;
  display: flex; gap: 6px; max-width: 86vw; overflow-x: auto; padding: 6px 8px;
  border-radius: 12px; background: rgba(20, 17, 14, .55);
}
.lbx__th {
  flex: none; width: 44px; height: 44px; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; background: rgba(255,255,255,.08); opacity: .72;
}
.lbx__th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lbx__th.is-on { border-color: #D9B36A; opacity: 1; }

/* ══════════════════════════════════════════════════════════
   v1.16.46 阳历生日选择器（在线问卷 H5 · 移动端友好）
   ⚠️ 追加在所有断点块之后，不插中间。
   形态：移动端 = 底部抽屉（从下滑出）；桌面端 = 居中弹层。
   ══════════════════════════════════════════════════════════ */
.date-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.date-input {
  max-width: 220px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.date-row__age {
  font-size: 12.5px;
  color: var(--ink-3);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.fdp {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}
.fdp.is-on { display: block; }
.fdp__mask {
  position: absolute;
  inset: 0;
  background: rgba(35, 32, 28, .46);
  animation: fdpFade .18s ease;
}
.fdp__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(440px, 100%);
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(58, 47, 33, .22);
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: fdpUp .22s cubic-bezier(.22, .8, .3, 1);
}
.fdp__grab {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 6px auto 12px;
}
.fdp__head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.fdp__head b {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--serif);
}
.fdp__nav {
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 9px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.fdp__nav:active { background: var(--accent-soft); color: var(--accent); }
.fdp__week, .fdp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.fdp__week span {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  padding: 4px 0;
}
.fdp__cell {
  aspect-ratio: 1 / 1;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.fdp__cell.is-empty { cursor: default; }
.fdp__cell:active:not(.is-empty) { background: var(--accent-soft); }
.fdp__cell.is-today { color: var(--accent); font-weight: 700; }
.fdp__cell.is-on { background: var(--accent); color: #fff; font-weight: 600; }
.fdp__foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
@keyframes fdpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fdpUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }

/* 桌面端：改成居中弹层（底部抽屉在鼠标环境里很怪） */
@media (min-width: 720px) {
  .fdp__panel {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    border-radius: 18px;
    padding: 18px 22px 18px;
    animation: fdpPop .16s ease;
  }
  @keyframes fdpPop {
    from { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
}
