/* ===== 主题变量（可被"主题色"功能改写） ===== */
:root {
  --accent: #e59ab8;          /* 主题色，默认柔粉 */
  --accent-soft: #fbeaf1;     /* 主题色的浅色底 */
  --accent-ink: #8a3d5d;      /* 主题色上的深色字 */
  --bg: #faf7f3;
  --card: #ffffff;
  --ink: #3a3630;
  --muted: #8f887e;
  --line: #ece7df;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(120, 100, 90, 0.08);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶部导航 ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.brand-emoji { font-size: 20px; line-height: 1; }
.brand-logo { height: 30px; width: auto; max-width: 160px; border-radius: 8px; object-fit: contain; display: block; }
.brand-preview {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 19px; font-weight: 500; letter-spacing: 0.5px;
  padding: 10px 14px; margin-top: 6px;
  background: var(--surface, #fff); border: 1px solid var(--line, #eee); border-radius: 12px;
}

.tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.tab {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--ink); background: var(--accent-soft); }
.tab.active {
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-weight: 500;
}

/* 顶部「更多」下拉 */
.tab-more { position: relative; }
.more-btn { cursor: pointer; font-family: var(--font); background: transparent; border: none; }
.more-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; z-index: 40; min-width: 132px;
  display: none; flex-direction: column; gap: 2px;
}
.more-menu.open { display: flex; }
.more-menu .tab { border-radius: 8px; }

/* 手机版汉堡按钮：默认（电脑版）隐藏 */
.nav-toggle {
  display: none;
  background: transparent; border: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--ink);
  padding: 4px 8px; border-radius: 10px;
}
.nav-toggle:hover { background: var(--accent-soft); }

/* ===== 内容区 ===== */
.view {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 22px 60px;
  animation: fade 0.25s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 16px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.view-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.view-toggle-label { color: var(--muted); font-size: 12px; padding: 0 6px 0 8px; }
.view-toggle button {
  background: transparent; border: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; color: var(--muted);
  padding: 5px 12px; border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.view-toggle button:hover { color: var(--ink); }
.view-toggle button.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 500;
}
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.section-title {
  font-size: 22px;
  font-weight: 500;
  margin: 4px 0 20px;
}

/* ===== 个人主页 ===== */
.profile-head {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.avatar-wrap { position: relative; cursor: pointer; flex: none; }
.avatar-frame-img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 138%; height: 138%; object-fit: contain; pointer-events: none; z-index: 2; }
.avatar-wrap .edit-badge { z-index: 3; }
.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-soft);
  background: var(--accent-soft);
  display: block;
}
.avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  font-size: 30px;
}
.avatar-wrap .edit-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
  box-shadow: var(--shadow);
}

/* 接稿状态牌 + 公告栏 */
.status-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.status-badge { font-size: 13px; font-weight: 500; padding: 5px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; user-select: none; }
.ann-icon { font-size: 14px; }
.announcement-input { flex: 1; min-width: 160px; border: none; border-bottom: 1px dashed var(--line); border-radius: 0; padding: 6px 2px; background: transparent; font-size: 14px; }
.announcement-input:focus { border-bottom-color: var(--accent); }

