/* 动效层单独成文件，必须在设计系统最前面引入，保证它排在所有基础样式之后生效 */
@import url("./motion.css");
/* 章法层：暗底场景、纸边交接、偏心纹样（第二章） */
@import url("./chapter.css");

/* ==================================================================
   Aura · 设计系统
   浅色主题：宣纸底 + 墨字 + 黄铜主色 + 黑漆暗面
   衬线做标题（金石气），无衬线做界面（可读性），等宽做数字
   ================================================================== */

:root {
  /* --- 底色层次：宣纸、绢本。偏暖的象牙纸，比纯白低半档，长文不刺眼 --- */
  --bg:        #F5EFE3;   /* 纸面：正文、列表、表单都落在这里 */
  --bg-sunk:   #EBE2D2;   /* 压一层：公告条、表头、被压住的区域 */
  --surface:   #FBF6EA;   /* 抬一层：会在纸上「浮起」的纸板 */
  --surface-2: #F1E9DA;   /* 纸板背层：图片底、图表底 */

  /* --- 墨色：暖黑，不用蓝黑 --- */
  --ink:   #191510;   /* 15.9:1 */
  --ink-2: #4B4237;   /*  8.6:1，正文与说明 */
  --ink-3: #6E6355;   /*  5.1:1，正文最浅到此为止 */
  --ink-4: #A99C88;   /*  仅装饰：分隔、禁用态 */

  /* --- 线：发丝级，一像素就够 --- */
  --line:      #DCCFB8;
  --line-soft: #E7DCC7;
  --line-ink:  #C8B695;

  /* --- 主色：金箔（logo 里的金），只做标记与强调，不做大面积填充 --- */
  --brand:      #7E5F26;   /* 5.2:1，可做文字色 */
  --brand-deep: #63481A;
  --brand-soft: #F2E6CC;
  --brand-line: #DFC99C;

  /* --- 鎏金：暗面上的高光，只做装饰（描边、刻度、纹样） --- */
  --gold:      #A8823C;   /* 对纸 3.1:1 —— 只可装饰，不可做正文 */
  --gold-soft: #F7EEDA;
  --gold-line: #E4D2AC;

  /* --- 暗面：四个「场景底」，按章节换，不换主题 --- */
  --ink-bg:     #17120C;   /* 黑漆：页脚、主按钮 */
  --ink-bg-2:   #221C14;
  --scene-verd: #22322B;   /* 铜绿：编辑部、工艺段 */
  --scene-oxblood: #3B1E1B;/* 牛血红：订阅、承诺 */
  --scene-lapis:   #1B2438;/* 石青：共创、社区 */

  /* --- 第二组强调色：取自矿石，只用于「一件东西」，不铺满 --- */
  --cinnabar: #A23A2B;   /* 5.8:1，朱砂：警示、限量 */
  --celadon:  #6E8A78;   /* 3.3:1，青瓷：成功、已确认（仅装饰/图标） */
  --amethyst: #6A5478;   /* 5.8:1，紫晶：灵犀相关标记 */

  /* --- 五行：按矿石本色收一档饱和度 --- */
  --el-metal: #A3AAB8;
  --el-wood:  #7A9A66;
  --el-water: #5B8FBE;
  --el-fire:  #C9664F;
  --el-earth: #B58F58;

  /* --- 语义 --- */
  --up:   #A8402A;   /* 警示、超额 */
  --ok:   #3F6B52;
  --warn: #9C6B1C;

  /* --- 尺寸：4px 栅格上的圆角阶梯，控制卡片/面板分开 --- */
  --r-xs: 4px;    /* 小标签、色块 */
  --r-sm: 8px;    /* 按钮、输入框 */
  --r-md: 12px;   /* 卡片 */
  --r-lg: 16px;   /* 面板 */
  --r-xl: 22px;   /* 大容器 */
  --r-pill: 999px;

  /* --- 间距：只用这一套，别再出现 56/62/72/96 混用 --- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* --- 字号 --- */
  --fs-hero: clamp(42px, 5vw, 64px);
  --fs-h1:   clamp(30px, 3.4vw, 42px);
  --fs-h2:   clamp(23px, 2.2vw, 29px);
  --fs-h3:   18px;
  --fs-body: 15px;
  --fs-sm:   13px;
  --fs-xs:   11.5px;

  --shadow-1: 0 1px 1px rgba(31,27,22,.04);
  --shadow-2: 0 2px 6px rgba(31,27,22,.05), 0 1px 2px rgba(31,27,22,.04);
  --shadow-3: 0 12px 32px rgba(31,27,22,.10);
  --shadow-pop: 0 24px 60px rgba(31,27,22,.18);

  --nav-h: 64px;
  --header-h: 97px;   /* 公告条 32 + 导航 64 + 1px 边框 */
  --serif: "Cormorant Garamond", "Songti SC", "Source Han Serif SC",
           Georgia, "Times New Roman", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ================================================================== */
/* 基础 */
/* ================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body)/1.66 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.012em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
/* 数字统一等宽对齐：价格、颗数、尺寸表都对得上 */
.num, .mono { font-variant-numeric: tabular-nums; }

::selection { background: var(--brand-soft); color: var(--brand-deep); }

:focus-visible {
  outline: 1.5px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.06;
}

/* 段落小标签：句首大写、不加宽字距、不抢标题?
   原先?10.5px/650/.2em 的全大写，属于最典型的模板痕迹?*/
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--ink-3);
}

