/* ============ 兵子装修台 · 现代简约 + 鹅黄温馨 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --yellow:      #F5C542;   /* 鹅黄主色 */
  --yellow-deep: #E8B232;   /* 深一点，用于文字/渐变 */
  --yellow-soft: #FBEAB9;   /* 浅鹅黄，用于 hover / 点缀 */
  --cream:       #FFF9EC;   /* 页面背景（暖奶油） */
  --paper:       #FFFDF7;   /* 侧边栏背景 */
  --card:        #FFFFFF;   /* 卡片 */
  --ink:         #3D352A;   /* 主文字（暖棕黑） */
  --muted:       #8A7F6A;   /* 次要文字 */
  --line:        #EFE6D3;   /* 分隔线 / 边框 */
  --danger:      #D9534F;
  --radius:      16px;
  --shadow:      0 10px 30px rgba(197, 157, 66, .14);
  --shadow-sm:   0 2px 10px rgba(197, 157, 66, .10);
  --sidebar-w:   66.666vw;  /* 左页面占屏幕 2/3 */
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; color: var(--ink); }

/* ---------- 左页面：侧边栏 ---------- */
#sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--paper);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  z-index: 60;
  display: flex; flex-direction: column;
}
body.sidebar-open #sidebar { transform: translateX(0); }

.sidebar-head { padding: 22px 20px 16px; border-bottom: 1px solid var(--line); }
.brand { font-size: 19px; font-weight: 700; letter-spacing: .5px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.brand-name { display: inline-flex; align-items: center; gap: 6px; }
.brand svg { width: 19px; height: 19px; }
.brand small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

#nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 4px;
  border-radius: 12px; text-align: left; font-size: 15px;
  transition: background .18s, transform .1s;
}
.nav-item:hover { background: var(--yellow-soft); }
.nav-item:active { transform: scale(.98); }
.nav-item.active {
  background: var(--yellow);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(245, 197, 66, .35);
}
.nav-ic   { font-size: 18px; width: 24px; text-align: center; }
.nav-name { flex: 1; }
.nav-total { font-size: 12px; color: var(--muted); white-space: nowrap; }
.nav-item.active .nav-total { color: rgba(61, 53, 42, .7); }

/* ---------- 遮罩 ---------- */
#backdrop {
  position: fixed; inset: 0;
  background: rgba(64, 54, 34, .35);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  z-index: 50;
}
body.sidebar-open #backdrop { opacity: 1; pointer-events: auto; }

/* ---------- 主界面（右页面 100%） ---------- */
#main { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  background: rgba(255, 253, 247, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
#menuBtn {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: background .18s, transform .1s;
  flex-shrink: 0;
}
#menuBtn:hover  { background: var(--yellow-soft); }
#menuBtn:active { transform: scale(.95); }

.topbar-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; flex: 1; min-width: 0; }
.topbar-title .icon { font-size: 20px; }
.topbar-total {
  font-size: 15px; font-weight: 600; color: var(--yellow-deep);
  background: var(--yellow-soft);
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}

#content {
  flex: 1; width: 100%; max-width: 880px; margin: 0 auto;
  padding: 20px;
  animation: fade .25s ease;
}

/* ---------- 通用 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.btn {
  padding: 10px 18px; border-radius: 12px; font-size: 15px; font-weight: 600;
  background: #F3EDE0; color: var(--ink);
  transition: background .18s, transform .1s;
}
.btn:hover  { background: #EAE2D0; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--yellow); }
.btn-primary:hover { background: var(--yellow-deep); }
.btn-block { width: 100%; }
.hidden { display: none !important; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 6px 2px 12px; letter-spacing: 1px; }

/* ---------- 添加表单 ---------- */
.add-card { padding: 14px; margin-bottom: 16px; }
.form { display: none; padding-top: 16px; }
.form.open { display: block; animation: fade .25s ease; }
.form h3 { font-size: 16px; margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--cream);
  outline: none;
  transition: border .18s, box-shadow .18s, background .18s;
}
.field input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, .22);
  background: #fff;
}
.form-actions { display: flex; gap: 10px; }

/* ---------- 统计 ---------- */
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 16px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--yellow-deep); }