/* 成就 / 里程碑 */
.ach-row { padding: 10px 0; border-top: 1px solid var(--line); }
.ach-row:first-of-type { border-top: none; }
.ach-label { font-size: 14px; font-weight: 500; margin-bottom: 7px; }
.ach-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ach-chip { font-size: 12px; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.ach-chip.done { background: #fbefdc; color: #8a5b1d; font-weight: 500; }
.ach-chip.locked { background: #f1efe8; color: #8f887e; }

/* ===== 主页皮肤：淡淡的装饰花纹层 + 选择器 ===== */
#skin-decor { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05; background-repeat: repeat; }
.skin-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.skin-opt { cursor: pointer; text-align: center; padding: 8px; border-radius: 12px; border: 2px solid transparent; }
.skin-opt:hover { background: var(--accent-soft); }
.skin-opt.active { border-color: var(--accent); background: var(--accent-soft); }
.skin-swatch { position: relative; width: 76px; height: 56px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 5px; }
.skin-dot { width: 16px; height: 16px; border-radius: 50%; }
.skin-emoji { position: absolute; top: 3px; right: 4px; font-size: 14px; }
.skin-name { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ===== 头像框 ===== */
.avatar-wrap.mini { width: auto; }
.avatar-wrap.mini .avatar { width: 46px; height: 46px; border-width: 3px; font-size: 18px; }
/* 边框环 */
.frame-gold .avatar { border-color: #e5b06a; box-shadow: 0 0 0 3px #fbefdc; }
.frame-mint .avatar { border-color: #7fc7b0; box-shadow: 0 0 0 3px #e4f5ee; }
.frame-rainbow .avatar { border-color: #e58f8f; box-shadow: 0 0 0 3px #e5b06a, 0 0 0 6px #7fc7b0, 0 0 0 9px #8fb4e5; }
.frame-star .avatar { border-color: #b39ae5; box-shadow: 0 0 12px rgba(179, 154, 229, 0.6); }
.frame-sakura .avatar { border-color: #ed93b1; }
.frame-heart .avatar { border-color: #f4c0d1; }
.frame-crown .avatar { border-color: #e5b06a; }
/* 角标 emoji（统一放右上角） */
.frame-star::after, .frame-sakura::after, .frame-heart::after, .frame-crown::after {
  position: absolute; top: -4px; right: -4px; font-size: 22px; line-height: 1; z-index: 3; pointer-events: none;
}
.frame-star::after { content: "✨"; }
.frame-sakura::after { content: "🌸"; }
.frame-heart::after { content: "💗"; }
.frame-crown::after { content: "👑"; }
.avatar-wrap.mini.frame-star::after, .avatar-wrap.mini.frame-sakura::after, .avatar-wrap.mini.frame-heart::after, .avatar-wrap.mini.frame-crown::after {
  font-size: 14px; top: -3px; right: -3px;
}
/* 头像框选择器 */
.frame-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.frame-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; padding: 10px 8px 6px; border-radius: 12px; border: 2px solid transparent; }
.frame-opt:hover { background: var(--accent-soft); }
.frame-opt.active { border-color: var(--accent); background: var(--accent-soft); }
.frame-opt-label { font-size: 12px; color: var(--muted); }

.profile-meta { flex: 1; min-width: 220px; }
.profile-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-name { font-size: 24px; font-weight: 500; margin: 0; }
.signature { color: var(--muted); margin: 8px 0 0; white-space: pre-wrap; }

/* 标签 */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-chip {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag-chip .x { cursor: pointer; opacity: 0.6; }
.tag-chip .x:hover { opacity: 1; }

/* 主题色选择 */
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; border: 3px solid transparent;
  transition: transform 0.12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.active { border-color: var(--ink); }

/* ===== 表单控件 ===== */
input[type="text"], textarea {
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  width: 100%;
  background: #fff;
  outline: none;
}
input[type="text"]:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 72px; }

.field-label { font-size: 13px; color: var(--muted); display: block; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
  font-family: var(--font);
  font-size: 14px;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(0.95); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent); }
.btn-sm { padding: 5px 13px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.hint.warn { color: #b8683f; }

/* ===== 即将上线的占位区 ===== */
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 14px;
  color: var(--ink);
}
.soon {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  background: #fffdfa;
}
.soon h3 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.soon p { margin: 0; color: var(--muted); font-size: 14px; }
.soon .badge {
  display: inline-block;
  font-size: 11px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 8px;
  vertical-align: middle;
}

.hidden { display: none !important; }

/* ===== 子导航高亮 ===== */
.pill { text-decoration: none; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.pill:hover { border-color: var(--accent); }
.pill.active { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; font-weight: 500; }

/* ===== 表单：下拉框、价格区间 ===== */
select.select {
  font-family: var(--font); font-size: 15px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  width: 100%; background: #fff; outline: none;
}
select.select:focus { border-color: var(--accent); }
.range-dash { color: var(--muted); align-self: flex-end; padding-bottom: 9px; }

/* ===== 稿价：业务卡片 ===== */
.svc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.svc-price { color: var(--accent-ink); font-weight: 500; margin-top: 4px; }

.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.gallery-cell { position: relative; width: 108px; height: 108px; }
.gallery-cell .img-del {
  position: absolute; top: -6px; right: -6px; z-index: 3;
  background: #fff; color: #b8683f; border: 1px solid var(--line);
  border-radius: 999px; width: 22px; height: 22px; line-height: 20px; text-align: center;
  font-size: 12px; cursor: pointer; box-shadow: var(--shadow);
}

/* 例图防护：图片 + 透明遮罩挡住右键/拖拽/长按 */
.img-guard { position: relative; width: 100%; height: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.img-guard img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  -webkit-touch-callout: none; pointer-events: none;
}
.img-watermark { position: absolute; inset: 0; z-index: 1; pointer-events: none; background-repeat: repeat; }
.wm-preview { height: 96px; border-radius: 10px; border: 1px solid var(--line); background-color: var(--accent-soft); background-repeat: repeat; }
.img-guard-overlay { position: absolute; inset: 0; z-index: 2; background: transparent; }

/* ===== 排单队列 ===== */
.booking {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.booking:last-child { border-bottom: none; }
.booking.done { opacity: 0.62; }
.booking-main { flex: 1; min-width: 200px; }
.booking-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.booking-name { font-size: 16px; font-weight: 500; }
.booking-meta { color: var(--ink); font-size: 14px; margin-top: 4px; }
.booking-dates { color: var(--muted); font-size: 13px; margin-top: 3px; }
.booking-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge-done { background: #e4f5ee; color: #2f6e56; }

/* 截稿倒计时 */
.cd { font-size: 12px; padding: 2px 9px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.cd-ok { background: #e4f5ee; color: #2f6e56; }
.cd-warn { background: #fbefdc; color: #8a5b1d; }
.cd-over { background: #fbe8e8; color: #8a3535; }

/* 进度节点 草稿→精草→勾线→成图 */
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.step {
  font-family: var(--font); font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 4px 12px; position: relative;
}
.step:hover { border-color: var(--accent); }
.step.reached { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.step.current { background: var(--accent); color: #fff; font-weight: 500; }

/* ===== 月历 ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-size: 16px; font-weight: 500; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekday { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-cell {
  min-height: 64px; border: 1px solid var(--line); border-radius: 8px; padding: 4px;
  cursor: pointer; background: #fff; transition: border-color 0.12s, background 0.12s;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-cell:hover { border-color: var(--accent); }
.cal-cell.empty { border: none; background: transparent; cursor: default; }
.cal-cell.today { border-color: var(--accent); background: var(--accent-soft); }
.cal-cell.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.cal-num { font-size: 12px; color: var(--muted); }
.cal-chip {
  font-size: 11px; background: var(--accent); color: #fff; border-radius: 5px;
  padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-chip.chip-done { background: #9ec9b6; }
.cal-more { font-size: 10px; color: var(--muted); }

/* ===== 分段按钮（稿件类型） ===== */
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
  font-family: var(--font); font-size: 14px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.seg-btn:hover { border-color: var(--accent); }
.seg-btn.active { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; font-weight: 500; }

/* ===== 类型标签 ===== */
.type-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.tag-normal { background: var(--accent-soft); color: var(--accent-ink); }
.tag-squeeze { background: #fbefdc; color: #8a5b1d; }
.tag-rush { background: #fbe8e8; color: #8a3535; }
.tag-custom { background: #efeafb; color: #4f3d8a; }

/* ===== 计算器结果 ===== */
.calc-result {
  margin-top: 14px; padding: 12px 14px; background: var(--accent-soft);
  color: var(--accent-ink); border-radius: 10px; font-size: 15px; line-height: 1.6;
}

/* ===== 作品橱窗（相册分组） ===== */
.album-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.album-name-input {
  font-size: 17px; font-weight: 500; flex: 1; min-width: 120px;
  border: none; border-bottom: 1px dashed var(--line); background: transparent; padding: 3px 2px;
}
.album-name-input:focus { outline: none; border-bottom-color: var(--accent); }
.album-count { font-size: 13px; color: var(--muted); }
.album-ops { display: flex; gap: 6px; margin-left: auto; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.work-cell { border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.work-img { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--accent-soft); }
.work-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-cell input, .work-cell select { width: 100%; box-sizing: border-box; margin-top: 6px; font-size: 13px; }
.work-move { margin-top: 6px; }
.work-del { width: 100%; margin-top: 8px; }

/* ===== 好友（演示） ===== */
.friend-ava { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.friend-ava.big { width: 60px; height: 60px; font-size: 32px; }
.friend-handle { color: var(--muted); font-size: 13px; margin-left: 6px; }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 12px; }
.friend-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center; cursor: pointer; transition: border-color 0.15s; }
.friend-card:hover { border-color: var(--accent); }
.friend-card .friend-handle { display: block; margin: 2px 0 0; }
.friend-name { font-weight: 500; margin-top: 8px; }
.status-pill { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; margin-top: 6px; }
.status-pill.s-open { background: #e3f3e8; color: #3a7d54; }
.status-pill.s-full { background: #faf0da; color: #98741a; }
.status-pill.s-paused { background: #eeeeee; color: #888888; }
.chat-wrap { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; padding: 6px 2px; }
.chat-msg { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.chat-msg.them { align-self: flex-start; background: rgba(0, 0, 0, 0.05); border-bottom-left-radius: 4px; }
.chat-msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.ava-wrap { position: relative; display: inline-block; flex: none; }
.online-dot { position: absolute; bottom: 1px; right: 1px; width: 12px; height: 12px; border-radius: 50%; background: #5bc07a; border: 2px solid var(--card); }
.feed-art { width: 100%; height: 180px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 64px; margin-top: 12px; }
.feed-actions { display: flex; gap: 18px; align-items: center; margin-top: 12px; }
.feed-btn { background: none; border: none; cursor: pointer; font-size: 15px; color: var(--ink); padding: 4px 0; font-family: var(--font); }
.feed-btn.muted { color: var(--muted); cursor: default; }
.feed-btn.liked { color: #e0607e; }
.feed-comments { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.feed-comment { font-size: 14px; line-height: 1.5; }
.presence-preview { margin-top: 6px; padding: 10px 14px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
.online-dot-inline { width: 10px; height: 10px; border-radius: 50%; background: #5bc07a; display: inline-block; flex: none; }

/* ===== 弹窗 / 免责声明 ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(45, 32, 42, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.modal-box {
  background: var(--card); border-radius: 16px;
  max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto;
  padding: 24px 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}
.modal-title { margin: 0 0 14px; font-size: 19px; font-weight: 500; }
.disclaimer-text {
  white-space: pre-wrap; font-size: 14px; line-height: 1.75; color: var(--ink);
  background: var(--accent-soft); border-radius: 12px; padding: 14px 16px;
  max-height: 42vh; overflow-y: auto;
}
.disclaimer-edit { width: 100%; min-height: 240px; box-sizing: border-box; font-size: 14px; line-height: 1.7; }
.disclaimer-confirm-lead { margin: 18px 0 10px; font-weight: 500; font-size: 15px; }
.disc-radio { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; margin: 8px 0; cursor: pointer; }
.disc-radio input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.foot-link { color: var(--muted); font-size: 13px; text-decoration: underline; }
.foot-link:hover { color: var(--accent-ink); }

/* ===== 计算器档位设置 ===== */
.tier-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.tier-row > input:first-child { flex: 1; min-width: 0; }
.tier-mult { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.tier-x { color: var(--muted); font-size: 15px; }
.type-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.type-row > input:first-child { flex: 1; min-width: 130px; }
.nav-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.nav-row-tag { font-size: 12px; color: var(--muted); flex: none; min-width: 42px; text-align: right; }

/* ===== 收支统计图 ===== */
.chart-wrap { margin-top: 14px; }
.chart-svg { width: 100%; height: auto; max-width: 640px; display: block; margin: 0 auto; }
.chart-legend { display: flex; gap: 20px; justify-content: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.cl-item { display: inline-flex; align-items: center; gap: 6px; }
.cl-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* ===== 自定义补偿 / 退款规则 ===== */
.rule-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule-row:last-of-type { border-bottom: none; }
.rule-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.rule-fields .field { flex: 1; min-width: 150px; margin: 0; }
.rule-fields .field input { width: 100%; box-sizing: border-box; }
.rule-fields .pct-field { flex: none; }
.rule-fields .pct-field input { width: 72px; }
.rule-ops { display: flex; gap: 8px; margin-top: 10px; }

/* ===== 月历图例 + 按类型上色 ===== */
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot-normal, .cal-chip.chip-normal { background: var(--accent); }
.dot-squeeze, .cal-chip.chip-squeeze { background: #e5b06a; }
.dot-rush, .cal-chip.chip-rush { background: #e58f8f; }
.dot-custom, .cal-chip.chip-custom { background: #b39ae5; }
.dot-done, .cal-chip.chip-done { background: #9ec9b6; }

/* ===== 财务 ===== */
.fin-hero { background: linear-gradient(0deg, var(--card), var(--card)); }
.fin-summary { display: flex; gap: 12px; flex-wrap: wrap; }
.fin-stat {
  flex: 1; min-width: 120px; text-align: center;
  background: var(--surface, #faf8f5); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 10px;
}
.fin-val { font-size: 22px; font-weight: 500; }
.fin-summary.big .fin-val { font-size: 28px; }
.fin-val.pos { color: #2f6e56; }
.fin-val.neg { color: #b8683f; }
.fin-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

.rec {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.rec:last-child { border-bottom: none; }
.rec-main { flex: 1; min-width: 0; }
.rec-title { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rec-amt { font-size: 16px; font-weight: 500; white-space: nowrap; }
.rec-amt.pos { color: #2f6e56; }
.rec-amt.neg { color: #b8683f; }
.exp-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.exp-preview { display: inline-flex; }

/* ===== 支付方式（个人主页） ===== */
.pay-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pay-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-soft); border-radius: 10px; padding: 8px 14px;
}
.pay-name { font-weight: 500; color: var(--accent-ink); }
.pay-note { color: var(--muted); font-size: 13px; flex: 1; }
.pay-item .x { cursor: pointer; opacity: 0.55; color: var(--accent-ink); }
.pay-item .x:hover { opacity: 1; }

/* ===== 主页封面 / 背景图 ===== */
.cover {
  position: relative; height: 180px; border-radius: 16px; margin-bottom: 20px;
  background-size: cover; background-position: center; background-color: var(--accent-soft);
  border: 1px solid var(--line);
}
.cover.empty {
  display: flex; align-items: center; justify-content: center;
  border-style: dashed;
}
.cover-btns { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.cover-sticker { position: absolute; font-size: 30px; line-height: 1; z-index: 2; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18)); }
.sticker-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.sticker-btn { font-size: 22px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 4px 9px; cursor: pointer; line-height: 1; }
.sticker-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.sticker-btn.active { border-color: var(--accent); background: var(--accent-soft); }

/* ===== OC 设定包 ===== */
.pack-frame { overflow: hidden; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.pack-scale { transform-origin: top left; width: 1080px; }
.pack { width: 1080px; position: relative; padding: 64px 72px; box-sizing: border-box; font-family: var(--font); }
.pack-head { text-align: center; margin-bottom: 26px; }
.pack-avatar { width: 300px; height: 300px; border-radius: 26px; object-fit: cover; border: 8px solid #fff; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.14); }
.pack-basic { margin-bottom: 30px; }
.pack-name { font-size: 60px; font-weight: 500; text-align: center; }
.pack-meta { font-size: 30px; color: #8a8a8a; text-align: center; margin-top: 10px; }
.pack-block { margin: 34px 0; }
.pack-h { font-size: 36px; font-weight: 500; margin-bottom: 18px; border-left: 10px solid; padding-left: 18px; }
.pack-text { font-size: 30px; line-height: 1.7; white-space: pre-wrap; }
.pack-chips { display: flex; flex-wrap: wrap; gap: 14px; }
.pack-chip { font-size: 28px; padding: 8px 24px; border: 3px solid; border-radius: 999px; }
.pack-palette { display: flex; flex-wrap: wrap; gap: 22px; }
.pack-swatch { text-align: center; }
.pack-color { width: 120px; height: 86px; border-radius: 16px; border: 1px solid rgba(0, 0, 0, 0.08); }
.pack-hex { font-size: 24px; margin-top: 8px; font-family: var(--font-mono, monospace); }
.pack-cname { font-size: 22px; color: #9a9a9a; }
.pack-quote { font-size: 30px; margin: 12px 0; }
.pack-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.pack-gcell { width: 306px; }
.pack-gcell img { width: 306px; height: 306px; object-fit: cover; border-radius: 16px; }
.pack-glabel { font-size: 24px; text-align: center; margin-top: 8px; color: #8a8a8a; }
.pack-sticker { position: absolute; font-size: 60px; line-height: 1; z-index: 2; }
.cover:not(.empty) .cover-btns .btn { background: rgba(255, 255, 255, 0.9); }
.cover.empty .cover-btns { position: static; }

/* ===== 约稿须知 ===== */
.terms-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.mt-note {
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.term-sec .term-title { margin-bottom: 12px; }
.term-text { white-space: pre-wrap; line-height: 1.8; margin-bottom: 12px; }
.term-text:last-child { margin-bottom: 0; }
.term-sec.disclaimer {
  border: 1.5px solid var(--border-accent, #e8b3c6); background: #fff7fa;
}
.term-sec.disclaimer .term-title { color: #b8683f; }
.term-sec.disclaimer .term-text { color: #7a4a55; }

.term-table-wrap { overflow-x: auto; margin: 6px 0 12px; }
.term-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.term-table th, .term-table td {
  border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top;
}
.term-table th { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.term-table.edit input {
  border: none; padding: 4px 6px; width: 100%; min-width: 90px; background: transparent;
}
.term-table.edit input:focus { background: #fff; outline: 1px solid var(--accent); border-radius: 4px; }
.term-table .x { cursor: pointer; opacity: 0.5; margin-left: 4px; }
.term-table .x:hover { opacity: 1; color: #b8683f; }

.edit-block {
  border-left: 3px solid var(--line); padding-left: 12px; margin: 12px 0;
  border-radius: 0;
}

/* ===== 底部同意 / 免责声明 ===== */
.agree-card { border: 1.5px solid var(--border-accent, #e8b3c6); }
.agree-opts { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.agree-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.5; }
.agree-row input { margin-top: 4px; flex: none; width: 17px; height: 17px; accent-color: var(--accent); }

/* ===== 装饰页：更大的背景色块 + 组件预览 ===== */
.swatch.big { width: 44px; height: 44px; }
.bg-swatches .swatch { border: 3px solid var(--line); }
.bg-swatches .swatch.active { border-color: var(--ink); }

.preview-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.preview-item:last-child { border-bottom: none; }
.preview-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

/* ===== OC 页面 ===== */
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.oc-card { padding: 12px; margin: 0; cursor: pointer; text-align: center; transition: border-color 0.12s, transform 0.12s; }
.oc-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.oc-avatar { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: var(--accent-soft); display: block; }
.oc-avatar.placeholder { display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--accent-ink); }
.oc-card-name { font-weight: 500; margin-top: 8px; }
.oc-card-meta { font-size: 12px; color: var(--muted); }

.back-link { display: inline-block; cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.back-link:hover { color: var(--accent-ink); }

.oc-detail-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.oc-detail-avatar { width: 120px; height: 120px; border-radius: 16px; object-fit: cover; background: var(--accent-soft); border: 3px solid var(--accent-soft); display: block; }
.oc-detail-avatar.placeholder { display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--accent-ink); }
.oc-detail-fields { flex: 1; min-width: 200px; }
.oc-ref { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* 作品图库卡片 */
.art-card { padding: 10px; margin: 0; }
.art-img { width: 100%; aspect-ratio: 1 / 1; }
.art-img .oc-ref { border-radius: 8px; }

/* 配色板 */
.pal-swatches { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.pal-swatch { position: relative; width: 84px; text-align: center; }
.pal-chip { width: 84px; height: 60px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.pal-hex { font-size: 12px; font-family: var(--font-mono, monospace); margin-top: 4px; color: var(--ink); }
.pal-name { font-size: 12px; color: var(--muted); }
.pal-swatch .x { position: absolute; top: -6px; right: -6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; width: 20px; height: 20px; line-height: 18px; font-size: 11px; cursor: pointer; color: #b8683f; box-shadow: var(--shadow); }
.pal-input { width: 54px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }

/* 资料库 / CP 墙 卡片 */
.lore-card, .pair-card { padding: 14px; margin: 0; }
.lore-img { width: 100%; aspect-ratio: 4 / 3; margin-bottom: 8px; }
.lore-img .oc-ref { border-radius: 8px; }
.lore-term { font-size: 16px; font-weight: 500; }
.pair-members { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pair-member { text-align: center; width: 52px; }
.pair-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); }
.pair-av.placeholder { display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--accent-ink); }
.pair-name { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 角色详情小头部 */
.oc-mini-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.oc-mini-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); }
.oc-mini-av.placeholder { display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--accent-ink); }
.oc-mini-name { font-size: 18px; font-weight: 500; }

/* 时间线事件 */
.tl-event { transition: border-color 0.12s; }
.tl-event:hover { border-color: var(--accent); }
.tl-title { font-size: 18px; font-weight: 500; }
.tl-label { font-size: 13px; color: var(--accent-ink); margin-top: 2px; }

/* ===== 使用教程 ===== */
.tut-card { padding: 0; overflow: hidden; }
.tut-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; user-select: none; }
.tut-head:hover { background: var(--accent-soft); }
.tut-icon { font-size: 20px; }
.tut-title { flex: 1; font-size: 16px; font-weight: 500; }
.tut-arrow { color: var(--muted); font-size: 14px; }
.tut-list { margin: 0; padding: 0 24px 18px 40px; }
.tut-list li { margin: 8px 0; line-height: 1.7; }

/* ===== 搜索 ===== */
.search-cats { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.search-cat { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.search-cat input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ===== 人物关系网画布 ===== */
.graph-canvas {
  position: relative; width: 100%; height: 440px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, #fff);
  overflow: hidden; touch-action: none;
}
.graph-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.graph-edge { stroke: var(--accent); stroke-width: 2; opacity: 0.75; }
.graph-edge-label { fill: var(--accent-ink); font-size: 12px; font-family: var(--font); }
.graph-node {
  position: absolute; transform: translate(-50%, -50%); width: 76px;
  display: flex; flex-direction: column; align-items: center;
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none;
}
.graph-node:active { cursor: grabbing; }
.graph-av {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent-soft); background: var(--accent-soft); pointer-events: none;
}
.graph-av.placeholder { display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--accent-ink); }
.graph-name {
  font-size: 12px; margin-top: 4px; max-width: 84px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.75); border-radius: 6px; padding: 1px 6px; pointer-events: none;
}

/* 关系条目（含彼此看法） */
.rel-item { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.rel-title { font-size: 15px; font-weight: 500; }

/* 视角模式：中心角色更大更醒目 */
.graph-node.center { z-index: 2; }
.graph-node.center .graph-av { width: 72px; height: 72px; border-color: var(--accent); border-width: 4px; }
.graph-node.center .graph-name { font-weight: 500; background: var(--accent-soft); color: var(--accent-ink); }

/* 时间线对比：横向并排的列 */
.compare-cols { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.compare-col {
  flex: 0 0 260px; min-width: 260px;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--card);
}
.compare-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.compare-event { border-top: 1px solid var(--line); padding: 10px 0; }
.compare-event:first-of-type { border-top: none; }

/* ===== 装饰：背景图缩略 ===== */
.bg-thumb-wrap { margin-top: 12px; }
.bg-thumb { width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ===== 名片 ===== */
.namecard-head { display: flex; align-items: center; gap: 14px; }
.namecard-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-soft); background: var(--accent-soft); }
.namecard-av.placeholder { display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--accent-ink); }
.namecard-name { font-size: 18px; font-weight: 500; }
.namecard-label { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ===== 对外作品集 ===== */
.pf-header { display: flex; align-items: center; gap: 16px; }
.pf-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-soft); background: var(--accent-soft); flex: none; }
.pf-avatar.placeholder { display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--accent-ink); }
.pf-name { font-size: 22px; font-weight: 500; }
.pf-service { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pf-service:last-child { border-bottom: none; }
.pf-service-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-service-name { font-size: 16px; font-weight: 500; }

/* ===== 动态 / 图文笔记 ===== */
.post-time { font-size: 12px; color: var(--muted); }
.post-text { white-space: pre-wrap; line-height: 1.7; margin-top: 6px; }
.post-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.post-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ===== 数据看板：每月完稿条形 ===== */
.dash-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.dash-month { width: 66px; font-size: 13px; color: var(--muted); flex: none; }
.dash-bar-track { flex: 1; background: var(--accent-soft); border-radius: 999px; height: 14px; overflow: hidden; }
.dash-bar { height: 100%; background: var(--accent); border-radius: 999px; min-width: 3px; }
.dash-count { width: 46px; text-align: right; font-size: 13px; flex: none; }

@media (max-width: 560px) {
  .cal-cell { min-height: 52px; }
  .cal-chip { font-size: 10px; }
}

/* ============================================================
   手机版布局：由 <html class="is-mobile"> 触发（自动或手动切换）
   ============================================================ */
html.is-mobile .topbar { padding: 12px 16px; gap: 10px; }
html.is-mobile .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
html.is-mobile .brand { font-size: 17px; }
html.is-mobile .brand-logo { height: 26px; }

/* 顶部导航收成一个下拉抽屉 */
html.is-mobile .tabs {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
  display: none; flex-direction: column; align-items: stretch; justify-content: flex-start;
  gap: 2px; padding: 8px; margin: 0;
  background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
html.is-mobile .tabs.open { display: flex; }
html.is-mobile .tab { font-size: 16px; padding: 12px 14px; border-radius: 10px; }
/* 「更多」里的工具页在手机抽屉里直接平铺展开 */
html.is-mobile .tab-more { position: static; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
html.is-mobile .more-btn { display: none; }
html.is-mobile .more-menu {
  position: static; display: flex; flex-direction: column; gap: 2px;
  box-shadow: none; border: none; border-radius: 0; padding: 0; min-width: 0;
}

/* 内容区在小屏幕上的留白 / 字号 */
html.is-mobile .view { padding: 20px 16px 48px; }
html.is-mobile .section-title { font-size: 20px; margin-bottom: 16px; }
html.is-mobile .card { padding: 18px 16px; border-radius: 16px; }
/* 表单控件更好点：加大点击区、输入框铺满一行 */
html.is-mobile input[type="text"],
html.is-mobile input[type="number"],
html.is-mobile input[type="date"],
html.is-mobile textarea,
html.is-mobile select { font-size: 16px; }
html.is-mobile .field input,
html.is-mobile .field textarea { width: 100%; box-sizing: border-box; }
html.is-mobile .btn { padding: 10px 16px; }
html.is-mobile .btn-sm { padding: 8px 14px; font-size: 14px; }

/* 首页 · 精选作品橱窗 */
.home-work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.home-work-cell { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #f0ece6; cursor: pointer; }
.home-work-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-work-cell:hover { opacity: 0.92; }
.home-work-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 8px; font-size: 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 首页 · 编辑主页折叠开关 */
.edit-toggle { text-align: left; font-weight: 600; }

/* 轻提示 toast */
#toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  max-width: 86vw; padding: 10px 16px; border-radius: 12px; font-size: 14px; color: #fff; background: #4a4a52;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18); opacity: 0; transform: translateY(10px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #4b9e7f; }
.toast-error { background: #cf6b7f; }

/* 好友卡片上的操作按钮（主页 / 私信 / 删除）*/
.friend-card-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: center; }

/* 私信 · 会话列表 */
.conv-row { border-bottom: 1px solid var(--line, #ececec); }
.conv-main { display: flex; align-items: center; gap: 12px; padding: 10px 4px; cursor: pointer; border-radius: 10px; }
.conv-main:hover { background: rgba(0,0,0,0.03); }
.conv-info { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.conv-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 12px; color: var(--muted, #999); flex-shrink: 0; }
.conv-preview { font-size: 13px; color: var(--muted, #999); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv-foot { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 0 4px 6px; }
.conv-ops { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.conv-menu-btn { line-height: 1; }
/* 私信 · 对话工具条 */
.chat-toolbar { background: rgba(0,0,0,0.03); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
/* 私信 · 已撤回的消息（墓碑）*/
.chat-msg.recalled { background: transparent !important; color: var(--muted, #9a9a9a); font-size: 12px; font-style: italic; text-align: center; align-self: center; box-shadow: none; padding: 4px 0; }
.chat-msg.recallable { cursor: pointer; }
/* 群消息：发送者名字 */
.gmsg-sender { font-size: 11px; color: var(--muted, #9a9a9a); margin-bottom: 3px; }
/* 群公告横幅 */
.group-announce { background: #fff7e6; border: 1px solid #ffe0a3; color: #8a5b1d; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; line-height: 1.5; }
/* 群成员管理列表 */
.gmember-list { display: flex; flex-direction: column; gap: 4px; }
.gmember-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line, #f0f0f0); }
.gmember-name { flex: 1; min-width: 120px; }
.gmember-role { font-size: 11px; color: var(--accent-ink, #7a6cff); margin-left: 6px; background: rgba(122,108,255,0.12); padding: 1px 7px; border-radius: 8px; }
.gmember-ops { display: flex; flex-wrap: wrap; gap: 4px; }
.gmember-title { font-size: 11px; color: #8a5b1d; margin-left: 6px; background: #fbefdc; padding: 1px 7px; border-radius: 8px; }
.group-welcome { background: #eaf6ef !important; border-color: #bfe3cd !important; color: #2f6e56 !important; }
/* 群话题墙 */
.topic-card { border: 1px solid var(--line, #ececec); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.topic-title { font-weight: 600; font-size: 15px; }
.topic-content { margin: 6px 0 0; white-space: pre-wrap; color: var(--ink, #333); }
.topic-del { font-size: 12px; color: var(--muted, #999); cursor: pointer; flex-shrink: 0; }
.topic-del:hover { color: #c0576e; }
/* 聊天排版：每条消息 = 气泡 + 时间，清楚对齐 */
.chat-line { display: flex; flex-direction: column; max-width: 82%; }
.chat-line.me { align-self: flex-end; align-items: flex-end; }
.chat-line.them { align-self: flex-start; align-items: flex-start; }
.chat-line.them.group { flex-direction: row; align-items: flex-start; gap: 8px; max-width: 92%; }
.chat-them-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.chat-ava-sm { width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; margin-top: 15px; }
.chat-line .chat-msg { max-width: 100%; align-self: auto; }
.chat-time { font-size: 10px; color: var(--muted, #b3b3b3); margin-top: 3px; padding: 0 3px; }

/* 头像裁剪弹窗 */
.crop-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.crop-panel { background: var(--card, #fff); border-radius: 16px; padding: 20px; max-width: 340px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.crop-area { position: relative; margin: 8px auto 0; overflow: hidden; background: #e8e4de; border-radius: 12px; cursor: grab; touch-action: none; user-select: none; }
.crop-area.circle { border-radius: 50%; }
.crop-area:active { cursor: grabbing; }
.crop-img { position: absolute; top: 0; left: 0; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }

/* 新手引导卡片 */
.onboard-card { background: #eef4ff; border: 1px solid #cfdcfb; }

/* 陌生人落地页 */
.landing-hero { text-align: center; padding: 28px 12px 20px; }
.landing-logo { font-size: 52px; line-height: 1; }
.landing-title { font-size: 26px; margin: 12px 0 6px; }
.landing-sub { color: var(--muted, #8a8a8a); margin: 0; font-size: 15px; }
.landing-list { list-style: none; padding: 0; margin: 8px 0 0; line-height: 2; }
.landing-list li::before { content: "· "; color: var(--muted, #b0b0b0); }
.landing-warn { background: #fff7e6; border: 1px solid #ffe0a3; color: #8a5b1d; }
.landing-warn h2 { color: #8a5b1d; }
.landing-cta { display: flex; justify-content: center; gap: 10px; margin: 18px 0 8px; }

/* 作品集：删除按钮 */
.art-del { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(0,0,0,0.5); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.art-del:hover { background: #c0576e; }

/* 导航红点（好友申请 / 未读私信 数量）*/
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; margin-left: 5px; border-radius: 9px;
  background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle;
}
