/* =============================================================================
   家物智管家 · 统一视觉体系 v5
   -----------------------------------------------------------------------------
   设计原则
   1. 一个主色（墨绿）+ 一套中性灰阶；不用彩色渐变按钮、不用装饰色块
   2. 圆角 12 / 10 / 8 三档；阴影只有一层且极轻，靠描边和留白建立层级
   3. 图标统一线性描边（icons.js sprite），保持同一视觉重量
   4. PC 侧栏 + 内容区；≤900px 切底部导航；所有控件在 360px 宽下可用
   ============================================================================= */

/* ---------------------------------------------------------------- 设计 token */
:root{
  /* 品牌 */
  --brand:#146b53;
  --brand-strong:#0f5844;
  --brand-soft:#eef6f2;
  --brand-line:#cfe6dc;

  /* 中性 */
  --bg:#f6f7f8;
  --surface:#ffffff;
  --surface-2:#fbfbfc;
  --surface-3:#f3f4f6;
  --ink:#101828;
  --text:#344054;
  --muted:#667085;
  --faint:#98a2b3;
  --line:#e4e7ec;
  --line-soft:#eef0f3;

  /* 语义 */
  --danger:#b42318;
  --danger-soft:#fef3f2;
  --danger-line:#fecdca;
  --warn:#b54708;
  --warn-soft:#fffaeb;
  --warn-line:#fedf89;
  --ok:#067647;
  --ok-soft:#ecfdf3;
  --ok-line:#abefc6;
  --info:#175cd3;
  --info-soft:#eff4ff;

  /* 形状 */
  --r-lg:14px;
  --r-md:10px;
  --r-sm:8px;
  --shadow:0 1px 2px rgba(16,24,40,.04);
  --shadow-pop:0 12px 32px -12px rgba(16,24,40,.18),0 2px 6px rgba(16,24,40,.04);
  --ring:0 0 0 3px rgba(20,107,83,.12);

  /* 兼容旧变量名 */
  --card:#fff;
  --primary:#146b53;
  --primary-2:#0f5844;
  --primary-soft:#eef6f2;
  --radius:14px;
  --shadow-lg:0 24px 64px -24px rgba(16,24,40,.3);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;min-height:100%}
body{
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:14px;line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
[v-cloak]{display:none}
h1,h2,h3,h4{margin:0;color:var(--ink);font-weight:600;letter-spacing:-.01em}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
img{display:block}
code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px;
  background:var(--surface-3);border:1px solid var(--line-soft);border-radius:5px;padding:1px 4px;color:#475467;
}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#d6dae0;border-radius:10px;border:3px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:#c1c7d0;background-clip:content-box}
::selection{background:#d3ece2;color:#0f5844}

/* 键盘可达性：只在键盘操作时显示焦点环 */
button:focus-visible,a:focus-visible,[role="tab"]:focus-visible,summary:focus-visible{
  outline:2px solid var(--brand);outline-offset:2px;border-radius:var(--r-sm);
}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none}

