/* ============================================================
 * BiBiBoBo · 美甲管理系统 视觉规范实现
 * 奶油粉 · 雾紫 · 衬线标题 · 斜体拉丁点缀
 * ============================================================ */

:root {
  /* 中性底色 */
  --cream: #FBF6F2;  --cream-deep: #F4EAE3;  --white: #FFFFFF;
  /* 粉系 */
  --blush: #F3D9DC;  --rose: #E8A9B4;  --rose-deep: #D08896;
  /* 紫系 */
  --lilac: #D9D3EC;  --lilac-deep: #B7AED8;  --mist: #9E93C4;
  /* 金系 */
  --gold: #C9A86A;  --gold-light: #E7C98A;
  /* 文字 */
  --ink: #3A323A;  --ink-soft: #8A7F86;  --ink-faint: #A8999F;  --placeholder: #C3B7BD;
  /* 描边 */
  --line: #EEE2DC;  --line-soft: #F4EAE3;  --line-warm: #F0E6E0;

  /* 强调色（默认玫瑰；JS 按 CONFIG.accent 覆盖） */
  --accent: #D08896;
  --accent-g: linear-gradient(135deg, #E8A9B4, #D08896);

  /* 圆角 */
  --r-card: 22px;  --r-card-sm: 18px;  --r-input: 14px;  --r-seg: 13px;
  --r-pill: 999px;  --r-sheet: 28px 28px 0 0;

  /* 阴影 */
  --shadow-card: 0 4px 16px rgba(180,140,150,.10);
  --shadow-list: 0 3px 10px rgba(180,140,150,.07);
  --shadow-btn: 0 8px 20px rgba(180,140,150,.28);
  --shadow-chip: 0 4px 12px rgba(180,140,150,.22);
  --shadow-brand: 0 6px 16px rgba(180,140,150,.28);
  --shadow-sheet: 0 10px 30px rgba(0,0,0,.25);
  --shadow-viewer: 0 24px 70px rgba(0,0,0,.5);

  /* 字体 */
  --serif: 'Noto Serif SC', 'Songti SC', serif;
  --latin: 'Cormorant Garamond', 'Noto Serif SC', serif;
  --ui: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --maxw: 440px;
}

/* 主题：雾紫 / 暖金 */
[data-accent="雾紫"] { --accent: #9E93C4; --accent-g: linear-gradient(135deg, #B7AED8, #9E93C4); }
[data-accent="暖金"] { --accent: #C9A86A; --accent-g: linear-gradient(135deg, #E7C98A, #C9A86A); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background:
    radial-gradient(1100px 560px at 18% -8%, #FCE9EC 0%, transparent 58%),
    radial-gradient(960px 560px at 102% 2%, #ECE7F7 0%, transparent 54%),
    var(--cream);
  background-attachment: fixed;
  color: var(--ink); font-family: var(--ui);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}

.app {
  width: min(var(--maxw), 100%); margin: 0 auto;
  padding: 0 18px calc(120px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

/* ---------- 品牌头 ---------- */
.brand { padding: 24px 2px 12px; display: flex; align-items: center; gap: 13px; }
.brand-logo {
  width: 48px; height: 48px; border-radius: 15px; flex: none;
  background: var(--accent-g); box-shadow: var(--shadow-brand);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 24px; color: #fff;
}
.brand-text { flex: 1; min-width: 0; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .5px; line-height: 1.1; }
.brand-sub { font-family: var(--latin); font-style: italic; font-size: 15px; color: var(--ink-faint); margin-top: 1px; }
.brand-count {
  flex: none; font-size: 11px; font-weight: 700; color: var(--accent);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 5px 11px; box-shadow: var(--shadow-list);
}

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
  padding: 19px; margin-bottom: 16px;
}
.card-title {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px; margin-bottom: 15px;
}
.card-title .cn { color: var(--ink); font-size: 15px; }
.card-title .en { font-family: var(--latin); font-style: italic; font-size: 14px; color: var(--ink-faint); }

/* ---------- 页面标题（衬线 + 斜体英文） ---------- */
.section-hd { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 8px 2px 2px; }
.section-en { font-family: var(--latin); font-style: italic; font-size: 15px; color: var(--ink-faint); margin: 0 2px 18px; }

/* ---------- 表单 ---------- */
label.field { display: block; margin-bottom: 15px; }
.field-label { font-size: 13px; color: var(--ink-soft); margin-bottom: 7px; font-weight: 600; }
.field-label .req { color: var(--accent); }
input[type=text], select {
  width: 100%; padding: 14px; font-size: 16px; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line);
  border-radius: var(--r-input); outline: none; font-family: var(--ui);
  transition: border-color .15s, background .15s;
}
input::placeholder { color: var(--placeholder); }
input:focus, select:focus { border-color: var(--accent); background: #fff; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A7F86' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

/* ---------- 分段控件（等级） ---------- */
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 12px 0; font-size: 14px; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--cream); color: var(--ink-soft);
  border-radius: var(--r-seg); font-family: var(--ui); transition: all .15s;
}
.seg button.on { color: #fff; border-color: transparent; box-shadow: var(--shadow-chip); }
.seg button.on[data-lv="金"]   { background: linear-gradient(135deg,#E7C98A,#C9A86A); }
.seg button.on[data-lv="黑钻"] { background: linear-gradient(135deg,#6E6473,#403A45); }
.seg button.on[data-lv="彩钻"] { background: linear-gradient(135deg,var(--rose),var(--lilac-deep)); }

/* ---------- 等级徽章 ---------- */
.lv-badge {
  display: inline-flex; align-items: center; padding: 4px 10px;
  border-radius: var(--r-pill); font-size: 11px; font-weight: 700; color: #fff;
}
.lv-badge[data-lv="金"]   { background: linear-gradient(135deg,#E7C98A,#C9A86A); }
.lv-badge[data-lv="黑钻"] { background: linear-gradient(135deg,#6E6473,#403A45); }
.lv-badge[data-lv="彩钻"] { background: linear-gradient(135deg,var(--rose),var(--lilac-deep)); }

/* ---------- 价目表点选 ---------- */
.price-group + .price-group { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 14px; }
.pg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pg-en { font-family: var(--latin); font-style: italic; font-size: 16px; font-weight: 600; letter-spacing: .3px; color: var(--ink); }
.pg-cn { font-size: 12px; color: var(--ink-soft); }
.pg-note { font-family: var(--latin); font-style: italic; font-size: 12px; color: var(--gold); margin-left: auto; }

.item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin-bottom: 8px;
  background: var(--cream); border: 1.5px solid var(--line);
  border-radius: var(--r-input); cursor: pointer; transition: all .14s; user-select: none;
}
.item:active { transform: scale(.99); }
.item.on { background: linear-gradient(135deg,#FFF4F2,#F6F0FB); border-color: var(--accent); }
.item .box {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  border: 2px solid var(--lilac-deep); background: #fff; display: grid; place-items: center; transition: all .14s;
}
.item.on .box { background: var(--accent); border-color: var(--accent); }
.item .box svg { opacity: 0; transition: opacity .14s; }
.item.on .box svg { opacity: 1; }
.item .name { flex: 1; font-size: 15px; }
.item .price { font-size: 15px; font-weight: 700; color: var(--rose-deep); font-family: var(--latin); font-style: italic; }

/* ---------- 折扣提示 ---------- */
.hint {
  display: none; margin-top: 10px; padding: 11px 13px;
  background: linear-gradient(135deg,#FFF6E8,#FFF0F2);
  border: 1px solid #F2DDC2; border-radius: var(--r-input);
  font-size: 13px; color: #9A7B4F; line-height: 1.5;
}
.hint.show { display: block; }
.hint b { color: var(--rose-deep); }

/* ---------- 金额条 ---------- */
.totals { display: grid; gap: 10px; }
.total-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.total-row .k { color: var(--ink-soft); }
.total-row .v { font-weight: 700; }
.total-final {
  margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
}
.total-final .k { font-size: 14px; color: var(--ink-soft); }
.total-final .v { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--rose-deep); }

/* ---------- 主按钮 ---------- */
.btn {
  width: 100%; padding: 16px; border: none; cursor: pointer; font-family: var(--ui);
  font-size: 16px; font-weight: 700; color: #fff; border-radius: 16px;
  background: var(--accent-g); box-shadow: var(--shadow-btn); transition: transform .12s, opacity .12s;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--rose-deep); border: 1.5px solid #F0DDDF; box-shadow: var(--shadow-list); }
.btn.close { background: var(--cream-deep); color: var(--ink-soft); box-shadow: none; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-warm);
}
.tabbar .inner { display: flex; gap: 2px; width: 100%; max-width: var(--maxw); }
.tab {
  flex: 1; background: none; border: none; cursor: pointer; padding: 6px 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--placeholder); font-size: 11px; font-weight: 700; font-family: var(--ui); transition: color .15s;
}
.tab svg { width: 23px; height: 23px; stroke: var(--placeholder); fill: none; stroke-width: 1.8; transition: stroke .15s; }
.tab.on { color: var(--accent); }
.tab.on svg { stroke: var(--accent); }

/* ---------- 页面切换 ---------- */
.page { display: none; animation: fade .25s ease; }
.page.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 选中会员卡（开单页顶部） ---------- */
.sel-member {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: linear-gradient(135deg,#FFF6F4,#F4EEFB);
  border: 1.5px solid var(--blush); border-radius: var(--r-card-sm);
}
.avatar {
  width: 48px; height: 48px; border-radius: 15px; flex: none;
  display: grid; place-items: center; color: #fff; font-family: var(--serif); font-weight: 600; font-size: 20px;
}
.avatar.sm { width: 42px; height: 42px; font-size: 17px; border-radius: 13px; }

/* ---------- 搜索框 ---------- */
.search-box { position: relative; margin-bottom: 14px; }
.search-box input {
  width: 100%; padding: 13px 14px 13px 44px; font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  outline: none; font-family: var(--ui); box-shadow: var(--shadow-list); transition: border-color .15s;
}
.search-box input::placeholder { color: var(--placeholder); }
.search-box input:focus { border-color: var(--accent); }
.search-ico {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; stroke: var(--ink-faint); fill: none; stroke-width: 1.8; pointer-events: none;
}

/* ---------- 会员列表（卡片 + 展开记录） ---------- */
.member-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-card-sm); margin-bottom: 11px; overflow: hidden;
  box-shadow: var(--shadow-list); transition: border-color .14s;
}
.member-card.sel { border-color: var(--accent); }
.member-head { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; }
.member-head:active { background: var(--cream); }
.m-id {
  font-family: var(--latin); font-style: italic; font-weight: 600; font-size: 15px;
  color: var(--lilac-deep); background: var(--cream); padding: 5px 10px; border-radius: 10px; flex: none;
}
.m-name { font-family: var(--serif); font-weight: 600; font-size: 16px; }
.m-meta { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.m-grow { flex: 1; min-width: 0; }
.chev { color: var(--ink-faint); font-size: 13px; transition: transform .2s; display: inline-block; }
.chev.up { transform: rotate(180deg); }

.member-body { display: none; padding: 0 14px 14px; border-top: 1px dashed var(--line); }
.member-body.open { display: block; }

/* 会员登记 · 档案明细 */
.profile { padding: 12px 0 4px; }
.pf-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.pf-row:last-child { border-bottom: none; }
.pf-k { color: var(--ink-soft); }
.pf-v { color: var(--ink); font-weight: 600; }

/* 分析 · 明细/汇总 切换 */
.mode-seg { margin: 13px 0 6px; }
.mode-seg button.on { color: #fff; border-color: transparent; background: var(--accent-g); box-shadow: var(--shadow-chip); }
.m-actions { display: flex; gap: 8px; padding: 13px 0; flex-wrap: wrap; }
.mini {
  font-family: var(--ui); font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 9px 13px; border-radius: 11px; border: 1.5px solid transparent;
  background: var(--accent-g); color: #fff; transition: transform .12s;
}
.mini:active { transform: scale(.96); }
.mini.ghost { background: #fff; color: var(--rose-deep); border-color: #F0DDDF; }
.mini.danger { background: #fff; color: #C46; border-color: #EBC; }

.rec-head { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 4px 0 8px; }
.rec-row {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; margin-bottom: 8px;
}
.rec-main { flex: 1; min-width: 0; }
.rec-top { display: flex; gap: 8px; align-items: baseline; }
.rec-no { font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--rose-deep); }
.rec-date { font-family: var(--latin); font-style: italic; font-size: 12px; color: var(--ink-faint); }
.rec-items { font-size: 13px; color: var(--ink); margin: 4px 0; line-height: 1.4; }
.rec-money { font-size: 12px; color: var(--ink-soft); }
.rec-money b { color: var(--rose-deep); }
.rec-ops { display: flex; flex-direction: column; gap: 6px; flex: none; }
.ticon {
  font-family: var(--ui); font-size: 12px; font-weight: 700; cursor: pointer;
  width: 34px; padding: 6px 0; border-radius: 9px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink-soft);
}
.ticon.danger { color: #C46; border-color: #EBC; }
.ticon:active { transform: scale(.94); }

/* ---------- 汇总分析面板 ---------- */
.analysis-panel { padding: 14px 0 4px; }
.ap-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 15px 17px; border-radius: 15px; margin-bottom: 12px;
  background: linear-gradient(135deg,#FFF1F0,#F2ECFB); border: 1px solid var(--blush);
}
.ap-total-k { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.ap-total-v { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--rose-deep); }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ap-cell { background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.ap-cell.wide { grid-column: 1 / -1; }
.ap-k { font-size: 11px; color: var(--ink-faint); margin-bottom: 4px; }
.ap-v { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); }
.ap-v .lv-badge { font-family: var(--ui); font-size: 12px; }

/* ---------- 作品集：分类 chip + 瀑布流 ---------- */
.cat-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; -webkit-overflow-scrolling: touch; }
.cat-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 9px 15px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: var(--ui);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); transition: all .15s;
}
.chip.on { border-color: transparent; background: var(--accent-g); color: #fff; box-shadow: var(--shadow-chip); }

.masonry { column-count: 2; column-gap: 12px; }
.masonry.col3 { column-count: 3; }
.tile {
  break-inside: avoid; display: inline-block; width: 100%; margin-bottom: 12px; cursor: pointer;
}
.tile-img {
  position: relative; border-radius: var(--r-card-sm); overflow: hidden;
  box-shadow: var(--shadow-card); background: var(--lilac);
}
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-img::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120px 80px at 22% 12%, rgba(255,255,255,.45), transparent 70%);
}
.tile-cat {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  font-size: 11px; font-weight: 700; color: var(--ink); padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tile-like {
  position: absolute; right: 10px; bottom: 9px; z-index: 2;
  font-family: var(--latin); font-style: italic; font-size: 13px; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.tile-title { font-family: var(--serif); font-size: 14px; font-weight: 600; margin: 7px 2px 0; }

/* ---------- 全屏查看器 ---------- */
.viewer { background: rgba(40,30,35,.9) !important; flex-direction: column; align-items: center !important; justify-content: center !important; padding: 24px; }
.viewer-card {
  position: relative; width: min(86vw, 380px); aspect-ratio: 3/4;
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-viewer); background: var(--lilac);
  animation: scalein .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes scalein { from { transform: scale(.92); opacity: .6; } to { transform: none; opacity: 1; } }
.viewer-card img { width: 100%; height: 100%; object-fit: cover; }
.viewer-card::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(180px 120px at 24% 12%, rgba(255,255,255,.4), transparent 70%);
}
.viewer-meta { display: flex; align-items: center; gap: 12px; width: min(86vw, 380px); margin-top: 16px; }
.viewer-title { font-family: var(--serif); font-size: 22px; font-weight: 600; color: #fff; flex: 1; }
.viewer-like { font-family: var(--latin); font-style: italic; font-size: 15px; color: rgba(255,255,255,.8); }
.viewer-nav { display: flex; flex-direction: column; gap: 8px; }
.viewer-nav button {
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.45); color: #fff;
  font-size: 17px; display: grid; place-items: center;
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--ink-faint); padding: 34px 10px; font-size: 14px; line-height: 1.7; }
.empty .em-ttl { font-family: var(--serif); font-size: 18px; color: var(--ink-soft); margin-bottom: 6px; }

/* ---------- 弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(58,42,48,.42);
  backdrop-filter: blur(2px); z-index: 60; display: none; align-items: flex-end; justify-content: center;
}
.sheet-mask.show { display: flex; animation: fade .2s; }
.sheet {
  width: 100%; max-width: var(--maxw); background: var(--white);
  border-radius: var(--r-sheet); padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-sheet); animation: slideup .3s cubic-bezier(.2,.8,.2,1);
  max-height: 90vh; overflow-y: auto;
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grab { width: 38px; height: 4px; border-radius: 999px; background: #E7DAD3; margin: -6px auto 18px; }
.sheet-title { font-family: var(--serif); font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.sheet-title .m-id { font-size: 14px; }
.edit-totals { margin-top: 12px; }

/* ---------- 成交展示（收银确认 §6） ---------- */
.receipt { text-align: center; padding: 6px 4px 4px; }
.receipt .crown { font-size: 34px; margin-bottom: 6px; }
.receipt .ttl { font-family: var(--latin); font-style: italic; font-size: 17px; letter-spacing: 2px; color: var(--ink-soft); }
.receipt .big {
  font-family: var(--serif); font-size: 54px; font-weight: 600; margin: 6px 0 4px;
  background: var(--accent-g); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.receipt .strike { font-size: 15px; color: var(--ink-soft); }
.receipt .strike s { opacity: .7; }
.receipt .save {
  display: inline-block; margin-top: 8px; padding: 5px 14px; border-radius: var(--r-pill);
  background: linear-gradient(135deg,#FFF1E4,#FFE9EE); color: var(--gold); font-size: 13px; font-weight: 700; border: 1px solid #F2DEC6;
}
.receipt-lines { text-align: left; margin: 18px 0 6px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-input); padding: 14px; }
.rl { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--ink-soft); }
.rl .rv { color: var(--ink); font-weight: 600; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: rgba(58,42,48,.94); color: #fff; padding: 12px 20px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; z-index: 80; opacity: 0; pointer-events: none;
  transition: all .25s; white-space: nowrap; box-shadow: var(--shadow-sheet);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 杂项 ---------- */
.muted { color: var(--ink-faint); font-size: 13px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.pill-count { font-size: 12px; font-weight: 700; color: var(--rose-deep); background: #FBEAEE; padding: 3px 10px; border-radius: var(--r-pill); }

/* ============================================================
 * 联网版追加样式：登录页 / 退出按钮 / 登录前隐藏主界面
 * ============================================================ */

/* 未登录时隐藏 App 与底部导航，只显示登录卡 */
html:not(.authed) .app,
html:not(.authed) .tabbar { display: none; }

/* 登录弹层（复用 sheet-mask，居中显示登录卡） */
#login-mask { align-items: center; justify-content: center; padding: 24px; display: none; }
#login-mask.show { display: flex; }
.login-card {
  width: min(88vw, 360px); background: var(--white);
  border-radius: 26px; box-shadow: var(--shadow-sheet); padding: 32px 26px 26px;
  text-align: center; display: flex; flex-direction: column; align-items: center;
  animation: scalein .28s cubic-bezier(.2,.8,.2,1);
}
.login-logo {
  width: 60px; height: 60px; border-radius: 18px; flex: none; margin-bottom: 14px;
  background: var(--accent-g); box-shadow: var(--shadow-brand);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 30px; color: #fff;
}
.login-title { font-family: var(--serif); font-size: 24px; font-weight: 700; }
.login-sub { font-family: var(--latin); font-style: italic; font-size: 15px; color: var(--ink-faint); margin: 2px 0 20px; }
.login-card input {
  width: 100%; padding: 14px; font-size: 16px; color: var(--ink); text-align: center;
  background: var(--cream); border: 1.5px solid var(--line); border-radius: var(--r-input);
  outline: none; font-family: var(--ui);
}
.login-card input:focus { border-color: var(--accent); background: #fff; }
.login-err { color: #C46; font-size: 13px; min-height: 18px; margin: 8px 0 4px; }
.login-card .btn { width: 100%; letter-spacing: 4px; }

/* 退出按钮（品牌头右上） */
.brand-logout {
  flex: none; margin-left: 8px; font-family: var(--ui); font-size: 12px; font-weight: 700;
  color: var(--ink-soft); background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 5px 11px; cursor: pointer; box-shadow: var(--shadow-list);
}
.brand-logout:active { transform: scale(.96); }
