/* ============ 人生效率 · 年度像素打卡（无印良品·红白极简） ============ */
:root {
  --accent: #C7000B;
  --accent-soft: #FBEDED;
  --text: #333333;
  --muted: #999999;
  --line: #E8E8E8;
  --family: #F0B8B8;
  --bg: #FBFBFB;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
  max-width: 560px; margin: 0 auto;
  min-height: 100vh;
}
button { font-family: inherit; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent);
  color: #fff; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.topbar h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.topbar p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.sync-badge {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.sync-badge.on { color: var(--accent); border-color: #F0C7CA; }

/* 统计 */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.stat {
  background: #FAFAFA; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 8px; text-align: center;
}
.stat b { display: block; font-size: 22px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.p { background: #C7000B; }
.dot.f { background: var(--family); }

/* 视图切换 */
.tabs { display: flex; gap: 8px; padding: 12px 16px 0; }
.pixel-tab {
  flex: 1; padding: 9px 0; font-size: 13px; font-weight: 600;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pixel-tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* 面板 */
.panel { background: #fff; margin: 12px 12px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.legend-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.legend-head .hint { font-size: 11px; color: var(--muted); margin-right: auto; }
.mini {
  font-size: 12px; padding: 5px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; color: var(--text); cursor: pointer;
}
.mini.active { border-color: var(--accent); color: var(--accent); }
.mini:disabled { opacity: .4; }

/* 图例 */
#pixel-legend { padding: 10px 12px 12px; }
.pixel-group { margin-bottom: 12px; }
.pixel-group:last-child { margin-bottom: 2px; }
.pixel-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pixel-swatch { width: 12px; height: 12px; border-radius: 3px; background: #C7000B; display: inline-block; }
.pixel-group-name { font-size: 13px; font-weight: 700; }
.pixel-add-item {
  margin-left: auto; font-size: 11px; color: var(--accent); background: none;
  border: 1px dashed #E0B6B9; border-radius: 999px; padding: 3px 10px; cursor: pointer;
}
.pixel-items { display: flex; flex-wrap: wrap; gap: 6px; }
.pixel-item {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  font-size: 13px; background: #FAFAFA; cursor: pointer; touch-action: manipulation;
}
.pixel-item.sel { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pixel-swatch.sm { width: 9px; height: 9px; }
.pixel-name { line-height: 1.2; }
.pixel-count { font-size: 11px; color: var(--muted); }
.pixel-del {
  width: 18px; height: 18px; border-radius: 50%; border: 0; background: #F2F2F2;
  color: var(--muted); font-size: 10px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pixel-name-input {
  font-size: 13px; border: 1px solid var(--accent); border-radius: 6px;
  padding: 4px 6px; width: 96px; outline: none;
}
.pixel-item.eraser { color: var(--muted); }
.pixel-swatch.eraser-swatch {
  background: #fff; border: 1px solid var(--line); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 9px;
}

/* 年度网格 */
.grid-panel { margin-bottom: 24px; }
.year-head { display: flex; padding: 10px 8px 6px; border-bottom: 1px solid var(--line); overflow: hidden; }
.year-head span { flex: 1; min-width: 15px; font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; }
.grid-scroll { display: flex; overflow-x: auto; padding: 10px 8px 12px; -webkit-overflow-scrolling: touch; }
.weekday { position: sticky; left: 0; z-index: 5; background: #fff; display: flex; flex-direction: column; gap: 2px; margin-right: 6px; }
.weekday span { height: 16px; font-size: 9px; color: var(--muted); display: flex; align-items: center; justify-content: center; width: 14px; }
#pixel-grid { display: flex; gap: 3px; }
.pixel-col { display: flex; flex-direction: column; gap: 2px; }
.pixel {
  width: 15px; height: 15px; border-radius: 3px; background: #F4F4F4;
  border: 1px solid #EDEDED; cursor: pointer; touch-action: none; position: relative;
  display: flex; overflow: hidden; transition: background .1s;
}
.pixel.empty { background: transparent; border-color: transparent; cursor: default; }
.pixel.today { outline: 1.5px solid var(--accent); outline-offset: 1px; }
.pixel.multi { display: flex; }
.pbar { flex: 1; height: 100%; display: block; }
.pixel.on { border-color: transparent; }
.foot-note { font-size: 11px; color: var(--muted); text-align: center; padding: 0 0 12px; margin: 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom));
  transform: translateX(-50%); background: rgba(51,51,51,.94); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 100;
  white-space: nowrap; max-width: 86vw; overflow: hidden; text-overflow: ellipsis;
}
.toast.hidden { display: none; }


/* ============ 导出弹层 / 图片预览 ============ */
.sheet-mask, .img-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-mask.hidden, .img-mask.hidden { display: none; }
.sheet {
  width: 100%; max-width: 560px; background: #fff;
  border-radius: 16px 16px 0 0; padding: 10px 14px calc(18px + env(safe-area-inset-bottom));
}
.sheet-title { font-size: 14px; font-weight: 700; text-align: center; padding: 10px 0 12px; color: var(--text); }
.sheet-opt {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  margin-bottom: 10px; background: #FAFAFA; cursor: pointer;
}
.sheet-opt:active { background: var(--accent-soft); }
.opt-icon { font-size: 22px; line-height: 1; }
.sheet-opt b { font-size: 14px; display: block; }
.sheet-opt p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.sheet-cancel {
  width: 100%; padding: 12px; border: 0; border-radius: 12px;
  background: #F2F2F2; color: var(--text); font-size: 14px; margin-top: 4px; cursor: pointer;
}
.img-mask { align-items: center; padding: 20px; }
.img-box {
  background: #fff; border-radius: 12px; padding: 12px; width: 100%; max-width: 560px;
  max-height: 92vh; display: flex; flex-direction: column; gap: 10px; overflow: auto;
}
.img-head { font-size: 12px; color: var(--muted); text-align: center; }
.img-box img { max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: 8px; background: #fff; }

/* ============ v2 竖版年度表 + 新布局 ============ */
/* 顶部连接信息 */
.conn { font-size: 10px; color: var(--muted); margin: 2px 0 0; }
.conn.on { color: #4A8; }

/* 视图切换：吸顶，紧贴顶栏下方 */
.tabs {
  position: sticky; top: calc(64px + env(safe-area-inset-top));
  z-index: 15; background: var(--bg);
  padding: 10px 16px 8px;
}

/* 年度表：竖版（周一~周日 7 列 × 全年周数），随页面纵向滚动 */
.grid-panel { margin-bottom: 12px; }
.grid-scroll { overflow: visible; padding: 8px 12px 4px; }
.weekday {
  position: static; z-index: auto; background: transparent;
  display: flex; flex-direction: row; align-items: center; gap: 2px;
  padding: 0 0 6px; margin: 0;
}
.weekday span {
  width: 15px; height: 15px; font-size: 9px;
  display: flex; align-items: center; justify-content: center;
}
.weekday span.corner { width: 26px; flex-shrink: 0; }
#pixel-grid { display: flex; flex-direction: column; gap: 3px; overflow: visible; touch-action: none; -webkit-user-select: none; user-select: none; transform-origin: 0 0; }
.pixel-row { display: flex; gap: 2px; }
.pixel-month {
  width: 26px; flex-shrink: 0; font-size: 9px; color: var(--muted);
  line-height: 15px; padding-right: 2px; text-align: left; white-space: nowrap;
  display: flex; align-items: center;
}
.pixel-month.empty { visibility: hidden; }
.year-head { display: none; }

/* 导出弹层提示 */
.sheet-hint {
  font-size: 11px; color: var(--muted); background: #FAFAFA;
  border: 1px dashed var(--line); border-radius: 8px;
  padding: 8px 10px; margin: 2px 0 10px; line-height: 1.5;
}

/* ============ 安装到主屏幕引导条 ============ */
.install-card {
  background: var(--accent-soft); border-bottom: 1px solid #F0C7CA;
  padding: 8px 12px; font-size: 12px;
}
.install-card.hidden { display: none; }
.install-main { display: flex; align-items: center; gap: 8px; }
.install-ico { font-size: 16px; line-height: 1; }
.install-txt { flex: 1; color: var(--accent); cursor: pointer; }
.install-close { padding: 2px 9px; font-size: 11px; }
.install-steps {
  margin-top: 6px; padding: 8px 10px; background: #FFFDF5;
  border-radius: 8px; border: 1px dashed #EAD9A8;
  color: #6B5610; line-height: 1.7; font-size: 12px;
}

/* ============ v3 紧凑像素表（月份列 × 天数行）+ 右侧项目列 ============ */
.px-panel { padding: 8px 12px 12px; margin-bottom: 12px; }
.px-wrap { display: flex; align-items: flex-start; gap: 10px; }
.px-table { flex-shrink: 0; }
.px-months { display: flex; gap: 1px; margin-left: 18px; margin-bottom: 2px; }
.px-mlabel { width: 12px; font-size: 8px; color: var(--muted); text-align: center; line-height: 13px; }
.px-body { display: flex; }
.px-days { width: 18px; display: flex; flex-direction: column; gap: 1px; }
.px-days span { height: 12px; font-size: 8px; color: var(--muted); text-align: center; line-height: 12px; }
.px-cols { display: flex; gap: 1px; }
.px-col { display: flex; flex-direction: column; gap: 1px; }
.px-cols .pixel { width: 11px; height: 11px; border-radius: 2px; }
.px-cols .pixel.empty { background: transparent; border-color: transparent; }
.px-cols .pixel.today { outline-width: 1px; outline-offset: 0; }
.px-note { font-size: 10px; color: var(--muted); margin: 6px 0 0; text-align: left; }

/* 右侧项目列 */
.px-side { flex: 1; min-width: 0; }
.px-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.px-tools .mini { flex: 1; white-space: nowrap; }
.px-hint { font-size: 10px; color: var(--muted); margin: 0 0 8px; }
#px-groups { display: flex; flex-direction: column; }
.px-group-head { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; font-size: 12px; font-weight: 700; }
.px-group-head:first-child { margin-top: 0; }
.px-group-head .pixel-swatch { width: 10px; height: 10px; }
.px-group-head .px-group-name { flex: 1; }
.px-add-item {
  font-size: 10px; color: var(--accent); border: 1px dashed #E0B6B9;
  border-radius: 999px; padding: 2px 8px; background: none; cursor: pointer;
}
.px-item {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 8px; font-size: 12px; background: #FAFAFA;
  cursor: pointer; margin-bottom: 4px; min-height: 24px;
}
.px-item .pixel-swatch { width: 10px; height: 10px; flex-shrink: 0; }
.px-item .pixel-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-item .pixel-count { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.px-item .pixel-del { margin-left: 2px; flex-shrink: 0; }
.px-item.sel { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.px-item.eraser { color: var(--muted); }
.px-item.eraser.sel { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pixel-name-input { width: 82px; }
.px-group { margin-bottom: 6px; }

/* ============ v4 紧凑像素表：CSS Grid 精确对齐 + 撑满屏幕 ============ */
.px-panel { padding: 8px 12px 12px; margin-bottom: 12px; }
.px-wrap { display: flex; align-items: flex-start; gap: 10px; }
/* 表格用 Grid：第1列=天数(22px)，后面12列=月份(自动均分)，行高固定17px */
.px-zoomcol { flex: 0 0 auto; width: 250px; overflow: hidden; max-height: 78vh; position: relative; }
.px-table {
  width: 249px;
  display: grid;
  grid-template-columns: 22px repeat(12, 18px);
  grid-auto-rows: 17px;
  gap: 1px;
  align-content: start;
}
.px-corner, .px-mlabel, .px-daynum {
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--muted); line-height: 1; overflow: hidden;
}
.px-mlabel { font-weight: 600; }
.px-table .pixel { width: 100%; height: 100%; border-radius: 2px; }
.px-table .pixel.empty { background: transparent; border-color: transparent; }
.px-table .pixel.today { outline-width: 1px; outline-offset: 0; }
.px-note {
  font-size: 10px; color: var(--muted); margin: 6px 0 0; text-align: left;
  font-size: 10px;
}

/* 右侧项目列：定宽，项目名最多 4 个字 */
.px-side { width: 96px; flex: none; }
.px-tools { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.px-tools .mini { width: 100%; text-align: center; font-size: 11px; padding: 4px 0; white-space: nowrap; }
#px-groups { display: flex; flex-direction: column; }
.px-group { margin-bottom: 6px; }
.px-group-head {
  display: flex; align-items: center; gap: 5px; margin: 6px 0 4px;
  font-size: 12px; font-weight: 700;
}
.px-group-head .pixel-swatch { width: 10px; height: 10px; flex-shrink: 0; }
.px-group-head .px-group-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-add-item {
  font-size: 10px; color: var(--accent); border: 1px dashed #E0B6B9;
  border-radius: 999px; padding: 1px 6px; background: none; cursor: pointer; flex-shrink: 0;
}
.px-item {
  display: flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 6px; font-size: 12px; background: #FAFAFA;
  cursor: pointer; margin-bottom: 4px; min-height: 22px;
}
.px-item .pixel-swatch { width: 10px; height: 10px; flex-shrink: 0; }
.px-item .pixel-name { flex: 1; min-width: 0; max-width: 4em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-item .pixel-del { margin-left: auto; flex-shrink: 0; width: 16px; height: 16px; font-size: 9px; }
.px-item.sel { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.px-item.eraser { color: var(--muted); }
.px-item.eraser.sel { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pixel-name-input { width: 72px; }

/* 限制表格最大宽度，保证格子近方形（手机端填满屏宽，大屏不拉宽） */
.px-table { }
/* 月份英文缩写字号；项目行防止双击缩放 */
.px-mlabel { font-size: 7px; letter-spacing: 0; }
.px-item { touch-action: manipulation; }

/* 橡皮擦开启时底部指示器 */
.eraser-ind {
  position: fixed; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(199,0,11,.94); color: #fff;
  padding: 8px 16px; border-radius: 999px; font-size: 12px; z-index: 95;
  white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}
.eraser-ind.hidden { display: none; }
.eraser-ico { font-size: 12px; line-height: 1; }
.px-item.eraser .eraser-swatch { border: 1px solid var(--line); background: #fff; }

/* ====== 顶栏右侧 + 主题按钮 ====== */
.topbar-right { display: flex; align-items: center; gap: 8px; }
.theme-btn { font-size: 15px; padding: 3px 9px; line-height: 1; }

/* ====== 主题面板选项 ====== */
.theme-opt {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  margin-bottom: 8px; background: #FAFAFA; cursor: pointer; font-size: 13px;
}
.theme-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.theme-opt .theme-swatch { width: 18px; height: 18px; border-radius: 6px; flex-shrink: 0; }
.theme-opt .theme-swatch.f { border: 1px solid rgba(0,0,0,.06); }
.theme-opt .theme-name { flex: 1; }

/* ====== MUJI 灰白橡皮擦 ====== */
.eraser-ind {
  position: fixed; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  background: #ffffff; color: #8a8a8a;
  border: 1px solid #e3e3e3;
  padding: 8px 16px; border-radius: 999px; font-size: 12px; z-index: 95;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
}
.eraser-ind.hidden { display: none; }
.er-ico { flex-shrink: 0; }

/* 项目行的编辑按钮 */
.pixel-edit {
  width: 16px; height: 16px; border: 0; border-radius: 50%;
  background: #f2f2f2; color: var(--muted); font-size: 9px;
  line-height: 1; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
/* 橡皮擦行激活态 → 灰白（去红） */
.px-item.eraser { color: #8a8a8a; }
.px-item.eraser.sel { border-color: #cfcfcf; color: #555; background: #f4f4f4; }

/* ====== MUJI 细线图标按钮 ====== */
.theme-btn { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; }
.theme-btn svg { color: #555; display: block; }

/* ====== 管理项目弹层（虚化背景） ====== */
.px-panel.modal-open { filter: blur(5px); }
#color-sheet, #theme-sheet { z-index: 98; }
.manage-mask {
  position: fixed; inset: 0; z-index: 96;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); padding: 20px;
}
.manage-mask.hidden { display: none; }
.manage-box {
  background: #fff; border-radius: 14px; padding: 16px;
  width: 100%; max-width: 360px; max-height: 82vh; overflow: auto;
}
.manage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.manage-head span { font-size: 15px; font-weight: 700; }
.manage-add { display: flex; gap: 8px; margin-bottom: 12px; }
.manage-add input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font-size: 13px; outline: none;
}
.manage-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 6px; font-size: 13px; background: #FAFAFA;
}
.manage-item .manage-name { flex: 1; word-break: break-word; white-space: normal; overflow: hidden; }
.manage-item .pixel-del { flex-shrink: 0; }
/* 项目行文字放宽（行内只剩 ✎，更多显示空间）；管理✕中性灰 */
.px-item .pixel-name { max-width: 5em; }
.px-add-item.mgr { color: var(--muted); border-color: var(--line); }
/* 管理页项目行：允许指针拖拽排序（防止被当成页面滚动） */
.manage-item { touch-action: none; }

/* ====== 今日格子：红色边框缓慢闪烁提示 ====== */
@keyframes todayPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent); }
  50% { box-shadow: 0 0 0 4px rgba(199,0,11,0); }
}
.pixel.today {
  outline: 1.5px solid var(--accent);
  outline-offset: 0;
}
.pixel.today.pending { animation: todayPulse 1.8s ease-in-out infinite; }

/* ====== 管理页拖拽：长按抬升 ====== */
.manage-item { touch-action: none; }
.manage-item.dragging { opacity: .6; box-shadow: 0 5px 14px rgba(0,0,0,.16); transform: scale(1.02); z-index: 2; }

/* ====== 时长选择弹层 ====== */
.dur-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.dur-chips .mini { flex: none; padding: 8px 14px; font-size: 13px; }
.dur-chips .mini.sel { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dur-custom { display: flex; gap: 8px; margin-bottom: 8px; }
.dur-custom input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; outline: none;
}
.dur-hint { font-size: 11px; color: var(--muted); margin: 0 0 4px; }

.manage-head-btns { display: flex; gap: 8px; align-items: center; }
.manage-head-btns .mini { white-space: nowrap; }

/* 项目颜色选择 */
.color-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0 12px; }
.color-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-size: 13px; background: #FAFAFA; cursor: pointer;
}
.color-item.sel { border-color: var(--accent); background: var(--accent-soft); }
.color-dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,.08); }

/* 像素卡缩放容器 */
#px-zoom { overflow: hidden; flex: 1; min-width: 0; max-height: 78vh; position: relative; }
.zoom-bar {
  position: fixed; right: 14px; bottom: calc(120px + env(safe-area-inset-bottom));
  z-index: 94; display: flex; gap: 6px;
}
.zoom-bar.show { display: flex; }
.zoom-bar .mini { display: inline-flex; align-items: center; gap: 4px; }
/* 调色盘 · 样式切换 */
.style-row { display: flex; gap: 10px; margin-bottom: 12px; }
.style-opt { flex: 1; }
.style-opt.sel { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
#theme-list .px-hint { font-size: 11px; color: var(--muted); margin: 4px 0 8px; }

/* 每日 20:50 提醒横幅（MUJI 极简） */
.reminder {
  position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 99; width: calc(100% - 24px); max-width: 520px;
}
.reminder.hidden { display: none; }
.reminder-box {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #f0d6d8; border-radius: 14px;
  padding: 10px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.10);
}
.reminder-ico { font-size: 20px; }
.reminder-txt { flex: 1; font-size: 13px; color: #555; line-height: 1.4; }
.reminder-box .mini { white-space: nowrap; }

/* 通知铃铛：开启后变主题红 */
.theme-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.theme-btn.on svg { color: var(--accent); }

/* 人员页成员改名小笔 */
.pixel-tab .tab-edit { margin-left: 4px; font-size: 10px; color: var(--muted); cursor: pointer; }
.pixel-tab .tab-edit:hover { color: var(--accent); }

/* ============ 项目专项统计弹层 ============ */
.proj-box { max-width: 380px; }
.proj-hint { text-align: center; font-size: 11px; color: var(--muted); margin: 0 0 8px; }
.proj-grid { width: 250px; margin: 4px auto 8px; }
.proj-grid .pixel { width: 100%; height: 100%; }
.proj-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.proj-stats .stat b { font-size: 22px; }

/* 项目行「统计」小按钮（条形图，MUJI 细线） */
.pixel-stat {
  width: 18px; height: 18px; border: 0; border-radius: 50%;
  background: #f2f2f2; color: var(--muted); cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.pixel-stat:hover { color: var(--accent); }

/* ===== v51 极简头部：功能按钮移至底部，顶栏只留品牌区 ===== */
.topbar { justify-content: flex-start; }
.topbar-right { display: none; }
#install-card { display: none !important; } /* 已安装引导卡：按需求永久隐藏 */

/* 底部功能条：弱化存在的设置入口 */
body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
.bottombar {
  position: fixed; left: 0; right: 0;
  bottom: 0; z-index: 25;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bottombar .mini { opacity: .55; }
.bottombar .mini:active { opacity: 1; }

/* 同步状态：从文字徽标改为 8px 小圆点（绿=已同步，灰=本地模式） */
.sync-badge {
  width: 8px; height: 8px; padding: 0; border-radius: 50%;
  background: #C9CDD3; border: none; font-size: 0; overflow: hidden;
}
.sync-badge.on { background: var(--accent); border: none; }

/* ===== v56 MUJI 排印 ===== */
.logo { width: 34px; height: 34px; border-radius: 8px; }
.topbar h1 {
  font-family: "Hiragino Sans GB", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 17px; font-weight: 600; letter-spacing: 2.5px;
}
.ver { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 8px; letter-spacing: .5px; }
.topbar p {
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 12px; letter-spacing: 1px;
}

/* ===== v57/v58 诗注：MUJI 式小注（横版单行，超出省略）===== */
.poem {
  margin: 3px 0 0; text-align: left;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 11px; letter-spacing: 1px; line-height: 1.6;
  color: var(--muted);
  border-left: none; padding-left: 0; max-width: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