.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.hidden { display: none !important; }

.sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ================================================================== */
/* 顶栏 */
/* ================================================================== */

.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 26px;
  padding: 0 22px;
  background: rgba(247,244,238,.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-brand { display: flex; align-items: center; gap: 10px; margin-right: 6px; }

/* 品牌 logo：用户提供的金色液态圆标（2026-09-28 换掉?CSS 紫球）?
   图本身已是圆形透明 PNG，这?border-radius 只是兜底，防止拿到方的图?*/
.nav-mark {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  background: url('/assets/brand/logo.png') center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(31,27,22,.10);
}

.nav-name {
  font-family: var(--serif);
  font-size: 19px; font-weight: 500; letter-spacing: .01em;
}

.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }

.nav-link {
  padding: 7px 13px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 520; color: var(--ink-2);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-link:hover { background: var(--bg-sunk); color: var(--ink); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand-deep); }

/* ================================================================== */
/* 按钮 */
/* ================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-ink);
  background: var(--surface);
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  white-space: nowrap;
  transition: background .16s var(--ease), border-color .16s var(--ease),
              color .16s var(--ease);
}
.btn:hover { border-color: var(--ink-3); background: var(--surface); }
.btn:active { background: var(--bg-sunk); }

/* 主按钮：墨色实底。一个屏幕上只留一个?*/
.btn-primary {
  background: var(--ink); border-color: var(--ink); color: #FBF8F1;
}
.btn-primary:hover { background: #000; border-color: #000; color: #fff; }

/* 品牌动作沿用墨色；黄铜只在标记、下划线、数字上出现，不做按钮大色块 */
.btn-brand {
  background: var(--ink); border-color: var(--ink); color: #FBF8F1;
}
.btn-brand:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #FBF8F1; }

.btn-ghost {
  background: transparent; border-color: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--bg-sunk); border-color: transparent; color: var(--ink); }

.btn-gold {
  background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-deep);
}
.btn-gold:hover { background: #EFE1C6; border-color: var(--brand); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .38; pointer-events: none; }

/* ================================================================== */
/* 表单 */
/* ================================================================== */

.field { display: block; margin-bottom: 15px; }

.field-label {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 500; color: var(--ink-2);
}
.field-hint { margin-top: 5px; font-size: 11.5px; color: var(--ink-3); }

.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px;
  background: var(--surface);
  border: 1px solid var(--line-ink);
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.textarea { height: auto; min-height: 84px; padding: 11px 13px; resize: vertical; line-height: 1.55; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%237B7266' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
  padding-right: 34px;
}

.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

/* 选项组（单选卡片） */
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt-grid-3 { grid-template-columns: repeat(3, 1fr); }

.opt {
  position: relative; display: block;
  padding: 13px 15px;
  border: 1px solid var(--line-ink); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color .14s var(--ease), background-color .14s var(--ease);
}
.opt:hover { border-color: var(--ink-3); background: var(--surface-2); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-t { display: block; font-size: 13.5px; font-weight: 500; }
.opt-s { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt:has(input:checked) .opt-t { color: var(--brand-deep); }

/* 滑块 */
.range { width: 100%; height: 22px; appearance: none; background: none; cursor: pointer; }
.range::-webkit-slider-runnable-track {
  height: 3px; border-radius: 2px; background: var(--line-ink);
}
.range::-webkit-slider-thumb {
  appearance: none; width: 16px; height: 16px; margin-top: -6.5px;
  border-radius: 50%; background: var(--surface);
  border: 2px solid var(--brand);
  box-shadow: 0 1px 4px rgba(23,22,26,.2);
}
.range::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line-ink); }
.range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--brand);
}

/* 分段控件 */
.seg {
  display: inline-flex; padding: 2px; gap: 2px;
  background: var(--bg-sunk); border-radius: var(--r-sm);
}
.seg button {
  padding: 6px 12px; border-radius: 6px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-3);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button.is-on {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
}
/* 导航里的语言切换（中/EN）：两个?+ 一条斜线，不做胶囊 */
.nav-lang {
  display: inline-flex; align-items: center; gap: 1px;
  padding: 0 2px; margin-right: 2px;
  background: none;
}
.nav-lang button {
  padding: 6px 5px; font-size: 11.5px; font-weight: 400; color: var(--ink-3);
  border-radius: 4px;
}
.nav-lang button:hover { color: var(--ink); background: none; }
.nav-lang button.is-on {
  background: none; box-shadow: none;
  color: var(--ink); font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--brand); text-decoration-thickness: 1px;
}
.nav-lang i { font-style: normal; font-size: 10px; color: var(--ink-4); }