/* ------------------------------------------------------------------ 图标基类 */
.ic{
  width:18px;height:18px;flex:0 0 auto;display:inline-block;vertical-align:-3px;
  fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
.ic.sm{width:15px;height:15px;stroke-width:1.8}
.ic.lg{width:22px;height:22px}
.ic.xl{width:26px;height:26px;stroke-width:1.6}

/* --------------------------------------------------------------- 通用小工具 */
.muted{color:var(--muted)}
.tiny{font-size:12px;line-height:1.55}
.small{font-size:12.5px}
.grid{display:grid;gap:16px}
.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.row{display:flex;align-items:center;gap:8px}
.spacer{margin-left:auto}

/* =============================================================== 应用骨架 */
.app-shell{display:flex;min-height:100vh;background:var(--bg)}

/* —— PC 侧栏 —— */
.sidebar{
  width:232px;flex:0 0 232px;position:sticky;top:0;height:100vh;z-index:20;
  display:flex;flex-direction:column;gap:18px;
  padding:18px 14px 14px;
  background:var(--surface);border-right:1px solid var(--line);
}
.brand{display:flex;align-items:center;gap:10px;padding:2px 6px 0}
.brand-logo,.brand .brand-logo{
  width:34px;height:34px;flex:0 0 34px;border-radius:9px;
  background:var(--brand);color:#fff;
  display:flex;align-items:center;justify-content:center;
}
.brand-logo .ic{width:19px;height:19px;stroke-width:1.9}
.brand-title{font-size:14.5px;font-weight:650;color:var(--ink);line-height:1.3}
.brand-sub{font-size:11px;color:var(--faint);line-height:1.3;margin-top:1px}
.nav-group{display:flex;flex-direction:column;gap:2px}
.nav-caption{
  font-size:10.5px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;
  color:var(--faint);padding:0 10px;margin:6px 0 5px;
}
.nav-item{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:8px 10px;border-radius:var(--r-sm);
  color:var(--text);font-size:13.5px;font-weight:500;text-align:left;
  transition:background .14s,color .14s;
}
.nav-item:hover{background:var(--surface-3);color:var(--ink)}
.nav-item:active{background:#eaecf0}
.nav-item.active{background:var(--brand-soft);color:var(--brand-strong);font-weight:600}
.nav-ico{width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:currentColor}
.nav-ico .ic{width:17.5px;height:17.5px;stroke-width:1.7}
.nav-item.active .nav-ico .ic{stroke-width:1.9}
.nav-badge{
  margin-left:auto;min-width:18px;height:18px;padding:0 5px;border-radius:9px;
  background:var(--danger-soft);color:var(--danger);border:1px solid var(--danger-line);
  font-size:10.5px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;
}
.side-foot{
  margin-top:auto;padding:10px 10px 12px;
  border-top:1px solid var(--line-soft);
  font-size:11px;line-height:1.75;color:var(--faint);
}
.side-foot b{color:var(--text);font-weight:600}
.side-user{
  display:flex;align-items:center;gap:9px;width:100%;padding:8px 9px;
  border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface);
  text-align:left;transition:background .14s,border-color .14s;
}
.side-user:hover{background:var(--surface-2);border-color:#d0d5dd}
.su-meta{display:flex;flex-direction:column;min-width:0;line-height:1.35}
.su-meta b{font-size:12.5px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.su-meta span{font-size:11px;color:var(--faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.su-more{margin-left:auto;color:var(--faint);display:flex}

/* —— 头像 —— */
.avatar{
  width:30px;height:30px;flex:0 0 auto;border-radius:8px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:12.5px;font-weight:600;color:var(--brand-strong);
  background:var(--brand-soft);border:1px solid var(--brand-line);
}
.avatar.sm{width:26px;height:26px;border-radius:7px;font-size:11.5px}
.avatar.lg{width:44px;height:44px;border-radius:11px;font-size:17px}
.avatar-btn{
  width:34px;height:34px;border-radius:9px;border:1px solid var(--brand-line);
  color:var(--brand-strong);font-weight:600;font-size:13px;background:var(--brand-soft);
  display:inline-flex;align-items:center;justify-content:center;transition:.14s;
}
.avatar-btn:hover{background:#e2f0ea}

/* —— 主区 / 顶栏 —— */
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  position:sticky;top:0;z-index:15;
  display:flex;align-items:center;gap:10px;
  padding:10px 24px;min-height:56px;
  background:rgba(255,255,255,.86);backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
}
.mobile-brand{display:none;align-items:center;gap:7px;font-weight:650;font-size:14.5px;color:var(--ink)}
.mobile-brand .ic{color:var(--brand)}
.top-search{position:relative;flex:1;max-width:460px}
.top-search input{
  width:100%;height:36px;padding:0 74px 0 33px;
  border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--surface-2);font-size:13px;outline:0;
  transition:background .16s,border-color .16s,box-shadow .16s;
}
.top-search input::placeholder{color:var(--faint)}
.top-search input:focus{background:#fff;border-color:var(--brand-line);box-shadow:var(--ring)}
.search-ico{
  position:absolute;left:10px;top:50%;transform:translateY(-50%);
  color:var(--faint);display:flex;pointer-events:none;
}
.search-act{
  position:absolute;right:3px;top:50%;transform:translateY(-50%);
  width:28px;height:28px;border-radius:7px;
  display:inline-flex;align-items:center;justify-content:center;
  color:var(--muted);transition:background .14s,color .14s;
}
.search-act:hover{background:#eaecf0;color:var(--text)}
.search-act.mic{color:var(--brand)}
.search-act.mic.warn{color:var(--warn);background:var(--warn-soft)}
.search-act.clear{color:var(--faint)}
.top-actions{margin-left:auto;display:flex;align-items:center;gap:7px}
.icon-btn{
  width:34px;height:34px;border-radius:9px;
  border:1px solid var(--line);background:var(--surface);color:var(--muted);
  display:inline-flex;align-items:center;justify-content:center;
  transition:background .14s,color .14s,border-color .14s;
}
.icon-btn:hover{background:var(--surface-2);color:var(--ink);border-color:#d0d5dd}
.icon-btn.xs{width:26px;height:26px;border:0;background:transparent;color:var(--faint)}
.icon-btn.xs:hover{background:var(--surface-3);color:var(--text)}
.sync-pill{
  display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;
  border:1px solid var(--line);border-radius:999px;background:var(--surface);
  font-size:12px;font-weight:500;color:var(--muted);white-space:nowrap;max-width:180px;
}
.sync-pill:hover{background:var(--surface-2);color:var(--text)}
.dot{width:6px;height:6px;border-radius:50%;background:var(--faint);display:inline-block;flex:0 0 auto}
.dot.on{background:#12b76a;box-shadow:0 0 0 3px rgba(18,183,106,.16)}
.dot.warn{background:#f79009}

.page{padding:22px 24px 40px;max-width:1240px;margin:0 auto;width:100%}
.page-head{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:14px;margin-bottom:18px;flex-wrap:wrap;
}
.page-title{font-size:21px;font-weight:650;letter-spacing:-.02em;color:var(--ink)}
.page-sub{font-size:12.5px;color:var(--muted);margin:4px 0 0;line-height:1.55}
.page-head h2{font-size:21px;font-weight:650;letter-spacing:-.02em;margin:0}
.page-head p{margin:4px 0 0;font-size:12.5px;color:var(--muted)}

/* ================================================================ 按钮 */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:34px;padding:0 13px;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--surface);color:var(--text);font-size:13px;font-weight:500;
  box-shadow:0 1px 1px rgba(16,24,40,.03);
  transition:background .14s,border-color .14s,color .14s,box-shadow .14s;
  white-space:nowrap;
}
.btn:hover{background:var(--surface-2);border-color:#d0d5dd;color:var(--ink)}
.btn:active{background:#f0f1f3}
.btn .ic{width:15px;height:15px;stroke-width:1.9;color:currentColor}
.btn.primary{
  background:var(--brand);border-color:var(--brand);color:#fff;
  box-shadow:0 1px 2px rgba(16,24,40,.08);
}
.btn.primary:hover{background:var(--brand-strong);border-color:var(--brand-strong);color:#fff}
.btn.primary:active{background:#0c4a39}
.btn.accent{background:var(--info);border-color:var(--info);color:#fff}
.btn.danger{background:var(--surface);border-color:var(--danger-line);color:var(--danger)}
.btn.danger:hover{background:var(--danger-soft);border-color:#fda29b;color:var(--danger)}
.btn.ghost{background:transparent;border-color:transparent;box-shadow:none;color:var(--muted)}
.btn.ghost:hover{background:var(--surface-3);border-color:transparent;color:var(--text)}
.btn.sm{height:28px;padding:0 9px;font-size:12px;border-radius:7px;gap:5px}
.btn.sm .ic{width:13px;height:13px}
.btn:disabled,.btn[disabled]{opacity:.45;cursor:not-allowed;box-shadow:none}
.btn:disabled:hover,.btn[disabled]:hover{background:var(--surface);border-color:var(--line);color:var(--text)}
.btn.primary:disabled:hover{background:var(--brand);border-color:var(--brand);color:#fff}
.danger-text{color:var(--danger)!important}
.btn.voice-btn{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-strong)}
.btn.voice-btn:hover{background:#e4f1eb;border-color:#bfdccf;color:var(--brand-strong)}
.btn.voice-btn.warn{background:var(--warn-soft);border-color:var(--warn-line);color:var(--warn)}

/* ================================================================ 卡片 */
.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--shadow);padding:18px;
}
.card + .card{margin-top:14px}
.card-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:14px;min-height:26px;
}
.card-title{
  display:flex;align-items:center;gap:8px;
  font-size:14px;font-weight:600;color:var(--ink);letter-spacing:-.01em;
}
.card-title .ic{color:var(--muted);width:16px;height:16px}
.card-title small{font-weight:400;color:var(--faint);font-size:11.5px;margin-left:2px}
.card-status{display:flex;align-items:center;gap:7px;flex:none}
.card-status small{font-size:10.5px;color:var(--faint)}

/* 状态徽章 */
.status-badge{
  display:inline-flex;align-items:center;gap:4px;
  padding:1px 7px;border-radius:999px;border:1px solid transparent;
  font-size:11px;font-weight:600;line-height:1.6;white-space:nowrap;
}
.status-badge::before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.85}
.status-badge.ok{background:var(--ok-soft);color:var(--ok);border-color:var(--ok-line)}
.status-badge.ready{background:var(--warn-soft);color:var(--warn);border-color:var(--warn-line)}
.status-badge.fail{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-line)}
.status-badge.idle{background:var(--surface-3);color:var(--muted);border-color:var(--line)}
.status-badge.info{background:var(--info-soft);color:var(--info);border-color:#d1e0ff}

/* 物品状态 chip */
.chip{
  display:inline-flex;align-items:center;gap:4px;
  padding:1px 8px;border-radius:999px;border:1px solid transparent;
  font-size:11px;font-weight:600;white-space:nowrap;
}
.chip.expired{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-line)}
.chip.expiring{background:var(--warn-soft);color:var(--warn);border-color:var(--warn-line)}
.chip.normal{background:var(--ok-soft);color:var(--ok);border-color:var(--ok-line)}
.chip.no_expiry{background:var(--surface-3);color:var(--muted);border-color:var(--line)}
.chip.plain{background:var(--surface-3);color:var(--muted);border-color:var(--line)}

.empty{
  text-align:center;padding:30px 16px;color:var(--faint);font-size:12.5px;line-height:1.7;
}
.empty .empty-ico{display:block;color:#cdd3dc;margin:0 auto 8px;width:30px;height:30px}

/* ================================================================ 看板 */
.hero{
  position:relative;overflow:hidden;border-radius:var(--r-lg);
  padding:26px 26px 24px;color:#fff;
  background:linear-gradient(135deg,#0e5544 0%,#146b53 62%,#17795e 100%);
  box-shadow:0 1px 2px rgba(16,24,40,.06);
}
.hero::after{
  content:'';position:absolute;right:-90px;top:-140px;width:340px;height:340px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.09),transparent 68%);
  pointer-events:none;
}
.hero h1{
  font-size:22px;font-weight:650;letter-spacing:-.02em;color:#fff;
  margin:0 0 6px;display:flex;align-items:center;gap:9px;
}
.hero h1 .ic{width:22px;height:22px;opacity:.9}
.hero p{margin:0;font-size:13px;color:rgba(255,255,255,.78)}
.hero-tags{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}
.hero-tag{
  display:inline-flex;align-items:center;gap:5px;
  padding:4px 10px;border-radius:999px;font-size:11.5px;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);
  color:rgba(255,255,255,.92);
}
.hero-tag .ic{width:13px;height:13px;opacity:.85}

.stat-grid{gap:12px}
.stat-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:15px 16px;box-shadow:var(--shadow);
}
.stat-num{
  font-size:26px;font-weight:650;line-height:1.15;color:var(--ink);
  letter-spacing:-.03em;font-variant-numeric:tabular-nums;
}
.stat-label{font-size:12px;color:var(--muted);margin-top:3px}
.stat-card.danger .stat-num{color:var(--danger)}
.stat-card.warn .stat-num{color:var(--warn)}
.stat-card.ok .stat-num{color:var(--ok)}

.urgent-row{
  display:flex;align-items:center;gap:10px;
  padding:9px 0;border-bottom:1px solid var(--line-soft);
  font-size:13px;
}
.urgent-row:last-child{border-bottom:0;padding-bottom:0}
.urgent-name{
  flex:1;min-width:0;font-weight:500;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.room-tile{
  display:flex;flex-direction:column;gap:2px;
  padding:12px 13px;border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--surface);text-align:left;transition:background .14s,border-color .14s;
}
.room-tile:hover{background:var(--surface-2);border-color:var(--brand-line)}
.room-tile b{font-size:13px;font-weight:600;color:var(--ink);display:flex;align-items:center;gap:6px}
.room-tile b .ic{width:14px;height:14px;color:var(--faint)}
.room-tile span{font-size:11.5px;color:var(--faint)}

/* ================================================================ 物品清单 */
.filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.filter-chip{
  height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--line);
  background:var(--surface);color:var(--muted);font-size:12.5px;font-weight:500;
  transition:.14s;white-space:nowrap;
}
.filter-chip:hover{background:var(--surface-2);color:var(--text);border-color:#d0d5dd}
.filter-chip.active{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:600}
.filters select{
  height:30px;padding:0 26px 0 10px;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  font-size:12.5px;color:var(--text);outline:0;appearance:none;
}
.filters select:focus{border-color:var(--brand-line);box-shadow:var(--ring)}

.item-list{display:grid;gap:8px}
.item-row{
  display:flex;align-items:center;gap:12px;
  padding:11px 13px;border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--surface);transition:border-color .14s,background .14s,box-shadow .14s;
}
.item-row:hover{border-color:#d0d5dd;box-shadow:var(--shadow);background:#fff}
.item-thumb{
  width:42px;height:42px;flex:0 0 42px;border-radius:9px;object-fit:cover;
  background:var(--surface-3);border:1px solid var(--line-soft);
}
.item-thumb.emoji{
  display:flex;align-items:center;justify-content:center;color:var(--muted);
}
.item-thumb.emoji .ic{width:20px;height:20px}
.item-main{flex:1;min-width:0}
.item-name{font-size:13.5px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.item-meta{
  display:flex;gap:10px;flex-wrap:wrap;margin-top:3px;
  font-size:11.5px;color:var(--muted);
}
.item-meta span{display:inline-flex;align-items:center;gap:3px}
.item-meta .ic{width:12px;height:12px;color:var(--faint);stroke-width:1.9}
.item-side{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
mark{background:#fef0c7;color:#7a2e0e;border-radius:3px;padding:0 1px}

/* ---------------------------------------------------------------- 列表工具条 */
.list-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:-2px 0 12px}
.viewseg{
  display:inline-flex;gap:2px;padding:3px;flex:none;
  background:var(--surface-3);border:1px solid var(--line-soft);border-radius:10px;
}
.viewseg button{
  display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;
  border:0;border-radius:7px;background:transparent;color:var(--muted);
  font-size:12.5px;font-weight:500;transition:background .14s,color .14s,box-shadow .14s;white-space:nowrap;
}
.viewseg button .ic{width:14px;height:14px;stroke-width:1.9}
.viewseg button:hover{color:var(--text)}
.viewseg button.on{background:var(--surface);color:var(--brand-strong);font-weight:600;box-shadow:0 1px 2px rgba(16,24,40,.08)}
.list-bar-side{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}
.lb-note{font-size:11.5px;color:var(--faint);margin-right:3px}

/* ---------------------------------------------------------------- 按位置树 */
.tree{
  border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);
  overflow:hidden;
}
.trow{position:relative}
.trow.is-group.d0:not(:first-child){border-top:1px solid var(--line-soft)}
.trow-hit{
  position:relative;display:flex;align-items:center;gap:9px;width:100%;
  border:0;background:transparent;text-align:left;
  transition:background .12s;font:inherit;
}
.trow-hit.group{min-height:45px;padding:8px 14px;cursor:pointer}
.trow-hit.group:hover{background:var(--surface-2)}
.trow.open>.trow-hit.group{background:#fcfdfd}
.trow-hit.group:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}

.twist{
  width:14px;height:14px;flex:none;display:inline-flex;align-items:center;justify-content:center;
  color:var(--faint);transition:transform .16s,color .16s;
}
.twist .ic{width:13px;height:13px;stroke-width:2.1}
.trow.open>.trow-hit .twist{transform:rotate(90deg);color:var(--muted)}
.twist.off{opacity:.22}

.tico{
  width:25px;height:25px;flex:none;border-radius:8px;display:inline-flex;
  align-items:center;justify-content:center;background:var(--surface-3);color:var(--muted);
}
.tico .ic{width:14px;height:14px;stroke-width:1.8}
.trow.k-room>.trow-hit .tico{background:var(--brand-soft);color:var(--brand)}
.trow.k-spot>.trow-hit .tico{background:var(--surface-3);color:var(--text);border-radius:7px}
.trow.k-none>.trow-hit .tico{background:var(--warn-soft);color:var(--warn)}

.tname{
  font-size:13.5px;font-weight:600;color:var(--ink);flex:none;max-width:44%;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.trow.k-spot .tname{font-size:13px;font-weight:500;color:var(--text)}
.trow.k-none .tname{color:var(--text)}
.trow.empty .tname{color:var(--faint);font-weight:500}
.tsub{font-size:11px;color:var(--faint);flex:none;padding-left:2px}
.tspacer{flex:1;min-width:6px}
.tcount{
  font-size:11.5px;color:var(--muted);flex:none;min-width:36px;text-align:right;
  font-variant-numeric:tabular-nums;
}
.tcount.zero{color:#c3c9d2}
.tree .chip{font-size:10.5px;padding:0 7px;line-height:1.75}

/* 物品行 */
.trow-hit.item{min-height:40px;padding:6px 14px;cursor:pointer;gap:8px}
.trow-hit.item:hover{background:var(--surface-2)}
.trow-hit.item:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.tconn{width:12px;flex:none;align-self:stretch}
.tthumb{
  width:30px;height:30px;flex:0 0 30px;border-radius:7px;object-fit:cover;
  border:1px solid var(--line-soft);background:var(--surface-3);
}
.tthumb.ico{display:inline-flex;align-items:center;justify-content:center;color:var(--muted)}
.tthumb.ico .ic{width:15px;height:15px;stroke-width:1.8}
.titem-main{flex:1;min-width:0}
.titem-name{
  font-size:13px;font-weight:500;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.titem-meta{
  display:flex;gap:8px;flex-wrap:wrap;margin-top:1px;
  font-size:11px;color:var(--faint);
}
.titem-meta span{white-space:nowrap}
.tm-detail{overflow:hidden;text-overflow:ellipsis;max-width:210px}
.row-act{opacity:0;transition:opacity .12s}
.trow-hit.item:hover .row-act,
.trow-hit.item:focus-within .row-act{opacity:1}
@media (hover:none){.row-act{opacity:1}}

/* 空房间合并成一行提示 */
.trow-empty{
  display:flex;align-items:flex-start;gap:8px;padding:11px 14px;flex-wrap:wrap;
  border-top:1px solid var(--line-soft);background:var(--surface-2);
}
.trow-empty .ic{width:14px;height:14px;flex:none;stroke-width:1.8;color:#b9c0ca;margin-top:1px}
.te-label{font-size:11.5px;font-weight:500;color:var(--muted);flex:none}
.te-names{flex:1;min-width:0;font-size:11.5px;color:var(--faint);line-height:1.55}

.tree-empty{padding:36px 18px;text-align:center;color:var(--faint)}
.tree-empty .ic{width:26px;height:26px;stroke-width:1.6}
.tree-empty p{margin:9px 0 0;font-size:12.5px}

/* ================================================================ 空间 */
.room-block{
  border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);
  padding:15px;box-shadow:var(--shadow);
}
.room-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.room-head>b{
  font-size:14px;font-weight:600;color:var(--ink);display:flex;align-items:center;gap:7px;
}
.room-head>b .ic{width:16px;height:16px;color:var(--brand)}
.spot-row{
  display:flex;align-items:center;gap:8px;padding:7px 9px;
  border-radius:var(--r-sm);background:var(--surface-2);
  border:1px solid var(--line-soft);margin-top:6px;font-size:12.5px;
}
.spot-row:hover{background:var(--brand-soft);border-color:var(--brand-line)}
.spot-row>.ic{width:14px;height:14px;color:var(--faint)}
.spot-name{flex:1;font-weight:500;color:var(--text);cursor:pointer}

/* ================================================================ 拍照识别 */
.scan-drop{
  display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:28px 18px;border:1.5px dashed #d0d5dd;border-radius:var(--r-md);
  background:var(--surface-2);text-align:center;cursor:pointer;transition:.16s;
}
.scan-drop:hover{border-color:var(--brand);background:var(--brand-soft)}
.scan-icon{color:var(--faint);display:flex;margin-bottom:2px}
.scan-icon .ic{width:30px;height:30px;stroke-width:1.5}
.scan-drop b{font-size:13.5px;font-weight:600;color:var(--ink)}
.scan-drop:hover .scan-icon{color:var(--brand)}
.photo-strip{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.photo-thumb{
  position:relative;width:68px;height:68px;border-radius:var(--r-sm);
  object-fit:cover;border:1px solid var(--line);overflow:visible;
}
.photo-thumb img{border-radius:7px}
.photo-thumb button{
  position:absolute;right:-6px;top:-6px;width:19px;height:19px;border-radius:50%;
  background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;
  border:2px solid #fff;
}
.photo-thumb button .ic{width:11px;height:11px;stroke-width:2.4}

.scan-item{
  border:1px solid var(--line);border-radius:var(--r-md);padding:11px;
  margin-bottom:8px;background:var(--surface);transition:opacity .16s,border-color .16s;
}
.scan-item:hover{border-color:#d0d5dd}
.scan-item.off{opacity:.5;background:var(--surface-2)}
.scan-item-head{display:flex;align-items:center;gap:9px}
.scan-item-head input[type=checkbox]{
  width:15px;height:15px;flex:0 0 auto;accent-color:var(--brand);cursor:pointer;
}
.si-name{
  flex:1;min-width:0;font-size:13.5px;font-weight:600;color:var(--ink);
  border:1px solid transparent;background:transparent;border-radius:6px;
  padding:4px 7px;outline:0;
}
.si-name:hover{background:var(--surface-3)}
.si-name:focus{background:#fff;border-color:var(--brand-line);box-shadow:var(--ring)}
.si-grid{display:grid;grid-template-columns:64px 56px 130px minmax(0,1fr) minmax(0,1fr);gap:7px;margin-top:9px}
.si-cap{display:block;font-size:10.5px;color:var(--faint);margin-bottom:3px;font-weight:500}
.si-cell input,.si-cell select{
  width:100%;height:30px;padding:0 8px;font-size:12.5px;
  border:1px solid var(--line);border-radius:7px;background:#fff;outline:0;
}
.si-cell input:focus,.si-cell select:focus{border-color:var(--brand-line);box-shadow:var(--ring)}
.result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.confidence{display:flex;align-items:center;gap:8px}
.confidence-bar{height:5px;border-radius:5px;background:var(--surface-3);flex:1;overflow:hidden}
.confidence-bar i{display:block;height:100%;background:var(--ok);border-radius:5px}

/* ================================================================ 表单 */
.field{display:flex;flex-direction:column;gap:5px;min-width:0}
.field>label{
  font-size:12px;font-weight:500;color:var(--text);
  display:flex;align-items:center;gap:4px;
}
.field label em{color:var(--danger);font-style:normal;font-weight:600}
.field input,.field select,.field textarea,.auth-plain,.hh-add input{
  width:100%;border:1px solid var(--line);border-radius:var(--r-sm);
  background:#fff;padding:0 10px;height:34px;font-size:13px;color:var(--ink);
  outline:0;transition:border-color .14s,box-shadow .14s;
}
.field select{
  appearance:none;padding-right:26px;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
}
.field textarea{height:auto;min-height:68px;padding:8px 10px;resize:vertical;line-height:1.6}
.field input::placeholder,.field textarea::placeholder{color:var(--faint)}
.field input:focus,.field select:focus,.field textarea:focus,.auth-plain:focus,.hh-add input:focus{
  border-color:#9ecfbd;box-shadow:var(--ring);
}
.field input:disabled,.field select:disabled{background:var(--surface-2);color:var(--faint);cursor:not-allowed}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.form-actions{
  display:flex;justify-content:flex-end;align-items:center;gap:8px;
  margin-top:18px;padding-top:16px;border-top:1px solid var(--line-soft);flex-wrap:wrap;
}
.switch-row{
  display:flex;align-items:center;gap:7px;
  font-size:12.5px;color:var(--text);min-height:34px;
}
.switch-row input[type=checkbox]{width:15px;height:15px;accent-color:var(--brand);cursor:pointer;flex:0 0 auto}
.hint-box{
  display:flex;flex-wrap:wrap;align-items:center;gap:4px;
  padding:9px 11px;border-radius:var(--r-sm);font-size:12px;line-height:1.6;
  background:var(--surface-2);border:1px solid var(--line-soft);color:var(--muted);
}
.hint-box b{color:var(--text);font-weight:600}
.hint-box a{color:var(--brand);font-weight:500;display:inline-flex;align-items:center;gap:3px}
.hint-box.ok{background:var(--ok-soft);border-color:var(--ok-line);color:#05603a}
.hint-box.ok b{color:#05603a}
.model-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.model-chip{
  height:26px;padding:0 10px;border:1px solid var(--line);border-radius:999px;
  background:var(--surface);color:var(--muted);font-size:11.5px;transition:.14s;white-space:nowrap;
}
.model-chip:hover{border-color:var(--brand-line);color:var(--brand-strong);background:var(--brand-soft)}
.model-chip.on{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-strong);font-weight:600}
.sub-form-title{
  display:flex;align-items:center;gap:7px;
  margin:18px 0 10px;font-size:12px;font-weight:600;color:var(--text);
}
.sub-form-title::before{content:'';width:3px;height:12px;border-radius:3px;background:var(--brand);flex:none}
.settings-sub{
  font-size:11px;font-weight:600;color:var(--faint);letter-spacing:.06em;
  text-transform:uppercase;margin:20px 0 9px;
  padding-bottom:7px;border-bottom:1px solid var(--line-soft);
}
.acct-line{
  display:flex;align-items:center;gap:10px;padding:10px 11px;
  border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface-2);
}
.acct-line b{display:block;font-size:13px;font-weight:600;color:var(--ink)}
.acct-line small{color:var(--faint);font-size:11.5px}

/* ================================================================
   设置与同步 —— 一体式布局（左导航与右内容同处一张面板）
   ================================================================ */
.settings-shell{
  display:grid;grid-template-columns:214px minmax(0,1fr);
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--shadow);overflow:hidden;
}
.settings-nav{
  display:flex;flex-direction:column;gap:0;min-width:0;
  padding:16px 12px;background:var(--surface-2);
  border-right:1px solid var(--line);
}
.sn-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:0 8px 10px;font-size:11px;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;color:var(--faint);
}
.sn-head em{
  font-style:normal;font-size:10.5px;font-weight:600;color:var(--muted);
  letter-spacing:0;text-transform:none;font-variant-numeric:tabular-nums;
  background:var(--surface-3);border-radius:999px;padding:0 6px;
}
.sn-tabs{position:relative;display:flex;flex-direction:column;gap:1px;min-width:0}
.settings-tab{
  position:relative;display:flex;align-items:center;gap:9px;width:100%;
  padding:8px 9px;border-radius:var(--r-sm);
  color:var(--text);text-align:left;
  transition:background .14s,color .14s;
}
.settings-tab:hover{background:#f0f1f3}
.settings-tab.on{background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.06),inset 0 0 0 1px var(--line)}
.settings-tab.on::before{
  content:'';position:absolute;left:0;top:50%;transform:translateY(-50%);
  width:2.5px;height:18px;border-radius:0 3px 3px 0;background:var(--brand);
}
.st-ico{
  width:26px;height:26px;flex:0 0 26px;border-radius:7px;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface-3);color:var(--muted);transition:.14s;
}
.st-ico .ic{width:15px;height:15px;stroke-width:1.8}
.settings-tab:hover .st-ico{background:#e7e9ec;color:var(--text)}
.settings-tab.on .st-ico{background:var(--brand-soft);color:var(--brand-strong)}
.settings-tab.on .st-ico .ic{stroke-width:2}
.st-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.st-body b{font-size:12.5px;font-weight:500;color:var(--text);line-height:1.4;transition:color .14s}
.st-body small{
  font-size:10.5px;color:var(--faint);line-height:1.4;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.settings-tab.on .st-body b{color:var(--brand-strong);font-weight:500}
.st-dot{
  width:6px;height:6px;flex:0 0 auto;border-radius:50%;background:#d0d5dd;
}
.st-dot.ok{background:#12b76a;box-shadow:0 0 0 3px rgba(18,183,106,.14)}
.st-dot.ready{background:#f79009}
.st-dot.fail{background:#f04438}
.st-dot.idle{background:#d0d5dd}
.st-state{display:none}
.sn-hint{margin:12px 0 0;padding:0 9px;font-size:10.5px;color:var(--faint);line-height:1.6}

.settings-panel{min-width:0;padding:22px 24px 26px}
.set-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;
  padding-bottom:16px;margin-bottom:18px;border-bottom:1px solid var(--line-soft);
}
.set-head h3{font-size:17px;font-weight:650;color:var(--ink);letter-spacing:-.015em}
.set-head p{margin:4px 0 0;font-size:12.5px;color:var(--muted);line-height:1.6;max-width:620px}
.set-head .status-badge{margin-top:2px;flex:none}
.settings-pane{display:flex;flex-direction:column;gap:14px}
.settings-pane>.card{border:0;box-shadow:none;padding:0;border-radius:0;background:transparent}
.settings-pane>.card+.card{
  border-top:1px solid var(--line-soft);padding-top:20px;margin-top:2px;
}
.settings-panel .card{max-width:none}

/* —— 语音环境提示卡 —— */
.mic-env{
  padding:12px 13px;border:1px solid var(--line-soft);border-radius:var(--r-md);
  background:var(--surface-2);display:flex;flex-direction:column;gap:7px;
}
.mic-env.warn{border-color:var(--warn-line);background:var(--warn-soft)}
.me-row{display:flex;align-items:baseline;gap:10px;font-size:12px;line-height:1.6}
.me-row>span{color:var(--faint);flex:0 0 72px}
.me-row>b{color:var(--text);font-weight:500;word-break:break-all;font-size:12px}
.mic-env.warn .me-row>b{color:#93370d}
.me-warn,.me-ok{margin:2px 0 0;font-size:12px;line-height:1.65}
.me-warn{color:#93370d}
.me-ok{color:#05603a}
.mg-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:2px}

/* —— 通知渠道：渠道选择卡 + 单一表单 —— */
.chan-pick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.chan-opt{
  position:relative;display:flex;align-items:center;gap:9px;
  padding:11px 12px;border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--surface);text-align:left;transition:.14s;
}
.chan-opt:hover{border-color:#d0d5dd;background:var(--surface-2)}
.chan-opt.on{
  border-color:var(--brand);background:var(--brand-soft);
  box-shadow:inset 0 0 0 1px var(--brand);
}
.co-ico{
  width:28px;height:28px;flex:0 0 28px;border-radius:7px;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface-3);color:var(--muted);
}
.co-ico .ic{width:16px;height:16px}
.chan-opt.on .co-ico{background:var(--brand);color:#fff}
.co-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.co-body b{font-size:12.5px;font-weight:600;color:var(--ink);line-height:1.4}
.co-body small{font-size:10.5px;color:var(--faint);line-height:1.4}
.chan-opt.on .co-body small{color:var(--brand-strong);opacity:.85}
.co-flag{
  display:none;width:14px;height:14px;flex:0 0 auto;border-radius:50%;
  background:var(--brand);color:#fff;align-items:center;justify-content:center;
}
.co-flag .ic{width:9px;height:9px;stroke-width:3}
.chan-opt.on .co-flag{display:flex}
.chan-form{padding-top:16px;margin-top:16px;border-top:1px solid var(--line-soft)}
.chan-form-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.chan-form-head b{font-size:13px;font-weight:600;color:var(--ink)}
.channel-bar,.channel-tabs{display:none}

/* 兼容：旧的触达概览（模板已移除，保留类名防漏） */
.reach-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.reach-item{display:none}
.reach-ico{display:none}
.channel-pane{display:flex;flex-direction:column;gap:0}

/* ================================================================ 家庭页 */
.fam-name-row{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}
.fam-name{
  font-size:17px;font-weight:650;color:var(--ink);border:1px solid transparent;
  background:transparent;border-radius:7px;padding:2px 7px;margin-left:-7px;
  width:min(260px,72%);outline:0;
}
.fam-name:hover{border-color:var(--line);background:var(--surface-2)}
.fam-name:focus{border-color:var(--brand-line);background:#fff;box-shadow:var(--ring)}
.fam-name-text{font-size:17px;font-weight:650;color:var(--ink)}
.invite-box{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:12px 13px;border:1px solid var(--brand-line);border-radius:var(--r-md);
  background:var(--brand-soft);
}
.invite-code{
  font-size:20px;font-weight:650;letter-spacing:.14em;color:var(--brand-strong);
  font-variant-numeric:tabular-nums;line-height:1.2;margin-top:2px;
}
.invite-actions{display:flex;gap:7px}
.member-list{display:flex;flex-direction:column;gap:1px}
.member-row{
  display:flex;align-items:center;gap:10px;padding:8px 6px;
  border-radius:var(--r-sm);transition:background .14s;
}
.member-row:hover{background:var(--surface-2)}
.member-meta{flex:1;min-width:0;line-height:1.4}
.member-meta b{font-size:13px;font-weight:600;color:var(--ink)}
.member-meta em{font-style:normal;color:var(--faint);font-weight:400;font-size:11.5px}
.member-meta span{display:block;font-size:11.5px;color:var(--faint)}
.role-badge{
  padding:1px 7px;border-radius:999px;border:1px solid var(--line);
  background:var(--surface-3);color:var(--muted);
  font-size:10.5px;font-weight:600;white-space:nowrap;
}
.role-badge.owner{background:#fffaeb;border-color:var(--warn-line);color:var(--warn)}
.role-badge.admin{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-strong)}
.member-tip{
  margin:12px 0 0;padding:9px 11px;border-radius:var(--r-sm);
  background:var(--surface-2);border:1px solid var(--line-soft);
  font-size:11.5px;color:var(--muted);line-height:1.65;
}
.hh-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.hh-item{
  display:flex;align-items:center;gap:10px;padding:9px 10px;
  border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--surface);text-align:left;transition:.14s;
}
.hh-item:hover{background:var(--surface-2);border-color:#d0d5dd}
.hh-item.on{border-color:var(--brand);background:var(--brand-soft)}
.hh-ico{color:var(--muted);display:flex}
.hh-item.on .hh-ico{color:var(--brand)}
.hh-ico .ic{width:17px;height:17px}
.hh-name{display:flex;flex-direction:column;min-width:0;line-height:1.35}
.hh-name b{font-size:12.5px;font-weight:600;color:var(--ink)}
.hh-name small{font-size:11px;color:var(--faint)}
.hh-on{
  margin-left:auto;font-size:10.5px;font-weight:600;color:var(--brand-strong);
  background:#fff;border:1px solid var(--brand-line);border-radius:999px;padding:0 7px;
}
.hh-add{display:flex;gap:7px;margin-top:7px}
.hh-add input{flex:1;min-width:0;height:32px;font-size:12.5px}
.act-list{display:flex;flex-direction:column;max-height:286px;overflow:auto;padding-right:2px}
.act-row{
  display:flex;align-items:flex-start;gap:9px;padding:8px 2px;
  border-bottom:1px solid var(--line-soft);
}
.act-row:last-child{border-bottom:0}
.act-dot{width:5px;height:5px;border-radius:50%;background:#d0d5dd;margin-top:8px;flex:0 0 auto}
.act-main{flex:1;min-width:0;font-size:12.5px;color:var(--muted);line-height:1.6}
.act-main b{color:var(--ink);font-weight:600}
.act-main em{font-style:normal;color:var(--brand-strong)}
.act-time{font-size:11px;color:var(--faint);white-space:nowrap;flex:none}
.account-row{display:flex;align-items:flex-end;gap:28px;flex-wrap:wrap}
.account-row>div>span{display:block;font-size:11px;color:var(--faint);margin-bottom:2px}
.account-row>div>div{font-size:13px;color:var(--ink)}
.account-actions{margin-left:auto;display:flex;gap:7px}
.profile-hero{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.profile-hero b{display:block;font-size:13.5px;font-weight:600;color:var(--ink)}
.profile-hero small{color:var(--faint);font-size:11.5px}

/* ================================================================ 弹层 */
.mask{
  position:fixed;inset:0;z-index:50;
  display:flex;align-items:center;justify-content:center;padding:20px;
  background:rgba(16,24,40,.48);backdrop-filter:blur(2px);
  animation:maskIn .16s ease-out;
}
@keyframes maskIn{from{opacity:0}to{opacity:1}}
.mask.bottom{align-items:flex-end;padding:0}
.dialog{
  width:min(660px,100%);max-height:88vh;overflow:auto;
  background:var(--surface);border-radius:var(--r-lg);
  box-shadow:var(--shadow-pop);padding:20px;
  animation:dialogIn .18s cubic-bezier(.2,.8,.3,1);
}
@keyframes dialogIn{from{opacity:0;transform:translateY(6px) scale(.995)}to{opacity:1;transform:none}}
.dialog.narrow{width:min(440px,100%)}
.mask.bottom .dialog{border-radius:16px 16px 0 0;max-height:92vh;width:100%}
.dialog-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-bottom:14px;
}
.dialog-head h3{font-size:16px;font-weight:650;color:var(--ink)}
.dialog-close{
  width:28px;height:28px;flex:0 0 auto;border-radius:7px;
  color:var(--muted);display:inline-flex;align-items:center;justify-content:center;
  transition:background .14s,color .14s;
}
.dialog-close:hover{background:var(--surface-3);color:var(--ink)}
.dialog-close .ic{width:15px;height:15px;stroke-width:2}
.badge{
  display:inline-flex;align-items:center;gap:5px;
  background:var(--brand-soft);color:var(--brand-strong);
  border:1px solid var(--brand-line);border-radius:999px;
  padding:1px 8px;font-size:11px;font-weight:600;margin-bottom:10px;
}
.confirm-lines{
  background:var(--surface-2);border:1px solid var(--line-soft);
  border-radius:var(--r-md);padding:12px 13px;margin:10px 0;font-size:13px;
  color:var(--text);line-height:1.7;
}
.confirm-lines div+div{margin-top:4px}

/* 批量入库确认表 */
.confirm-items{display:flex;flex-direction:column;gap:9px;margin-top:12px}
.confirm-item{
  border:1px solid var(--line);border-radius:var(--r-md);
  padding:10px;background:var(--surface-2);
}
.ci-grid{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) 66px 36px 26px minmax(0,1fr) minmax(0,1fr) 140px;
  gap:7px;align-items:center;
}
.ci-grid input{
  min-width:0;height:32px;padding:0 9px;font-size:12.5px;color:var(--ink);
  border:1px solid var(--line);border-radius:7px;background:#fff;outline:0;
}
.ci-grid input:focus{border-color:var(--brand-line);box-shadow:var(--ring)}
.ci-qty{text-align:center}
.ci-unit{font-size:11.5px;color:var(--faint);text-align:center}
.ci-del{
  width:26px;height:26px;border-radius:7px;color:var(--faint);
  display:flex;align-items:center;justify-content:center;
}
.ci-del:hover{background:var(--danger-soft);color:var(--danger)}
.ci-del .ic{width:13px;height:13px;stroke-width:2}
.ci-check{
  display:flex;gap:7px;align-items:flex-start;
  font-size:11.5px;color:var(--muted);margin-top:8px;line-height:1.5;
}
.ci-check input{width:14px;height:14px;margin-top:1px;accent-color:var(--brand);flex:0 0 auto}

/* ================================================================ 语音面板 */
.voice-dialog{width:min(520px,100%)}
.mask.bottom .voice-dialog{width:min(520px,100%);margin:0 auto}
.vd-head{display:flex;align-items:center;gap:9px;min-width:0}
.vd-head h3{font-size:16px;font-weight:650}
.vd-mode{
  flex:none;font-size:10.5px;font-weight:600;letter-spacing:.02em;
  padding:2px 8px;border-radius:999px;
  background:var(--brand-soft);color:var(--brand-strong);border:1px solid var(--brand-line);
}
.vd-mode.m-search{background:var(--info-soft);color:var(--info);border-color:#d1e0ff}
.mic-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:3px 9px;border-radius:999px;border:1px solid var(--line);
  background:var(--surface-2);color:var(--muted);
  font-size:11.5px;font-weight:500;margin-top:2px;
}
.mic-pill i{width:5px;height:5px;border-radius:50%;background:var(--faint);flex:0 0 auto}
.mic-pill.ok{background:var(--ok-soft);color:#05603a;border-color:var(--ok-line)}
.mic-pill.ok i{background:#12b76a;box-shadow:0 0 0 3px rgba(18,183,106,.16)}
.mic-pill.warn{background:var(--warn-soft);color:#93370d;border-color:var(--warn-line)}
.mic-pill.warn i{background:#f79009}
.mp-host{color:var(--faint);font-weight:400;font-size:10.5px}
.vd-tip{margin:8px 0 0;font-size:12px;color:var(--muted);line-height:1.65}
.mic-guide{
  margin-top:11px;padding:11px 12px;
  border:1px solid var(--warn-line);background:var(--warn-soft);
  border-radius:var(--r-md);display:flex;flex-direction:column;gap:6px;
}
.mic-guide b{font-size:12.5px;font-weight:600;color:#93370d}
.mic-guide p{margin:0;font-size:11.5px;color:#b54708;line-height:1.65}
.voice-hero{text-align:center;padding:6px 0 2px}
.wave{height:44px;display:flex;align-items:center;justify-content:center;gap:4px;margin:6px 0}
.wave i{
  display:block;width:3px;height:10px;border-radius:3px;background:var(--brand);
  animation:wave 1s ease-in-out infinite;
}
.wave i:nth-child(2){animation-delay:.1s}.wave i:nth-child(3){animation-delay:.2s}
.wave i:nth-child(4){animation-delay:.3s}.wave i:nth-child(5){animation-delay:.4s}
.wave i:nth-child(6){animation-delay:.5s}.wave i:nth-child(7){animation-delay:.6s}
.wave.idle i{animation:none;height:6px;opacity:.3}
@keyframes wave{0%,100%{height:7px}50%{height:30px}}
.transcript{
  min-height:52px;padding:11px 13px;border-radius:var(--r-md);
  background:var(--surface-2);border:1px solid var(--line-soft);
  font-size:14px;line-height:1.6;color:var(--ink);margin:10px 0;
}
.transcript.muted{color:var(--faint);font-size:12.5px}
.samples{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}
.sample{
  padding:4px 10px;border:1px solid var(--line);border-radius:999px;
  background:var(--surface);color:var(--muted);font-size:11.5px;transition:.14s;
}
.sample:hover{border-color:var(--brand-line);background:var(--brand-soft);color:var(--brand-strong)}
.ptt{
  width:100%;height:46px;border-radius:var(--r-md);border:0;background:var(--brand);color:#fff;
  font-size:14.5px;font-weight:600;touch-action:none;transition:background .14s;
  display:flex;align-items:center;justify-content:center;gap:8px;
}
.ptt:hover{background:var(--brand-strong)}
.ptt.recording{background:var(--danger);animation:pulse 1.3s infinite}
.ptt.upload{background:#b54708}
.ptt.busy{background:#475467}
.ptt:disabled{opacity:.75}
@keyframes pulse{50%{opacity:.82}}
.voice-actions{display:flex;gap:7px;margin-top:9px;justify-content:center;flex-wrap:wrap}

/* ================================================================ 引导 */
.tour-layer{position:fixed;inset:0;z-index:70;pointer-events:none}
.tour-hole{
  position:absolute;border:2px solid var(--brand);border-radius:var(--r-md);
  box-shadow:0 0 0 9999px rgba(16,24,40,.55);pointer-events:none;
  transition:all .22s ease;
}
.tour-card{
  position:absolute;pointer-events:auto;background:var(--surface);
  border-radius:var(--r-lg);box-shadow:var(--shadow-pop);
  padding:16px 17px;max-width:calc(100vw - 24px);max-height:64vh;overflow:auto;
  transition:all .22s ease;
}
.tour-head{display:flex;align-items:center;gap:9px;font-size:14.5px;font-weight:600;color:var(--ink)}
.tour-emoji{color:var(--brand);display:flex}
.tour-emoji .ic{width:19px;height:19px}
.tour-head .dialog-close{margin-left:auto;flex:none}
.tour-desc{font-size:12.5px;line-height:1.75;color:var(--muted);margin:9px 0 0}
.tour-tip{
  margin-top:9px;padding:8px 10px;border-radius:var(--r-sm);
  background:var(--brand-soft);border:1px solid var(--brand-line);
  font-size:11.5px;color:var(--brand-strong);line-height:1.6;
}
.tour-foot{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:13px}
.tour-count{font-size:11px;color:var(--faint);margin-right:auto;font-variant-numeric:tabular-nums}
.tour-dots{display:flex;gap:4px;margin-right:2px}
.tour-dots i{width:5px;height:5px;border-radius:3px;background:#d0d5dd;cursor:pointer;transition:.16s}
.tour-dots i.on{background:var(--brand);width:14px}
.onb-step{text-align:center;padding:16px 10px}
.onb-emoji{font-size:44px;color:var(--brand)}
.guide-dots{display:flex;justify-content:center;gap:6px;margin:14px 0}
.guide-dots i{width:6px;height:6px;border-radius:3px;background:#d0d5dd}
.guide-dots i.on{background:var(--brand);width:16px}

/* ================================================================ 底部导航 */
.tabbar{
  display:none;position:fixed;left:0;right:0;bottom:0;z-index:30;
  background:rgba(255,255,255,.96);backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
  padding:5px 4px calc(5px + env(safe-area-inset-bottom));
  justify-content:space-around;align-items:flex-end;
}
.tab{
  display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:4px 6px;min-width:52px;border-radius:var(--r-sm);
  font-size:10px;color:var(--faint);transition:color .14s;
}
.tab i{display:flex;font-size:19px;line-height:1}
.tab i .ic{width:21px;height:21px;stroke-width:1.7}
.tab.active{color:var(--brand);font-weight:600}
.tab.active i .ic{stroke-width:2.1}
.tab.voice-tab i{
  width:38px;height:38px;border-radius:50%;margin-top:-14px;
  align-items:center;justify-content:center;
  background:var(--brand);color:#fff;
  box-shadow:0 4px 12px -2px rgba(20,107,83,.5);
}
.tab.voice-tab i .ic{width:19px;height:19px;stroke-width:1.9}

/* ================================================================ Toast / 灯箱 */
.toast{
  position:fixed;left:50%;bottom:88px;transform:translateX(-50%);z-index:90;
  max-width:88vw;padding:9px 15px;border-radius:var(--r-md);
  background:#1d2939;color:#fff;font-size:12.5px;line-height:1.5;
  box-shadow:var(--shadow-pop);text-align:center;
  animation:toastIn .18s ease-out;
}
@keyframes toastIn{from{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%,0)}}
.lightbox{
  position:fixed;inset:0;z-index:80;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:14px;padding:24px;
  background:rgba(16,24,40,.9);
}
.lightbox img{max-width:100%;max-height:78vh;border-radius:var(--r-md)}
.lightbox button{padding:7px 16px;border-radius:var(--r-sm);background:#fff;color:var(--ink);font-size:13px}

/* ================================================================ 登录页 */
.boot-screen{
  min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:14px;color:var(--faint);font-size:12.5px;
}
.boot-logo{
  width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;
  background:var(--brand);color:#fff;
  animation:bootPulse 1.6s ease-in-out infinite;
}
.boot-logo .ic{width:26px;height:26px;stroke-width:1.8}
@keyframes bootPulse{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.boot-bar{width:110px;height:3px;border-radius:99px;background:#e4e7ec;overflow:hidden}
.boot-bar i{display:block;height:100%;width:38%;border-radius:99px;background:var(--brand);animation:bootSlide 1.1s infinite}
@keyframes bootSlide{0%{transform:translateX(-100%)}100%{transform:translateX(320%)}}

.auth-page{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:var(--surface)}
.auth-page.solo{display:block;padding:34px 20px;background:var(--bg)}
.auth-visual{
  position:relative;overflow:hidden;padding:48px 52px;color:#fff;
  display:flex;flex-direction:column;justify-content:center;
  background:linear-gradient(160deg,#0b4034 0%,#10553f 55%,#15654c 100%);
}
.auth-visual::after{
  content:'';position:absolute;right:-120px;bottom:-140px;width:400px;height:400px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.06),transparent 70%);
}
.auth-brand{display:flex;align-items:center;gap:11px;margin-bottom:36px}
.auth-brand .brand-logo{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.2)}
.auth-brand b{display:block;font-size:15px;font-weight:650;color:#fff}
.auth-brand small{font-size:11.5px;color:rgba(255,255,255,.6)}
.auth-visual h1{
  font-size:28px;line-height:1.4;font-weight:650;letter-spacing:-.025em;
  color:#fff;margin:0 0 14px;
}
.auth-sub{margin:0 0 28px;max-width:420px;font-size:13px;line-height:1.8;color:rgba(255,255,255,.72)}
.auth-points{list-style:none;padding:0;margin:0 0 28px;display:flex;flex-direction:column;gap:15px}
.auth-points li{display:flex;gap:11px;align-items:flex-start}
.auth-points i{
  width:32px;height:32px;flex:0 0 32px;border-radius:8px;font-style:normal;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.14);color:#fff;
}
.auth-points i .ic{width:16px;height:16px}
.auth-points b{display:block;font-size:13px;font-weight:600;color:#fff}
.auth-points span{font-size:12px;color:rgba(255,255,255,.66);line-height:1.6}
.auth-avatars{display:flex;align-items:center}
.auth-avatars span{
  width:28px;height:28px;border-radius:50%;margin-right:-8px;
  display:flex;align-items:center;justify-content:center;
  font-size:11.5px;font-weight:600;color:#0b4034;background:#e8f5ef;
  border:2px solid #10553f;
}
.auth-avatars em{font-style:normal;font-size:11px;color:rgba(255,255,255,.55);margin-left:18px}

.auth-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 28px}
.auth-panel.wide{max-width:800px;margin:0 auto}
.auth-card{width:100%;max-width:384px}
.auth-mobile-brand{display:none}
.auth-card h2{font-size:21px;font-weight:650;letter-spacing:-.02em;margin:0 0 6px}
.auth-lead{font-size:12.5px;color:var(--muted);line-height:1.75;margin:0 0 20px}
.auth-switch{display:flex;gap:3px;padding:3px;border-radius:var(--r-md);background:var(--surface-3);margin-bottom:18px}
.auth-switch button{
  flex:1;height:32px;border-radius:7px;font-size:12.5px;font-weight:500;color:var(--muted);
  transition:.14s;
}
.auth-switch button.on{background:#fff;color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(16,24,40,.08)}
.auth-label{display:block;font-size:12px;font-weight:500;color:var(--text);margin:12px 0 5px}
.auth-input{
  display:flex;align-items:center;gap:8px;height:38px;padding:0 6px 0 11px;
  border:1px solid var(--line);border-radius:var(--r-sm);background:#fff;
  transition:border-color .14s,box-shadow .14s;
}
.auth-input:focus-within{border-color:#9ecfbd;box-shadow:var(--ring)}
.auth-input .prefix{font-size:12.5px;color:var(--faint);font-weight:500;margin-right:2px}
.auth-input input{
  flex:1;min-width:0;border:0;background:transparent;outline:0;
  font-size:14px;letter-spacing:.02em;color:var(--ink);
}
.auth-input input::placeholder{color:var(--faint);letter-spacing:0}
.code-btn{
  flex:none;height:28px;padding:0 10px;border-radius:7px;
  background:var(--brand-soft);color:var(--brand-strong);
  font-size:12px;font-weight:600;white-space:nowrap;
}
.code-btn:hover{background:#e4f1eb}
.code-btn[disabled]{opacity:.55;cursor:not-allowed}
.auth-plain{height:38px;padding:0 11px;font-size:13.5px}
.auth-more{margin:14px 0 2px;padding-top:12px;border-top:1px solid var(--line-soft)}
.auth-more summary{
  display:flex;align-items:center;gap:6px;cursor:pointer;list-style:none;
  font-size:12px;color:var(--muted);
}
.auth-more summary::-webkit-details-marker{display:none}
.auth-more summary::before{content:'+';color:var(--brand);font-weight:600;font-size:13px}
.auth-more[open] summary::before{content:'−'}
.auth-submit{
  width:100%;height:40px;margin-top:18px;border-radius:var(--r-md);
  background:var(--brand);color:#fff;font-size:13.5px;font-weight:600;
  transition:background .14s;
}
.auth-submit:hover{background:var(--brand-strong)}
.auth-submit[disabled]{opacity:.55;cursor:not-allowed}
.auth-submit.ghost{background:#fff;color:var(--brand-strong);border:1px solid var(--brand-line)}
.auth-submit.wechat{background:#07c160}
.auth-submit.wechat:hover{background:#06ad56}
.auth-error{margin:10px 0 0;font-size:12px;color:var(--danger);line-height:1.6}
.auth-hint{margin:10px 0 0;font-size:12px;color:var(--muted);line-height:1.6}
.auth-guest{
  width:100%;margin-top:10px;padding:8px;border-radius:var(--r-sm);
  color:var(--faint);font-size:12px;transition:.14s;
}
.auth-guest:hover{background:var(--surface-3);color:var(--text)}
.auth-foot{margin:22px 0 0;font-size:11px;color:var(--faint)}
.auth-wechat .wechat-box{
  display:flex;gap:11px;align-items:flex-start;padding:13px;
  border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface-2);
  font-size:12px;color:var(--muted);line-height:1.7;
}
.auth-wechat .wechat-box span{color:#07c160;display:flex}
.auth-wechat .wechat-box span .ic{width:20px;height:20px}
.auth-wechat .wechat-box p{margin:0}
.solo-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:6px}
.solo-card{
  display:flex;flex-direction:column;gap:8px;padding:16px;
  border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface);
}
.solo-ico{color:var(--brand);display:flex}
.solo-ico .ic{width:20px;height:20px}
.solo-card b{font-size:13.5px;font-weight:600;color:var(--ink)}
.solo-card p{margin:0;font-size:12px;color:var(--muted);line-height:1.7}
.solo-card .auth-plain{margin-top:auto}

/* ================================================================ 响应式 */

/* 中屏：收窄侧栏 */
@media (max-width:1080px){
  .sidebar{width:206px;flex-basis:206px}
  .page{padding:20px 18px 40px}
  .topbar{padding:10px 18px}
  .settings-shell{grid-template-columns:190px minmax(0,1fr)}
  .settings-panel{padding:20px 18px 22px}
  .grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* 平板 / 手机：底部导航，设置页横向胶囊 */
@media (max-width:900px){
  /* 登录 / 建家 */
  .auth-page{grid-template-columns:1fr}
  .auth-visual{display:none}
  .auth-panel{padding:28px 22px;justify-content:flex-start;padding-top:9vh}
  .auth-mobile-brand{
    display:flex;align-items:center;gap:8px;
    font-weight:650;font-size:15px;color:var(--ink);margin-bottom:20px;
  }
  .auth-mobile-brand .ic{color:var(--brand);width:19px;height:19px}
  .auth-card{max-width:420px;margin:0 auto}
  .auth-card h2{font-size:20px}
  .solo-grid{grid-template-columns:1fr}
  .auth-page.solo{padding:22px 16px}
  .auth-page.solo .auth-panel{padding:0}
  .auth-page.solo .auth-panel.wide{max-width:none}

  .sidebar{display:none}
  .tabbar{display:flex}
  .main{padding-bottom:84px}
  .mobile-brand{display:flex}
  .topbar{padding:9px 14px;gap:9px}
  .top-actions .sync-pill{display:none}
  .page{padding:16px 14px 28px}
  .page-title,.page-head h2{font-size:19px}
  .hero{padding:20px;border-radius:var(--r-lg)}
  .hero h1{font-size:19px}
  .grid.cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}

  .settings-shell{display:block;background:transparent;border:0;box-shadow:none;border-radius:0;overflow:visible}
  .settings-nav{
    background:transparent;border:0;padding:0 0 12px;
    position:static;
  }
  .sn-head,.sn-hint{display:none}
  .sn-tabs{
    flex-direction:row;flex-wrap:nowrap;gap:7px;
    overflow-x:auto;padding:1px 0 4px;margin:0 -14px;
    padding-left:14px;padding-right:14px;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;
  }
  .sn-tabs::-webkit-scrollbar{display:none}
  .settings-tab{
    flex:0 0 auto;width:auto;gap:7px;padding:6px 11px 6px 7px;
    border:1px solid var(--line);background:var(--surface);border-radius:999px;
    box-shadow:none;
  }
  .settings-tab.on{
    background:var(--brand);border-color:var(--brand);color:#fff;
    box-shadow:0 2px 8px -2px rgba(20,107,83,.4);
  }
  .settings-tab.on::before{display:none}
  .settings-tab.on .st-body b{color:#fff}
  .settings-tab.on .st-ico{background:rgba(255,255,255,.2);color:#fff}
  .settings-tab.on .st-dot{background:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.22)}
  .st-ico{width:22px;height:22px;flex-basis:22px;border-radius:6px;background:transparent}
  .st-ico .ic{width:14px;height:14px}
  .st-body b{font-size:12px}
  .st-body small{display:none}
  .st-dot{display:none}

  .settings-panel{padding:0}
  .set-head{padding-bottom:11px;margin-bottom:13px}
  .set-head h3{font-size:16px}
  .settings-pane>.card{
    background:var(--surface);border:1px solid var(--line);
    border-radius:var(--r-lg);padding:16px;box-shadow:var(--shadow);
  }
  .settings-pane>.card+.card{
    border-top:1px solid var(--line);padding-top:16px;margin-top:12px;
  }
  .chan-pick{grid-template-columns:1fr;gap:7px}
  .chan-opt{padding:10px 11px}

  .voice-dialog{width:100%}
  .toast{bottom:100px}
  .result-grid{grid-template-columns:1fr}
}

/* 手机 */
@media (max-width:640px){
  .grid.cols-2,.grid.cols-3,.grid.cols-4,.form-grid{grid-template-columns:1fr}
  .grid.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat-grid{gap:9px}
  .stat-card{padding:12px 13px}
  .stat-num{font-size:22px}
  .item-row{flex-wrap:wrap;padding:10px 12px}
  .item-side{width:100%;justify-content:flex-start;padding-left:54px;gap:6px}
  .item-thumb{width:40px;height:40px;flex-basis:40px}
  /* 按位置树 */
  .list-bar{gap:8px;margin-bottom:10px}
  .lb-note{display:none}
  .viewseg{padding:2px;border-radius:9px}
  .viewseg button{height:27px;padding:0 9px;font-size:12px;gap:5px}
  .list-bar-side .btn.sm{height:27px;padding:0 7px;font-size:11.5px}
  .trow-hit.group{min-height:42px;padding-top:7px;padding-bottom:7px;gap:7px}
  .trow-hit.item{padding-top:6px;padding-bottom:6px;gap:6px}
  .tname{font-size:13px;max-width:52%}
  .tsub{display:none}
  .tcount{min-width:30px;font-size:11px}
  .tree .chip{font-size:10px;padding:0 6px}
  .tthumb{width:28px;height:28px;flex-basis:28px}
  .titem-name{font-size:12.5px}
  .tm-detail{display:none}
  .row-act{opacity:1}
  .row-act.cam{display:none}
  .top-search input{height:32px;font-size:12.5px;padding-right:68px}
  .top-search input::placeholder{font-size:12.5px}
  .top-actions .icon-btn{display:none}
  .top-actions{gap:6px}
  .mask{align-items:flex-end;padding:0}
  .dialog{
    width:100%;border-radius:16px 16px 0 0;max-height:92vh;
    padding:18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .form-actions{padding-top:14px;margin-top:14px}
  .form-actions .btn{flex:1;min-width:0}
  .hero-tags{gap:6px}
  .hero-tag{font-size:11px;padding:3px 9px}
  .filters{gap:6px}
  .filter-chip{height:28px;padding:0 10px;font-size:12px}
  .filters select{height:28px;font-size:12px;max-width:46%}
  .page-head{flex-direction:column;align-items:stretch;gap:10px}
  .page-head>div:last-child{display:flex;gap:7px;flex-wrap:wrap}
  .page-head>.btn{align-self:flex-start}
  .card{padding:15px;border-radius:var(--r-lg)}
  .card+.card{margin-top:12px}
  .ci-grid{grid-template-columns:minmax(0,1fr) 58px 30px 24px;row-gap:7px}
  .ci-name{grid-column:1/2}
  .ci-qty{grid-column:2/3}
  .ci-unit{grid-column:3/4}
  .ci-del{grid-column:4/5}
  .ci-room,.ci-spot,.ci-date{grid-column:1/-1}
  .si-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .si-cell:nth-child(3){grid-column:1/-1}
  .invite-box{flex-direction:column;align-items:flex-start}
  .invite-actions{width:100%}
  .invite-actions .btn{flex:1}
  .account-row{gap:14px}
  .account-actions{margin-left:0;width:100%}
  .act-list{max-height:240px}
  .tour-card{padding:14px 14px calc(14px + env(safe-area-inset-bottom))}
  .tour-foot .btn{padding:6px 9px}
}
@media (max-width:400px){
  .tab{min-width:46px;font-size:9.5px}
  .tab i .ic{width:19px;height:19px}
  .settings-tab{padding:5px 9px 5px 6px}
  .top-search input{padding-left:30px}
  .search-ico{left:8px}
}

/* 触屏：只放宽命中高度，不横向加内边距（避免再次溢出） */
@media (pointer:coarse){
  .nav-item,.settings-tab,.hh-item,.member-row{min-height:40px}
  .btn{min-height:36px}
  .btn.sm{min-height:30px}
  .filter-chip,.model-chip,.sample{min-height:28px}
  .top-search input{min-height:34px}
}

/* 降低动效偏好 */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