/* ---------- 记录列表 ---------- */
.record {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; margin-bottom: 12px;
  transition: transform .12s;
}
.record:hover { transform: translateY(-1px); }
.record-info { min-width: 0; flex: 1; }
.record-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.record-name { font-weight: 600; font-size: 15px; }
.record-date { font-size: 12px; color: var(--muted); }
.record-note {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 420px;
}
.record-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.record-amount { font-weight: 700; font-size: 16px; color: var(--yellow-deep); white-space: nowrap; }
.record-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 9px; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.icon-btn:hover { background: var(--yellow-soft); }
.icon-btn.danger:hover { background: #FBEAE9; }

/* ============ 记录页：参考图排版（除设计外）· 配色沿用原鹅黄方案 ============ */
/* 顶部装饰大色块 */
.rec-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px;
  padding: 26px 22px; margin-bottom: 18px;
  border-radius: 24px;
  background: var(--yellow-soft);
  box-shadow: var(--shadow);
}
.rec-hero::before, .rec-hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.rec-hero::before { right: -50px; bottom: -70px; width: 190px; height: 190px; background: rgba(255, 255, 255, .5); }
.rec-hero::after  { right: 84px; top: -34px; width: 84px; height: 84px; background: rgba(255, 255, 255, .28); }
.rec-hero-ic {
  width: 60px; height: 60px; border-radius: 20px; flex-shrink: 0;
  background: #fff; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.rec-hero-t { position: relative; z-index: 1; min-width: 0; }
.rec-hero-name { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: .5px; }
.rec-hero-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 主体：左列表 + 右面板（宽屏分栏，窄屏上下堆叠、列表优先） */
.rec-body {
  display: grid; gap: 18px; align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 880px) {
  .rec-body { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
.rec-col-list { min-width: 0; }
.rec-list-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.rec-list-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }

.rec-col-panel { display: flex; flex-direction: column; gap: 14px; }
.rec-panel-card { padding: 16px; }
.rec-panel-title {
  font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 1px;
  margin-bottom: 4px;
}
.rec-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rec-stats .stat-card { margin: 0; }

/* 记录行：左圆形图标 + 中间名称/日期 + 右金额 */
.rec-ic {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--yellow-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; color: var(--muted); font-size: 14px; line-height: 1.9;
  padding: 50px 20px;
  background: var(--paper);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- 账单页 ---------- */
.bill-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.bill-hero { padding: 18px; }
.bill-hero.accent { background: linear-gradient(135deg, var(--yellow), var(--yellow-deep)); border: none; }
.bill-hero-label { font-size: 13px; color: var(--muted); }
.bill-hero.accent .bill-hero-label { color: rgba(61, 53, 42, .75); }
.bill-hero-value { font-size: 24px; font-weight: 800; margin-top: 8px; color: var(--ink); }
.bill-hero-value.small { font-size: 18px; }
.bill-hero-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bill-hero.accent .bill-hero-sub { color: rgba(61, 53, 42, .7); }

.bill-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 10px; }
.bill-ic { font-size: 20px; width: 28px; text-align: center; }
.bill-mid { flex: 1; min-width: 0; }
.bill-name { font-size: 14px; font-weight: 600; }
.bill-count { font-size: 12px; color: var(--muted); font-weight: 400; }
.bar { height: 8px; background: #F3EDE0; border-radius: 99px; margin-top: 6px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-deep));
  transition: width .5s ease;
}
.bill-total { font-weight: 700; color: var(--yellow-deep); white-space: nowrap; }

/* ---------- Toast 轻提示 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: var(--yellow); color: var(--ink);
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  font-weight: 600; box-shadow: var(--shadow-sm);
  opacity: 0; pointer-events: none;
  transition: .25s; z-index: 100;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ 统一确认弹窗（鹅黄主题 + 圆角按钮） ============ */
.cf-modal {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(22, 18, 10, .45);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.cf-modal.open { display: flex; }
.cf-box {
  width: 100%; max-width: 320px;
  background: var(--cream); border-radius: 16px; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow); animation: fade .18s ease;
}
.cf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cf-title { font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.cf-title svg { width: 18px; height: 18px; color: var(--yellow-deep); }
.cf-ic { color: var(--yellow-deep); display: inline-flex; }
.cf-ic svg { width: 18px; height: 18px; }
.cf-msg { font-size: 14px; line-height: 1.7; color: var(--ink); word-break: break-word; }
.cf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
.cf-actions .btn { min-width: 76px; padding: 9px 14px; border-radius: 10px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .nav-total { display: none; }
  .topbar-title { font-size: 16px; }
}
@media (max-width: 480px) {
  #content { padding: 14px; }
  .topbar { padding: 12px 14px; }
  .form-row { grid-template-columns: 1fr; }
  .bill-summary { grid-template-columns: 1fr; }
  .record-note { max-width: 200px; }
  .rec-hero { padding: 20px 16px; gap: 13px; }
  .rec-hero-ic { width: 50px; height: 50px; border-radius: 17px; font-size: 25px; }
  .rec-hero-name { font-size: 19px; }
  /* 侧边栏保持 1/3，压缩内边距以便容纳 */
  #nav { padding: 10px 8px; }
  .nav-item { padding: 11px 10px; gap: 9px; font-size: 14px; }
  .nav-ic { font-size: 16px; width: 20px; }
}

/* ================= 设计板块：图纸 + 灵感墙 ================= */
.design-sec { padding: 16px; margin-bottom: 16px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-title { font-size: 16px; font-weight: 700; flex: 1; min-width: 120px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.danger { background: #FBEAE9; color: #B64540; }
.btn.danger:hover { background: #F5DCDB; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 缩略图网格 */
.thumb-grid { display: grid; gap: 12px; }
.thumb-grid.bp { grid-template-columns: repeat(3, 1fr); }
.thumb-grid.wall { grid-template-columns: repeat(2, 1fr); }   /* 灵感墙一行显示两个 */
.thumb-empty {
  grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 13px;
  padding: 26px 10px; border: 1px dashed var(--line); border-radius: 12px;
}

.tcard {
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; cursor: pointer;
  transition: transform .12s, box-shadow .2s;
}
.tcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tcard-img { position: relative; aspect-ratio: 4 / 3; background: #fff; }
.tcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard-img.link {
  display: flex; align-items: center; justify-content: center; background: #FFF3D6;
}
.tcard-img.link img { object-fit: contain; width: 46px; height: 46px; }
.link-badge {
  position: absolute; right: 6px; top: 6px; font-size: 11px;
  background: rgba(255, 255, 255, .9); padding: 2px 7px; border-radius: 6px;
  color: var(--ink);
}
.tcard-meta { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.tcard-title {
  flex: 1; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tcard-del { width: 24px; height: 24px; border-radius: 7px; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.tcard-del:hover { background: #FBEAE9; color: var(--danger); }

/* 灵感墙管理 */
.wall-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.wall-name-label { font-size: 13px; color: var(--muted); }
.wall-name-input {
  flex: 0 1 180px; min-width: 120px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--cream); font-size: 16px; font-weight: 600; outline: none;
}
.wall-name-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, .2);
  background: #fff;
}
.wall-name-hint { font-size: 12px; color: var(--muted); }
.wall-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.wall-tab { padding: 6px 12px; border-radius: 999px; font-size: 13px; background: #F3EDE0; transition: .15s; }
.wall-tab:hover { background: var(--yellow-soft); }
.wall-tab.active { background: var(--yellow); font-weight: 600; }
.wall-add-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.wall-url-input {
  flex: 1; min-width: 180px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--cream); outline: none;
}
.wall-url-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, .2);
  background: #fff;
}
.wall-add-row label { margin: 0; }

/* ================= 全屏看图 + 简单标记编辑 ================= */
#viewer {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(22, 18, 10, .97);
  display: flex; flex-direction: column;
}
#viewer[hidden] { display: none; }
.no-scroll { overflow: hidden; }

.viewer-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 12px;
  background: rgba(255, 255, 255, .06);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.vname { color: #fff; font-size: 14px; font-weight: 600; margin-right: auto; padding-left: 4px; }
.vgroup { display: flex; align-items: center; gap: 4px; }
.vdivider { width: 1px; height: 22px; background: rgba(255, 255, 255, .15); }
.viewer-toolbar button {
  width: 34px; height: 34px; border-radius: 9px; color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.viewer-toolbar button:hover { background: rgba(255, 255, 255, .14); }
.viewer-toolbar button.active { background: var(--yellow); color: var(--ink); }
.viewer-toolbar .sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; }
.viewer-toolbar .sw.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .4); }
#vWidth {
  background: #2a2419; color: #fff; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px; padding: 4px 6px; font-size: 16px; outline: none;
}
.viewer-toolbar #vClose {
  background: var(--yellow); color: var(--ink); font-weight: 700; width: auto; padding: 0 14px;
}
.viewer-toolbar #vClose:hover { background: var(--yellow-deep); }

.viewer-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; }
.viewer-box { position: absolute; transform-origin: 0 0; }
.viewer-box img, .viewer-box canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.viewer-box img { -webkit-user-select: none; user-select: none; }
.viewer-box canvas { z-index: 2; }
.viewer-hint {
  position: absolute; left: 0; right: 0; bottom: 12px;
  text-align: center; font-size: 12px; color: rgba(255, 255, 255, .5);
  pointer-events: none;
}
.vtext-input {
  position: absolute; z-index: 300;
  padding: 6px 10px; min-width: 140px;
  border: 2px solid var(--yellow); border-radius: 8px;
  background: #fff; font-size: 16px; outline: none;
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .thumb-grid.bp { grid-template-columns: repeat(2, 1fr); }
  .viewer-toolbar { gap: 6px; padding: 8px; }
  .viewer-toolbar button { width: 32px; height: 32px; }
  .vname { display: none; }
}

/* ============ 设计子类目切换（顶栏） ============ */
.top-tabs { display: flex; gap: 4px; flex-shrink: 0; }
.top-tab {
  padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--muted);
  white-space: nowrap; transition: background .15s, color .15s;
}
.top-tab:hover { background: var(--yellow-soft); }
.top-tab.active { background: var(--yellow); color: var(--ink); font-weight: 600; }

/* ============ 设计页子类目：居中分段控件（内容区顶部，切换不位移） ============ */
.design-tabs {
  display: flex; justify-content: center;
  max-width: 420px; margin: 0 auto 18px;
  padding: 4px; background: #F3EDE0; border-radius: 999px;
}
.dtab {
  flex: 1 1 0; min-width: 0;
  padding: 9px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background .15s, color .15s;
  white-space: nowrap; text-align: center;
}
.dtab:hover { color: var(--ink); }
.dtab.active { background: var(--yellow); color: var(--ink); }

/* ============ 矢量图标（SVG） ============ */
svg.ic { width: 20px; height: 20px; vertical-align: -0.18em; }
.nav-ic svg { width: 20px; height: 20px; }
#catIcon svg { width: 20px; height: 20px; }
.rec-hero-ic svg { width: 28px; height: 28px; }
.rec-ic svg { width: 22px; height: 22px; }
.bill-ic svg { width: 22px; height: 22px; }
.icon-btn svg { width: 16px; height: 16px; }
.record-date svg, .bill-hero-value svg { width: 15px; height: 15px; vertical-align: -0.15em; }
.tcard-del svg { width: 14px; height: 14px; }
.link-badge svg { width: 12px; height: 12px; }
.viewer-toolbar button svg { width: 18px; height: 18px; }
.sec-title, .wptab, .wall-src label { display: inline-flex; align-items: center; gap: 6px; }

/* ============ 灵感墙 ============ */
.wall-bar { margin-bottom: 14px; }
.wall-panel {
  margin-top: 10px; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--cream);
  animation: fade .2s ease;
}
.wall-panel-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.wptab { padding: 7px 14px; border-radius: 10px; font-size: 13px; background: #F3EDE0; transition: .15s; }
.wptab.active { background: var(--yellow); font-weight: 600; }
.wall-src { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wall-hint { font-size: 12px; color: var(--muted); }
.wall-url-input {
  flex: 1; min-width: 180px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none;
}
.wall-url-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, .22);
}