/* 购物车里的定制整圈：没有商品照片，用加购时的整圈缩略 SVG */
.cart-thumb-custom { display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.cart-thumb-custom svg { width: 52px; height: 52px; display: block; }

/* 开?*/
.switch { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-track {
  width: 36px; height: 21px; flex: none; border-radius: var(--r-pill);
  background: var(--line-ink); position: relative;
  transition: background .18s var(--ease);
}
.switch-track::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s var(--ease);
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(15px); }
.switch-label { font-size: 13px; }

/* ================================================================== */
/* 卡片 / 面板 */
/* ================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: none;
}
.card-pad { padding: 20px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}
/* 面板标题：正常大小写，不加字距，不做全大?*/
.panel-title {
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2);
}
.panel-body { padding: 16px; }

/* 标签：小圆角矩形，不做胶?*/
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 8px;
  border-radius: var(--r-xs);
  background: var(--bg-sunk); border: 1px solid transparent;
  font-size: 11.5px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap;
}
.chip-brand { background: var(--brand-soft); color: var(--brand-deep); }
.chip-gold  { background: var(--gold-soft); color: var(--brand-deep); }
.chip-ok    { background: #E9F1EC; color: var(--ok); }
.chip-warn  { background: #F8EFDD; color: var(--warn); }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

.el-metal { background: var(--el-metal); }
.el-wood  { background: var(--el-wood); }
.el-water { background: var(--el-water); }
.el-fire  { background: var(--el-fire); }
.el-earth { background: var(--el-earth); }

/* ================================================================== */
/* 珠子卡片 / 网格 */
/* ================================================================== */

.bead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.bead-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 7px 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: grab;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease),
              transform .12s var(--ease);
}
.bead-card:hover { border-color: var(--ink-4); }
.bead-card:active { cursor: grabbing; }
.bead-card.is-dragging { opacity: .34; }
.bead-card.is-picked { border-color: var(--brand); background: var(--brand-soft); }

.bead-card-img {
  width: 46px; height: 46px; flex: none;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  pointer-events: none;
}
.bead-card-name {
  font-size: 10.5px; line-height: 1.28; text-align: center;
  color: var(--ink-2); font-weight: 540;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.bead-card-meta {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--ink-3);
}
.bead-card-price { font-size: 10.5px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.bead-card-el {
  position: absolute; top: 7px; left: 7px;
  width: 6px; height: 6px; border-radius: 50%;
}

/* ================================================================== */
/* 工坊三栏 */
/* ================================================================== */

.studio {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 336px;
  gap: 14px;
  /* 底部只留 10：右栏恰好一屏时装完时，14 会把文档顶出 4px，白多一条页面滚动条 */
  padding: 14px 14px 10px;
  align-items: start;
  /* 公告?30 + 导航 62 = 实际吸顶高度 92；只?--nav-h 会多?31px 滚动 */
  min-height: calc(100vh - var(--header-h));
}

.studio-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.studio-col-left { position: sticky; top: calc(var(--header-h) + 14px); }
.studio-col-right { position: sticky; top: calc(var(--header-h) + 14px); }

/* --- 珠子库筛选：五组，垂直排但每行都压到最小高?--- */
/* 珠子库顶栏：标题 + 搜索 + 计数挤在同一行，把省下的高度让给下面的珠子列?*/
.lib-top {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px 7px;
}
.lib-top .panel-title { flex: none; white-space: nowrap; }
.lib-top .input {
  flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 10px; font-size: 12.5px;
}
.lib-top .chip { flex: none; height: 22px; padding: 0 7px; font-size: 11px; }

.lib-filters { padding: 0 14px 8px; }

.kind-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.kind-bar { flex: 1; flex-wrap: nowrap; }
.kind-bar .chip { white-space: nowrap; height: 26px; padding: 0 11px; font-size: 12px; cursor: pointer; }
.clr {
  flex: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 11.5px; color: var(--ink-3);
  padding: 2px 2px; border-radius: 4px;
}
.clr:hover { color: var(--ink); background: var(--line-soft); }

.fgroup { margin-top: 5px; }
.fgroup:last-child { margin-bottom: 0; }
.fgroup .ctl-label { margin-bottom: 3px; }
/* 图标组：按列数等分、一行放?—?不再横向滚动，所以不会再出现
   「天秤后面的天…」「守护后面的丰…」被切掉半个的情?*/
.fgroup .filter-bar { flex-wrap: wrap; gap: 4px; }
.fgroup.fg-icons .filter-bar {
  display: grid;
  grid-template-columns: repeat(var(--cols, 12), minmax(0, 1fr));
  gap: 4px;
}
.fgroup .chip {
  height: 22px; padding: 0 8px; font-size: 11.5px; cursor: pointer; flex: none;
}
/* 图标组（星座 / 五行 / 效果）：纸上小方?+ 一个符号，选中才上铜色 */
.fgroup.fg-icons .chip {
  height: 28px; padding: 0; display: grid; place-items: center;
  border-radius: var(--r-xs); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  transition: border-color .14s var(--ease), color .14s var(--ease);
}
.fgroup.fg-icons .chip svg { width: 16px; height: 16px; display: block; }
.fgroup.fg-icons .chip:hover { border-color: var(--ink-4); color: var(--ink); }
.fgroup.fg-icons .chip.is-on {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep);
}
/* 五行只用颜色做信息提示，选中时统一回到铜色 */
.fgroup.fg-icons .chip[data-element]:not(.is-on) { color: color-mix(in oklab, var(--el, var(--ink-2)) 72%, var(--ink)); }
.fgroup .select { height: 30px; font-size: 12.5px; }

