:root{
  --bg:#f8f4ea;
  --paper:#fffdf8;
  --ink:#26241f;
  --muted:#78736a;
  --line:#e5ddcf;
  --orange:#e85d34;
  --green:#3a8c5d;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Noto Sans SC",sans-serif}
body{padding-bottom:82px}
/* TODO: 引导页首次启动时隐藏 body padding-bottom */

/* ============================================================ */
/* 引导页样式 (Onboarding) - TODO: 根据需求定制               */
/* ============================================================ */
.onboarding-overlay{
  position:fixed;inset:0;background:var(--bg);z-index:1000;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:40px 24px;
}
.onboarding-container{
  flex:1;width:100%;max-width:400px;overflow:hidden;position:relative;
}
.onboarding-page{
  display:none;flex-direction:column;
  justify-content:flex-start;align-items:center;
  height:100%;padding:40px 20px 20px;
  animation:fadeIn .3s ease;
  overflow-y:auto;
}
.onboarding-page.active{display:flex}
@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

.onboarding-logo{
  width:120px;height:120px;margin-bottom:32px;
  background:var(--paper);border-radius:28px;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 32px rgba(232,93,52,.15);
}
.onboarding-logo img{width:80%;height:80%;object-fit:contain}
.onboarding-title{font-size:28px;font-weight:700;margin:0 0 12px;color:var(--ink);text-align:center;width:100%}
.onboarding-desc{font-size:16px;color:var(--muted);line-height:1.6;margin:0;text-align:center;width:100%;max-width:360px}
.onboarding-page.active[data-page="1"] .onboarding-title,
.onboarding-page.active[data-page="1"] .onboarding-desc{text-align:center}

.onboarding-icon{font-size:64px;margin-bottom:24px}
.onboarding-page h2{font-size:22px;font-weight:600;margin:0 0 16px;text-align:left;width:100%;max-width:360px}
.onboarding-page p{font-size:14px;color:var(--muted);line-height:1.6;margin:0 0 12px;text-align:left;width:100%;max-width:360px}
.onboarding-page p:last-child{margin-bottom:0}
.feature-highlight{
  font-size:13px;color:var(--orange);font-weight:500;
  background:#fff5f2;padding:10px 14px;border-radius:10px;
  margin-top:16px !important;
  text-align:left !important;
}
.feature-btn{
  display:inline-block;padding:12px 20px;
  background:var(--orange);color:#fff;border:none;
  border-radius:10px;font-size:14px;font-weight:500;
  cursor:pointer;margin-top:16px;text-decoration:none;
}
.feature-btn:hover{background:#d44f2a}
  font-size:13px;color:var(--orange);font-weight:500;
  background:#fff5f2;padding:10px 14px;border-radius:10px;
  margin-top:16px !important;
}
.feature-btn{
  display:inline-block;padding:12px 20px;
  background:var(--orange);color:#fff;border:none;
  border-radius:10px;font-size:14px;font-weight:500;
  cursor:pointer;margin-top:16px;text-decoration:none;
}
.feature-btn:hover{background:#d44f2a}

.onboarding-options{
  display:grid;grid-template-columns:1fr 1fr;gap:12px;
  width:100%;margin-top:24px;
}
.onboarding-option input{display:none}
.onboarding-option .option-box{
  display:flex;flex-direction:column;align-items:center;
  padding:16px 12px;border:2px solid var(--line);
  border-radius:16px;cursor:pointer;
  transition:all .2s ease;background:var(--paper);
}
.onboarding-option input:checked+.option-box{
  border-color:var(--orange);background:#fff5f2;
}
.onboarding-option .option-icon{font-size:32px;margin-bottom:8px}
.onboarding-option .option-label{font-size:13px;font-weight:500;color:var(--ink)}

.onboarding-dots{
  display:flex;gap:8px;margin:24px 0;
}
.onboarding-dots .dot{
  width:8px;height:8px;border-radius:50%;background:var(--line);
  transition:all .3s ease;
}
.onboarding-dots .dot.active{background:var(--orange);width:24px;border-radius:4px}

.onboarding-actions{
  display:flex;justify-content:space-between;align-items:center;
  width:100%;max-width:400px;
}
.onboarding-skip{
  background:none;border:none;color:var(--muted);font-size:14px;
  padding:12px 16px;cursor:pointer;
}
.onboarding-next{
  background:var(--orange);color:#fff;border:none;
  padding:14px 32px;border-radius:25px;font-size:16px;font-weight:600;
  cursor:pointer;transition:all .2s ease;
}
.onboarding-next:hover{background:#d44f2a}
.onboarding-next.finish{background:var(--green)}

/* 问题调研页样式 */
.onboarding-survey-desc{font-size:14px;color:var(--muted);margin:0 0 16px}
.onboarding-checkbox-list{
  display:flex;flex-direction:column;gap:8px;
  width:100%;max-height:50vh;overflow-y:auto;
  padding-right:4px;
}
.onboarding-checkbox{
  display:flex;align-items:flex-start;gap:10px;
  padding:10px 12px;background:var(--paper);
  border:1.5px solid var(--line);border-radius:12px;
  cursor:pointer;transition:all .2s ease;
}
.onboarding-checkbox:hover{border-color:var(--orange);background:#fff5f2}
.onboarding-checkbox input[type="checkbox"]{display:none}
.onboarding-checkbox .checkbox-box{
  flex-shrink:0;width:24px;height:24px;border-radius:6px;
  background:var(--line);color:var(--muted);
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:600;
  transition:all .2s ease;
}
.onboarding-checkbox input:checked+.checkbox-box{
  background:var(--orange);color:#fff;
}
.onboarding-checkbox .checkbox-label{
  font-size:13px;color:var(--ink);line-height:1.4;
}
.onboarding-survey-note{
  font-size:8px;color:var(--muted);margin:12px 0 0;
}

header{
  height:66px;padding:10px 18px;display:flex;align-items:center;gap:10px;
  border-bottom:1px solid var(--line);position:sticky;top:0;
  background:#f8f4eaf2;backdrop-filter:blur(12px);z-index:5;
}
.logo{width:37px;height:37px;border-radius:11px;background:var(--ink);color:white;display:grid;place-items:center;font-weight:900}
.logo img{width:100%;height:100%;border-radius:11px;display:block}
header strong{font-size:20px}
header span{color:var(--muted);font-size:12px;margin-left:auto}
/* v2.10.4: 右推职责交给登录按钮本身,副标题 span 删了布局也不塌 */
header .account-btn{margin-left:auto}
header span + .account-btn{margin-left:10px}
header .app-menu-button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%}
header .app-menu-button img{display:block;width:24px;height:24px}
header .app-sync-button{display:flex;align-items:center;justify-content:center;gap:8px;flex:none;min-height:38px;padding:8px 12px}
header .app-sync-button span{margin:0;color:inherit;font-size:13px}

/* v2.10.4: Create 页紧凑化 — 标题行右侧小按钮;scan 内嵌输入框右下角 */
.hero-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.hero-row .hero-main{flex:1;min-width:0}
/* v2.20.1: My Steps 头部按钮组(library + 扫码 + 文件导入) */
.hero-actions{display:flex;gap:8px;align-items:center;flex:none}
.btn-small{flex:none;width:auto;min-height:36px;padding:6px 12px;font-size:13px;margin-top:2px}
/* v2.11.0: 抽屉语音备注口令设置 */
.vn-settings{margin-top:12px}
.vn-label{display:block;font-size:12px;color:var(--muted);margin:6px 0 3px}
.vn-input{width:100%;border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-size:14px;margin-bottom:2px}
.vn-hint{font-size:12px;color:var(--muted);margin:4px 0 0;line-height:1.5}

/* v2.12.0: 抽屉区块手风琴(默认收起,点击标题展开) */
.drawer-label.fold{cursor:pointer;user-select:none;-webkit-user-select:none}
.drawer-label.fold::after{content:'▾';float:right;opacity:.55;font-size:12px}
.drawer-label.fold.folded::after{content:'▸'}
.drawer-label.fold.folded + .drawer-card{display:none}
.drawer-label.fold.folded + .drawer-section{display:none}
.drawer-account.folded > *:not(.drawer-label){display:none}
.account-name-label{display:block;font-size:12px;color:var(--muted);margin:10px 0 4px}
.account-name-row{display:flex;gap:6px;align-items:center;min-width:0}
.account-name-row input{flex:1;min-width:0;width:0;margin:0}
.account-name-row button{flex:0 0 42px;width:42px;height:44px;padding:0;display:grid;place-items:center;border-radius:8px}
.account-name-status{display:block;min-height:18px;margin:3px 0 8px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.account-info{overflow-wrap:anywhere}
.exec-performer{margin:0 0 10px;color:var(--muted);font-size:13px;text-align:center;overflow-wrap:anywhere}
.exec-performer[hidden]{display:none}

/* v2.14.0: 报告详情层 */
/* v2.19.0: 报告层撑满全屏,Export 按钮贴底(原 92vh 留出空位) */
#reportOverlay .edit-sheet{display:flex;flex-direction:column;height:100%;max-height:none}
#reportOverlay .report-scroll{flex:1;overflow-y:auto;min-height:0;-webkit-overflow-scrolling:touch}
.report-body{padding:12px 16px;text-align:left;font-size:14px;line-height:1.6}
.report-body h1{font-size:1.3rem}
.report-body h2{font-size:1.05rem;color:var(--orange);margin-top:1em}
.report-body table{border-collapse:collapse;width:100%;font-size:13px}
.report-body td,.report-body th{border:1px solid var(--line);padding:5px 7px}
.report-body .report-sample-plate{table-layout:fixed;text-align:center}
.report-body .report-sample-plate td,.report-body .report-sample-plate th{padding:5px 2px;font-size:11px;overflow-wrap:anywhere}
.report-body .report-sample a{color:#225e9c;text-decoration:underline;overflow-wrap:anywhere}
.report-body .report-sample a:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.report-body .report-well-detail{display:none;scroll-margin-top:12px}
.report-body .report-well-detail.active{display:block}
/* v2.15.0: 备注音频区 */
.report-notes-audio{padding:0 16px 10px;text-align:left}
.report-notes-audio h2{font-size:1.05rem;color:var(--orange);margin:6px 0}
.note-audio-row{border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:10px;background:#fff}
.note-audio-step{font-size:12px;color:var(--muted);margin-bottom:6px}
.note-audio{width:100%;height:36px;display:block;margin-bottom:8px}
.note-text-edit{width:100%;border:1px solid var(--line);border-radius:10px;padding:8px;font-size:14px;margin-bottom:0}

/* v2.16.0: 报告照片网格(横版缩略图,长边为底) */
.report-photos{padding:0 16px;text-align:left}
.report-photos h2{font-size:1.05rem;color:var(--orange);margin:6px 0}
.photo-grid{display:flex;flex-direction:column;gap:10px}
.photo-cell{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
.photo-thumb{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;cursor:zoom-in}
.photo-cap{font-size:12px;color:var(--muted);padding:6px 8px}

/* v2.16.0: 历史"只看有照片"整行横版图(一行一张) */
.photo-strip{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.photo-row-img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:10px;cursor:zoom-in}

/* v2.16.2: 垃圾箱可见区(History 底部,可还原) */
.trash-header{margin-top:18px;opacity:.8}
.trash-card{opacity:.6}

/* v2.17.0: 排期窗口高亮置顶卡 */
.schedule-active{border:2px solid var(--orange);background:#fff7ec}
.schedule-active .badge{background:var(--orange);color:#fff}
.schedule-active{border:2px solid var(--orange);background:#fff7ec}
.schedule-active .badge{background:var(--orange);color:#fff}
.fab{
  position:fixed;right:18px;bottom:74px;z-index:30;
  width:52px;height:52px;min-height:52px;border-radius:50%;
  background:var(--orange);color:#fff;font-size:26px;font-weight:800;
  border:0;box-shadow:none;appearance:none;
  display:flex;align-items:center;justify-content:center;
  padding:0;line-height:1;   /* v2.17.2: 十字键居中修复 */
}

/* v2.17.2: 全局排版打磨 — hero 间距统一 */
.hero{margin-bottom:14px}
.hero p{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.55}
/* 日历页 */
.cal-head{display:grid;grid-template-columns:minmax(84px,1fr) 44px minmax(64px,120px) 44px minmax(104px,1fr);align-items:center;gap:6px;width:100%;max-width:600px;margin:0 auto 8px}
.cal-year{justify-self:start;width:84px;min-width:0;height:40px;margin:0;padding:0 4px;font-size:18px;font-weight:700;color:var(--ink);background:transparent;border:0;border-radius:8px;cursor:pointer}
.cal-year:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.cal-month-short{display:none}
@media(max-width:360px){
  .cal-month-full{display:none}
  .cal-month-short{display:inline}
}
.cal-head strong{flex:1;min-width:0;text-align:center;overflow-wrap:anywhere}
#calPrev,#calNext{flex:none;width:44px;height:40px;min-height:40px;padding:0;display:grid;place-items:center;box-shadow:none}
#calPrev img{transform:rotate(180deg)}
#calPrev{justify-self:end}
#calNext{justify-self:start}
.sched-repeat-row{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px}
.sched-repeat-row .sched-input{min-width:0}
#scheduleOverlay.open{max-height:100dvh;overflow-y:auto;justify-content:flex-start}
/* v2.17.4: M/W/D 改长方形三等分段控件 — 一个边框整体,中间分隔线,选中段深底 */
.cal-view-toggle{display:flex;justify-self:end;width:100%;max-width:120px;height:40px;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff}
.cal-view-btn{flex:1;min-width:0;height:100%;min-height:0;padding:0 4px;border:0;border-radius:0;background:#fff;color:var(--ink)}
.cal-view-btn + .cal-view-btn{border-left:1px solid var(--line)}
.cal-view-btn.active{background:var(--ink);color:#fff}
@media(max-width:600px){
  .cal-head{grid-template-columns:76px 32px minmax(54px,1fr) 32px 80px;gap:4px}
  .cal-year{width:76px}
  #calPrev,#calNext{width:32px}
}
.cal-body{padding-bottom:20px}
/* v2.17.2: Outlook 式星期头 — 与内容格同宽同列,固定圆形字母徽标,不用文字标题 */
.ot-dow{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:4px}
.ot-dow.with-gutter{grid-template-columns:44px repeat(7,1fr)}
/* v2.18.1: 日视图单徽标列 */
.ot-dow.with-gutter.single{grid-template-columns:44px 1fr}
.ot-dow-cell{display:flex;justify-content:center}
.ot-dow-badge{
  min-width:24px;height:22px;padding:0 5px;border-radius:11px;background:var(--line);
  display:flex;align-items:center;justify-content:center;
  font-size:10px;font-weight:700;color:var(--muted);line-height:1;white-space:nowrap;
}
/* 月视图 */
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-cell{
  min-height:52px;border:1px solid var(--line);border-radius:8px;padding:3px;
  font-size:11px;cursor:pointer;background:#fff;overflow:hidden;
}
.cal-cell.other{opacity:.35}
.cal-cell.sel{border-color:var(--orange);box-shadow:0 0 0 1px var(--orange)}
.cal-cell.today .cal-day{color:var(--orange);font-weight:800}
.cal-day{font-size:12px;margin-bottom:2px}
.cal-chip{
  display:block;background:var(--orange);color:#fff;
  padding:1px 4px;margin-top:2px;font-size:10px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* v2.17.3: 状态色直角半透明块 — 与格子边框完全吻合,无圆角 */
.cal-chip.st-block{border-radius:0;margin-left:-3px;margin-right:-3px;cursor:pointer}
.st-scheduled{background:rgba(37,99,235,.45)}
.st-done{background:rgba(22,163,74,.45)}
.st-overdue{background:rgba(220,38,38,.5)}
.st-device{background:#536a73;color:#fff}
/* v2.17.2: Outlook 式时间轴(周=7 列 / 日=1 列,纵轴 0~24h) */
.ot-wrap{display:flex;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
.ot-gutter{flex:none;width:44px;border-right:1px solid var(--line);background:#faf6ef}
.ot-hour-label{
  height:44px;font-size:10px;color:var(--muted);
  text-align:right;padding:2px 4px 0 0;border-bottom:1px dashed #eee;
}
.ot-col{flex:1;position:relative;border-right:1px solid var(--line);cursor:pointer}
.ot-col:last-child{border-right:none}
.ot-col.today{background:#fff7ec}
.ot-col.sel{box-shadow:inset 0 0 0 2px var(--orange)}
.ot-hour-line{height:44px;border-bottom:1px dashed #f0e8dd}
.ot-event{
  position:absolute;left:0;right:0;color:#fff;
  padding:2px 5px;font-size:10px;overflow:hidden;cursor:pointer;
  white-space:nowrap;text-overflow:ellipsis;
}
.schedule-card{text-align:left}
.schedule-card h3{margin-top:0}

/* v2.16.0: 历史搜索行;v2.17.10: 日期框拉长占满左侧,图片/Clear 靠右 */
.history-search-row{display:flex;align-items:center;gap:10px;margin-top:8px}
/* v2.17.6: Photos 改图片图标切换按钮,选中态深底白图 */
.history-photos-btn{width:auto;min-width:44px}
.history-photos-btn.on{background:var(--ink);color:#fff;border-color:var(--ink)}
/* v2.17.7: 日期控件与 Photos/Clear 按钮等高对齐 */
#historyDate{flex:1;min-width:0;height:36px;min-height:36px;box-sizing:border-box;padding:6px 10px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-size:13px}
/* 保留原生日历选择器,文本固定为英文日期格式,不随系统语言变化。 */
.history-date-field{position:relative;flex:1;min-width:0;height:36px}
.history-date-field #historyDate{width:100%;color:transparent;caret-color:transparent}
.history-date-field #historyDate::-webkit-datetime-edit{opacity:0}
.history-date-display{position:absolute;left:10px;right:36px;top:0;height:36px;display:flex;align-items:center;pointer-events:none;color:var(--ink);font-size:13px;white-space:nowrap;overflow:hidden}
/* v2.17.8: 三控件等高 36px 且去掉错位 margin
   — .light 定义在 .btn-small 之后会覆盖;input 全局规则带 margin-bottom:14px */
.history-search-row .btn-small{min-height:36px;padding:6px 12px;font-size:13px;margin-top:0}
.history-search-row #historyDate{margin-bottom:0}

/* v2.16.0: 照片全屏查看层 */
.photo-viewer{
  position:fixed;inset:0;background:#000d;display:none;z-index:90;
  display:none;align-items:center;justify-content:center;flex-direction:column;
}
.photo-viewer.open{display:flex}
.photo-viewer img{max-width:96vw;max-height:82vh;object-fit:contain;border-radius:8px}
.photo-viewer-close{position:absolute;top:14px;right:14px;width:38px;height:38px;min-height:38px;border-radius:50%;background:#fff3;font-size:16px}
.photo-viewer-cap{color:#fff;font-size:13px;margin-top:10px;padding:0 20px;text-align:center}

/* v2.16.0: 执行页拍照按钮行 */
.photo-row{margin-top:8px}
/* v2.10.5: scan 改到 Steps 标签行最右;Tip 移到输入框下方并缩小 */
.steps-head{display:flex;align-items:center;justify-content:space-between}
.steps-head #stepsHeadLabel[hidden]{display:none}
.lab-switch-slot{min-width:0}
.lab-view-switch{display:inline-flex;align-items:stretch;max-width:100%;height:34px;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:var(--paper,#fff)}
.lab-view-switch button{flex:0 0 auto;min-width:58px;min-height:32px;margin:0;padding:5px 10px;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;color:var(--muted);font-size:13px;line-height:22px;box-shadow:none}
.lab-view-switch button:last-child{border-right:0}
.lab-view-switch button[aria-pressed="true"]{background:var(--orange);color:#fff}
.lab-view-switch button:focus-visible{outline:2px solid var(--ink);outline-offset:-3px}
#page-samples>.lab-switch-slot,#page-recipes>.lab-switch-slot{margin-bottom:16px}
.steps-head-tools{display:flex;align-items:center;gap:8px}
.steps-head-tools [hidden]{display:none}
.create-draft-bar{display:flex;align-items:center;gap:12px;margin:0 0 8px}
.create-draft-bar span{flex:1;min-width:0;font-size:12px;overflow-wrap:anywhere;color:var(--muted,#666)}
.create-draft-bar .draft-error{color:#b42318}
#discardCreateDraft{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0}
#discardCreateDraft:disabled{opacity:.35}
.create-actions{display:grid;grid-template-columns:minmax(0,auto) 44px 44px;justify-content:flex-end;max-width:64%}
.create-actions .btn-small{min-height:44px;white-space:normal;margin-top:0}
.create-actions button{box-shadow:none;appearance:none}
#createModules{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0}
.steps-head label{margin-bottom:0}
.scan-mini{width:44px;min-height:30px;padding:0;font-size:15px;border-radius:10px;margin:0;display:inline-flex;align-items:center;justify-content:center}
/* v2.10.7: Steps 输入框自动撑高,不出现内部滚动条 */
#stepsInput{overflow-y:hidden;resize:none;min-height:130px}
#materialsInput{overflow-y:hidden;resize:none}

/* v2.10.8: 代码式输入框 — 左侧行号槽(VSCode 风格) */
.code-wrap{
  display:flex;align-items:stretch;background:#fff;border:1px solid var(--line);
  border-radius:14px;overflow:hidden;margin-bottom:14px;font-size:15px;
}
.code-wrap textarea{border:none;border-radius:0;margin-bottom:0;flex:1;min-width:0;background:transparent}
.line-nums{
  flex:none;width:34px;padding:14px 6px 14px 10px;text-align:right;
  font-size:15px;line-height:1.6;font-family:monospace;color:var(--muted);
  background:#faf6ef;border-right:1px solid var(--line);
  white-space:pre;user-select:none;
}
/* v2.12.0: 逐行删除按钮槽(与行号对齐,一行一个 ✕) */
.line-dels{
  flex:none;width:30px;padding:14px 4px;display:flex;flex-direction:column;
  background:#faf6ef;border-left:1px solid var(--line);user-select:none;
}
.line-del{
  width:22px;height:24px;min-height:24px;padding:0;margin:0 auto;
  display:grid;place-items:center;border:0;box-shadow:none;appearance:none;
  font-size:11px;line-height:1;background:transparent;border-radius:6px;
  color:var(--muted);
}
.line-del:active{color:#b0341f}

main{padding:18px 15px;max-width:720px;margin:auto}
.page{display:none}
.page.active{display:block}
.page{padding-bottom:90px}     /* 防止底部 nav 遮挡最后按钮 */

.hero{padding:10px 2px 18px}
.hero small{color:var(--orange);font-weight:800;letter-spacing:.12em}
.hero h1{font-family:serif;font-size:34px;margin:7px 0}
.hero p{color:var(--muted);line-height:1.6}

/* 搜索框 */
.search{
  width:100%;border:1px solid var(--line);background:white;
  border-radius:14px;padding:14px;outline:none;margin-bottom:14px;
}

/* 分类 tab */
.cat-tabs{
  display:flex;gap:8px;overflow-x:auto;padding:4px 0 14px;
  scrollbar-width:none;
}
.cat-tabs::-webkit-scrollbar{display:none}
.cat-tab{
  flex:0 0 auto;padding:8px 16px;border-radius:18px;
  background:#fff;border:1px solid var(--line);color:var(--ink);
  font-size:14px;font-weight:600;min-height:auto;height:auto;
  white-space:nowrap;
}
.cat-tab.active{background:var(--ink);color:white;border-color:var(--ink)}

/* 列表 */
.list-header{font-size:12px;color:var(--muted);padding:0 4px 6px}
.list{display:grid;gap:13px;padding-bottom:30px}

/* 卡片 (v1.0.0 风格:大圆角 19px) */
.card{
  position:relative;
  background:var(--paper);border:1px solid var(--line);padding:18px;
  border-radius:19px;box-shadow:0 7px 25px #3a2e1710;
}
/* v2.17.4: 卡片右上角图标按钮(Export) */
.card-corner{position:absolute;top:10px;right:10px;width:36px;min-width:36px;min-height:36px;padding:6px;border-radius:10px;z-index:2}
.card-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.card h3{font-size:21px;margin:8px 0 4px;flex:1}
.card p{color:var(--muted);line-height:1.6}
.badge{
  background:#efe8dc;color:var(--ink);border-radius:20px;
  font-size:12px;padding:5px 10px;font-weight:700;
}
.meta{color:var(--muted);font-size:13px;margin:4px 0 14px}
.meta-small{color:var(--green);font-size:12px;padding:0 6px}
.tag{background:#efe8dc;border-radius:20px;font-size:12px;padding:6px 9px}

/* 卡片按钮区 */
.card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.card-actions button{flex:1;min-width:80px;min-height:42px;padding:10px;font-size:14px;border-radius:11px}
/* v2.17.6: 2x2 四角排版(My Steps 卡片) */
.card-actions.quad button{flex:1 1 calc(50% - 8px);min-width:0}
.btn-primary{background:var(--ink);color:white;font-weight:700}
.btn-ghost{background:#fff;border:1px solid var(--line);color:var(--ink);font-weight:600}

.empty-state{
  text-align:center;color:var(--muted);
  padding:40px 20px;font-size:14px;
  grid-column:1/-1;width:100%;min-width:0;
  white-space:normal;overflow-wrap:anywhere;
}

/* 表单 */
label{font-size:13px;font-weight:800;display:block;margin:5px 0 8px}
input,textarea,select{
  width:100%;border:1px solid var(--line);background:white;
  border-radius:14px;padding:14px;outline:none;margin-bottom:14px;
}
textarea{min-height:80px;line-height:1.6;resize:vertical}
.select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px;background-repeat:no-repeat;padding-right:40px}

/* 步骤预览 */
#stepsPreview{list-style:none;padding:0;margin:0 0 14px}
#stepsPreview li{
  background:white;border:1px solid var(--line);border-radius:10px;
  padding:10px 12px;margin-bottom:6px;font-size:14px;
}
#stepsPreview .step-num{font-weight:700;color:var(--orange);margin-right:6px}
#stepsPreview .placeholder{color:var(--muted);text-align:center;border:1px dashed var(--line);background:transparent}

/* 按钮基础 (v1.0.0 风格) */
button{
  background:var(--ink);color:white;border-radius:13px;
  padding:13px;font-weight:750;min-height:48px;
}
.light{background:#fff;border:1px solid var(--line);color:var(--ink);border-radius:13px;padding:13px;font-weight:700;min-height:48px;font-size:15px}
.back{background:#fff;border:1px solid var(--line);color:var(--ink);padding:8px 13px;min-height:40px;border-radius:11px;margin-bottom:14px}

/* row + flex:1 等宽 (v1.0.0 风格) */
.actions,.row{display:flex;gap:10px}
.actions button,.row button{flex:1}

/* 步骤预览 (create 页) */
.preview{display:flex;gap:11px;border-bottom:1px solid var(--line);padding:11px 2px}
.preview b{width:25px;height:25px;border-radius:50%;background:#eee6d9;display:grid;place-items:center;flex:none;font-size:13px}

/* 主按钮(已完成·下一步 / 识别并保存):橙色满宽 */
.save,.done{background:var(--orange);width:100%;margin-top:18px;border-radius:13px;padding:13px;font-weight:750;min-height:48px;font-size:16px;color:white}
#editSave{border:0;box-shadow:none;appearance:none}

/* 空状态 */
.empty{text-align:center;color:var(--muted);padding:40px 10px}

/* ============================================================ */
/*  执行页 (v1.0.0 风格)                                          */
/* ============================================================ */
/* v2.5.1: Exit 与方法标题同一行并吸顶(贴在 App 头下),长页面也不用上滑找退出 */
.exec-head{
  display:flex;align-items:center;gap:10px;
  position:sticky;top:66px;z-index:4;background:var(--bg);padding:6px 0;
}
.exec-head .back{margin:0;flex:none}
.exec-head h2{flex:1;margin:0;text-align:left;font-size:19px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#page-exec h2{text-align:center}
.progress{height:7px;background:#e6ded1;border-radius:8px;overflow:hidden;margin:10px 0 18px}
.progress i{display:block;height:100%;width:0;background:var(--orange);transition:.3s}
.runner-card{
  background:var(--paper);border:1px solid var(--line);
  border-radius:25px;padding:28px 20px;text-align:center;
  box-shadow:0 18px 55px #34291015;
}
.runner-card small{font-weight:800;color:var(--orange)}
.step-text{
  font-family:serif;font-size:28px;line-height:1.55;
  margin:25px 0;
}
/* v2.21.0: 步骤级表格(执行页,方法包带 stepTables 时显示) */
.step-table{margin-top:10px;overflow-x:auto}
.step-table table{border-collapse:collapse;width:100%;font-size:13px}
.step-table th,.step-table td{border:1px solid var(--line);padding:5px 7px;text-align:left;vertical-align:top}
.step-table th{background:#fff4e8}

/* v2.23.0: 创建页表格标签栏 */
.tab-bar{display:flex;gap:6px;flex-wrap:wrap;margin:2px 0 8px;align-items:center}
.tab-btn{background:#fff;border:1px solid var(--line);color:var(--ink);border-radius:999px;padding:6px 14px;min-height:32px;font-size:13px;font-weight:600;width:auto}
.tab-btn.active{background:var(--ink);color:#fff;border-color:var(--ink)}
.tab-btn.tab-add{min-width:34px;padding:6px 10px}
/* v2.23.1: Excel 式 sheet 标签;v2.24.0: 内容高度随文本变化,标签改到内容框上方
   (浏览器页签式),位置才稳定;左缩进对齐行号槽右缘(内容起点) */
.sheet-tabs{gap:0;flex-wrap:nowrap;overflow-x:auto;margin:8px 0 -1px;padding:0 10px 0 35px}
.sheet-tabs .tab-btn{border-radius:10px 10px 0 0;border-bottom:none;background:#f3ede2;min-height:34px;padding:6px 16px;flex:none}
.sheet-tabs .tab-btn.active{background:#fff;color:var(--ink);border-color:var(--line);font-weight:700}
/* 内容框顶角留方,与上方标签衔接 */
.sheet-body{border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-left-radius:14px;border-bottom-right-radius:14px}

/* v2.23.0: 表格网格编辑器(创建页 + 滚轮编辑器面板共用) */
.table-editor,.edit-tables{margin-top:4px}
/* v2.24.0: 创建页表格编辑区与步骤框同款边框(code-wrap 是 flex 会把内容挤成左右列,勿复用) */
#createTableEditor.table-editor{
  background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:10px;margin-bottom:0;
}
.tbl-grid{margin:6px 0 12px}
.tbl-row{display:flex;gap:4px;margin-bottom:4px}
.tbl-cell{flex:1;min-width:0;padding:8px 6px;font-size:13px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);margin-bottom:0}
.tbl-row.head .tbl-cell{background:#fff4e8;font-weight:700}
.tbl-tools{display:flex;gap:8px;margin-top:6px}
.tbl-name-btn{margin-bottom:4px}

/* v2.23.0: 执行页表格 + mix 系数框 */
.exec-tbl{margin-top:10px}
.exec-tbl-name{font-size:13px;font-weight:700;color:var(--muted);margin-bottom:4px}
.exec-tbl table{border-collapse:collapse;width:100%;font-size:13px}
.exec-tbl th,.exec-tbl td{border:1px solid var(--line);padding:5px 7px;text-align:left;vertical-align:top}
.exec-tbl th{background:#fff4e8}
.mix-row{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:13px;color:var(--muted)}
.mix-coeff{width:64px;min-height:36px;padding:6px;text-align:center;border:1px solid var(--orange);border-radius:8px;font-size:14px;margin-bottom:0}
/* v2.25.0: 执行页播报音量滑杆 */
.vol-row{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:13px;color:var(--muted)}
.vol-row input[type="range"]{flex:1;min-height:32px;accent-color:var(--orange);margin-bottom:0}
.run-sync-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0 12px;font-size:12px;color:var(--muted)}
.run-sync-bar[hidden],.run-sync-bar button[hidden]{display:none}
.run-sync-bar [data-error="true"]{color:#a12631}
.run-sync-bar button{min-height:32px;padding:6px;font-size:12px}
#page-exec.run-readonly .done,#page-exec.run-readonly .row,#page-exec.run-readonly .mix-row,#page-exec.run-readonly .exec-attachment-controls,#page-exec.run-readonly .exec-playback-controls,#page-exec.run-readonly .vol-row{pointer-events:none;opacity:.45}
.exec-attachment-controls button{display:flex;align-items:center;justify-content:center;gap:8px}
.exec-playback-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:16px;margin-top:16px}
.exec-speed{min-width:0;text-align:left;font-size:12px}
.exec-speed label{display:flex;justify-content:space-between;gap:4px;margin:0}
.exec-speed output{font-variant-numeric:tabular-nums;white-space:nowrap}
.exec-speed input{display:block;width:100%;min-width:0;min-height:32px;padding:0;margin:0;accent-color:var(--orange)}
.exec-playback-controls .exec-handsfree-switch{min-width:0;justify-content:flex-end;gap:8px;font-size:13px}
.run-attachments{display:grid;gap:8px;text-align:left}
.run-attachment{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;border-bottom:1px solid var(--line);padding:8px 0;font-size:13px}
.run-attachment span{min-width:0;overflow-wrap:anywhere}
.run-attachment button{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:0}
.vol-label{min-width:44px;text-align:right;font-variant-numeric:tabular-nums}

/* v2.23.0: 滚轮编辑器行内表格标记 + 行号槽/删除列的标记占位 */
.wheel-tbl-chip{display:inline-block;min-width:0;overflow-wrap:anywhere;text-align:left;font-size:11px;color:var(--muted);border:1px dashed var(--line);border-radius:8px;padding:1px 7px;margin-top:3px}
/* v2.26.0: 表格标记独占一行(滚轮内,不可选) + 长按 ↑↓ 换位 */
.wheel-row.wheel-tblmark{display:flex;align-items:center;justify-content:flex-start;gap:8px;padding-left:52px;min-height:28px;opacity:.85;border:1px dashed var(--line);border-radius:10px}
.btn-mini{width:26px;min-width:26px;min-height:24px;padding:0;font-size:12px;border-radius:7px}
/* 编辑器翻页器(手机桌面式) + 底部圆点 */
.edit-pager{flex:1;min-height:0;overflow:hidden;position:relative}
.edit-page{height:100%;display:flex;flex-direction:column}
.edit-mats-text{flex:1;min-height:200px;padding:12px;font-size:14px;font-family:monospace;border:1px solid var(--line);border-radius:12px;background:#fff;resize:none}
.edit-dots{display:flex;align-items:center;justify-content:center;gap:7px;padding:8px 0 4px}
.edit-dot{width:8px;height:8px;border-radius:50%;background:var(--line);cursor:pointer}
.edit-dot.active{background:var(--orange);width:18px;border-radius:4px}
/* v2.27.0: 末尾新建页 — 虚线框大 ＋ + 新建页圆点 */
/* v2.27.1: 只有 ＋ 按钮可点,按反馈也收敛到按钮框内 */
.edit-page-add{align-items:center;justify-content:center;gap:10px}
.edit-add-btn{width:72px;height:72px;border-radius:18px;border:2px dashed var(--muted);background:transparent;color:var(--muted);font-size:34px;line-height:1;cursor:pointer}
.edit-add-btn:active{border-color:var(--orange);color:var(--orange);background:#fff}
.edit-add-cap{color:var(--muted);font-size:13px}
/* v2.27.0: 滚轮里表格标记被框选 */
.wheel-tblmark.sel{border-style:solid;border-color:var(--orange);opacity:1}
.line-mark{color:var(--muted);display:flex;align-items:center;justify-content:center;font-size:11px}

/* v2.24.0: 逐行实测高度的行号/删除单元格 + 表格标记覆盖层 */
.line-num-cell{display:flex;align-items:flex-start;justify-content:flex-end}
.line-del-cell{display:flex;align-items:center;justify-content:center}
.steps-mid{position:relative;flex:1;min-width:0;display:flex}
.tbl-mark-layer{position:absolute;inset:0;pointer-events:none}
.tbl-mark-badge{
  position:absolute;left:0;right:0;text-align:center;font-size:11px;color:var(--muted);
  background:var(--bg);border:1px dashed var(--line);border-radius:8px;
  padding:0 7px;line-height:1.6;
}
/* 表格编辑面板里的位置输入(直接可见可改) */
.tbl-pos-row{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);padding:8px 4px;flex-wrap:wrap}
.tbl-pos-input{width:64px;min-height:34px;padding:4px 8px;text-align:center;border:1px solid var(--orange);border-radius:8px;margin-bottom:0}

/* 计时器 */
.timer{
  display:none;background:var(--ink);color:white;
  border-radius:17px;padding:15px;margin:15px 0;
}
.timer.visible{display:flex;justify-content:space-between;align-items:center}
.timer strong{font-size:30px;font-family:monospace}

/* 上一步+重播:row flex:1 等宽并排 */
#page-exec .row{margin:10px 0}
#page-exec .row button.light{border-radius:13px}

/* 语音反馈:绿色满宽 */
.listen{
  width:100%;margin-top:12px;background:var(--green);color:white;
  border-radius:13px;padding:13px;font-weight:750;min-height:48px;font-size:16px;
}
.listen.on{background:var(--orange);animation:pulse 1.2s infinite}
@keyframes pulse{50%{opacity:.75}}

#page-exec #heard{
  color:var(--muted);line-height:1.6;text-align:center;
  margin:14px 0 0;padding:0;font-size:13px;
}

/* 键盘语音面板 (v1.2.14) */
.voice-panel{
  background:#fff;border:1px solid var(--line);border-radius:17px;
  padding:16px;margin-top:14px;
}
.voice-panel .voice-tip{color:var(--muted);font-size:13px;line-height:1.6;margin:0 0 10px;text-align:center}
.voice-panel input{margin-bottom:10px}
.voice-panel .row button{min-height:44px}

/* ============================================================ */
/*  底部 nav (fixed,56px)                                          */
/* ============================================================ */
.nav{
  position:fixed;bottom:0;left:0;right:0;height:56px;
  background:#fffdf8f5;border-top:1px solid var(--line);
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  padding:5px max(10px,env(safe-area-inset-right)) 5px max(10px,env(safe-area-inset-left));
  box-shadow:none;
  z-index:9;
}
.nav button{
  min-width:0;background:transparent;color:var(--muted);
  padding:6px 4px;min-height:44px;font-size:13px;
  border:0;border-radius:0;box-shadow:none;appearance:none;font-weight:600;
}
.nav button.active{color:var(--orange)}

/* ============================================================ */
/*  toast                                                         */
/* ============================================================ */
#toast,.toast{
  position:fixed;left:50%;bottom:90px;transform:translate(-50%,120px);
  background:var(--ink);color:white;padding:12px 16px;border-radius:12px;
  opacity:0;visibility:hidden;pointer-events:none;
  transition:transform .25s,opacity .25s,visibility 0s .25s;z-index:20;white-space:normal;overflow-wrap:anywhere;
  font-size:14px;font-weight:600;
  box-shadow:0 8px 24px #00000040;max-width:90%;text-align:center;
}
#toast.show,.toast.show{transform:translate(-50%,0);opacity:1;visibility:visible;transition-delay:0s}

@media(min-width:700px){
  .list{grid-template-columns:1fr 1fr}
}

/* ============================================================ */
/*  编辑方法: 滚轮式步骤编辑器 (v1.7.0, 类歌词滚动,一屏 3 行)        */
/* ============================================================ */
.edit-overlay{
  position:fixed;inset:0;z-index:30;
  background:#f8f4eafa;backdrop-filter:blur(8px);
  transform:translateY(100%);visibility:hidden;
  transition:transform .28s ease,visibility .28s;
}
.edit-overlay.open{transform:translateY(0);visibility:visible}
/* v2.27.1: 表格新建/设置对话框 DOM 序在编辑器之前,需更高层级,
   否则编辑器打开时点 ＋ 弹窗被编辑页盖住(退出编辑才露出) */
#tableNewOverlay,#tableEditOverlay{z-index:35}
.edit-sheet{
  max-width:720px;height:100%;margin:auto;padding:18px 15px;
  display:flex;flex-direction:column;
}
.edit-head{display:flex;align-items:center;gap:12px}
.edit-head .back{margin:0}
.edit-head strong{font-family:serif;font-size:20px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.edit-tip{color:var(--muted);font-size:13px;text-align:center;margin:14px 0 6px}

/* 模块侧栏覆盖编辑器,遮罩不拦截步骤手势,主内容尺寸保持不变。 */
#editModules{flex:0 0 44px;width:44px;height:44px;padding:0;display:grid;place-items:center;box-shadow:none;appearance:none}
.editor-modules-mask{position:fixed;inset:0;z-index:40;pointer-events:none}
.editor-modules-mask>svg{display:block;width:100%;height:100%}
.module-insertion-line{position:absolute;left:0;top:0;height:3px;border-radius:1px;background:#4966b2;box-shadow:0 0 0 1px #ffffffb3;pointer-events:none}
.module-selection-active #wheelViewport{overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;touch-action:pan-y;scrollbar-width:thin}
.module-selection-active #wheelList{position:relative;transform:none;transition:none;will-change:auto;padding:var(--module-wheel-padding,0px) 0}
.module-selection-active #wheelList .wheel-row{cursor:pointer;opacity:.45;transition:transform .18s ease,opacity .18s,box-shadow .18s;border-radius:8px}
.module-selection-active #wheelList .wheel-row.module-selected{opacity:1;color:var(--ink);background:var(--paper);transform:translateX(8px);outline:1px solid var(--orange);box-shadow:0 4px 10px #0002}
.module-selection-active #wheelList .wheel-row:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.module-selection-active #wheelViewport .wheel-fade,.module-selection-active #wheelBand{visibility:hidden}
#editorModulesDrawer{left:auto;right:0;z-index:41;width:min(36vw,320px);min-width:min(240px,76vw);max-width:86vw;padding:14px;transform:translateX(100%);overflow-y:auto;background:var(--paper);font-size:13px;visibility:hidden;box-shadow:none}
#editorModulesDrawer.open{transform:translateX(0);visibility:visible}
.module-close-icon{transform:rotate(45deg)}
.editor-modules-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.editor-modules-head strong{min-width:0;overflow-wrap:anywhere;font-size:16px;line-height:1.4}
.editor-modules-head .icon-btn,.editor-module-draft>.icon-btn,.editor-module-card .icon-btn,.module-preview-navigation>.icon-btn{flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:0;display:grid;place-items:center;box-shadow:none;appearance:none}
.editor-module-draft{padding:12px 0;border-bottom:1px solid var(--line);margin-bottom:14px}
.editor-module-draft label{display:block;color:var(--muted);font-size:12px;margin:8px 0 4px}
.editor-module-draft input{width:100%;min-width:0;margin:0;font-size:14px}
.editor-module-draft ol{padding-left:24px;max-height:180px;overflow-y:auto;margin:10px 0}
.editor-module-draft li{overflow-wrap:anywhere;padding:5px 0}
.editor-module-draft li>div{display:flex;align-items:flex-start;gap:4px}
.editor-module-draft li span{flex:1;min-width:0;white-space:pre-wrap}
.editor-module-draft li button{flex:0 0 32px;width:32px;min-height:32px;padding:0;background:transparent;border:0;box-shadow:none}
.editor-modules-list{display:flex;flex-direction:column;gap:10px;padding-bottom:20px}
.editor-module-card{border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--paper);touch-action:pan-y;overflow-wrap:anywhere}
.editor-module-open{width:100%;text-align:left;display:block;padding:0;min-height:44px;background:transparent;border:0;box-shadow:none;color:var(--ink);font-size:14px;white-space:normal}
.editor-module-open strong{display:block;line-height:1.4}
.editor-module-open small{display:block;color:var(--muted);font-weight:400;margin-top:5px}
.editor-module-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:8px}
.module-branch-controls{min-width:0;margin-top:6px}
.module-branch-selector [hidden]{display:none!important}
.module-branch-multiple{margin-top:5px;font-size:12px}
.module-branch-multiple-options p{font-size:12px;line-height:1.4;color:var(--muted);margin:6px 0}
.module-branch-multiple-option{display:flex;align-items:flex-start;gap:8px;padding:7px 0;font-size:13px;line-height:1.4}
.module-branch-multiple-option input{flex:0 0 18px;width:18px;height:18px;min-height:18px;margin:0;padding:0;accent-color:#24755c}
.module-branch-multiple-option span{min-width:0;overflow-wrap:anywhere}
.module-branch-group{min-width:0;margin:0 0 8px;padding:0;border:0}
.module-branch-group:last-child{margin-bottom:0}
.module-branch-group legend{padding:0;margin-bottom:5px;font-size:12px;color:var(--muted);font-weight:600}
.module-branch-option{display:flex;align-items:flex-start;gap:7px;min-height:44px;margin:0;padding:9px 5px;border-bottom:1px solid var(--line);font-size:13px;line-height:1.45}
.module-branch-group legend.module-branch-sr-label{position:absolute;width:1px;height:1px;margin:0;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.module-branch-head{display:flex;align-items:center;gap:8px;min-width:0}
.module-branch-heading{flex:none;font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}
.module-branch-slider-scroll{flex:0 1 auto;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.module-branch-slider{position:relative;height:36px;direction:ltr}
.module-branch-slider::before{content:'';position:absolute;inset:3px 0;border:1px solid #c7d1cc;border-radius:4px;background:#edf1ee}
.module-branch-slider .module-branch-range{appearance:none;position:absolute;z-index:1;top:0;left:2px;width:calc(100% - 4px);height:36px;min-height:36px;margin:0;padding:0;border:0;border-radius:4px;background:transparent;box-shadow:none;cursor:ew-resize;touch-action:pan-y}
.module-branch-range::-webkit-slider-runnable-track{height:28px;background:transparent;border:0}
.module-branch-range::-moz-range-track{height:28px;background:transparent;border:0}
.module-branch-range::-webkit-slider-thumb{appearance:none;box-sizing:border-box;width:28px;height:28px;margin-top:0;border:2px solid #24755c;border-radius:4px;background:#d8e8df;box-shadow:none}
.module-branch-range::-moz-range-thumb{box-sizing:border-box;width:28px;height:28px;border:2px solid #24755c;border-radius:4px;background:#d8e8df;box-shadow:none}
.module-branch-selector[data-reviewed="false"] .module-branch-range::-webkit-slider-thumb{border-color:#8d9792;background:var(--paper)}
.module-branch-selector[data-reviewed="false"] .module-branch-range::-moz-range-thumb{border-color:#8d9792;background:var(--paper)}
.module-branch-stops{position:absolute;z-index:2;inset:4px 2px;display:flex;pointer-events:none}
.module-branch-stops .module-branch-stop{flex:0 0 28px;width:28px;height:28px;display:grid;place-items:center;color:#69766e;font-size:11px;font-weight:600;line-height:1;white-space:nowrap}
.module-branch-stop+.module-branch-stop{border-left:1px solid #d4ddd7}
.module-branch-stops .module-branch-stop.selected{color:#1d624c}
.module-branch-range:focus-visible{outline:2px solid #24755c;outline-offset:-2px}
.module-branch-display{display:grid;grid-template-columns:minmax(0,1fr);max-height:180px;overflow-y:auto;margin-top:0;overscroll-behavior-y:contain}
.module-branch-step{grid-area:1/1;display:flex;align-items:flex-start;min-height:28px;padding:2px 0;font-size:13px;line-height:1.45;visibility:hidden;pointer-events:none}
.module-branch-step.current{visibility:visible;pointer-events:auto}
.module-branch-selector[data-reviewed="false"] .module-branch-display{color:var(--muted)}
.module-branch-label{flex:0 0 auto;min-width:25px;font-size:12px;line-height:1.6;font-variant-numeric:tabular-nums}
.module-branch-text{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}
.module-branch-status{flex:1;align-self:center;min-width:0;color:var(--muted);font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.editor-module-actions button:disabled{opacity:.35;cursor:not-allowed}
.editor-module-card.branch-needs-review{border-color:#a63434}
.combine-item:has(.module-branch-controls){flex-wrap:wrap}
.combine-item>.module-branch-controls{flex-basis:100%;width:100%}
.wheel-row .wheel-branch-add{flex:0 0 36px;display:grid;place-items:center;width:36px;height:36px;min-height:36px;margin:0 0 0 5px;padding:0;border-radius:6px;box-shadow:none}
.module-preview-overlay{z-index:50;background:#0006;backdrop-filter:none;display:grid;place-items:center;transform:none;opacity:0;transition:opacity .15s,visibility .15s}
.module-preview-overlay.open{opacity:1}
.module-preview-sheet{width:min(620px,calc(100vw - 32px));height:min(680px,calc(100dvh - 48px));background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:14px;display:flex;flex-direction:column;min-height:0;min-width:0}
.module-preview-content{flex:1;min-height:0;min-width:0;overflow:auto;touch-action:pan-y;margin-top:12px;overscroll-behavior:contain}
.module-preview-content h4{font-size:14px;margin:0 0 12px;overflow-wrap:anywhere}
.module-preview-steps{padding:70px 0;display:flex;flex-direction:column;gap:6px}
.module-preview-step{display:flex;align-items:flex-start;gap:8px;flex:none;min-height:44px;padding:10px 8px;border:1px solid transparent;border-radius:8px;color:var(--muted);background:transparent;text-align:left;font-size:14px;font-weight:400;box-shadow:none;appearance:none;white-space:normal}
.module-preview-step[aria-pressed="true"]{border-color:var(--orange);color:var(--ink)}
.module-preview-step>span:first-child{flex:0 0 28px;color:var(--orange);font-weight:700}
.module-preview-step>span:last-child{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.module-preview-table-marker{margin-left:44px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.module-preview-materials{padding-left:20px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.module-preview-materials li{margin:10px 0}
.module-preview-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}
.module-preview-table th,.module-preview-table td{border:1px solid var(--line);padding:8px;text-align:left;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere}
.module-preview-table th{background:var(--line)}
.module-preview-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:12px}
.module-preview-navigation .edit-dots{flex:1;flex-wrap:wrap;min-width:0;max-height:64px;overflow:auto}
.module-preview-navigation .edit-dot{flex:0 0 8px;min-width:8px;min-height:8px;border:0;padding:0;box-shadow:none}
.module-preview-navigation .edit-dot.active{flex-basis:18px}
.module-preview-navigation[hidden]{display:none}
.editor-module-section{min-width:0;border-top:1px solid var(--line);padding:8px 0}
.editor-module-section>summary{font-size:13px;font-weight:600;min-height:36px;cursor:pointer;overflow-wrap:anywhere}
.editor-module-section>.editor-module-card{margin:8px 0}
.lab-step-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.lab-step-tools label{display:flex;align-items:center;gap:8px;margin:0;flex:1;min-width:150px;font-size:13px}
.lab-step-tools input{width:76px;margin:0}
.lab-step-tools .icon-btn,.wheel-labmark .icon-btn,.lab-attachment-head .icon-btn{display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;flex:none}
.lab-step-content{min-width:0;max-width:100%;overflow-x:auto}
.lab-attachment-page{overflow-y:auto;min-height:0}
.lab-attachment-overlay{position:fixed;inset:0;z-index:85;background:#0006;display:grid;place-items:center}
body.lab-attachment-open{overflow:hidden}
.lab-attachment-sheet{display:flex;flex-direction:column;min-width:0;width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);background:var(--paper,#fff);border:1px solid var(--line);border-radius:8px;padding:14px}
.lab-attachment-head{display:flex;align-items:center;gap:10px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.lab-attachment-head h3{font-size:16px;min-width:0;overflow-wrap:anywhere;margin:0}
.lab-attachment-body{min-height:0;min-width:0;overflow:auto;padding-top:14px;overscroll-behavior:contain}
.lab-step-execution{margin:14px 0;padding-top:12px;border-top:1px solid var(--line);text-align:left;min-width:0}
.wheel-labmark .wheel-tbl-chip{flex:1;min-width:0}
/* 确认式引导仅遮暗无关区域,保留步骤/表格与右侧模块栏的原尺寸。 */
.module-coach-overlay{z-index:60;background:transparent;backdrop-filter:none;transform:none;touch-action:none;transition:visibility .15s}
.module-coach-shade{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.module-coach-focus{position:absolute;border:2px solid var(--orange);border-radius:8px;pointer-events:none}
.module-coach-active #wheelList .wheel-row.module-coach-anchor{opacity:1}
.module-coach-message{position:absolute;left:50%;bottom:max(20px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(360px,calc(100% - 32px));max-height:calc(100% - 32px);overflow-y:auto;padding:18px;background:var(--paper);border:1px solid var(--line);border-radius:8px}
.module-coach-message h3{font-size:18px;line-height:1.4;margin:8px 0}
.module-coach-message p{font-size:14px;line-height:1.5;margin:0 0 14px;overflow-wrap:anywhere}
.module-coach-message .save{margin:0;width:100%;min-height:44px}
.module-coach-direction{position:absolute;width:28px;height:28px;pointer-events:none;animation:moduleCoachSwipe 1.2s ease-in-out infinite}
.module-coach-direction img{display:block;transform:rotate(180deg);filter:brightness(0) invert(1)}
@keyframes moduleCoachSwipe{0%,100%{transform:translateX(0)}50%{transform:translateX(14px)}}
@media(prefers-reduced-motion:reduce){.module-coach-direction{animation:none}.module-selection-active #wheelList .wheel-row{transition:none}}
@media(max-width:480px){#editOverlay .edit-head{gap:6px}#editOverlay .wheel-controls{gap:4px}#editModules{width:36px;flex-basis:36px}.module-preview-sheet{height:calc(100dvh - 24px);width:calc(100vw - 24px)}}

/* 滚轮: − 左 / 视口 / ＋ 右,按钮与中间行对齐 */
/* v2.6.3 修复: flex 项默认 min-height:auto 不会缩到内容(整条滚轮列表)以下,
   长步骤方法的总行高超过屏幕时,滚轮区把 Save 按钮挤出可视区、视口被撑高
   导致选中步不居中;min-height:0 让滚轮区收缩,视口内部裁剪滚动 */
.edit-wheel{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:10px}
.wheel-column-label{padding:8px 0 6px;width:44px;text-align:center;font-size:13px;font-weight:800;color:var(--orange)}
.wheel-controls{flex:none;display:flex;align-items:center;gap:8px}
.wheel-viewport{
  position:relative;flex:1;min-width:0;align-self:stretch;overflow:hidden;
  /* v2.1.1: 视口撑满编辑页剩余高度(原固定 204px≈3 行),
     长步骤不再挤没上下文,范围内步骤完整可见;± 按钮仍垂直居中 */
  touch-action:none;user-select:none;-webkit-user-select:none;
}
.wheel-list{transition:transform .22s ease;will-change:transform}
.wheel-row{
  position:relative;display:flex;align-items:center;gap:8px;padding:10px 0;
  color:var(--muted);opacity:.45;transition:opacity .2s,min-height .15s;
}
.wheel-row .wheel-num{flex:0 0 44px;width:44px;text-align:center;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;font-size:13px;font-weight:800;color:var(--orange)}
/* v1.13.0: 行高按字数自适应(类 Excel 自动换行),内容左对齐、上下居中 */
.wheel-row .wheel-text{
  flex:1;min-width:0;overflow-wrap:anywhere;text-align:left;font-size:14px;line-height:1.45;
}
/* 当前选中步: 视觉高亮(大字 serif + 中央色带) */
.wheel-row.sel{opacity:1;color:var(--ink)}
.wheel-row.wheel-insert-boundary{box-sizing:border-box;min-height:40px;height:40px;padding:0;cursor:pointer;border-bottom:1px dashed var(--line)}
.wheel-row.wheel-empty{justify-content:center;font-size:14px}
/* v1.12.1 起选中步为多行编辑框;v1.13.0 行高按字数自适应 */
.wheel-row textarea{
  flex:1;min-width:0;margin:0;padding:9px 12px;font-size:14px;line-height:1.45;text-align:left;
  border:1px solid var(--orange);border-radius:11px;background:#fff;
  min-height:0;resize:none;font-family:inherit;overflow:hidden;
}
/* v1.13.0: 选中步下边框的液态把手 — 长按液态化,下拉拆分/上拉合并 */
.wheel-handle{
  position:absolute;bottom:2px;left:50%;transform:translateX(-50%);
  width:38px;height:5px;border-radius:3px;background:var(--line);
  cursor:grab;touch-action:none;
}
.wheel-row.liquid .wheel-handle{background:var(--orange)}
.wheel-row.liquid textarea{
  animation:liquidWobble .9s ease-in-out infinite;
  border-color:var(--orange);box-shadow:0 6px 18px #e85d3433;
}
@keyframes liquidWobble{
  0%,100%{border-radius:11px 13px 12px 14px/13px 11px 14px 12px;transform:scale(1)}
  25%{border-radius:16px 10px 17px 9px/10px 17px 9px 16px;transform:scale(1.015,.985)}
  50%{border-radius:10px 17px 9px 16px/16px 9px 17px 10px;transform:scale(.985,1.015)}
  75%{border-radius:14px 12px 15px 11px/12px 15px 11px 14px;transform:scale(1.01,.99)}
}
/* v2.1.0: 选中步上边框的换位把手 — 长按高亮进入换位,拖动整步与邻步对调 */
.wheel-handle-top{top:2px;bottom:auto}
.wheel-row.reorder{z-index:3}
.wheel-row.reorder .wheel-handle-top{background:var(--orange)}
.wheel-row.reorder textarea{
  border-color:var(--orange);box-shadow:0 10px 26px #e85d3440;
}
/* 换位预览: 被挤开的邻步内容滑向对调后的位置(Step 序号留原地);
   拖动的内容框直接设 transform 无过渡,未过阈值松手时借此类弹回原位 */
.swap-shift{transition:transform .18s ease,opacity .18s ease;opacity:.9}
.drag-hint{
  text-align:center;color:var(--orange);font-size:13px;font-weight:700;
  min-height:20px;margin-top:8px;
}
.wheel-band{
  position:absolute;left:0;right:0;top:68px;height:68px;pointer-events:none;
  background:#e85d340d;border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  transition:top .15s,height .15s;
}
.wheel-fade{position:absolute;left:0;right:0;height:68px;pointer-events:none;z-index:2}
.wheel-fade-top{top:0;background:linear-gradient(#f8f4ea,transparent)}
.wheel-fade-bottom{bottom:0;background:linear-gradient(transparent,#f8f4ea)}
.wheel-btn{
  flex:none;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;
  font-size:24px;font-weight:800;line-height:1;
}
.wheel-del{background:#fff;border:1px solid var(--line);color:#b0341f}
.wheel-add{background:var(--orange);color:#fff;border:0;box-shadow:none;appearance:none}

/* ============================================================ */
/*  账号 / 试用 / 订阅 (v1.8.0)                                    */
/* ============================================================ */
.account-btn{
  flex:none;margin-left:10px;padding:8px 14px;min-height:38px;
  border-radius:19px;background:var(--ink);color:#fff;
  font-size:13px;font-weight:700;
  border:0;box-shadow:none;appearance:none;
}
header .account-btn{display:flex;align-items:center;gap:8px;flex:0 1 auto;min-width:0;max-width:220px;height:38px;padding:0 14px 0 0;overflow:hidden;white-space:nowrap}
header .account-btn .web-account-avatar{position:relative;display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;margin:0;border-radius:50%;overflow:hidden;background:#e4edf1;color:#245467}
header .web-account-avatar > span{margin:0;color:inherit;font-size:12px}
header .web-account-avatar.guest{background:#e9ecef url('vendor/shoelace/assets/icons/person-circle.svg') center / 28px 28px no-repeat}
header .web-account-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
header .web-account-avatar img[hidden]{display:none}
header .account-btn .web-account-name{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;color:inherit;font-size:14px}
.logo{cursor:pointer}

/* ============================================================ */
/*  左侧抽屉 (v1.9.0): 充值订阅 / 试用说明 / 默认账户               */
/* ============================================================ */
.drawer-mask{
  position:fixed;inset:0;background:#00000066;z-index:39;
  opacity:0;visibility:hidden;transition:.25s;
}
.drawer-mask.open{opacity:1;visibility:visible}
.drawer{
  position:fixed;top:0;left:0;bottom:0;width:min(84vw,340px);z-index:40;
  background:var(--bg);padding:18px 16px;overflow-y:auto;
  display:flex;flex-direction:column;
  transform:translateX(-105%);transition:transform .28s ease;
  box-shadow:6px 0 30px #00000022;
}
.drawer.open{transform:translateX(0)}
#drawer{width:min(84vw,280px)}
.drawer-head{
  display:flex;align-items:center;gap:10px;
  padding-bottom:14px;border-bottom:1px solid var(--line);
}
.drawer-ver{color:var(--muted);font-size:12px}
/* 两端侧栏复用用户头部及底部品牌折叠区,其余功能使用各平台既有入口。 */
#drawer .web-profile-head { gap: 12px; min-height: 64px; }
.web-profile-avatar { position: relative; display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: 50%; overflow: hidden; background: #e4edf1; color: #245467; font-size: 17px; font-weight: 600; cursor: pointer; }
.web-profile-avatar:hover { border-color: var(--orange); }
.web-profile-avatar:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.web-profile-avatar.guest { background: #e9ecef url('vendor/shoelace/assets/icons/person-circle.svg') center / 28px 28px no-repeat; }
.web-profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.web-profile-avatar img[hidden] { display: none; }
.web-profile-text { min-width: 0; flex: 1; }
.web-profile-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.web-profile-text strong { display: block; min-width: 0; font-size: 16px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-profile-tier { flex: 0 0 auto; padding: 2px 6px; border-radius: 4px; background: #e8f1ff; color: #1756aa; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.web-profile-tier[hidden] { display: none; }
.web-profile-text small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.web-profile-text small[hidden] { display: none; }
.web-about { margin: 0; border: 0; }
.web-about summary { cursor: pointer; padding: 0; list-style: none; }
.web-about summary::-webkit-details-marker { display: none; }
.web-about summary::marker { content: ''; }
.web-about summary::after { content: '\25b8'; margin-left: auto; flex: none; opacity: .55; font-size: 12px; }
.web-about[open] summary::after { content: '\25be'; }
.web-about summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.web-about-content { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; }
.web-about-content > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.web-about-content .logo { flex: 0 0 37px; }
.drawer-label{font-size:12px;color:var(--muted);font-weight:800;letter-spacing:.08em;margin:16px 0 8px}
.drawer-label-icon{display:flex;align-items:center;gap:8px;min-height:24px;letter-spacing:0}
.drawer-label-icon img{display:block;flex:none}
.drawer-label-icon span{min-width:0;overflow-wrap:anywhere}
.drawer-label-icon.fold::after{float:none;margin-left:auto;flex:none}
#drawer .drawer-label{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:400;color:var(--ink);letter-spacing:0;line-height:1.4;min-height:24px}
#drawer .drawer-label.fold::after{float:none;flex:none;margin-left:auto}
.cloud-section #groupsOpen{width:100%;min-width:0;display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px}
.cloud-section>.drawer-status{margin:8px 0;overflow-wrap:anywhere}
.cloud-section>.drawer-status:first-child{margin-top:0}
.settings-section{border-bottom:1px solid var(--line)}
.settings-section:last-child{border-bottom:0}
.settings-section>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:8px 4px;font-size:14px;font-weight:400;cursor:pointer;list-style:none;overflow-wrap:anywhere}
.settings-section>summary::-webkit-details-marker{display:none}
.settings-section>summary::after{content:'\203A';flex:none;font-size:18px;line-height:1;color:var(--muted)}
.settings-section[open]>summary::after{transform:rotate(90deg)}
.settings-section>summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.settings-section-body{padding:4px 4px 12px;min-width:0}
.settings-section-body>.privacy-item{width:100%;margin:6px 0;white-space:normal;overflow-wrap:anywhere}
.drawer-card{background:var(--paper);border:1px solid var(--line);border-radius:15px;padding:14px}
/* 订阅管理入口垂直排列,窄屏仍完整展示按钮名称。 */
.subscription-panel .btn-row{display:grid;gap:8px;margin-top:10px}
.subscription-panel .btn-sub{
  width:100%;min-width:0;min-height:44px;padding:10px 8px;font-size:14px;border-radius:8px;
  border:1px solid var(--orange);background:var(--orange);color:#fff;
  cursor:pointer;text-align:center;white-space:normal;overflow-wrap:anywhere
}
.subscription-panel .btn-sub.light{background:transparent;color:var(--orange)}
.subscription-panel strong{font-size:16px}
.subscription-panel p,.trial-card p{color:var(--muted);font-size:13px;line-height:1.7;margin:6px 0}
.trial-card b{color:var(--orange)}
.drawer-status{color:var(--ink);font-weight:700;font-size:13px;margin:8px 0 0}
.debug-card button{display:block;width:100%;margin-bottom:8px;font-size:14px}
.debug-card button:last-child{margin-bottom:0}
.drawer-account{border-top:1px solid var(--line);padding-top:6px}
.account-info{font-size:17px;font-weight:800;margin-bottom:10px;min-height:24px}
#drawer .account-info{font-size:12px;font-weight:400;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
#drawer label,#drawer strong,#drawer b,#drawer button,#drawer .drawer-status{font-weight:400}
.wx-login{
  width:100%;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:8px;box-shadow:none;appearance:none;
  padding:13px;font-weight:750;min-height:48px;font-size:16px;
}
.wx-login img,#emailLoginBtn img{display:inline-block;vertical-align:middle;margin-right:10px}
.wx-login span,#emailLoginBtn span{vertical-align:middle}
.wx-login:not(:disabled):hover{background:#f5f5f5}
.wx-login:not(:disabled):active{background:#ebebeb}
/* v2.10.0: 邮箱登录输入框(审核/备用登录方式) */
.email-login{margin-top:10px;display:flex;flex-direction:column;gap:8px}
.email-login input{
  width:100%;border:1px solid #e0d5c8;border-radius:13px;padding:12px;
  font-size:15px;background:#fff;box-sizing:border-box;font-family:inherit;
}
.edit-publish{flex:none;min-height:40px;padding:8px 12px;font-size:13px;margin:0;width:auto}

/* 导出路径与复制同排,历史/关闭固定在底部。 */
#exportOverlay .edit-sheet{min-height:0;overflow:hidden;padding-bottom:max(18px,env(safe-area-inset-bottom))}
#exportOverlay .export-card{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}
#exportOverlay .export-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.export-path-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:start;gap:8px}
.export-path{
  display:block;min-width:0;width:100%;min-height:44px;margin:0;padding:11px 12px;
  border:1px dashed var(--orange);border-radius:12px;background:#fff;
  color:var(--ink);font-size:13px;line-height:1.5;text-align:center;
  user-select:text;-webkit-user-select:text;
}
#exportCopy{display:grid;place-items:center;width:44px;height:44px;min-height:44px;margin:0;padding:0;background:#fff;border:1px solid var(--line);border-radius:6px}
#exportCopy img{filter:grayscale(1) brightness(0)}
#exportOverlay .export-actions{flex:none;display:grid;gap:10px;padding-top:14px}
#exportOverlay .export-actions button{width:100%;min-height:48px;margin:0}

/* 免提录音状态指示 (v2.2.2): 红点闪烁=正在录音,灰色=等待开麦 */
.listen-indicator{display:none;align-items:center;justify-content:center;gap:8px;margin-top:10px;font-size:13px;color:var(--muted)}
.listen-indicator.show{display:flex}
.listen-indicator .rec-dot{width:10px;height:10px;border-radius:50%;background:#d43a2a;flex:none;opacity:.25}
.listen-indicator.rec{color:#c0341f;font-weight:700}
.listen-indicator.rec .rec-dot{opacity:1;animation:recpulse 1s infinite}
@keyframes recpulse{0%,100%{opacity:1}50%{opacity:.2}}

/* 录音笔记与免提分开显示,计时和波形占固定空间避免状态切换抖动 */
.exec-voice-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.exec-voice-controls button{min-width:0;margin:0;padding:12px 8px;border-radius:8px;line-height:1.35;overflow-wrap:anywhere;box-shadow:none}
.exec-voice-controls .exec-handsfree-switch{min-width:0;min-height:48px;justify-content:center;gap:12px;padding:0 8px;font-size:15px;font-weight:700;line-height:1.35}
.voice-note-btn{display:flex;align-items:center;justify-content:center;gap:8px}
.voice-note-btn img{flex:0 0 18px;width:18px;height:18px;filter:invert(18%) sepia(63%) saturate(2229%) hue-rotate(331deg) brightness(83%)}
.voice-note-btn[data-state="recording"]{border-color:#b42336;background:#fff0f2;color:#991c2d}
.voice-note-btn[data-state="recording"] img{animation:note-icon-pulse 1.2s ease-in-out infinite}
.voice-note-btn[data-state="starting"] img,.voice-note-btn[data-state="saving"] img{filter:invert(44%) sepia(91%) saturate(832%) hue-rotate(6deg) brightness(90%);animation:note-icon-spin 1s linear infinite}
.voice-note-btn[data-state="saved"] img{filter:invert(36%) sepia(35%) saturate(871%) hue-rotate(100deg) brightness(87%)}
.voice-note-btn[data-state="text"] img{filter:grayscale(1);opacity:.65}
.exec-voice-controls button:focus-visible{outline:2px solid #286f80;outline-offset:3px}
.exec-voice-controls button:disabled{opacity:.65;cursor:wait}
.voice-note-status{display:flex;align-items:center;gap:10px;min-height:42px;margin-top:6px;color:var(--muted);font-size:13px;text-align:left}
#voiceNoteStatusText{flex:1;min-width:0;overflow-wrap:anywhere}
#voiceNoteTime{flex:0 0 5ch;text-align:right;font-variant-numeric:tabular-nums}
.voice-note-wave{display:flex;align-items:center;justify-content:center;gap:3px;width:28px;height:22px;flex:0 0 28px}
.voice-note-wave i{display:block;width:3px;height:5px;background:currentColor;border-radius:2px}
.voice-note-status[data-state="recording"]{color:#991c2d;font-weight:700}
.voice-note-status[data-state="recording"] .voice-note-wave i{animation:note-wave .85s ease-in-out infinite alternate}
.voice-note-wave i:nth-child(2),.voice-note-wave i:nth-child(4){animation-delay:-.3s!important;height:12px}
.voice-note-wave i:nth-child(3){animation-delay:-.6s!important;height:18px}
.voice-note-status[data-state="saved"]{color:#24704c;font-weight:700}
.voice-note-status[data-state="error"]{color:#a12631}
.voice-note-status:not([data-state="recording"]) .voice-note-wave{opacity:.45}
@keyframes note-wave{from{transform:scaleY(.35)}to{transform:scaleY(1)}}
@keyframes note-icon-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.55;transform:scale(.88)}}
@keyframes note-icon-spin{to{transform:rotate(360deg)}}
@media(max-width:360px){.exec-voice-controls{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.voice-note-status .voice-note-wave i,.listen-indicator.rec .rec-dot,.voice-note-btn img{animation:none!important}.exec-handsfree-switch input,.exec-handsfree-switch input::before{transition:none!important}}

/* 招呼开头使用心得提示 (v2.2.2,纯文字提示非功能) */
.greet-tip{font-size:12px;color:var(--muted);line-height:1.6;margin:10px 4px 0;text-align:center}

/* 评分复盘框 (v2.4.0): 每步实际用时/repeat/三星自评(默认全 3 星) */
.recap-card{max-width:420px}
#recapOverlay .recap-card{width:100%;max-width:none;min-width:0;overflow-wrap:anywhere}
#recapOverlay .edit-sheet{min-height:0;overflow:hidden;padding-bottom:max(18px,env(safe-area-inset-bottom))}
#recapOverlay .recap-card{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#recapOverlay .gate-text,#recapOverlay .recap-tip{flex:none}
#recapOverlay #recapList{flex:1;min-height:0;max-height:none;margin:0;overscroll-behavior:contain;scroll-padding-bottom:8px}
#recapOverlay .recap-actions{flex:none;display:grid;gap:10px;padding-top:14px}
#recapOverlay .recap-actions button{width:100%;min-height:48px;margin:0}
.recap-tip{font-size:12px;color:var(--muted);line-height:1.6;margin:-6px 0 12px}
.recap-list{max-height:46vh;overflow-y:auto;margin:0 0 14px;text-align:left}
.recap-row{padding:9px 2px;border-bottom:1px solid var(--line)}
.recap-row:last-child{border-bottom:none}
.recap-row .r-title{font-size:13px;font-weight:700;color:var(--ink)}
.recap-row .r-meta{font-size:12px;color:var(--muted);margin-top:2px}
.recap-rate{margin-top:6px;font-size:13px;padding:5px 12px;border-radius:9px;border:1px solid var(--line);background:#fff;cursor:pointer}
.recap-rate.r3{color:#2e7d32;border-color:#2e7d32}
.recap-rate.r2{color:#b8860b;border-color:#b8860b}
.recap-rate.r1{color:#c0341f;border-color:#c0341f}

/* 摇摆步骤 (v2.5.0): 编辑器标记按钮 + 开始前重写输入框 */
.edit-swing{flex:none;min-height:40px;padding:8px 10px;font-size:12px;margin:0;width:auto;display:inline-flex;align-items:center;justify-content:center}
/* v2.18.1: 摇摆步已标记时深底反白 */
.edit-swing.on{background:var(--ink);border-color:var(--ink)}
.edit-swing.on svg [stroke]{stroke:#fff}
.edit-swing.on svg [fill]{fill:#fff}
.swing-input{
  width:100%;margin-top:6px;padding:9px 10px;font-size:14px;line-height:1.5;
  border:1px dashed var(--orange);border-radius:10px;background:#fff;color:var(--ink);
  resize:vertical;font-family:inherit;
}

/* 耗材/仪器清单: 创建页预览 + 确认层两侧标记(左 ✕ 缺失红 / 右 ✓ 备妥绿,防误触) */
.mat-preview{margin:-6px 0 12px}
.mat-preview-count{font-size:12px;color:var(--muted);line-height:1.6}
.mat-card{max-width:480px}
#materialsOverlay .mat-card{width:100%;max-width:none;min-width:0}
/* 操作区留在固定弹层底部,仅清单占用剩余高度并滚动。 */
#materialsOverlay .edit-sheet{min-height:0;overflow:hidden;padding-bottom:max(18px,env(safe-area-inset-bottom))}
#materialsOverlay .mat-card{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#materialsOverlay .gate-text{flex:none}
#materialsList{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;margin:0;scroll-padding-bottom:8px}
#materialsOverlay .materials-actions{flex:none;display:grid;gap:10px;padding-top:14px}
#materialsOverlay .materials-actions button{width:100%;min-height:48px;margin:0}
.mat-row{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(120px,1fr) 44px;align-items:start;gap:8px;padding:7px 0;border-bottom:1px solid var(--line);user-select:none}
.mat-row:last-child{border-bottom:none}
.mat-side{
  flex:none;width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;border-radius:10px;border:1px solid var(--line);
  background:#fff;font-size:16px;cursor:pointer;color:var(--muted);
}
.mat-side.mat-ok{color:#2e7d32;border-color:#2e7d3255}
.mat-side.mat-miss{color:#c0341f;border-color:#c0341f55}
.mat-row.ok .mat-side.mat-ok{background:#2e7d32;color:#fff;border-color:#2e7d32}
.mat-row.miss .mat-side.mat-miss{background:#c0341f;color:#fff;border-color:#c0341f}
.mat-mid{flex:1;min-width:0}
.mat-name{font-size:13px;font-weight:700;color:var(--ink);word-break:break-word}
.mat-detail{font-size:12px;color:var(--muted);margin-top:1px;word-break:break-word}
.mat-row.ok .mat-name,.mat-row.ok .mat-detail{color:#2e7d32}
.mat-row.miss .mat-name,.mat-row.miss .mat-detail{color:#c0341f}
.mat-remark{
  min-width:0;width:100%;min-height:44px;margin:0;padding:10px 8px;font:inherit;font-size:13px;line-height:1.5;border:1px solid var(--line);
  border-radius:8px;background:#fff;color:var(--ink);resize:none;overflow:hidden;overflow-wrap:anywhere;user-select:text;
}
.mat-remark::placeholder{color:var(--muted);opacity:1}
.mat-row.miss .mat-remark{border-color:#c0341f}
@media(max-width:480px){
  .mat-row{grid-template-columns:44px minmax(0,1fr) 44px}
  .mat-row>.mat-miss{grid-column:1;grid-row:1}
  .mat-row>.mat-ok{grid-column:3;grid-row:1}
  .mat-row>.mat-remark{grid-column:2;grid-row:2}
}
.mat-prompt{font-size:11px}
/* v2.17.4: 清单提示关闭状态 — 图标置灰 */
.mat-prompt.off{opacity:.4}

/* ============================================================ */
/*  主题皮肤 (v2.5.2, Pro): 经典(默认,免费)/海洋/科技简约        */
/*  主体组件全部走 CSS 变量,换肤只覆盖变量与少数硬编码背景         */
/* ============================================================ */
/* 海洋主题 Ocean */
body[data-theme="ocean"]{
  --bg:#e9f3f8;--paper:#f7fbfd;--ink:#10303f;--muted:#55798a;
  --line:#c3dce8;--orange:#0e7aa8;--green:#2a9d8f;
}
body[data-theme="ocean"] header{background:#e9f3f8f2}
body[data-theme="ocean"] .tag{background:#d5e8f1}
body[data-theme="ocean"] .preview b{background:#d5e8f1}
body[data-theme="ocean"] .progress{background:#c3dce8}
body[data-theme="ocean"] .wheel-fade-top{background:linear-gradient(#e9f3f8,transparent)}
body[data-theme="ocean"] .wheel-fade-bottom{background:linear-gradient(transparent,#e9f3f8)}

/* 主题选择按钮 (v2.5.2) */
.theme-row{display:flex;gap:8px;margin-top:8px}
.theme-btn{flex:1;margin:0;font-size:13px;padding:9px 4px}
.theme-btn.theme-active{border-color:var(--orange);color:var(--orange);font-weight:700}
.settings-section-body .theme-row{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.settings-section-body .theme-btn{width:100%;min-width:0;text-align:left;padding-left:12px;padding-right:12px}
#googleLoginBtn,#emailLoginBtn{text-align:left;padding-left:12px;padding-right:12px}
.ocean-option{min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--paper);overflow:hidden}
.ocean-option #themeOcean{border:0;border-radius:0;background:transparent;box-shadow:none}
.ocean-effects{margin:0;padding:8px 10px;border-top:1px solid var(--line)}
.ocean-effects .cloud-sync-switch{font-size:13px}

/* ============================================================ */
/*  主题交互特效 (v2.6.0)                                         */
/*  海洋: 浪花边框 + 水滴涟漪 + 浪流进度条                         */
/* ============================================================ */
/* —— 海洋: 卡片/执行卡底边双层浪纹 —— */
body[data-theme="ocean"] .card,
body[data-theme="ocean"] .runner-card{
  padding-bottom:36px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 6 Q10 0 20 6 T40 6 V12 H0 Z' fill='%230e7aa8' fill-opacity='0.16'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 6 Q10 12 20 6 T40 6 V12 H0 Z' fill='%232a9d8f' fill-opacity='0.12'/%3E%3C/svg%3E");
  background-repeat:repeat-x,repeat-x;
  background-position:left bottom,left bottom;
  background-size:40px 12px,40px 12px;
}
/* —— 海洋: 主按钮底边白浪纹 —— */
body[data-theme="ocean"] .save,
body[data-theme="ocean"] .done,
body[data-theme="ocean"] .btn-primary{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='8' viewBox='0 0 30 8'%3E%3Cpath d='M0 4 Q7.5 0 15 4 T30 4 V8 H0 Z' fill='%23ffffff' fill-opacity='0.22'/%3E%3C/svg%3E");
  background-repeat:repeat-x;background-position:left bottom;background-size:30px 8px;
}
/* —— 海洋: 进度条浪流(白浪纹在渐变上缓慢流动) —— */
body[data-theme="ocean"] .progress i{
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='7' viewBox='0 0 24 7'%3E%3Cpath d='M0 3.5 Q6 0 12 3.5 T24 3.5 V7 H0 Z' fill='%23ffffff' fill-opacity='0.25'/%3E%3C/svg%3E"),
    linear-gradient(90deg,#0e7aa8,#2a9d8f);
  background-repeat:repeat-x,no-repeat;
  background-size:24px 7px,100% 100%;
  background-position:left bottom,center;
  animation:oceanflow 2.4s linear infinite;
}
@keyframes oceanflow{to{background-position:48px bottom,center}}
/* —— 海洋: 水滴涟漪(点击按钮时触点扩散) —— */
.droplet{
  position:fixed;border-radius:50%;pointer-events:none;z-index:9999;
  border:2px solid rgba(14,122,168,.55);background:rgba(14,122,168,.18);
  transform:translate(-50%,-50%);animation:droplet .55s ease-out forwards;
}
@keyframes droplet{
  from{width:8px;height:8px;opacity:.9}
  to{width:64px;height:64px;opacity:0}
}

/* 无障碍: 系统"减弱动态效果"时关掉特效动画 (v2.6.0) */
@media (prefers-reduced-motion: reduce){
  .droplet{animation:none;display:none}
  body[data-theme="ocean"] .progress i{animation:none}
}

/* ============================================================ */
/*  水滴拆合 路线A: 双水滴近似 (v2.6.1, 仅海洋主题)                */
/*  液态把手激活后选中行变水滴;下拉"挤出"第二个水滴+变细水桥,     */
/*  过阈值水桥断开弹开(啵);上拉 60% 透明度靠近上一行融合(嘬)      */
/* ============================================================ */
/* 选中行编辑框变水滴(上圆下尖的摆动) */
body[data-theme="ocean"] .wheel-row.liquid-water textarea{
  animation:oceanDroplet 1.6s ease-in-out infinite;
  border-color:#0e7aa8;box-shadow:0 6px 18px #0e7aa833;
  background:linear-gradient(160deg,#eaf6fb,#d7edf6);
}
@keyframes oceanDroplet{
  0%,100%{border-radius:48% 52% 55% 45%/64% 66% 34% 36%;transform:scale(1)}
  50%{border-radius:52% 48% 45% 55%/60% 58% 40% 42%;transform:scale(1.02,.98)}
}
/* 下拉(pull-down): 主水滴随手势微涨,水桥(::before)随 --ldy 长高变细,
   第二个水滴(::after)在下端逐渐增大到超过阈值尺寸 */
body[data-theme="ocean"] .wheel-row.liquid-water.pull-down{
  transform:scale(calc(1 + var(--ldyn,0)*.05));z-index:3;
}
body[data-theme="ocean"] .wheel-row.liquid-water.pull-down::before{
  content:'';position:absolute;left:50%;top:100%;z-index:4;
  transform:translateX(-50%);
  height:calc(var(--ldy,0px)*.55);
  width:max(0px,calc(26px - var(--ldy,0px)*.45));
  background:linear-gradient(#9fd4ea,#bfe3f2);
  border-radius:0 0 45% 45%/0 0 100% 100%;
  opacity:calc(var(--ldyn,0)*.9);
}
body[data-theme="ocean"] .wheel-row.liquid-water.pull-down::after{
  content:'';position:absolute;left:50%;z-index:4;
  top:calc(100% + var(--ldy,0px)*.55 - 6px);
  transform:translateX(-50%) scale(calc(var(--ldyn,0)*1.15));
  width:34px;height:38px;background:#bfe3f2;border:2px solid #0e7aa855;
  border-radius:48% 52% 55% 45%/64% 66% 34% 36%;
  opacity:var(--ldyn,0);
}
/* 上拉(pull-up): 整行随手势上浮(60% 不透明度);
   v2.6.4: 上一行也变水滴(渐显到 60%),两个真水滴互相靠近融合 */
body[data-theme="ocean"] .wheel-row.liquid-water.pull-up{
  transform:translateY(calc(var(--ldy,0px)*.6));z-index:3;
}
body[data-theme="ocean"] .wheel-row.liquid-water.pull-up textarea{
  opacity:calc(1 - var(--ldyn,0)*.4);
}
body[data-theme="ocean"] .wheel-row.merge-target{opacity:calc(.45 + var(--ldyn,0)*.18);z-index:2}
body[data-theme="ocean"] .wheel-row.merge-target .wheel-text{
  background:linear-gradient(160deg,#eaf6fb,#d7edf6);
  border:2px solid #0e7aa855;
  padding:9px 12px;
  border-radius:48% 52% 55% 45%/64% 66% 34% 36%;
  transform:scale(calc(.85 + var(--ldyn,0)*.18));
  transition:border-radius .3s,background .3s;
}
/* v2.6.5 融合张力: 两水滴接近(ldyn≥0.6)时接触面去边框,
   张力桥撑开接触面积,视觉上连成一滩水 */
body[data-theme="ocean"] .wheel-row.liquid-water.pull-up.fusing textarea{
  animation:none;   /* 停止摆动,保持稳定接触面 */
  border-radius:48% 52% 10px 10px/64% 66% 8px 8px;
  border-bottom-color:transparent;
}
body[data-theme="ocean"] .wheel-row.merge-target.fusing .wheel-text{
  border-radius:10px 10px 55% 45%/8px 8px 34% 36%;
  border-top-color:transparent;
}
/* 张力桥: 两水滴之间的水面连接体,随手势加宽(接触面积增大) */
body[data-theme="ocean"] .wheel-row.merge-target.fusing::after{
  content:'';position:absolute;left:50%;top:100%;z-index:4;
  transform:translateX(-50%);
  width:calc(26px + var(--ldyn,0)*44px);height:16px;margin-top:-8px;
  background:linear-gradient(#d7edf6,#bfe3f2);
  border-radius:45%/100%;
  opacity:var(--ldyn,0);
}
/* 过阈值瞬间: 弹一下(水桥崩断/融合落定的触感) */
body[data-theme="ocean"] .wheel-row.liquid-water.snap,
body[data-theme="ocean"] .wheel-row.liquid-goo.snap{
  animation:oceanSnap .22s ease-out;
}
@keyframes oceanSnap{
  0%{transform:scale(1)}40%{transform:scale(1.05,.94)}100%{transform:scale(1)}
}
/* 水滴拆合 路线B (v2.6.2): gooey 滤镜真融合 — 双球黏连/拉断,
   行内容淡出,视觉交给 goo 层的两个色块 */
.goo-layer{
  position:absolute;left:0;right:0;top:-80px;bottom:-80px;
  pointer-events:none;z-index:5;filter:url(#goo);
}
.goo-blob{
  position:absolute;left:50%;width:32px;height:32px;margin-left:-16px;
  border-radius:50%;background:#7cc4e4;
}
body[data-theme="ocean"] .wheel-row.liquid-goo textarea{opacity:.4}
@media (prefers-reduced-motion: reduce){
  body[data-theme="ocean"] .wheel-row.liquid-water textarea{animation:none}
  body[data-theme="ocean"] .wheel-row.liquid-water.snap{animation:none}
}

/* ============================================================ */
/*  隐私合规 (v1.14.0): 首启隐私弹窗 / 隐私文档 / 抽屉清单入口      */
/* ============================================================ */
.consent-text{font-size:14px;line-height:1.9;text-align:left;margin:0 0 18px;color:var(--ink)}
.consent-text a{color:var(--orange);font-weight:700;text-decoration:underline;cursor:pointer}
.privacy-card .privacy-item{display:block;width:100%;margin:6px 0;text-align:left;font-size:14px}
.privacy-card .privacy-item:last-child{margin-bottom:0}
.cloud-sync-card .privacy-item{display:block;width:100%;margin:6px 0;text-align:left;font-size:14px}
.cloud-sync-card .privacy-item:last-of-type{margin-bottom:0}
.cloud-sync-switch{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;min-height:44px;margin:0;cursor:pointer}
.cloud-sync-switch span{min-width:0;overflow-wrap:anywhere}
.cloud-sync-name{display:flex;align-items:center;gap:8px;flex:1}
.cloud-sync-name img{flex:none}
.cloud-sync-switch input{appearance:none;position:relative;width:44px;height:24px;min-height:24px;margin:0;padding:0;flex:none;align-self:center;border:1px solid #777;border-radius:12px;background:#777;cursor:pointer;transition:background .18s,border-color .18s}
.cloud-sync-switch input::before{content:'';position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .18s}
.cloud-sync-switch input:checked{background:var(--orange);border-color:var(--orange)}
.cloud-sync-switch input:checked::before{transform:translateX(20px)}
.cloud-sync-switch input:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.cloud-sync-switch input:disabled{opacity:.45;cursor:not-allowed}
.privacy-body{flex:1;overflow-y:auto;padding:14px 4px;font-size:14px;line-height:1.8;color:var(--ink)}
.privacy-body h3{font-size:15px;margin:16px 0 6px}
.privacy-body p{margin:6px 0}
.privacy-body ul{margin:6px 0;padding-left:20px}
.privacy-body li{margin:6px 0}
.privacy-body .doc-ver{color:var(--muted);font-size:12px}
.delete-account{color:#b0341f}/* v2.17.3: sl-dialog 降级兼容 — Shoelace 未定义/加载失败时,
   带 open 类的 sl-dialog 按传统弹层渲染(保证加号面板一定可用) */
/* v2.17.6: 未打开时隐藏 — Shoelace 未加载/未升级时,未知元素会把
   dialog 内容内联渲染到页面上(每个界面都能看到排期表单的根因);
   Shoelace 正常工作时打开态带 [open] 属性,降级路径带 .open 类 */
sl-dialog:not(.open):not([open]){display:none}
sl-dialog.open{
  display:flex !important;position:fixed;inset:0;z-index:80;
  background:#0006;align-items:center;justify-content:center;
  flex-direction:column;padding:24px;
}
sl-dialog.open > *{
  background:#fff;border-radius:14px;padding:16px;width:100%;max-width:420px;
}
sl-dialog.open > [slot="footer"]{background:transparent;padding:8px 0 0;}
/* v2.17.9: 降级弹层的可见标题;Shoelace 正常加载(:defined)时隐藏防重复 */
.dlg-fallback-title{font-family:serif;font-size:18px;font-weight:700;margin:0 0 10px}
sl-dialog:defined .dlg-fallback-title{display:none}
/* v2.17.5: 排期面板原生输入控件(替代 Shoelace) */
.sched-input{
  width:100%;box-sizing:border-box;min-height:44px;padding:10px;margin:4px 0 10px;
  border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-size:15px;
}

/* v2.17.9: 免提按钮麦克风图标(::before 提供,不占 textContent) */
.mic-btn::before{
  content:'';display:inline-block;width:15px;height:15px;margin-right:6px;vertical-align:-2px;
  background:no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect x='6' y='1.5' width='4' height='7' rx='2' fill='none' stroke='%2326241f' stroke-width='1.5'/><path d='M3.5 7a4.5 4.5 0 0 0 9 0M8 11.5v3M5.5 14.5h5' fill='none' stroke='%2326241f' stroke-width='1.5' stroke-linecap='round'/></svg>");
}

/* v2.17.3: 图标按钮与导航图标(黑白统一风格) */
.nav button svg{display:block;margin:auto}
.icon-btn{min-width:38px;padding-left:10px;padding-right:10px;display:inline-flex;align-items:center;justify-content:center}
.icon-btn svg{display:block}

/* v2.29.0: Add 菜单(五项整屏等距) */
.add-menu-list{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto}
.add-menu-option{flex:1 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:92px;padding:14px 6px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);text-align:left}
.add-menu-option:last-child{border-bottom:0}
.add-menu-option>img{display:block;flex:0 0 24px}
.add-menu-option>span{flex:1;min-width:0;overflow-wrap:anywhere}
.add-menu-option>i{flex:none}
.add-menu-option:active{background:#fff4e8}
.add-menu-option b{display:block;font-size:17px}
.add-menu-option small{display:block;color:var(--muted);font-size:12px;margin-top:5px;line-height:1.4}
.add-menu-option i{font-size:26px;font-style:normal;color:var(--orange)}

/* PDF 内容独立滚动,进度与操作栏不参与滚动,底部为导航留位。 */
#quickSplitOverlay{z-index:34;bottom:var(--quick-split-nav-height,56px)}
.quick-split-sheet{min-height:0;padding-bottom:12px}
.quick-split-sheet>.edit-head{flex:none}
.quick-split-body{flex:1;min-height:0;overflow:auto;padding:18px 2px 28px}
.quick-split-body>p{font-size:14px;line-height:1.5;color:var(--muted)}
.quick-split-balances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}
.quick-split-balances>div{min-width:0;overflow-wrap:anywhere}
.quick-split-balances span,.quick-split-balances small{display:block;font-size:12px;line-height:1.5;color:var(--muted)}
.quick-split-balances strong{display:block;font-size:24px;line-height:1.4;font-variant-numeric:tabular-nums;color:var(--ink)}
.quick-split-balances>div:first-child strong{color:#17645b}
.quick-split-credit-note{margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.quick-split-credit-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 14px}
.quick-split-credit-actions[hidden]{display:none}
.quick-split-credit-actions>button{min-height:40px;border-radius:8px;max-width:100%;white-space:normal}
.quick-split-body>input[type=file]{display:block;width:100%;margin:16px 0 20px}
.quick-split-mode,.quick-split-choice,.quick-split-consent{display:flex;align-items:flex-start;gap:12px;padding:13px;border:1px solid var(--line);border-radius:12px;background:#fff;margin:10px 0;font-size:14px;line-height:1.4}
.quick-split-mode input,.quick-split-choice input,.quick-split-consent input{flex:none;width:19px;height:19px;margin:1px 0 0;accent-color:var(--orange)}
.quick-split-mode b{display:block;font-size:16px}
.quick-split-mode small{display:block;color:var(--muted);margin-top:3px}
.quick-split-consent{background:transparent;font-size:12px}
.quick-split-body>.save{width:100%;margin:10px 0}
.quick-split-footer{flex:0 0 auto;min-width:0;padding:8px 2px 0;border-top:1px solid var(--line);background:var(--bg)}
.quick-split-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0 0}
.quick-split-actions>.save,.quick-split-actions>.light{flex:1 1 130px;min-width:0;margin:0;border-radius:8px}
.quick-split-actions>button{height:56px;min-height:56px;padding:8px 6px;font-size:16px;line-height:18px;white-space:normal;overflow-wrap:anywhere}
.quick-split-actions>.light{display:flex;align-items:center;justify-content:center;gap:8px}
.quick-split-actions img{flex:0 0 18px}
#quickSplitStatus{min-height:20px;margin:0;font-size:13px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere;max-height:18dvh;overflow:auto}
.quick-split-progress{margin:6px 0 10px}
.quick-split-progress[hidden]{display:none}
.quick-split-progress progress{display:block;width:100%;height:12px;accent-color:var(--orange)}
.quick-split-progress small{display:block;margin-top:5px;color:var(--muted);font-size:12px}
.quick-split-choices{max-height:40vh;overflow:auto}
@media(max-width:440px){.quick-split-balances span{min-height:36px}}

/* v2.29.0: 组合协议右栏(左侧保留可滑动的卡片区,遮罩不拦截触摸) */
.combine-mask{z-index:44;pointer-events:none}
.combine-drawer{left:auto;right:0;transform:translateX(100%);z-index:45;width:min(64vw,420px);min-height:0;overflow:hidden;font-size:13px;padding-bottom:max(18px,env(safe-area-inset-bottom))}
.combine-drawer.open{transform:translateX(0)}
/* 内容独立滚动,底部操作区不收缩,避免卡片被挤压后覆盖删除选项。 */
.combine-drawer>.drawer-head{flex:0 0 auto}
.combine-body{flex:1 1 0;min-height:0;min-width:0;overflow-y:auto;overscroll-behavior-y:contain;padding:0 2px 12px 0;scrollbar-gutter:stable}
.combine-footer{flex:0 0 auto;min-width:0;padding-top:8px;border-top:1px solid var(--line);background:var(--bg)}
.combine-footer>.save{margin:8px 0 0}
/* v2.30.0: 右栏所有文字统一缩小一号 */
.combine-drawer input,.combine-drawer button,.combine-drawer label,.combine-drawer strong{font-size:13px}
body.combine-open #page-mine{margin-right:min(64vw,420px)}
/* v2.30.0: 左侧卡片与字体等比缩放(zoom 同步缩放布局间距,不挤字) */
body.combine-open #page-mine #mineList{gap:4px}   /* v2.30.4: 组合模式卡片更紧凑 */
body.combine-open #page-mine .mine-section-body{gap:4px}
body.combine-open #page-mine #mineList .card{zoom:var(--combine-scale,.36)}
body.combine-open #page-mine .card-actions,body.combine-open #page-mine .card-corner{display:none}
body.combine-open #page-mine .card{padding:10px}
/* v2.30.3: 仅卡片浮到遮罩上方高亮,其他文字/背景仍保持暗 */
body.combine-open #page-mine .card{position:relative;z-index:46;filter:brightness(1.1);box-shadow:0 9px 22px #e8710a30}
body.combine-open #page-mine .card::after{content:'Hold & drag';position:absolute;top:-7px;right:8px;padding:2px 6px;border-radius:7px;background:#26241f;color:#fff;font-size:9px;line-height:1.4;white-space:nowrap;box-shadow:0 3px 8px #0002;pointer-events:none;animation:combineHintFloat 1.6s ease-in-out infinite}
body.combine-open #page-mine .card.combine-selected{background:#ddf5e3;border-color:#238347;filter:none;box-shadow:0 4px 14px #23834730}
body.combine-open #page-mine .card.combine-selected::after{content:'Selected';background:#166534;animation:none}
body.combine-open #page-mine .card.combine-selected.combine-delete{background:#fde2e2;border-color:#bd3030;box-shadow:0 4px 14px #bd303030}
body.combine-open #page-mine .card.combine-selected.combine-delete::after{content:'Will be deleted';background:#a62626}
.combine-drawer .combine-delete-option{display:flex;align-items:flex-start;gap:8px;min-height:44px;margin:0;padding:8px 0;cursor:pointer;color:var(--ink)}
.combine-delete-option input[type="checkbox"]{flex:0 0 18px;width:18px;height:18px;margin:1px 0 0;padding:0;accent-color:#a62626}
.combine-delete-option span{min-width:0;line-height:1.5;overflow-wrap:anywhere}
body.combine-open #page-mine .card[data-cloud-only="true"]::after{content:none}
.mine-cloud-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}
.mine-cloud-header span{min-width:0;overflow-wrap:anywhere}
.mine-cloud-header button{flex:0 0 44px;width:44px;height:44px;padding:0;display:grid;place-items:center}
.mine-cloud-status{grid-column:1/-1;color:var(--muted);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.mine-section-header{display:flex;align-items:center;gap:8px;min-width:0;grid-column:1/-1;padding:0}
.mine-section-toggle{flex:1;min-width:0;min-height:44px;display:flex;align-items:center;gap:8px;text-align:left;color:var(--muted);background:transparent;border:0;box-shadow:none;padding:8px 4px;font-size:12px;font-weight:400;appearance:none}
.mine-section-toggle span{min-width:0;overflow-wrap:anywhere}
.mine-section-toggle img{flex:0 0 14px;transition:transform .15s}
.mine-section-toggle[aria-expanded="true"] img{transform:rotate(90deg)}
.mine-section-header>.icon-btn{flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;box-shadow:none;appearance:none}
.mine-section-body{display:grid;grid-template-columns:minmax(0,1fr);gap:13px;min-width:0;grid-column:1/-1}
.mine-section-body[hidden]{display:none}
#mineList .mine-section-body>.card{width:100%;min-width:0}
#modulesList .mine-section-body>.card{width:100%;min-width:0}
#modulesList .lab-item-card .card-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
#modulesList .lab-item-card .card-head{padding-right:0}
#modulesList .lab-item-card .card-actions .icon-btn{display:grid;place-items:center}
#mineList>.list-header,#mineList>.empty-state{grid-column:1/-1}
#mineList,#libraryList,#modulesList{grid-template-columns:minmax(0,1fr)}
#mineList>.card,#libraryList>.card,#modulesList>.card{width:100%;min-width:0}
#libraryList .card-head h3,#libraryList .meta{min-width:0;overflow-wrap:anywhere}
#page-mine>.hero,#page-library>.hero,#page-modules>.hero{padding:10px 2px 12px;margin-bottom:8px}
#page-mine>.hero h3,#page-library>.hero h3,#page-modules>.hero h3{margin:0;line-height:1.4}
#page-modules>.hero{align-items:center}
#page-modules .hero-actions button{flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;box-shadow:none;appearance:none}
#modulesList .card-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
#modulesList .card-actions button{min-width:0;box-shadow:none;appearance:none}
#page-create>.hero{align-items:center;padding:10px 2px 12px;margin-bottom:8px}
#page-create>.hero h3{margin:0;line-height:1.4}
#mineList .card-actions .btn-primary,#libraryList .card-actions .btn-primary{border:0;box-shadow:none;appearance:none}
#mineList .card-corner,#modulesList .card-corner{top:0;right:0;width:44px;height:44px;min-width:44px;min-height:44px;border-radius:0 18px 0 8px;background:transparent;border:0;box-shadow:none;appearance:none}
#mineList .card-corner:not(:disabled):hover,#modulesList .card-corner:not(:disabled):hover{background:var(--line)}
#mineList .card-corner:not(:disabled):active,#modulesList .card-corner:not(:disabled):active{background:var(--line);opacity:.7}
#mineList .card-head,#modulesList .card-head{padding-right:32px;min-width:0}
#mineList .card-head h3,#modulesList .card-head h3{min-width:0;overflow-wrap:anywhere;line-height:1.35}
#mineList .card-head .badge,#modulesList .card-head .badge{max-width:100%;overflow-wrap:anywhere}
#mineList .meta,#modulesList .meta{overflow-wrap:anywhere}
#mineList .card button:disabled,#modulesList .card button:disabled{background:#e5e7eb;border-color:#d1d5db;color:#6b7280;cursor:not-allowed;box-shadow:none}
#mineList .card .card-corner:disabled,#modulesList .card .card-corner:disabled{background:transparent;border:0}
#mineList .card button:disabled svg,#mineList .card button:disabled img,#modulesList .card button:disabled svg,#modulesList .card button:disabled img{opacity:.4}
@keyframes combineHintFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
body.combine-open #fabMine{display:none!important}
.combine-drawer label{margin-top:12px}
.combine-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px;min-height:60px}
.combine-item{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:12px 14px;font-weight:700;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.combine-item .combine-index{color:var(--orange);margin-right:8px}
.combine-empty{color:var(--muted);font-size:12px;padding:14px 0}
/* v2.30.0: 长按悬浮的亮度/波纹提示,原位置保留占位并淡化 */
.combine-source{opacity:.28}
.combine-lift{position:fixed!important;margin:0!important;pointer-events:none;z-index:70!important;filter:brightness(1.08);box-shadow:0 14px 34px #0004,0 0 0 0 #e8710a66;animation:combineRipple .9s ease-out infinite}
.combine-lift .card-actions,.combine-lift .card-corner{display:none}
/* v2.30.1: 高亮只作用于悬浮卡片,不给右栏加边框 */
.combine-lift.combine-drop-hot{filter:brightness(1.22)}
@keyframes combineRipple{0%{box-shadow:0 14px 34px #0004,0 0 0 0 #e8710a66}100%{box-shadow:0 14px 34px #0004,0 0 0 16px #e8710a00}}

/* v2.29.0: 协议完整信息页 */
.protocol-info{flex:1;min-height:0;overflow-y:auto;padding-top:10px}
.info-metadata-editor{margin:0 0 14px}
.info-metadata-editor label{display:block;margin:12px 0 6px;font-size:13px;font-weight:600}
.info-metadata-editor input{width:100%;min-width:0;margin:0}
.info-edit-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:12px}
.info-edit-status{flex:1 1 140px;min-width:0;color:var(--green);font-size:13px;overflow-wrap:anywhere}
.info-edit-status.info-error{color:#b42332}
.info-edit-actions .info-edit-save{flex:0 0 auto;width:auto;max-width:100%;min-height:44px;margin:0;padding:10px 16px;border-radius:8px;font-size:14px}
.protocol-info h3{margin:18px 0 8px;color:var(--orange);font-size:15px}
.info-row{display:flex;gap:12px;padding:6px 0;border-bottom:1px solid #f0e8dd;font-size:13px}
.info-row .info-key{flex:0 0 112px;color:var(--muted)}
.info-row .info-val{flex:1;min-width:0;word-break:break-word}
.info-source-card{background:var(--paper);border:1px solid var(--line);border-radius:11px;padding:10px 12px;margin:8px 0;font-size:13px}
/* 群组页: 紧凑工具栏与无嵌套卡片的列表。 */
#page-groups { max-width: 900px; margin: 0 auto; padding-bottom: 90px; }
.group-toolbar { display: flex; align-items: center; gap: 12px; }
.group-toolbar h2 { flex: 1; min-width: 0; font-size: 20px; overflow-wrap: anywhere; letter-spacing: 0; }
#page-groups .group-button { min-height: 44px; min-width: 44px; border-radius: 6px; padding: 10px 12px; white-space: normal; }
.group-button img, #groupsOpen img { width: 20px; height: 20px; vertical-align: middle; }
.group-button:disabled { opacity: .5; }
.group-button:focus-visible, .group-field input:focus-visible, .group-field select:focus-visible { outline: 2px solid #147d83; outline-offset: 2px; }
.group-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.group-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #9a9a9a50; }
.group-row > div:first-child, .group-row > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.group-row strong, .group-row small { display: block; }
.group-row small, .group-muted, #groupStatus { font-size: 13px; opacity: .8; margin-top: 5px; }
.group-row button { flex: 0 0 44px; }
#groupContent h3 { font-size: 16px; margin: 22px 0 10px; }
.group-field { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; font-size: 14px; }
.group-field input, .group-field select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid #8888; border-radius: 6px; font: inherit; background: var(--card, #fff); color: inherit; }
.group-field input[type=checkbox] { width: 24px; min-height: 24px; align-self: flex-start; }
.group-steps { padding-left: 25px; }
.group-steps li { margin-bottom: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.group-table { max-width: 100%; overflow-x: auto; }
.group-table table { border-collapse: collapse; font-size: 13px; }
.group-table th, .group-table td { border: 1px solid #8888; padding: 8px; min-width: 70px; max-width: 250px; overflow-wrap: anywhere; }

.lab-editor-sheet{overflow:hidden}
.lab-editor-body{flex:1;min-height:0;overflow-y:auto;padding:4px 2px 18px}
.lab-editor-body h3{font-size:17px;margin:22px 0 10px}
.lab-editor-sheet>.save{flex:none}
#recipeTableHost{background:#fff;border:1px solid var(--line);border-radius:4px 4px 14px 14px;padding:10px;overflow-x:auto}
.lab-table-name{font-weight:700}
.sample-plate-status{color:var(--muted);font-size:13px;line-height:1.5;margin:8px 0}
.sample-inline-editor,.recipe-inline-editor{min-width:0}
.sample-inline-editor [hidden],.recipe-inline-editor [hidden]{display:none !important}
.sample-inline-toolbar,.recipe-inline-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:14px}
.sample-inline-toolbar select,.recipe-inline-toolbar select{flex:1;min-width:0;margin:0}
.sample-inline-toolbar .icon-btn,.recipe-inline-toolbar .icon-btn{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0}
.sample-inline-fields,.recipe-inline-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sample-inline-fields>div,.recipe-inline-fields>div{min-width:0}
.sample-inline-fields input,.recipe-inline-fields input{margin-bottom:12px}
.recipe-name-field{display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:12px}
.recipe-name-field input{flex:1;min-width:0;margin:0}
.recipe-name-field output{flex:0 1 auto;max-width:40%;font-size:13px;font-weight:600;line-height:1.4;overflow-wrap:anywhere;color:var(--orange)}
.recipe-branch-tag{display:inline-flex;align-items:center;gap:5px;max-width:100%;margin:0 0 10px;padding:4px 8px;border:1px solid var(--line);border-radius:4px;background:#eaf4ef;color:#245246;font-size:12px;font-weight:600;line-height:18px}
.recipe-tables-head{display:flex;align-items:flex-end;gap:8px;min-width:0}
.recipe-tables-head .sheet-tabs{flex:1;min-width:0}
.recipe-tables-head .tab-btn{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recipe-tables-head>.icon-btn{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:0;margin-bottom:4px;border-radius:6px}
.lab-table-title{margin:0 0 16px;font-size:15px;line-height:1.5;overflow-wrap:anywhere}
#recipeMaterialsInput{display:block;width:100%;min-height:160px;resize:vertical;font-family:monospace;line-height:1.6}
.lab-readonly-materials{margin:14px 0;text-align:left;overflow-wrap:anywhere}
.lab-readonly-materials h4{margin:0 0 8px;font-size:14px}
.lab-readonly-materials ul{margin:0;padding-left:22px}
.lab-readonly-materials li{margin:6px 0;white-space:pre-wrap}
.recipe-table-actions{display:flex;align-items:center;gap:8px;margin-top:12px}
.recipe-inline-editor .tbl-tools{flex-wrap:wrap}
.recipe-table-actions .icon-btn,.recipe-branch-options .icon-btn{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:0;border-radius:6px}
.recipe-inline-editor .recipe-cell-selected{outline:2px solid var(--orange);outline-offset:-2px}
.recipe-inline-editor .recipe-cell-branch{border-bottom:2px dashed var(--orange);background:#fff7ed}
.recipe-parameter-branch{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.recipe-parameter-label{flex:1 1 150px;min-width:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.recipe-branch-options{display:flex;flex-wrap:wrap;align-items:center;gap:4px;max-width:100%}
.recipe-branch-options>button:not(.icon-btn){min-width:32px;height:32px;min-height:32px;padding:4px 8px;border:1px solid var(--line);border-radius:4px;background:var(--paper,#fff);color:var(--ink);font-size:13px;line-height:22px;box-shadow:none}
.recipe-branch-options>button[aria-pressed="true"]{border-color:var(--orange);background:var(--orange);color:#fff}
.recipe-branch-options>button:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
.recipe-assignment-row{display:grid;grid-template-columns:minmax(80px,1fr) minmax(0,2fr);align-items:center;gap:8px;margin-top:8px}
.recipe-assignment-row>span{min-width:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.recipe-assignment-row select{min-width:0;margin:0}
.sample-inline-editor h3{font-size:17px;margin:22px 0 10px}
.sample-plate-controls{display:flex;align-items:center;gap:16px;margin:4px 0 8px;min-width:0}
.sample-plate-controls>span{font-size:13px;font-weight:600;flex:none}
.sample-plate-picker{flex:1;max-width:320px;min-width:0}
.sample-photo-tool{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none;min-width:0;margin-left:auto}
.sample-photo-tool>span{font-size:13px;line-height:18px;font-weight:600;color:var(--ink);white-space:nowrap}
#samplePhotoAdd{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:0;padding:0}
@media(max-width:480px){.sample-photo-tool>span{max-width:50px;white-space:normal;text-align:center}}
.sample-plate-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid var(--line);border-radius:6px;overflow:hidden;background:var(--paper,#fff)}
.sample-plate-options button{min-width:0;min-height:32px;padding:5px 4px;margin:0;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);font-size:13px;line-height:22px;box-shadow:none}
.sample-plate-options button:last-child{border-right:0}
.sample-plate-options button[aria-pressed="true"]{background:var(--orange);color:#fff}
.sample-plate-options button:focus-visible{outline:2px solid var(--ink);outline-offset:-3px}
.sample-plate-picker input[type="range"]{display:block;appearance:none;width:calc(100% - 40px);height:18px;min-height:18px;margin:5px 20px 0;padding:0;border:0;box-shadow:none;background:transparent;cursor:ew-resize}
.sample-plate-picker input[type="range"]::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:var(--line)}
.sample-plate-picker input[type="range"]::-webkit-slider-thumb{appearance:none;width:20px;height:12px;margin-top:-4px;border:0;border-radius:3px;background:var(--orange)}
.sample-plate-picker input[type="range"]::-moz-range-track{height:4px;border-radius:2px;background:var(--line)}
.sample-plate-picker input[type="range"]::-moz-range-thumb{width:20px;height:12px;border:0;border-radius:3px;background:var(--orange)}
.sample-plate-picker input[type="range"]:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.sample-inline-editor .sample-board{width:100%;max-width:calc(var(--plate-columns)*40px + (var(--plate-columns) - 1)*6px);min-width:0;grid-template-columns:repeat(var(--plate-columns),minmax(0,1fr));gap:6px}
.sample-inline-editor .sample-well{width:100%;height:auto;min-width:0;min-height:0;aspect-ratio:1;font-size:10px}
.sample-board{position:relative}
.sample-selection-rect{position:absolute;pointer-events:none;z-index:1;border:2px solid var(--orange);border-radius:3px;background:#d6502912}
.sample-selection-rect[hidden]{display:none}
.recipe-color-options{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.recipe-color-swatch{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:0;border:1px solid #0003;border-radius:50%;box-shadow:none}
.recipe-color-swatch img{visibility:hidden}
.recipe-color-swatch[aria-pressed="true"]{outline:2px solid var(--ink);outline-offset:3px}
.recipe-color-swatch[aria-pressed="true"] img{visibility:visible}
.recipe-color-swatch:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.recipe-color-swatch[data-recipe-color="green"],.sample-well.assigned[data-recipe-color="green"]{background:#23764b;border-color:#23764b;color:#fff}
.recipe-color-swatch[data-recipe-color="blue"],.sample-well.assigned[data-recipe-color="blue"]{background:#2366b4;border-color:#2366b4;color:#fff}
.recipe-color-swatch[data-recipe-color="yellow"],.sample-well.assigned[data-recipe-color="yellow"]{background:#f4d35e;border-color:#ad8b18;color:#25282c}
.recipe-color-swatch[data-recipe-color="purple"],.sample-well.assigned[data-recipe-color="purple"]{background:#8045aa;border-color:#8045aa;color:#fff}
.recipe-color-swatch[data-recipe-color="orange"],.sample-well.assigned[data-recipe-color="orange"]{background:#f29a52;border-color:#b56628;color:#25282c}
.recipe-color-swatch:is([data-recipe-color="green"],[data-recipe-color="blue"],[data-recipe-color="purple"]) img{filter:brightness(0) invert(1)}
.sample-board-scroll{max-width:100%;overflow-x:auto;padding:8px 4px 12px;overscroll-behavior-x:contain}
.sample-board{display:grid;grid-template-columns:repeat(var(--plate-columns),44px);gap:7px;width:max-content;min-width:min-content;margin:0 auto;touch-action:none;user-select:none;-webkit-user-select:none}
.sample-well{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--muted);font-size:11px;font-weight:700;touch-action:none}
.sample-well.used{background:#fff0e9;border-color:var(--orange);color:var(--ink)}
.sample-well.assigned{background:var(--green);border-color:var(--green);color:#fff}
.sample-well.selected{outline:3px solid #26241f55;outline-offset:2px}
.sample-well:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
.sample-well-detail,.sample-exec-well-detail{background:#fff;border:1px solid var(--line);border-radius:8px;padding:12px;margin-top:10px;overflow-x:auto}
.sample-well-detail .row{align-items:stretch;margin-top:8px}
.sample-well-detail .row .save{margin-top:0}
.sample-well-detail>.light{width:100%;margin-top:8px}
.sample-well-identity{min-width:0;margin:14px 0}
.sample-well-identity input,.sample-well-identity select{width:100%;min-width:0;margin-bottom:8px}
.sample-name-amount{display:grid;grid-template-columns:minmax(0,2fr) minmax(80px,1fr);gap:12px}
.sample-name-amount>div{min-width:0}
.lab-readonly-table [data-well-sample-amount]{display:block;box-sizing:border-box;width:100%;min-width:80px;max-width:180px;margin:0;padding:6px 8px;border-radius:4px}
.sample-well-name{display:block;max-width:100%;font-size:13px;line-height:1.6;overflow-wrap:anywhere;white-space:pre-wrap}
.lab-readonly-table{min-width:280px;margin:14px 0;text-align:left}
.lab-readonly-table [data-well-sample]{min-width:120px;max-width:220px;white-space:pre-wrap;overflow-wrap:anywhere}
.sample-photo-actions{margin:8px 0 14px}
.sample-photo-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
.sample-photo-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px;display:grid;gap:6px}
.sample-photo-card img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;cursor:pointer}
.sample-photo-card span{font-size:12px;overflow-wrap:anywhere}
.sample-photo-card button{min-height:34px;padding:6px}
.sample-exec-panel{background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:16px;text-align:left;box-shadow:0 18px 55px #34291015}
.sample-exec-summary h3{margin:0 0 4px}
.exec-sample-tabs{margin:4px 0 12px;flex-wrap:nowrap}
.exec-sample-tabs .tab-btn{flex:1}
.run-sample-sheet{min-height:0;overflow:hidden;padding-bottom:max(18px,env(safe-area-inset-bottom))}
.run-sample-sheet>.edit-head,.run-sample-sheet>p,.run-sample-sheet>label,.run-sample-sheet>select{flex:none}
.run-sample-sheet .edit-head strong{white-space:normal;overflow-wrap:anywhere}
.run-sample-sheet p{color:var(--muted);line-height:1.6}
#runSamplePreview{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:4px 0 8px}
#runSamplePreview .sample-exec-well-detail:empty{display:none}
#runSamplePreview .sample-board,#runSamplePreview .sample-well{touch-action:pan-x pan-y}
.run-sample-actions{flex:none;display:grid;gap:10px;padding-top:14px}
.run-sample-actions button{width:100%;min-height:48px;margin:0}
@media (max-width:420px){.sample-board{grid-template-columns:repeat(var(--plate-columns),40px);gap:6px}.sample-well{width:40px;height:40px;min-width:40px;min-height:40px;font-size:10px}}
@media (max-width:420px){.sample-inline-fields,.recipe-inline-fields{grid-template-columns:minmax(0,1fr);gap:0}.sample-plate-controls{gap:10px}}