/* ============ 灵感卡片（封面 + 自定义命名） ============ */
.tcard-cover { position: relative; aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
.tcard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard-cover.link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #FCEFC0, #FBEAB9);
  padding: 12px;
}
.cover-name {
  font-size: 15px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all; max-width: 100%;
}
.cover-domain {
  font-size: 11px; color: var(--muted); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-badge {
  position: absolute; right: 6px; top: 6px; font-size: 11px;
  background: rgba(255, 255, 255, .85); padding: 2px 7px; border-radius: 6px; color: var(--ink);
}
.tcard-name {
  flex: 1; min-width: 0; font-size: 16px; font-weight: 600; color: var(--ink);
  border: 1px solid transparent; border-radius: 7px; padding: 3px 6px;
  background: transparent; outline: none;
  transition: background .15s, border .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tcard-name:hover { background: var(--yellow-soft); }
.tcard-name:focus { border-color: var(--yellow); background: #fff; box-shadow: 0 0 0 2px rgba(245, 197, 66, .25); }
.tcard-name.static { cursor: default; }

/* ============ 点子（文字 + 可选配图） ============ */
.wall-src.idea { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.wall-idea-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
  font-size: 16px; line-height: 1.6; outline: none;
  resize: vertical; font-family: inherit;
}
.wall-idea-input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245, 197, 66, .22); }
.wall-idea-pics { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wall-idea-row { display: flex; align-items: center; gap: 8px; }
.wall-idea-thumb {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px;
}
.wall-idea-thumb.hidden { display: none; }
.wall-idea-thumb img { width: 64px; height: 48px; object-fit: cover; border-radius: 7px; display: block; }

/* 点子卡片 */
.tcard.idea-card { display: flex; flex-direction: column; }
.idea-card .tcard-idea-text {
  padding: 10px 12px; font-size: 13px; line-height: 1.6; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap; word-break: break-word; flex: 1;
}
.idea-card:not(.has-img) .tcard-idea-text { min-height: 78px; }
.idea-card .tcard-meta { border-top: 1px solid var(--line); }
.idea-tag {
  flex: 1; font-size: 12px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px;
}
.idea-tag svg { width: 14px; height: 14px; }

/* 点子弹层 */
.idea-modal {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(22, 18, 10, .45);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.idea-modal.open { display: flex; }
.idea-modal-box {
  width: 100%; max-width: 420px; max-height: 84vh; overflow: auto;
  background: var(--cream); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow); animation: fade .18s ease;
}
.idea-modal-head { display: flex; align-items: center; justify-content: space-between; }
.idea-modal-title { font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.idea-modal-title svg { width: 18px; height: 18px; color: var(--yellow-deep); }
.idea-modal-pic { position: relative; }
.idea-modal-pic.hidden { display: none; }
.idea-modal-pic img {
  width: 100%; max-height: 46vh; object-fit: contain;
  border-radius: 10px; background: #fff; display: block; cursor: zoom-in;
}
.idea-modal-pic-hint { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; text-align: center; }
.idea-modal-actions { display: flex; align-items: center; gap: 8px; }
.idea-modal-actions .spacer { flex: 1; }

@media (max-width: 640px) {
  .top-tab { padding: 5px 9px; font-size: 12px; }
}

/* ============ 工作台（流程清单） ============ */
.wf-add { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.wf-addbox { display: flex; gap: 8px; }
.wf-addbox .wf-input { flex: 1; }
.wf-input {
  flex: 1; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font-size: 16px; outline: none;
}
.wf-input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245,197,66,.22); }
.wf-list { display: flex; flex-direction: column; gap: 10px; }
.wf-item { display: flex; flex-direction: column; }
.wf-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: background .15s, opacity .2s;
}
.wf-row:hover { background: var(--yellow-soft); }
.wf-row.done { opacity: .55; }
.wf-check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 14px; line-height: 1;
  transition: all .15s;
}
.wf-check.checked { background: var(--yellow); border-color: var(--yellow); }
.wf-text { flex: 1; min-width: 0; font-size: 15px; color: var(--ink); word-break: break-word; }
.wf-row.done .wf-text {
  text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted);
}
.wf-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.wf-link { padding: 5px 10px; font-size: 12px; }
.wf-inline { display: flex; gap: 8px; margin: 8px 0 2px 46px; }
.wf-inline.hidden { display: none; }
.wf-inline .wf-input { flex: 1; }
.wf-sub {
  margin: 8px 0 0 20px; padding-left: 16px;
  border-left: 2px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}

/* ============ 账单：记录明细分组 ============ */
.bill-group { margin-bottom: 24px; }
.bill-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px; margin-bottom: 10px;
}
.bill-group-ic {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  background: var(--yellow-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.bill-group-ic svg { width: 18px; height: 18px; }
.bill-group-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.bill-group-total { font-weight: 700; color: var(--yellow-deep); white-space: nowrap; }

/* 表单下拉（对齐 input 风格） */
.field select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--cream); color: var(--ink); font-size: 16px; outline: none;
  -webkit-appearance: none; appearance: none;
}
.field select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, .22);
  background: #fff;
}