.lib-scroll {
  /* 326 = 顶栏 + 四组筛?+ 底部留白；图标块?25 长到 28 后补?9px */
  max-height: calc(100vh - var(--header-h) - 335px);
  overflow-y: auto;
  padding: 12px 14px 14px;
  overscroll-behavior: contain;
}
.lib-scroll::-webkit-scrollbar { width: 9px; }
.lib-scroll::-webkit-scrollbar-thumb {
  background: var(--line-ink); border-radius: 5px;
  border: 3px solid var(--surface); background-clip: padding-box;
}
.lib-scroll::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: padding-box; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-bar .chip { cursor: pointer; transition: all .14s var(--ease); }
.filter-bar .chip:hover { background: var(--line-soft); }
.filter-bar .chip.is-on {
  background: var(--brand-soft); color: var(--brand-deep); border-color: var(--brand);
}

/* --- 画布：俯?+ 斜视 并排 --- */
.canvas-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 14px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.canvas-card::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .55;
  pointer-events: none;
}
.canvas-views {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px; width: 100%;
}
.view-cell {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.42);
  border: 1px solid var(--line-soft);
}
.view-cell[data-view="top"] { justify-content: center; }
.view-cell--oblique {
  display: flex; flex-direction: column;
}
.view-host {
  width: 100%; aspect-ratio: 1;
  touch-action: none;
  cursor: grab;
}
.view-cell--oblique .view-host {
  aspect-ratio: 1 / 1.25;
  cursor: ew-resize;
  touch-action: pan-y;
}
.spin-hint {
  position: absolute; left: 50%; bottom: 8px; z-index: 3;
  transform: translateX(-50%);
  padding: 3px 8px; border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 10px;
  white-space: nowrap; pointer-events: none;
}
.view-host:active { cursor: grabbing; }
.view-host svg { width: 100%; height: 100%; display: block; overflow: visible; }
.view-tag {
  position: absolute; top: 6px; left: 8px; z-index: 2;
  font-size: 10.5px; color: var(--ink-3);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 2px 7px; pointer-events: none;
}
.canvas-views.is-dropping .view-tag { opacity: .35; }

/* 画布下方的控制条 */
.canvas-controls {
  width: 100%; margin-top: 4px; padding: 9px 0 9px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 12px 16px;
  border-top: 1px solid var(--line-soft);
}
.canvas-controls .seg { display: flex; width: 100%; }
/* 窄列里「顺时针 / 材料包」不能断成两行；按钮平分列宽 */
.canvas-controls .seg button { flex: 1; min-width: 0; padding: 6px 8px; white-space: nowrap; }
.ctl-label {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 11px; font-weight: 500;
  color: var(--ink-3); margin-bottom: 4px;
}
.ctl-val { font-size: 12.5px; font-weight: 500; color: var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* --- 工坊右栏：灵犀 ?这一??保存的方案（上到下） --- */
/* 2026-10-30 定稿：右栏吸?+ 自己在列内滚，绝不跟着页面滚?
 * 试过让整页滚（去?max-height/sticky），结果是页面只多出 97px 可滚?
 * 一滚灵犀卡就钻进 93px 的吸顶导航下?—?既点不到「推荐下一颗」，也滚不回来?
 * 现在：列顶固定在导航下方，保存的方案 5 份全部展开（不再只?2~3 行）?
 * 超出部分由整列滚动承担（1440×900 上刚好一屏装完，不出滚动条）?*/
.studio-col-right {
  gap: 7px;
  /* 14 = 列顶留白；再?16 到底边，让最后一行完整落在视口里 */
  max-height: calc(100vh - var(--header-h) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 2px;
}
/* 三块都保持自己的自然高度，谁都不许被压扁?
   坑：flex 子项默认 flex-shrink:1，一旦内容超?max-height，浏览器会先把三块各压缩一?
   塞进容器，而不是让右栏滚动?panel 又是 overflow:hidden，被压掉的那截（「加入购物车」?
   「发送」）直接消失，看上去就像被上一块盖住了。改?flex:0 0 auto 后只有滚动、没有裁切?*/
.studio-col-right > * { flex: 0 0 auto; }
.studio-col-right::-webkit-scrollbar { width: 7px; }
/* 滚动条要看得见：建议卡展开时右栏会?~130px，若滚动条是浅米色，
   底下那条被切一半的方案卡就会被读成「被盖住了」而不是「还能往下滚?*/
.studio-col-right::-webkit-scrollbar-thumb {
  background: rgba(23, 22, 26, .26); border-radius: 4px;
  border: 2px solid transparent; background-clip: padding-box;
}
.studio-col-right::-webkit-scrollbar-thumb:hover { background: rgba(23, 22, 26, .42); background-clip: padding-box; }
/* 「保存的方案」：全部记录直接排开（最?5 份），不再给列表?max-height 和内滚动 */
.studio-col-right > #draftPanel { flex: 0 0 auto; display: flex; flex-direction: column; padding-bottom: 6px; }
.studio-col-right > #draftPanel > .panel-head { flex: 0 0 auto; }
.studio-col-right > #draftPanel > .panel-body {
  flex: 0 0 auto; min-height: 0;
  padding-bottom: 2px;
  overflow: visible;
}
/* 聊天气泡区仍限高：对话会无限长，让它撑开整列没意义（内部自动滚到最新一条） */
.studio-col-right .rchat-thread { max-height: 120px; overflow-y: auto; scrollbar-width: thin; }
.studio-col-right .panel-head { padding: 6px 12px; }
.studio-col-right .panel-body { padding: 9px 12px; }
.studio-col-right .aura-card { padding: 9px 12px; }
.studio-col-right .aura-text { font-size: 12px; line-height: 1.46; }
/* 灵犀输入条：右栏只有 336 宽，通用 42px 高的输入框塞在这里又高又?—?压到 34?
   发送按钮跟着一起缩（字?12.5，不再比输入框里的字大一号） */
.studio-col-right .rchat-compose { gap: 7px; align-items: center; }
.studio-col-right .rchat-compose .input {
  height: 34px; padding: 0 10px; font-size: 12.5px; border-radius: 9px;
}
.studio-col-right .rchat-compose .btn {
  height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 9px;
}
.studio-col-right .stat { padding: 7px 10px; }
.studio-col-right .stat-v { font-size: 14px; }
.studio-col-right .bill { font-size: 12.5px; }
.studio-col-right .bill-row { padding: 2px 0; }
.studio-col-right .bill-total { padding-top: 4px; }
.studio-col-right .bill-total b { font-size: 22px; }
/* 「这一单」三个按钮：40 ?38，省下的高度给「保存的方案」多露半?*/
.studio-col-right #btnOrder,
.studio-col-right #btnTryOn,
.studio-col-right #btnShare { height: 38px; font-size: 13px; }
.studio-col-right .legend { margin-top: 6px; }

/* 中栏「这一圈用了什么」：珠子种类多了也不能把画布顶出屏幕 */
.studio-col-center #usedList { max-height: 148px; overflow-y: auto; }
.studio-col-center #usedList .pick-row { gap: 9px; padding: 8px 0; }
.studio-col-center #usedList .pick-img { width: 34px; height: 34px; }
.studio-col-center #usedList .pick-name { font-size: 12px; }
.studio-col-center #usedList .pick-why { font-size: 11px; line-height: 1.45; margin-top: 2px; }
.studio-col-center .panel-head { padding: 8px 13px; }
.studio-col-center .panel-body { padding: 10px 13px; }
.studio-col-center .stat { padding: 8px 10px; }
.studio-col-center .legend { margin-top: 6px; }

/* 设计摘要一行两块：左「用了什么」右「整圈状态」，等高并排 */
.studio-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.studio-pair > .panel { min-width: 0; }

/* 矮屏?280×800 笔记本等）：右栏再压一档，?5 份方案也尽量一屏露?*/
@media (min-width: 1001px) and (max-height: 860px) {
  .studio-col-right { gap: 7px; }
  .studio-col-right .aura-card { padding: 9px 11px; }
  .studio-col-right .panel-body { padding: 8px 11px; }
  /* 信任文案在矮屏收起，省下的高度留给「保存的方案?*/
  .studio-col-right .trust-note { display: none; }
  .studio-col-right .draft-row { height: 36px; }
  .studio-col-right .draft-thumb { width: 26px; height: 26px; }
  .studio-col-right .draft-thumb svg { width: 22px; height: 22px; }
}

/* 画布顶部浮动工具 */
.canvas-tools {
  position: absolute; top: 8px; right: 8px; z-index: 6;
  display: flex; gap: 6px;
}
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2);
  transition: border-color .14s var(--ease), color .14s var(--ease);
}
.icon-btn:hover { border-color: var(--ink-4); color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }

/* ================================================================== */
/* 灵犀建议? */
/* ================================================================== */

.aura-card {
  position: relative;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-md);
}
.aura-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.aura-orb {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.aura-title { font-size: var(--fs-sm); font-weight: 500; color: var(--brand-deep); }
.aura-text { font-size: 13px; line-height: 1.68; color: var(--ink-2); }
.aura-text strong { color: var(--ink); font-weight: 500; }

.suggest {
  display: flex; gap: 11px; align-items: center;
  margin-top: 11px; padding: 10px;
  background: var(--surface); border: 1px solid var(--brand-line);
  border-radius: var(--r-sm);
}
.suggest-img {
  width: 42px; height: 42px; flex: none;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.suggest-body { min-width: 0; flex: 1; }
.suggest-name { font-size: 12.5px; font-weight: 500; }
.suggest-why { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; }

/* 建议卡底部一行：看到第几个候?+ 撤销（撤销一直按到第一个之?= 收起卡片?*/
.suggest-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 5px; padding: 0 2px;
}
.suggest-step { font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); letter-spacing: .02em; }
.suggest-undo {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 11.5px; color: var(--ink-2);
  padding: 2px 5px; border-radius: 6px;
}
.suggest-undo:hover { color: var(--ink); background: var(--line-soft); }

/* ================================================================== */
/* 订单 / 结算 */
/* ================================================================== */

.bill { font-size: 13px; }
.bill-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 5px 0; color: var(--ink-2);
}
.bill-row span:last-child { font-family: var(--mono); color: var(--ink); }
.bill-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 9px; padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 14px; font-weight: 500;
}
.bill-total b { font-family: var(--serif); font-size: 25px; font-weight: 500; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line-soft); border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--line-soft);
}
.stat { padding: 10px 12px; background: var(--surface); }
.stat-k { font-size: 11px; font-weight: 400; color: var(--ink-3); }
.stat-v { margin-top: 3px; font-size: 15px; font-weight: 500; font-family: var(--serif); font-variant-numeric: tabular-nums; }
.stat-v small { font-size: 10.5px; font-family: var(--sans); color: var(--ink-3); font-weight: 500; }

.bar-el { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--line-soft); }
.bar-el i { display: block; height: 100%; transition: width .3s var(--ease); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px; }
.legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--ink-2);
}
.legend-item b { font-family: var(--mono); font-weight: 500; }

/* ================================================================== */
/* 首页 */
/* ================================================================== */

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 22px; }

.hero {
  position: relative;
  display: grid; grid-template-columns: 1.06fr .94fr; gap: 46px;
  align-items: center;
  padding: 74px 0 66px;
}
.hero-copy { max-width: 552px; }
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 4.1vw, 52px);
  line-height: 1.08; letter-spacing: -.028em;
  margin: 16px 0 20px;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-lede { font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 430px; }
.hero-cta { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }

.hero-stage {
  position: relative; aspect-ratio: 1;
  display: grid; place-items: center;
}
.hero-stage svg { width: 100%; height: 100%; overflow: visible; }

.section { padding: 72px 0; border-top: 1px solid var(--line-soft); }
.section-head { max-width: 560px; margin-bottom: 32px; }
.section h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(26px, 3.2vw, 36px); line-height: 1.14;
  letter-spacing: -.022em; margin: 12px 0 12px;
}
.section-lede { font-size: 15.5px; line-height: 1.68; color: var(--ink-2); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 步骤编号：细线圆?+ 衬线数字，不做实心色?*/
.step-n {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-ink);
  color: var(--brand);
  font-family: var(--serif); font-size: 15px; font-weight: 500;
  margin-bottom: 14px;
}
.step h3 { font-size: 16px; margin-bottom: 7px; }
.step p { font-size: 13.5px; line-height: 1.64; color: var(--ink-2); }

.intent-card {
  display: block; padding: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.intent-card:hover {
  border-color: var(--ink-4); background: var(--surface-2);
}
.intent-card h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; margin-bottom: 5px; }
.intent-card p { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.intent-card .intent-n { margin-top: 11px; font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }

.note-box {
  padding: 15px 17px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 2px solid var(--brand);
  border-radius: var(--r-sm);
  font-size: 12.5px; line-height: 1.66; color: var(--ink-2);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  font-size: 12.5px; color: var(--ink-3);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 {
  font-size: 12.5px; font-weight: 500; color: var(--ink);
  margin-bottom: 10px;
}
.footer a { display: block; padding: 3px 0; color: var(--ink-3); }
.footer a:hover { color: var(--ink); }
.footer-legal {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; line-height: 1.7; color: var(--ink-4); max-width: 780px;
}

/* ================================================================== */
/* 咨询流程 */
/* ================================================================== */

/* 问卷?= 左侧步骤?+ 右侧内容。轨固定在左，内容占满剩下的宽度?
   这样一屏里既有导航也有题目，不会只占上半屏?*/
.reading {
  display: grid; grid-template-columns: 196px minmax(0, 1fr);
  gap: 60px; align-items: start;
  max-width: 1120px; margin: 0 auto; padding: 40px 24px 110px;
}
.reading > #quiz, .reading > #result, .reading > #loading { grid-column: 2; min-width: 0; }

.steps-nav {
  display: flex; flex-direction: column;
  position: sticky; top: calc(var(--nav-h) + 34px);
  margin: 0; border-left: 1px solid var(--line);
}
.steps-nav-item {
  display: flex; align-items: baseline; gap: 9px;
  padding: 9px 0 9px 16px; margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 12.5px; font-weight: 400; color: var(--ink-3);
  transition: color .14s var(--ease), border-color .14s var(--ease);
}
.steps-nav-item b {
  display: inline; width: auto; height: auto; background: none;
  font-family: var(--mono); font-size: 10.5px; font-weight: 400;
  color: var(--ink-4); font-variant-numeric: tabular-nums;
}
.steps-nav-item.is-done { color: var(--ink-2); }
.steps-nav-item.is-done b { background: none; color: var(--ink-3); }
.steps-nav-item.is-on { color: var(--ink); font-weight: 500; border-left-color: var(--brand); }
.steps-nav-item.is-on b { background: none; color: var(--brand); }
.steps-nav-sep { display: none; }

.q-title {
  font-family: var(--serif); font-size: clamp(25px, 3.2vw, 34px);
  font-weight: 500; letter-spacing: -.022em; margin: 0 0 10px;
}
.q-sub { font-size: 14.5px; color: var(--ink-2); line-height: 1.68; margin-bottom: 26px; max-width: 62ch; }

/* 底部行动条：题目再长，继续按钮都在拇指够得到的地?*/
#quiz {
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--nav-h) - 140px);
  padding: 40px 44px 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.quiz-actions {
  position: sticky; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 14px;
  margin-top: auto; padding: 16px 0 6px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}
.quiz-actions .btn-next { margin-left: auto; }

.reading-result { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: start; }
.reading-narr {
  font-family: var(--serif); font-size: 20px; line-height: 1.66;
  letter-spacing: -.005em; color: var(--ink);
}
.reading-narr p + p { margin-top: 15px; }

.result-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.micro-label { font-size: 11.5px; color: var(--ink-3); margin: 0 0 10px; }

@media (max-width: 900px) {
  .reading { display: block; padding: 26px 18px 80px; }
  .steps-nav {
    position: static; flex-direction: row; gap: 16px; flex-wrap: wrap;
    border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 26px;
  }
  .steps-nav-item { padding: 0 0 4px; border-left: 0; border-bottom: 1px solid transparent; }
  .steps-nav-item.is-on { border-left-color: transparent; border-bottom-color: var(--brand); }
  .reading-result { grid-template-columns: 1fr; gap: 26px; }
}

.pick-row {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pick-row:last-child { border-bottom: 0; }
.pick-img {
  width: 50px; height: 50px; flex: none;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.pick-body { min-width: 0; flex: 1; }
.pick-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pick-name { font-size: 13.5px; font-weight: 500; }
.pick-role {
  font-size: 11px; font-weight: 400; color: var(--ink-3);
}
.pick-why { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--ink-3); }

/* ================================================================== */
/* Toast / 空? */
/* ================================================================== */

.toast-wrap {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 17px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff;
  font-size: 13px; box-shadow: var(--shadow-pop);
  animation: toast-in .28s var(--ease);
}
.toast.is-warn { background: var(--warn); }
.toast.is-bad  { background: var(--up); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.empty {
  padding: 34px 20px; text-align: center;
  font-size: 13px; color: var(--ink-3); line-height: 1.65;
}

/* 骨架屏：静态色块，不做扫光 */
.skeleton { background: var(--bg-sunk); border-radius: var(--r-xs); }

/* 载入?*/
.loadbar {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 300;
  background: var(--brand); width: 0;
  transition: width .25s var(--ease), opacity .3s var(--ease);
}
.loadbar.is-done { opacity: 0; }

/* ================================================================== */
/* 响应? */
/* ================================================================== */

/* 中心列变窄时（≤1360）控制条?2×2，别把「顺时针/材料包」挤成竖排两?*/
@media (max-width: 1360px) {
  .canvas-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
}

@media (max-width: 1180px) {
  .studio { grid-template-columns: 320px minmax(0, 1fr) 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1000px) {
  .studio { grid-template-columns: 1fr; }
  .studio-col-left, .studio-col-right { position: static; }
  .studio-col-left { order: 2; }
  .studio-col-right { order: 3; }
  .studio-col-center { order: 1; }
  .lib-scroll { max-height: 340px; }
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 48px 0 42px; }
  .hero-stage { max-width: 420px; margin: 0 auto; width: 100%; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .reading-result { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 640px) {
  .nav { gap: 14px; padding: 0 14px; }
  .canvas-views { grid-template-columns: 1fr; }
  .nav-links { gap: 0; }
  .nav-link { padding: 7px 9px; font-size: 13px; }
  .section { padding: 44px 0; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .opt-grid { grid-template-columns: 1fr; }
  .bead-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .canvas-card { padding: 12px 12px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   灵犀对话框（推荐页）—?结构化问卷之外的「说人话」入?
   这里是用户拿大白话改方案的地方，所以它看起来要像一个对话，
   而不是又一个表单：左边用户（品牌色实底），右边灵犀（浅底）?
   ══════════════════════════════════════════════════════════════════ */

.rchat { margin-top: 20px; }

.rchat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 0;
}
.rchat-head .panel-title { margin-right: auto; }

.rchat-badge {
  font-size: 11px; padding: 3px 8px; border-radius: var(--r-xs);
  background: var(--bg-sunk); color: var(--ink-3);
  border: 1px solid var(--line);
  font-family: var(--mono);
  white-space: nowrap;
}
.rchat-badge.is-llm {
  background: var(--brand-soft); color: var(--brand-deep);
  border-color: var(--brand-line);
}

.rchat-hint {
  font-size: 12px; line-height: 1.7;
  padding: 8px 18px 0; margin: 0;
}

.rchat-thread {
  display: flex; flex-direction: column; gap: 9px;
  padding: 14px 18px 4px;
  max-height: 320px; overflow-y: auto;
}
.rchat-thread:empty { display: none; }

.rchat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 88%; }
.rchat-user { align-self: flex-end; align-items: flex-end; }
.rchat-agent { align-self: flex-start; align-items: flex-start; }

.rchat-bubble {
  padding: 9px 13px; border-radius: var(--r-md);
  font-size: 13px; line-height: 1.72;
  white-space: pre-wrap; word-break: break-word;
}
.rchat-user .rchat-bubble {
  background: var(--brand); color: #fff;
  border-bottom-right-radius: var(--r-xs);
}
.rchat-agent .rchat-bubble {
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: var(--r-xs);
}
.rchat-msg.is-error .rchat-bubble {
  background: #FDF3F1; border-color: #F2D7D2; color: #8E3126;
}
.rchat-msg.is-pending .rchat-bubble { color: var(--ink-3); font-style: italic; }

.rchat-meta {
  font-size: 11px; color: var(--ink-3); line-height: 1.65;
  padding: 0 3px;
}

.rchat-compose {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 18px 16px;
  border-top: 1px solid var(--line-soft); margin-top: 8px;
}
.rchat-textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px;
  font-size: 13px; line-height: 1.6;
  padding: 10px 12px;
}
.rchat-compose .btn { flex: none; height: 44px; }

@media (max-width: 620px) {
  .rchat-msg { max-width: 96%; }
  .rchat-thread { max-height: 260px; }
}

/* ── 工坊：保存的方案 + 灵犀界内对话?026-09-28）── */
.draft-row {
  display: flex; align-items: center; gap: 10px;
  height: 40px; box-sizing: border-box; padding: 0;
  border-top: 1px dashed var(--line-soft); overflow: hidden;
}
.draft-row:first-child { border-top: 0; }
/* 名字常常同名（同一份解读反复保存），缩略图才是区分版本的关?—?用户明确要求 */
.draft-thumb { flex: none; width: 30px; height: 30px; border-radius: var(--r-sm, 8px); background: var(--surface-2); border: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.draft-thumb svg { width: 25px; height: 25px; display: block; }
.draft-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.draft-main b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-main .muted { font-size: 11px; }
.aura-cand { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.aura-cand-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.btn.is-dirty { box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand-line); }
.aura-compose-hint { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }

/* ── 宠物水晶板块?026-10-02）── */
/* 两条路（让灵犀?/ 自己动手）并排卡?*/
.two-way { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.two-way h3 { font-size: 17px; margin: 6px 0; }
@media (max-width: 760px) { .two-way { grid-template-columns: 1fr; } }
.opt-grid-2 { grid-template-columns: 1fr 1fr; }

/* 工坊模式切换：人?/ 宠物 */
.mode-switch {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2, #f5f5f7);
  border: 1px solid var(--line-soft, #e7e7ef);
  border-radius: var(--r-xs); padding: 3px;
}
.mode-btn {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 14px; border-radius: 4px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: background .14s var(--ease), color .14s var(--ease);
}
.mode-btn.is-on { background: var(--brand-deep); color: #FBF8F1; }
.mode-switch-hint { margin-left: 12px; font-size: 12px; color: var(--ink-3, #888); }

/* ── 灵犀 · 玄学玩法选择（step 0）与结果解读?── */
.divine-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px; margin-top: 18px;
}
.divine-card {
  text-align: left; padding: 17px 18px; border: 1px solid var(--line-ink);
  border-radius: var(--r-sm); background: var(--surface); cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; font: inherit;
  transition: border-color .14s var(--ease), background-color .14s var(--ease);
}
.divine-card b { font-size: 15px; font-weight: 500; color: var(--ink); }
.divine-card span { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.divine-card i { font-style: normal; font-size: 10.5px; color: var(--ink-3); order: -1; }
.divine-card:hover { border-color: var(--ink-3); background: var(--surface-2); }
.divine-card.is-on { border-color: var(--brand); background: var(--brand-soft); }
.divine-result-card { margin-bottom: 12px; }
.divine-line { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px dashed var(--line-soft); }
.divine-line:first-of-type { border-top: 0; }
.divine-line b { font-size: 13px; font-weight: 500; }
.divine-line span { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
