:root {
  --bg: #fbf7f5;
  --bg-deep: #eee4df;
  --surface: #ffffff;
  --surface-2: #f7ece8;
  --surface-3: #f9f2ee;

  --line: #eadbd3;
  --line-strong: #dbc6bb;

  --text: #2a1f29;
  --text-soft: #5b4a55;
  --muted: #877179;

  --brand: #b66a78;
  --brand-strong: #8f4d5b;
  --brand-soft: #f1d7dd;
  --brand-soft-2: #f8e9ed;

  --amber: #f08a3c;
  --amber-soft: #ffe8d4;

  --mint: #2eb88a;
  --mint-soft: #d8f3e6;

  --blue: #5a7bff;
  --blue-soft: #e7ecff;

  --lilac: #a26bff;
  --lilac-soft: #efe6ff;

  --red: #a94f5f;
  --red-soft: #f3dbe0;

  --shadow-sm: 0 2px 8px rgba(128, 82, 78, 0.06);
  --shadow: 0 8px 24px rgba(128, 82, 78, 0.10);
  --shadow-lg: 0 16px 44px rgba(128, 82, 78, 0.14);

  --radius-card: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-pop: cubic-bezier(0.18, 0.95, 0.28, 1.18);
  --motion-fast: 140ms;
  --motion-med: 240ms;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.login-form label {
  display: block;
}

.login-form label > input {
  width: 100%;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 0% -10%, #f8e6de 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 5%, #f2dbe1 0%, transparent 60%),
    var(--bg-deep);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", Inter, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 整页切换只做轻微位移，不再淡透明度 —— 避免文字在过渡中被读成灰色，
   淡入交给下面的卡片逐张错位完成（staggered reveal）。 */
@keyframes page-in {
  from { transform: translateY(7px); }
  to { transform: translateY(0); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dock-in {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* 浮窗从输入框上沿「长出来」：带轻微回弹，origin 在底部中心 */
@keyframes chat-panel-in {
  0% { opacity: 0; transform: translateY(18px) scale(0.94); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 收起：回缩进输入框 */
@keyframes chat-panel-out {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(12px) scale(0.96); }
}

@keyframes badge-pop {
  0% { transform: scale(0.82); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.mini-app {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: hidden;
  padding: 18px 16px 168px;
  /* flex 列：让 main 撑开、footer 钉到底部，避免内容少时 footer 浮在半空、
     和悬浮的对话入口重叠（桌面 1024+ 会覆盖成 grid 布局，不受影响） */
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 1 auto;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 16px;
}

.app-header > .header-title {
  flex: 1;
  min-width: 0;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.sync-status {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--brand-soft-2);
  color: var(--brand-strong);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.sync-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

.sync-status[data-state="syncing"]::before { animation: status-pulse 1s ease-in-out infinite; }
.sync-status[data-state="pending"] { color: #8b6a28; background: #f8f1df; }
.sync-status[data-state="error"] { color: #9b4a51; background: #f8e9ea; }

@keyframes status-pulse {
  50% { opacity: 0.3; transform: scale(0.72); }
}

@media (max-width: 759px) {
  .sync-status { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
}

.app-header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.app-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.text-button,
.icon-button,
.primary-button,
.send-button,
.danger-button,
.event-action,
.profile-action-card,
.publish-todo-button {
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  font-weight: 600;
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    background var(--motion-med) var(--ease-out),
    border-color var(--motion-med) var(--ease-out),
    color var(--motion-med) var(--ease-out),
    opacity var(--motion-med) var(--ease-out);
}

.text-button:active,
.icon-button:active,
.primary-button:active,
.send-button:active,
.danger-button:active,
.event-action:active,
.profile-action-card:active,
.publish-todo-button:active {
  transform: scale(0.96);
}

.text-button {
  background: var(--brand-soft);
  color: var(--brand-strong);
  padding: 0 14px;
  font-size: 13px;
}

.icon-button {
  width: 34px;
  height: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.primary-button,
.send-button {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: white;
  padding: 0 18px;
  box-shadow: 0 6px 16px rgba(143, 77, 91, 0.24);
}

.danger-button {
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 16px;
  background: #fff0f2;
  color: var(--red);
  font-weight: 800;
}

.danger-text {
  color: var(--red);
  background: #fff0f2;
}

.full-width-button {
  width: 100%;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: page-in var(--motion-fast) var(--ease-out);
}

.home-controls,
.section-head,
.period-controls,
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-controls {
  margin-bottom: 14px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 180px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 999px;
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    background var(--motion-med) var(--ease-out),
    color var(--motion-med) var(--ease-out);
}

.segmented button:active {
  transform: scale(0.94);
}

.segmented button.active {
  background: white;
  color: var(--brand-strong);
  box-shadow: 0 3px 10px rgba(143, 77, 91, 0.16);
}

.period-controls {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.schedule-view,
.stats-list,
.client-list,
.llm-status,
.reminder-strip {
  display: grid;
  gap: 12px;
}

.day-card,
.profile-panel,
.stat-card,
.week-panel,
.month-panel,
.home-reminders {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.day-card,
.profile-panel,
.stat-card,
.home-reminders {
  padding: 18px;
  animation: card-in var(--motion-med) var(--ease-out);
}

.schedule-view > *,
.stats-list > *,
.manage-client-list > *,
.profile-todos > * {
  animation: card-in var(--motion-med) var(--ease-out);
  animation-fill-mode: both;
}

.schedule-view > *:nth-child(2),
.stats-list > *:nth-child(2),
.manage-client-list > *:nth-child(2),
.profile-todos > *:nth-child(2) {
  animation-delay: 35ms;
}

.schedule-view > *:nth-child(3),
.stats-list > *:nth-child(3),
.manage-client-list > *:nth-child(3),
.profile-todos > *:nth-child(3) {
  animation-delay: 70ms;
}

/* 周/月视图频繁切换日期时，整面板和 inline 日卡不再做入场动画 */
.schedule-view > .week-panel,
.schedule-view > .month-panel,
.schedule-view > .week-inline-day,
.week-inline-day .day-card {
  animation: none;
}

/* ===== 二级页「推入」转场：整层从右滑入，给下钻明确的层级方向感 ===== */
@keyframes subview-in {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}
main.subview-in > .page.active {
  animation: subview-in var(--motion-med) var(--ease-out) both;
}
/* 推入时内部卡片不再各自淡入 —— 整层作为一个面滑入，干净、不杂乱 */
main.subview-in > .page.active .day-card,
main.subview-in > .page.active .profile-panel,
main.subview-in > .page.active .stat-card,
main.subview-in > .page.active .home-reminders,
main.subview-in > .page.active .client-detail,
main.subview-in > .page.active .schedule-view > *,
main.subview-in > .page.active .stats-list > *,
main.subview-in > .page.active .manage-client-list > *,
main.subview-in > .page.active .profile-todos > * {
  animation: none;
}

.day-card.is-today {
  background: linear-gradient(160deg, #fdf2f0 0%, #f4dce1 60%, #e7c5cd 100%);
  border-color: #dfbac3;
  box-shadow: 0 12px 28px rgba(143, 77, 91, 0.16);
}

.day-card.is-today .event-row {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.9);
}

.day-card.is-today .event-row.shoot-row {
  background: linear-gradient(135deg, #fff4e2, #ffe9d4);
  border-color: #ffd9b5;
}

.day-card.is-today .event-row.planned-shoot-row {
  background: linear-gradient(135deg, #edf7ff, #e2f0ff);
  border-color: #bed9f4;
}

.day-card.is-today header span {
  background: rgba(255, 255, 255, 0.6);
  color: var(--brand-strong);
}

.week-day.is-today,
.month-day.is-today {
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.week-day.is-today .week-date strong,
.month-day.is-today .month-date strong {
  color: var(--brand-strong);
}

.week-day.is-selected,
.month-day.is-selected {
  background: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand-strong);
}

.week-day.is-selected .week-date,
.week-day.is-selected .week-date strong,
.month-day.is-selected .month-date,
.month-day.is-selected .month-date strong {
  color: white;
}

.week-day.is-selected.is-today,
.month-day.is-selected.is-today {
  background: var(--brand-strong);
}

.month-day.is-selected.muted {
  opacity: 1;
}

.week-inline-day {
  margin-top: 12px;
  scroll-margin-top: 16px;
}

.day-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.day-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.day-card header span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
}

.section-head span,
.mini-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    border-color var(--motion-med) var(--ease-out),
    background var(--motion-med) var(--ease-out);
  min-width: 0;
}

.event-row[data-event-client-detail] {
  cursor: pointer;
}

.event-client-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.event-client-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: 12px;
}

.event-main {
  min-width: 0;
}

.event-main strong,
.event-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.event-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
}

.event-row:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-sm);
}

.event-dot,
.client-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(143, 77, 91, 0.14);
}

.client-avatar-mark {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fallback, var(--brand));
  border: 0;
  color: white;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.client-avatar-mark.avatar-mark-dot {
  box-shadow: none;
  border: 0;
}

.client-avatar-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.client-avatar-mark span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.avatar-mark-xs {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.avatar-mark-sm {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.avatar-mark-md {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

.avatar-mark-dot {
  width: 20px;
  height: 20px;
  font-size: 10px;
}

.shoot-avatar-mark {
  position: relative;
  box-shadow: none;
}
.shoot-avatar-mark::after {
  /* 旧的摄像机角标废弃 */
  display: none;
}

/* 日历小点：拍摄态用红环（仿相机拍摄 UI），发布态为纯头像。
   注意：必须用 .calendar-client-mark.shoot-calendar-mark 复合选择器，
   否则会被后面更靠后的 .calendar-client-mark { box-shadow: none } 覆盖掉。 */
.shoot-calendar-mark,
.calendar-client-mark.shoot-calendar-mark {
  position: relative;
  box-shadow: 0 0 0 1.5px white, 0 0 0 4px #d83b50;
}

.week-day .shoot-calendar-mark,
.week-day .calendar-client-mark.shoot-calendar-mark {
  box-shadow: 0 0 0 1.5px white, 0 0 0 4px #d83b50;
}

/* 计划（未完成）拍摄：空心红环，与已拍摄区分 */
.shoot-calendar-mark-planned,
.calendar-client-mark.shoot-calendar-mark-planned {
  box-shadow: 0 0 0 1.5px white, 0 0 0 4px #d83b50;
  opacity: 0.92;
}

.week-day .shoot-calendar-mark-planned,
.week-day .calendar-client-mark.shoot-calendar-mark-planned {
  box-shadow: 0 0 0 1.5px white, 0 0 0 4px #d83b50;
}
.shoot-calendar-mark::before,
.shoot-calendar-mark::after { display: none; }

.event-main strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.event-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.event-time {
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 132px;
}

.detail-event-actions {
  max-width: 164px;
}

.event-actions .event-time {
  width: 100%;
  text-align: center;
}

.event-action {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--text-soft);
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
}

.event-action.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.event-action.danger {
  border-color: var(--red-soft);
  color: var(--red);
}

.pill {
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.shoot-row .event-time {
  background: var(--amber-soft);
  color: #8a4a14;
}

.shoot-row {
  background: linear-gradient(135deg, #fff4e2, #ffe9d4);
  border-color: #ffd9b5;
}

.planned-shoot-row {
  background: linear-gradient(135deg, #f1ecff, #e2d6ff);
  border-color: #cdbcff;
}

.planned-shoot-row .event-time {
  background: #d6c9ff;
  color: #4a3884;
}

.shoot-row .event-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(240, 138, 60, 0.18);
}

.empty-state {
  padding: 22px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  background: var(--surface-3);
}

/* 带吉祥物插画的空状态 / 引导态 */
.empty-illust {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 16px 22px;
  text-align: center;
}
.empty-illust img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(143, 77, 91, 0.16));
}
.empty-illust.is-hero img {
  width: 232px;
  height: auto;
}
.empty-illust-title {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-soft);
}
.empty-illust-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.week-panel,
.month-panel {
  overflow: hidden;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.week-day {
  min-height: 142px;
  border-right: 1px solid var(--line);
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: white;
  color: inherit;
  padding: 10px 6px;
  text-align: center;
  display: grid;
  grid-template-rows: 42px 68px;
  align-items: start;
  overflow: hidden;
}

.week-day:last-child {
  border-right: 0;
}

.week-date,
.month-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

.week-date strong,
.month-date strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.dot-stack {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  align-content: flex-start;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
  min-height: 28px;
}

.week-day .dot-stack {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-auto-rows: 28px;
  justify-content: center;
  align-items: center;
  align-content: start;
  gap: 6px 4px;
  width: 100%;
  height: 64px;
  min-height: 0;
  margin-top: 2px;
  padding: 3px 0 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.week-day .shoot-calendar-wrap {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: visible;
}

.calendar-more {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand-strong);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.cal-marks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
}

.cal-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
}

.cal-tag {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.cal-tag-pub {
  background: var(--brand);
}

.cal-tag-shoot {
  background: var(--amber);
}

.cal-shoot-chip {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--fallback, var(--amber));
  box-shadow: 0 0 0 1px white, 0 0 0 2px var(--ring, var(--amber));
}

.cal-shoot-chip.is-planned {
  background: transparent;
  box-shadow: 0 0 0 1px white, inset 0 0 0 1.5px var(--ring, #7654c7);
}

.cal-more {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
}

.client-dot {
  width: 10px;
  height: 10px;
  box-shadow: none;
}

.calendar-client-mark,
.legend-avatar-mark {
  box-shadow: none;
}

.shoot-mark {
  width: 22px;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber), #ffb066);
}

.camera-mark {
  display: inline-block;
  width: 22px;
  height: 15px;
  background-color: var(--camera, var(--amber));
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect x='1' y='6' width='13' height='8' rx='1.5'/%3E%3Ccircle cx='6' cy='4' r='3'/%3E%3Cpath d='M14 7 L23 4 L23 13 L14 13 Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect x='1' y='6' width='13' height='8' rx='1.5'/%3E%3Ccircle cx='6' cy='4' r='3'/%3E%3Cpath d='M14 7 L23 4 L23 13 L14 13 Z'/%3E%3C/svg%3E") center/contain no-repeat;
  vertical-align: middle;
}

.client-camera-mark {
  width: 18px;
  height: 12px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.weekday {
  padding: 10px 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-3);
  letter-spacing: 0.5px;
}

.month-day {
  min-height: 68px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 0;
  border-left: 0;
  background: white;
  color: inherit;
  padding: 6px 4px;
  display: grid;
  grid-template-rows: 28px minmax(22px, 1fr);
  align-items: start;
}

.month-day .dot-stack {
  display: grid;
  grid-template-columns: repeat(2, 22px);
  grid-auto-rows: 22px;
  justify-content: center;
  align-items: center;
  align-content: start;
  gap: 3px;
  min-height: 46px;
  margin-top: 4px;
  overflow: hidden;
}

.month-day .shoot-calendar-wrap,
.month-day .calendar-more,
.month-day .calendar-client-mark {
  width: 22px;
  height: 22px;
}

.month-day .calendar-more {
  font-size: 10px;
}

.month-day:nth-child(7n) {
  border-right: 0;
}

.month-day.muted {
  background: var(--surface-3);
}

.month-day.muted .month-date {
  opacity: 0.45;
}

.week-day:active,
.month-day:active {
  background: var(--brand-soft-2);
}

.single-day-detail .day-card {
  box-shadow: var(--shadow);
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  background: var(--surface-3);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.home-reminders {
  margin-top: 14px;
}

.reminder-item,
.llm-provider,
.client-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface-3);
}

.reminder-item {
  background: linear-gradient(135deg, #fff4e2, #ffe9d4);
  border-color: #ffd9b5;
  color: #8a4a14;
  font-size: 13px;
  font-weight: 600;
}

.reminder-item.urgent {
  background: linear-gradient(135deg, #fff1f1, #f3dbe0);
  border-color: #d99baa;
  color: #8f3448;
}

.publish-alert-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #f3c2c8;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, #ffeaec 0%, #ffd6dd 100%);
  box-shadow: 0 10px 24px rgba(196, 71, 101, 0.18);
  display: grid;
  gap: 10px;
  animation: publish-alert-pop 0.32s ease-out;
}

.publish-alert-banner.hidden {
  display: none;
}

@keyframes publish-alert-pop {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.publish-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.publish-alert-head strong {
  display: block;
  color: #9a2d4a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.publish-alert-secretary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.publish-alert-secretary img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(143, 77, 91, 0.16));
}

.publish-alert-mascot {
  animation: mascot-reminder-nod 2.8s ease-in-out infinite;
  transform-origin: 50% 82%;
}

.publish-alert-banner[data-mascot-state="warning"] .publish-alert-mascot {
  animation-name: mascot-warning-pulse;
}

.publish-alert-banner[data-mascot-state="relaxed"] .publish-alert-mascot {
  animation-name: mascot-relaxed-breathe;
  animation-duration: 3.6s;
}

.publish-alert-banner[data-mascot-state="greeting"] .publish-alert-mascot {
  animation-name: mascot-greeting-wave;
}

.publish-alert-secretary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.app-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(36, 22, 27, 0.38);
  backdrop-filter: blur(8px);
}

.app-confirm-backdrop.hidden {
  display: none;
}

.app-confirm-dialog {
  width: min(448px, 100%);
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(143, 77, 91, 0.18);
  border-radius: 24px;
  background: #fffaf8;
  box-shadow: 0 26px 70px rgba(74, 37, 48, 0.28);
}

.app-confirm-dialog > img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  animation: mascot-danger-brace 0.45s var(--ease-pop) both;
}

.app-confirm-copy h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.app-confirm-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.app-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.danger-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: #a84359;
  color: #fff;
  font-weight: 800;
}

.publish-alert-head .muted-text {
  color: #a86075;
  font-size: 12px;
}

.publish-alert-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.publish-alert-dismiss {
  border: 0;
  background: transparent;
  color: #9a5265;
  font-size: 13px;
  font-weight: 700;
  padding: 0 2px;
}

.publish-alert-cta {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  height: 34px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(196, 71, 101, 0.32);
}

.publish-alert-cta:active {
  transform: scale(0.97);
}

.publish-alert-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  color: #6f2c3b;
  font-size: 13px;
}

.publish-alert-list li {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.14s ease;
}

.publish-alert-list li[data-jump-to-date]:hover {
  background: rgba(255, 255, 255, 0.95);
}

.publish-alert-list li[data-jump-to-date]:active {
  transform: scale(0.99);
}

.publish-alert-list .publish-alert-arrow {
  flex-shrink: 0;
  color: #9a2d4a;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
}

.publish-alert-list li b {
  color: #9a2d4a;
  font-weight: 800;
  margin-right: 4px;
}

.publish-alert-list .publish-alert-more {
  background: transparent;
  color: #a86075;
  text-align: center;
  font-size: 12px;
  padding: 2px 0 0;
}

.stat-card {
  display: grid;
  gap: 14px;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.stat-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.stat-head h3,
.profile-panel h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.stat-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.metric {
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px 6px;
  text-align: center;
}

.metric strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

/* 库存指标按状态上色：已发=薄荷、待办（未发/未排）=琥珀，给单调的数字一层语义色 */
.metric-good {
  background: var(--mint-soft);
}
.metric-good strong {
  color: #1f8f6a;
}
.metric-warn {
  background: var(--amber-soft);
}
.metric-warn strong {
  color: #c2691f;
}

.overview-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--line);
  box-shadow: var(--shadow);
}

.overview-card > div {
  background: white;
  padding: 18px 8px;
  text-align: center;
}

.overview-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.overview-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.perf-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.perf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.perf-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.perf-cell {
  background: linear-gradient(135deg, var(--brand-soft-2), var(--brand-soft));
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.perf-cell .perf-label {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.perf-cell strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.perf-cell .perf-unit {
  margin-left: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.perf-cell p {
  margin: 4px 0 0;
  font-size: 12px;
}

.perf-row {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft-2);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.perf-row.muted-text {
  background: var(--surface-2);
  font-weight: 500;
}

.stock-line {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
}

.stock-line strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}

.stock-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #d39a7f);
}

.pill.risk {
  color: var(--red);
  background: var(--red-soft);
}

.deadline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft-2);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.back-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.detail-hero,
.detail-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: white;
  box-shadow: var(--shadow);
}

.detail-hero {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff, var(--brand-soft-2));
}

.detail-hero h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.detail-hero p {
  margin: 4px 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

/* 内容方向标签做成胶囊 chip，比纯顿号文本更有设计感、更易扫读 */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.hero-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(143, 77, 91, 0.16);
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1.5;
  white-space: nowrap;
}

.detail-ring {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 6px solid var(--brand);
  border-radius: 999px;
  background: white;
  box-shadow: 0 4px 12px rgba(143, 77, 91, 0.16);
}

.detail-ring strong {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--brand-strong);
}

.detail-ring span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.detail-section {
  padding: 18px;
  margin-bottom: 14px;
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-section-heading h3 {
  margin: 0;
}

.sync-hint {
  margin: -4px 0 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.detail-deadline {
  margin-top: 12px;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-3);
}

.detail-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.detail-row strong {
  font-size: 13px;
  font-weight: 700;
}

.detail-row em {
  grid-column: 2;
  color: var(--text-soft);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-row-with-actions {
  grid-template-columns: 88px 1fr auto;
  align-items: center;
}

.detail-row-with-actions em {
  grid-column: 2;
}

.detail-row-actions {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-row-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.detail-row-actions button.danger {
  color: var(--danger);
}

/* 卡片"编辑"内联日期选择器 */
.date-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.date-edit-input {
  font: inherit;
  font-size: 13px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text, #2b1a1d);
}
.date-edit button.ghost,
.event-action.ghost {
  color: var(--muted, #8b7a83);
}

.platform-info-list,
.recent-post-list {
  margin-top: 12px;
}

.platform-info-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-panel {
  margin-bottom: 14px;
}

.profile-action-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  text-align: left;
}

.profile-action-card:not(:disabled):hover {
  transform: translateY(-1px);
}

.profile-action-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
  font-weight: 800;
}

.profile-action-card:disabled {
  cursor: default;
  opacity: 0.72;
}

.profile-card-value,
.notification-badge {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.notification-badge {
  min-width: 26px;
  text-align: center;
  background: var(--red);
  color: white;
  box-shadow: 0 4px 12px rgba(169, 79, 95, 0.24);
  animation: badge-pop var(--motion-med) var(--ease-pop);
}

.org-card {
  display: grid;
  gap: 12px;
}

/* 组织邀请通知卡片 */
.org-invites {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.org-invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8ef, #f3e1e5);
  border: 1px solid #e8c8cc;
}
.org-invite-card strong { display: block; font-size: 14px; color: #2b1a1d; }
.org-invite-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.org-invite-actions .primary-button { padding: 6px 16px; }

.org-subsection {
  display: grid;
  gap: 10px;
}

.org-current-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--surface-3);
}

.org-form.compact {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.org-form.create-org-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.org-form.compact select {
  min-width: 92px;
}

.org-switcher {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.org-switcher button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
}

.org-switcher button.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.org-member-list {
  display: grid;
  gap: 8px;
}

.org-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--surface-3);
}

.org-member strong,
.org-member span {
  display: block;
}

.org-member > span {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 9px;
  background: white;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.login-form,
.client-form {
  display: grid;
  gap: 12px;
}

.login-error {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fde6e6;
  color: #b54a4a;
  font-size: 12px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  color: var(--text);
  outline: none;
  transition:
    transform var(--motion-fast) var(--ease-out),
    border-color var(--motion-med) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    background var(--motion-med) var(--ease-out);
}

input,
select {
  min-height: 38px;
  padding: 0 12px;
}

textarea {
  resize: none;
  min-height: 42px;
  padding: 9px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  background: white;
  box-shadow: 0 0 0 4px rgba(143, 77, 91, 0.12);
  transform: translateY(-1px);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.client-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.client-item-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.client-item strong {
  font-size: 15px;
  font-weight: 700;
}

.client-item strong .muted-text {
  font-weight: 500;
  font-size: 12px;
}

.client-platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 6px 0 2px;
}

.client-platform-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.client-platform-cell span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.client-platform-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.client-platform-cell em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.client-platform-cell.empty {
  border-style: dashed;
  background: white;
}

.client-platform-cell.empty strong {
  color: var(--muted);
}

.profile-todos {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-3);
}

.todo-entry {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  padding: 14px;
  text-align: left;
  color: var(--text);
}

.todo-entry.profile-action-card {
  border: 0;
  background: transparent;
  padding: 0;
}

.todo-entry strong {
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
  font-weight: 800;
}

.todo-entry > span {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.todo-entry > .notification-badge {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 12px rgba(169, 79, 95, 0.24);
}

.notification-control {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--surface-3);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.notification-enable {
  color: var(--brand-strong);
  cursor: pointer;
}

.todo-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.todo-head strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.todo-head > span {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.profile-todo {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.todo-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.todo-title strong {
  display: block;
  font-size: 15px;
}

.todo-fields {
  display: grid;
  gap: 8px;
}

.todo-fields input {
  min-height: 40px;
  background: var(--surface-3);
}

.todo-fields input[readonly] {
  color: var(--muted);
  background: transparent;
  cursor: default;
}

.profile-todo .primary-button {
  min-height: 38px;
}

.publish-todo {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.publish-todo strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.publish-todo-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease;
}

.publish-todo-button:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-sm);
}

.publish-todo-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
}

.publish-todo-button .todo-cta {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.manage-client-form {
  margin-top: 0;
}

.profile-panel.split-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
}

.manage-block {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: card-in var(--motion-med) var(--ease-out);
}

.manage-list-hint {
  margin: -6px 0 0;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.manage-client-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.manage-client-card {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    border-color var(--motion-med) var(--ease-out),
    background var(--motion-med) var(--ease-out);
}

.manage-client-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.manage-client-card.highlighted {
  border-color: var(--brand);
  background: var(--brand-soft-2);
  box-shadow: 0 8px 18px rgba(143, 77, 91, 0.12);
}

.manage-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.manage-pending-confirms {
  display: grid;
  gap: 8px;
}

.manage-client-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.manage-client-summary .todo-title {
  min-width: 0;
}

.manage-client-summary .todo-title strong,
.manage-client-summary .todo-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-inline-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.manage-inline-actions .text-button,
.manage-inline-actions .danger-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.client-edit-fields {
  display: grid;
  gap: 8px;
}

.client-pause-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.client-pause-control span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.client-pause-control strong {
  font-size: 13px;
}

.client-pause-control em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.client-pause-control .text-button {
  min-height: 34px;
  padding: 0 14px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .publish-alert-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .publish-alert-secretary {
    align-items: flex-start;
  }

  .publish-alert-secretary > div {
    overflow: hidden;
  }

  .publish-alert-head strong {
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .publish-alert-actions {
    justify-content: flex-start;
    padding-left: 76px;
  }

  .client-pause-control {
    grid-template-columns: 1fr;
  }

  .client-pause-control .text-button {
    width: 100%;
  }
}

.client-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(180, 80, 100, 0.12), 0 0 0 2px var(--ring, transparent);
}

.client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.avatar-md {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.stat-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.stat-head-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.detail-avatar {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  overflow: hidden;
  background: white;
  box-shadow:
    0 4px 14px rgba(143, 77, 91, 0.16),
    0 0 0 4px var(--ring, var(--brand));
}

.detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-avatar .avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: white;
  font-size: 28px;
  font-weight: 800;
}

.client-dot-avatar {
  width: 14px;
  height: 14px;
  background-size: cover;
  background-position: center;
  background-color: transparent;
  box-shadow: 0 0 0 1.5px var(--ring, currentColor);
}

.avatar-confirm {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #ffd9b5;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, #fff8ea, #ffeed4);
  box-shadow: var(--shadow);
}

.avatar-confirm-preview {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  overflow: hidden;
  background: white;
  box-shadow: 0 0 0 3px white, 0 4px 12px rgba(255, 130, 60, 0.22);
}

.avatar-confirm-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-confirm-preview .avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: white;
  font-size: 24px;
  font-weight: 800;
}

.avatar-confirm-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.avatar-confirm-body strong {
  font-size: 14px;
  font-weight: 700;
  color: #6a3a08;
}

.avatar-confirm-name {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.avatar-confirm-sig {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.avatar-confirm-actions .primary-button {
  min-height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.avatar-confirm-actions .text-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 0 8px;
}

.avatar-confirm-platform {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: white;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.avatar-confirm-list {
  grid-template-columns: 1fr;
}

.avatar-confirm-error {
  grid-template-columns: 1fr;
  align-items: start;
  padding: 14px;
}

.avatar-confirm-error .avatar-confirm-body {
  gap: 8px;
}

.avatar-confirm-error-text {
  margin: 0;
  max-width: 100%;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-candidates {
  display: grid;
  gap: 8px;
  margin: 6px 0;
}

.account-candidate {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 10px 12px;
}

.account-candidate:active {
  background: var(--brand-soft-2);
}

.account-candidate-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-candidate-body strong {
  font-size: 14px;
  font-weight: 700;
}

.account-candidate-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-inputs {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-3);
  border: 1px dashed var(--line-strong);
}

.platform-input {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  align-items: center;
}

.platform-input input {
  min-height: 38px;
  background: white;
}

.platform-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  padding: 6px 10px;
  background: white;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-align: center;
}

/* 平台 SVG 图标：跟随字号、品牌色由内联 style 控制 */
.pf-ico {
  display: inline-flex;
  align-items: center;
  vertical-align: -0.16em;
  flex-shrink: 0;
}
.pf-ico svg {
  width: 1.05em;
  height: 1.05em;
  display: block;
}

.platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  max-width: 100%;
}

.platform-chip[data-p="douyin"]    { background: #f1d7dd; color: #8f4d5b; }
.platform-chip[data-p="xhs"]       { background: #f1d7dd; color: #8f4d5b; }
.platform-chip[data-p="channels"]  { background: #d9f4e6; color: #0c7a4f; }

.detail-platform-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.detail-platform-tab {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.detail-platform-tab.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.perf-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.perf-tab {
  border: 1px solid var(--line);
  background: var(--surface-3);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.perf-tab.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.hidden {
  display: none;
}

.llm-provider {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.dot.on {
  background: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-soft);
}

.dot.warn {
  background: #d6a243;
  box-shadow: 0 0 0 4px rgba(214, 162, 67, 0.12);
}

.dot.error {
  background: #c85d6d;
  box-shadow: 0 0 0 4px rgba(200, 93, 109, 0.12);
}

.command-dock {
  position: fixed;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom, 0));
  width: min(100vw, 430px);
  box-sizing: border-box;
  transform: translateX(-50%);
  padding: 0 16px;
  pointer-events: none;
  z-index: 60;
  animation: dock-in var(--motion-med) var(--ease-pop);
}

.command-dock.hidden {
  display: none;
}

/* ===== 滚动轻量化：下滑时输入条缩成右下角悬浮球 ===== */
.command-ball {
  position: absolute;
  right: 16px;
  bottom: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: var(--brand, #8f4d5b);
  color: #fff;
  box-shadow: 0 8px 22px rgba(128, 82, 78, 0.32);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6) translateY(8px);
  pointer-events: none;
  transition:
    opacity var(--motion-med) var(--ease-pop),
    transform var(--motion-med) var(--ease-pop);
}
.command-ball svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.command-bar,
.command-result {
  transition:
    transform var(--motion-med) var(--ease-out),
    opacity var(--motion-med) var(--ease-out);
}
.command-dock.dock-ball .command-bar,
.command-dock.dock-ball .command-result,
.command-dock.dock-ball .chat-toggle {
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
}

.command-dock.keyboard-active .command-bar,
.command-dock.keyboard-active .command-result,
.command-dock.keyboard-active .chat-toggle {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.command-dock.dock-ball .command-ball {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.command-dock.keyboard-active .command-ball {
  opacity: 0;
  pointer-events: none;
}
.command-dock.dock-ball .command-ball:active {
  transform: scale(0.92);
}

.command-bar {
  display: grid;
  grid-template-columns: 40px 1fr 52px;
  gap: 6px;
  align-items: center;
  padding: 5px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 14px 38px rgba(128, 82, 78, 0.22);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
  transition:
    transform var(--motion-med) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    border-color var(--motion-med) var(--ease-out),
    border-radius var(--motion-med) var(--ease-out),
    background var(--motion-med) var(--ease-out);
}

.command-bar:focus-within {
  transform: translateY(-2px);
  border-color: rgba(143, 77, 91, 0.32);
  box-shadow: 0 18px 46px rgba(128, 82, 78, 0.26);
}

.mode-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-soft-2), white);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(143, 77, 91, 0.08);
  transition:
    background var(--motion-med) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

.mode-button:hover {
  box-shadow: inset 0 0 0 1px rgba(143, 77, 91, 0.12), 0 4px 10px rgba(143, 77, 91, 0.12);
}

.mode-button span {
  display: none;
}

.mode-svg {
  position: absolute;
  inset: 7px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--brand-strong);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.keyboard-svg,
.keyboard-mode-icon .mic-svg,
.voice-mode-icon .keyboard-svg {
  display: none;
}

.keyboard-mode-icon .keyboard-svg,
.voice-mode-icon .mic-svg {
  display: block;
}

.mode-button:active {
  background: var(--brand-soft);
  transform: scale(0.95);
}

.voice-mode-icon::before {
  content: none;
}

.voice-mode-icon::after {
  content: none;
}

.voice-mode-icon {
  background: linear-gradient(135deg, var(--brand-soft-2), white);
}

.keyboard-mode-icon::before {
  content: none;
}

.keyboard-mode-icon::after {
  content: none;
}

.text-entry {
  position: relative;
  min-width: 0;
}

.text-entry textarea {
  min-height: 36px;
  max-height: 88px;
  padding: 7px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  line-height: 1.4;
  border-radius: 0;
}

.text-entry textarea:focus {
  background: transparent;
  box-shadow: none;
}

.text-entry textarea::placeholder {
  color: var(--muted);
  font-size: 13px;
}

.hold-button {
  display: none;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 6px 18px rgba(143, 77, 91, 0.24);
}

.hold-button.recording {
  background: linear-gradient(135deg, #8f4d5b, #67303d);
  transform: scale(0.98);
}

.send-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 36px;
  padding: 0;
  font-size: 0;
  color: transparent;
  opacity: 0.4;
  box-shadow: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  overflow: hidden;
}

.send-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateX(1px);
  transition: transform var(--motion-fast) var(--ease-pop);
}

.send-button.ready {
  opacity: 1;
  box-shadow: 0 4px 14px rgba(143, 77, 91, 0.24);
}

.send-button.ready:hover svg {
  transform: translate(2px, -1px);
}

.command-bar.voice-mode {
  grid-template-columns: 40px 1fr;
  padding: 4px;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.command-bar.voice-mode .mode-button {
  background: white;
  box-shadow: var(--shadow);
}

.command-bar.voice-mode .text-entry,
.command-bar.voice-mode .send-button {
  display: none;
}

.command-bar.voice-mode .hold-button {
  display: block;
}

.command-result {
  min-height: 18px;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 8px auto 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  pointer-events: auto;
}

.command-result:empty {
  display: none;
}

.command-result.success {
  color: var(--mint);
}

.command-result.warning {
  color: var(--amber);
}

.douyin-prompt {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.douyin-prompt strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.douyin-prompt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.douyin-prompt-row input {
  min-height: 38px;
  background: var(--surface-3);
}

.douyin-prompt-row .primary-button {
  min-height: 38px;
  padding: 0 14px;
}

.frequency-prompt-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.frequency-prompt-row .text-button {
  min-height: 36px;
  padding: 0 10px;
}

.frequency-prompt-row .text-button.active {
  background: var(--brand);
  color: white;
  box-shadow: 0 4px 12px rgba(143, 77, 91, 0.2);
}

.resolution-card {
  display: grid;
  gap: 10px;
  border: 1px solid #ffd9b5;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff8ea, #ffeed4);
  padding: 14px;
  color: var(--text);
  margin-top: 10px;
}

.resolution-card p {
  margin: 4px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 13px;
}

.resolution-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100vw, 430px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 70px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tabbar button {
  border: 0;
  background: transparent;
  color: var(--muted);
  position: relative;
  font-size: 11px;
  font-weight: 600;
  transition:
    color var(--motion-med) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.tabbar button:active {
  transform: translateY(1px) scale(0.98);
}

.tabbar button.active {
  color: var(--brand-strong);
}

.tab-badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 32px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--red);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 14px rgba(169, 79, 95, 0.28);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  animation: badge-pop var(--motion-med) var(--ease-pop);
}

.tab-badge[hidden] {
  display: none;
}

.tab-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 30px;
  margin: 0 auto 2px;
  border-radius: 999px;
  transition:
    background var(--motion-med) var(--ease-out),
    transform var(--motion-med) var(--ease-pop),
    box-shadow var(--motion-med) var(--ease-out);
}

.tab-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.tabbar button.active .tab-icon {
  background: var(--brand-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(143, 77, 91, 0.18);
}

@media (min-width: 760px) {
  body {
    padding: 24px 0;
  }

  .mini-app {
    width: min(100vw - 32px, 640px);
    min-height: calc(100vh - 48px);
    border-radius: 32px;
    box-shadow: 0 36px 90px rgba(180, 80, 100, 0.18);
    overflow: hidden;
    padding: 22px 22px 168px;
  }

  .command-dock,
  .tabbar {
    border-radius: 0 0 32px 32px;
  }

  .app-header h1 {
    font-size: 26px;
  }

  .manage-client-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .manage-client-list > article {
    grid-column: span 1;
  }

  .manage-client-list > article.highlighted {
    grid-column: span 2;
  }
}

/* 桌面：宽屏 1100px 容器 + 双栏布局 */
@media (min-width: 1024px) {
  body {
    padding: 32px 0;
  }

  .mini-app {
    width: min(100vw - 48px, 1040px);
    padding: 28px 28px 132px;
    border-radius: 32px;
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "nav header"
      "nav main"
      "nav footer";
    gap: 18px 24px;
  }

  .app-header {
    grid-area: header;
    padding: 4px 8px 12px;
  }

  .app-header h1 {
    font-size: 28px;
  }

  main {
    grid-area: main;
    min-height: 0;
  }

  /* 首页双栏：日程主区 + 命令侧栏 */
  #homePage.page.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #homePage .schedule-view {
    min-height: 320px;
  }

  /* 桌面展开：三天视图的日卡并排成三列，不再各占满宽拉成空条 */
  #homePage .schedule-view {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  #homePage .schedule-view > .day-card .event-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #homePage .schedule-view > .day-card .event-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(88px, 1fr) auto auto;
    align-items: center;
    max-width: none;
    width: 100%;
  }

  #homePage .schedule-view > .day-card .event-actions .event-time {
    width: auto;
  }

  /* 周 / 月面板、内联日卡横跨整行 */
  #homePage .schedule-view > .month-panel,
  #homePage .schedule-view > .week-panel,
  #homePage .schedule-view > .week-inline-day {
    grid-column: 1 / -1;
  }

  /* 桌面端也保持视口悬浮，避免日程内容较长时输入框掉到页面底部。 */
  .command-dock {
    position: fixed;
    left: calc(50% + 64px);
    bottom: calc(30px + env(safe-area-inset-bottom, 0));
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 220px));
    margin: 0;
    border-radius: 18px;
    padding: 0;
    z-index: 80;
  }

  .chat-panel {
    max-height: min(420px, calc(100vh - 260px));
  }

  .command-bar textarea {
    min-height: 48px;
  }

  /* 底部 tabbar 桌面上变成顶部水平按钮 */
  .tabbar {
    grid-area: nav;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    height: auto;
    align-self: start;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-sm);
  }

  .tabbar button {
    min-height: 78px;
    border-radius: 16px;
  }

  .tabbar button.active {
    background: var(--brand-soft-2);
  }

  /* 三栏的客户管理 */
  .manage-client-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .manage-client-list > article.highlighted {
    grid-column: span 3;
  }

  /* 统计页：概览 + 客户列表 + 详情 三栏 */
  #statsPage.page.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }

  #statsOverview {
    grid-column: 1 / -1;
  }

  #statsListPanel {
    grid-column: 1 / -1;
  }

  #statsListPanel .stats-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  #statsPage.page.active:has(#clientDetail:not(.hidden)) {
    grid-template-columns: minmax(0, 1fr);
  }

  #statsPage.page.active:has(#clientDetail:not(.hidden)) #statsOverview,
  #statsPage.page.active:has(#clientDetail:not(.hidden)) #statsList {
    display: none;
  }

  #clientDetail:not(.hidden) {
    width: min(100%, 920px);
    justify-self: center;
  }

  .detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .detail-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .detail-row-with-actions {
    grid-template-columns: 104px minmax(0, 1fr) auto;
  }

  /* 我的页面：把多个 panel 排成两列 */
  #mePage.page.active {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
  }

  #mePage > section {
    margin: 0;
  }

  #managePanel.split-panel {
    grid-column: 1 / -1;
  }

  .icp-footer {
    grid-area: footer;
    margin: 0;
  }
}

@media (min-width: 1440px) {
  .mini-app {
    width: min(100vw - 64px, 1120px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* ===== 连续对话浮窗：作为命令栏的延伸，跟输入框一体 ===== */
.chat-backdrop {
  /* 不再用背景遮罩 */
  display: none !important;
}

.chat-panel {
  /* 直接坐在 command-bar 正上方，跟它共用宽度、共用阴影 */
  position: relative;
  width: 100%;
  max-height: min(58dvh, calc(100dvh - 220px - env(safe-area-inset-bottom, 0)));
  min-height: 180px;
  margin-bottom: -1px;            /* 跟下面的 command-bar 接边，无缝合并 */
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line, #efd9da);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 24px rgba(128, 82, 78, 0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom center;
  animation: chat-panel-in 260ms var(--ease-pop) both;
  pointer-events: auto;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  will-change: transform, opacity;
}
.chat-panel.hidden { display: none; }
/* 收起过渡：JS 先加 .closing 播退场动画，结束后再 .hidden */
.chat-panel.closing {
  animation: chat-panel-out var(--motion-fast) var(--ease-out) both;
  pointer-events: none;
}

/* 浮窗展开时：command-bar 顶部直角接浮窗下沿，底部圆角跟浮窗顶部圆角同值 */
.command-dock:has(.chat-panel:not(.hidden)) .command-bar {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  border-top: 1px solid var(--line, #efd9da);
  box-shadow: 0 14px 38px rgba(128, 82, 78, 0.18);
}

.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--line, #efd9da);
}
.chat-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.chat-mascot {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  /* 透明底 PNG：用 drop-shadow 贴轮廓投影，避免方块 box-shadow 的圆形光晕 */
  filter: drop-shadow(0 2px 3px rgba(143, 77, 91, 0.22));
}
.chat-mascot.mascot-state-success { animation: mascot-success-bounce 0.6s var(--ease-pop) both; }
.chat-mascot.mascot-state-reminder { animation: mascot-reminder-nod 2.8s ease-in-out infinite; }
.chat-mascot.mascot-state-warning { animation: mascot-warning-pulse 2.2s ease-in-out infinite; }
.chat-mascot.mascot-state-danger { animation: mascot-danger-brace 0.45s var(--ease-pop) both; }
.chat-mascot.mascot-state-greeting { animation: mascot-greeting-wave 2.8s ease-in-out infinite; }
.chat-panel-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text, #2b1a1d);
  letter-spacing: -0.2px;
}
.chat-panel-actions { display: flex; gap: 8px; }
.chat-panel-actions button {
  background: transparent;
  border: 1px solid var(--line, #efd9da);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-strong, #67303d);
  cursor: pointer;
}
.chat-panel-actions button:hover { background: var(--surface-3, #fcf4ec); }

.chat-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 14px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.chat-bubble {
  display: flex;
  margin: 6px 0;
  max-width: 100%;
}
.chat-bubble > span {
  display: inline-block;
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble.user { justify-content: flex-end; }
.chat-bubble.user > span {
  background: linear-gradient(135deg, #ffd9e0, #f5b8c5);
  color: #4f1d29;
  border-bottom-right-radius: 6px;
}
.chat-bubble.assistant { justify-content: flex-start; }
.chat-bubble.assistant:not(.action-bubble) { align-items: flex-end; gap: 6px; }
.chat-bubble-mascot {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(143, 77, 91, 0.16));
}
.chat-bubble.assistant > span {
  background: var(--surface-3, #fcf4ec);
  color: var(--text, #2b1a1d);
  border: 1px solid var(--line, #efd9da);
  border-bottom-left-radius: 6px;
}

/* 助手气泡里的可点选项（未识别客户/确认操作 等）*/
.chat-bubble.action-bubble {
  flex-direction: column;
  align-items: stretch;
}
.action-bubble-message {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 9px 13px 9px 9px;
  max-width: 100%;
  background: linear-gradient(135deg, #fff8ef, #f3e1e5);
  border: 1px solid #e8c8cc;
  color: #2b1a1d;
  border-radius: 14px;
  border-bottom-left-radius: 6px;
}
.action-bubble-message > span {
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.action-bubble-mascot {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(143, 77, 91, 0.16));
}
.chat-bubble.action-bubble em {
  font-style: normal;
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted, #8b7a83);
}
.action-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 0 2px;
}
.action-option {
  background: var(--surface, #fff8ef);
  border: 1px solid var(--brand-soft, #f1d6dc);
  color: var(--brand-strong, #67303d);
  border-radius: 14px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.action-option:hover { background: var(--brand-soft, #f1d6dc); }
.action-option.primary {
  background: var(--brand, #8f4d5b);
  color: #fff;
  border-color: var(--brand, #8f4d5b);
}
.action-option.primary:hover { background: var(--brand-strong, #67303d); }
.action-option.ghost {
  background: transparent;
  border-style: dashed;
  color: var(--muted, #8b7a83);
}
.action-option.danger {
  background: #fbeaec;
  border-color: #e3a3ac;
  color: #a3303f;
}
.action-option.danger:hover { background: #f6d8dc; }
.action-option-meta {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted, #8b7a83);
}

/* 单轮反馈：浮窗收起时显示在输入框上方，方向跟展开浮窗一致 */
.command-result {
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 0 12px 8px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text, #2b1a1d);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  border: 1px solid var(--line, #efd9da);
  box-shadow: 0 6px 16px rgba(128, 82, 78, 0.10);
  max-height: 4.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  pointer-events: auto;
}
.command-result:empty { display: none; }
.command-result.warning { color: #8a4a14; background: #fff4e2; border-color: #ffd9b5; }
.command-result.mascot-result {
  display: flex;
  align-items: center;
  gap: 8px;
  max-height: none;
  text-align: left;
}
.command-result.mascot-result > span {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.command-result-mascot {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(143, 77, 91, 0.16));
}
.command-result.success .command-result-mascot { animation: mascot-success-bounce 0.6s var(--ease-pop) both; }
.command-result.warning .command-result-mascot { animation: mascot-warning-pulse 2.2s ease-in-out infinite; }

@keyframes mascot-greeting-wave {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  35% { transform: rotate(-3deg) translateY(-2px); }
  55% { transform: rotate(2deg) translateY(-1px); }
}

@keyframes mascot-success-bounce {
  0% { transform: scale(0.82) translateY(4px); opacity: 0; }
  55% { transform: scale(1.08) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes mascot-reminder-nod {
  0%, 72%, 100% { transform: rotate(0deg) translateY(0); }
  80% { transform: rotate(2deg) translateY(1px); }
  90% { transform: rotate(-2deg) translateY(-1px); }
}

@keyframes mascot-warning-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@keyframes mascot-danger-brace {
  0% { transform: scale(0.88); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes mascot-relaxed-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(1px) scale(0.985); }
}
/* 浮窗展开时，单轮反馈条隐藏（信息已在浮窗里） */
.command-dock:has(.chat-panel:not(.hidden)) .command-result { display: none; }

/* typing 气泡 */
.chat-bubble.typing > span {
  opacity: 0.7;
  font-style: italic;
}

/* 命令栏上的"对话 N ›"入口 */
.chat-toggle {
  align-self: flex-start;
  background: var(--brand-soft, #f1d6dc);
  color: var(--brand-strong, #67303d);
  border: none;
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 8px;
  cursor: pointer;
  /* 命令栏 dock 是 pointer-events:none，按钮要自己打开 */
  pointer-events: auto;
}
.chat-toggle.hidden { display: none; }

.icp-footer {
  margin-top: auto;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  color: var(--muted, #8b7a83);
}

.icp-footer a {
  color: inherit;
  text-decoration: none;
}

.icp-footer a:hover {
  text-decoration: underline;
}

.icp-footer .footer-meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.85;
}

/* ===== 0.9.38 Editorial Ops UI =====
   克制的白/冷灰画布、墨绿色单一强调色、细边框与更小圆角。 */
:root {
  --bg: #f7f8f7;
  --bg-deep: #edf0ee;
  --surface: #ffffff;
  --surface-2: #f3f5f4;
  --surface-3: #f7f8f7;
  --line: #dfe4e1;
  --line-strong: #c9d1cd;
  --text: #17201d;
  --text-soft: #48534f;
  --muted: #77817d;
  --brand: #3f8f7a;
  --brand-strong: #2f7563;
  --brand-soft: #dceee8;
  --brand-soft-2: #eef7f4;
  --amber: #a66a2c;
  --amber-soft: #f6ecdf;
  --mint: #2f765f;
  --mint-soft: #e1eee9;
  --blue: #48677d;
  --blue-soft: #e9eff2;
  --lilac: #71677d;
  --lilac-soft: #efedf1;
  --red: #9c4545;
  --red-soft: #f5e8e8;
  --shadow-sm: 0 1px 2px rgba(23, 32, 29, 0.04);
  --shadow: 0 8px 28px rgba(23, 32, 29, 0.055);
  --shadow-lg: 0 18px 48px rgba(23, 32, 29, 0.08);
  --radius-card: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --ease-pop: cubic-bezier(0.22, 0.8, 0.25, 1);
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: Inter, "SF Pro Display", "SF Pro Text", -apple-system,
    BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

.mini-app {
  background: var(--surface);
}

.app-header {
  border-bottom: 1px solid var(--line);
}

.app-header p {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.app-header h1 {
  font-weight: 720;
  letter-spacing: -0.045em;
}

.text-button,
.icon-button,
.primary-button,
.send-button,
.danger-button,
.event-action,
.profile-action-card,
.publish-todo-button {
  border-radius: var(--radius-sm);
  font-weight: 650;
  box-shadow: none;
}

.text-button {
  color: var(--brand-strong);
  background: transparent;
  border: 1px solid var(--line-strong);
}

.icon-button {
  border-radius: var(--radius-sm);
}

.primary-button,
.send-button {
  background: var(--brand-strong);
  box-shadow: none;
}

.home-controls {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.segmented {
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  overflow: hidden;
}

.segmented button {
  min-height: 34px;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--text-soft);
  font-weight: 560;
}

.segmented button:last-child { border-right: 0; }

.segmented button.active {
  color: var(--brand-strong);
  background: var(--brand-soft-2);
  box-shadow: inset 0 0 0 1px #cbdcd5;
}

.period-controls {
  display: grid;
  grid-template-columns: 34px minmax(104px, 1fr) 34px;
  justify-self: end;
  align-items: center;
  min-width: min(100%, 214px);
  height: 36px;
  color: var(--text-soft);
}

.period-controls .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-color: transparent;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 18px;
}

.period-controls .icon-button:hover {
  color: var(--brand-strong);
  background: var(--brand-soft-2);
}

#periodLabel {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  color: var(--text);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-card,
.profile-panel,
.stat-card,
.week-panel,
.month-panel,
.home-reminders {
  border-color: var(--line);
  border-radius: var(--radius-card);
  box-shadow: none;
}

.day-card,
.profile-panel,
.stat-card,
.home-reminders {
  padding: 16px;
}

.empty-illust img { display: none; }

.schedule-empty .empty-illust.is-hero {
  width: min(100%, 420px);
  margin: 72px auto 0;
  padding: 22px 26px;
  align-items: flex-start;
  text-align: left;
  border-left: 2px solid var(--brand);
}

.schedule-empty .empty-illust-title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
}

.schedule-empty .empty-illust-sub {
  margin-top: 3px;
  font-size: 13px;
}

.publish-alert-banner {
  padding: 13px 15px;
  border: 1px solid #cfdbd6;
  border-radius: var(--radius-card);
  background: var(--brand-soft-2);
  box-shadow: none;
}

.publish-alert-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.publish-alert-secretary img,
.chat-mascot,
.chat-bubble-mascot,
.action-bubble-mascot,
.command-result-mascot,
.app-confirm-dialog > img {
  display: none;
}

.publish-alert-secretary::before,
.chat-head-left::before,
.chat-bubble.assistant:not(.action-bubble):not(.typing)::before,
.action-bubble-message::before {
  content: "AI";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.chat-bubble.assistant:not(.action-bubble):not(.typing)::before {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.publish-alert-actions button,
.publish-alert-list li,
.action-option {
  border-radius: var(--radius-sm);
}

.publish-alert-cta,
.publish-alert-dismiss {
  color: var(--brand-strong);
  background: transparent;
  border-color: var(--line-strong);
}

.command-dock {
  animation: dock-in 180ms var(--ease-out);
}

.command-bar {
  grid-template-columns: 40px 1fr 46px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.command-bar:focus-within {
  transform: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(36, 92, 77, 0.1);
}

.command-bar.is-processing {
  border-color: #9eb7ae;
  box-shadow: 0 0 0 3px rgba(36, 92, 77, 0.08);
}

.mode-button {
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: none;
}

.send-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.send-button::after {
  content: "";
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 260ms var(--ease-out), opacity 260ms ease;
  opacity: 0;
}

.send-button:active::after {
  transform: translate(-50%, -50%) scale(4);
  opacity: 1;
}

.send-button:disabled {
  cursor: progress;
  opacity: 0.55;
}

.command-ball {
  border-radius: 10px;
  background: var(--brand-strong);
  box-shadow: var(--shadow);
}

.chat-panel {
  min-height: 220px;
  margin-bottom: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-lg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: chat-panel-in 190ms var(--ease-out) both;
}

.command-dock:has(.chat-panel:not(.hidden)) .command-bar {
  border-radius: var(--radius-card);
  border-top: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.chat-panel-head {
  min-height: 54px;
  padding: 10px 14px;
  border-color: var(--line);
}

.chat-head-left { gap: 10px; }

.chat-panel-head h2 {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.chat-panel-body {
  padding: 14px 14px 18px;
}

.chat-bubble {
  margin: 9px 0;
  animation: chat-message-in 220ms var(--ease-out) both;
}

.chat-bubble > span {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.62;
}

.chat-bubble.user > span {
  color: #21352f;
  background: #edf3f0;
  border: 1px solid #d8e3de;
  border-bottom-right-radius: 3px;
}

.chat-bubble.assistant:not(.action-bubble) {
  align-items: flex-start;
  gap: 8px;
}

.chat-bubble.assistant > span {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
  border-bottom-left-radius: 3px;
}

.action-bubble-message {
  gap: 9px;
  padding: 10px;
  color: var(--text);
  background: var(--surface-3);
  border-color: var(--line-strong);
  border-radius: 8px;
}

.action-option {
  color: var(--brand-strong);
  background: #fff;
  border-color: var(--line-strong);
  font-weight: 620;
}

.action-option:hover { background: var(--brand-soft-2); }
.action-option.primary,
.action-option.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }

.typing-indicator {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  min-width: 190px;
  color: var(--text-soft) !important;
  background: var(--surface-3) !important;
  border-color: #d6dfdb !important;
  font-style: normal !important;
  opacity: 1 !important;
}

.typing-indicator i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  animation: ai-dot 1.05s ease-in-out infinite;
}

.typing-indicator i:nth-child(2) { animation-delay: 140ms; }
.typing-indicator i:nth-child(3) { animation-delay: 280ms; }

.typing-indicator b {
  margin-left: 5px;
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.01em;
}

@keyframes ai-dot {
  0%, 60%, 100% { opacity: 0.28; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

@keyframes chat-message-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes schedule-item-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.schedule-view > *,
.stats-list > *,
.manage-client-list > *,
.profile-todos > * {
  animation-name: schedule-item-in;
  animation-duration: 260ms;
  animation-timing-function: var(--ease-out);
}

.day-card,
.stat-card,
.profile-panel,
.event-row,
.month-day {
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-out), box-shadow 180ms ease;
}

@media (hover: hover) {
  .day-card:hover,
  .stat-card:hover,
  .profile-panel:hover {
    border-color: #b9cec6;
    box-shadow: 0 10px 28px rgba(47, 117, 99, 0.07);
    transform: translateY(-2px);
  }

  .event-row:hover,
  .month-day:hover {
    background: var(--brand-soft-2);
  }

  .tabbar button:hover,
  .segmented button:hover {
    color: var(--brand-strong);
  }
}

.command-result {
  border-radius: 7px;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.chat-toggle {
  color: var(--brand-strong);
  background: var(--brand-soft-2);
  border: 1px solid #d6e1dc;
  border-radius: 6px;
}

.tabbar {
  border-color: var(--line);
  box-shadow: none;
}

.tabbar button {
  color: var(--muted);
  font-weight: 560;
}

.tabbar button.active {
  color: var(--brand-strong);
  background: var(--brand-soft-2);
}

.tab-icon svg { stroke-width: 1.7; }

.app-confirm-dialog {
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 760px) {
  body { padding: 14px; }

  .mini-app {
    width: min(100%, 720px);
    min-height: calc(100vh - 28px);
    padding: 22px 22px 154px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: none;
  }
}

@media (min-width: 1024px) {
  body { padding: 14px; }

  .mini-app {
    width: min(100%, 1360px);
    min-height: calc(100vh - 28px);
    padding: 24px 26px 84px;
    overflow: visible;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px 26px;
    border-radius: 12px;
  }

  .app-header {
    min-height: 68px;
    padding: 4px 0 14px;
  }

  .app-header h1 { font-size: 30px; }

  .tabbar {
    position: sticky;
    top: 24px;
    height: auto;
    align-self: start;
    grid-template-rows: repeat(3, 72px);
    padding: 8px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
  }

  .tabbar button {
    min-height: 0;
    height: 72px;
    border-radius: 8px;
  }

  .command-dock {
    left: auto;
    right: max(26px, calc((100vw - 1360px) / 2 + 26px));
    bottom: 34px;
    width: min(420px, calc(100vw - 56px));
    transform: none;
  }

  .chat-panel {
    height: min(610px, calc(100vh - 170px));
    max-height: min(610px, calc(100vh - 170px));
  }

  .mini-app:has(.chat-panel:not(.hidden)) .app-header,
  .mini-app:has(.chat-panel:not(.hidden)) main,
  .mini-app:has(.chat-panel:not(.hidden)) .icp-footer {
    margin-right: 446px;
  }

  .mini-app:has(.chat-panel:not(.hidden)) #homePage .schedule-view {
    grid-template-columns: minmax(0, 1fr);
  }

  .mini-app:has(.chat-panel:not(.hidden)) #homePage .schedule-view > * {
    grid-column: 1 / -1;
  }

  .mini-app:has(.chat-panel:not(.hidden)) #statsListPanel .stats-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 759px) {
  .mini-app {
    background: #fff;
    padding-bottom: calc(236px + env(safe-area-inset-bottom, 0));
  }
  .month-panel .legend,
  .week-panel .legend {
    display: none;
  }
  .month-day {
    min-height: 51px;
    padding: 5px 4px 4px;
    grid-template-rows: 24px minmax(16px, 1fr);
  }
  .weekday {
    min-height: 28px;
    padding: 7px 0 6px;
    font-size: 9.5px;
  }
  .month-date strong {
    font-size: 14px;
    margin-bottom: 0;
  }
  .month-date .compact-counts {
    margin-top: 0;
  }
  .month-date .compact-counts,
  .compact-counts.is-empty {
    min-height: 12px;
  }
  .month-date .compact-counts b {
    min-height: 11px;
    padding: 0 3px;
    font-size: 8px;
  }
  .month-day .dot-stack {
    grid-template-columns: repeat(2, 16px);
    grid-auto-rows: 16px;
    min-height: 16px;
    gap: 2px;
  }
  .month-day .shoot-calendar-wrap,
  .month-day .calendar-more,
  .month-day .calendar-client-mark {
    width: 16px;
    height: 16px;
  }
  .month-day.has-events::before {
    width: 2px;
  }
  .month-day.has-shoot::after {
    right: 5px;
    bottom: 4px;
    left: 5px;
  }
  .event-row,
  .day-card.is-today .event-row,
  .day-card.is-today .event-row.shoot-row,
  .day-card.is-today .event-row.planned-shoot-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .event-main strong,
  .event-main span {
    white-space: normal;
  }
  .event-main span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .event-actions,
  .detail-event-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }
  .event-actions .event-time {
    width: auto;
  }
  .publish-alert-secretary::before { width: 26px; height: 26px; }
  .publish-alert-actions { gap: 6px; }
  .chat-panel {
    min-height: 180px;
    max-height: min(42dvh, calc(100dvh - 430px));
  }
  .schedule-empty .empty-illust.is-hero { margin-top: 34px; padding: 18px 20px; }
}

@media (max-width: 480px) {
  .home-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .segmented,
  .period-controls {
    width: 100%;
    min-width: 0;
  }

  .period-controls {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }
}

/* ===== 嗨嗨品牌形象 + 高密度日程 ===== */
.publish-alert-secretary img,
.chat-mascot,
.chat-bubble-mascot,
.action-bubble-mascot,
.command-result-mascot,
.app-confirm-dialog > img {
  display: block;
}

.publish-alert-secretary::before,
.chat-head-left::before,
.chat-bubble.assistant:not(.action-bubble):not(.typing)::before,
.action-bubble-message::before {
  display: none;
}

.publish-alert-secretary img {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  filter: drop-shadow(0 3px 7px rgba(47, 117, 99, 0.12));
}

.chat-mascot {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 5px rgba(47, 117, 99, 0.13));
}

.chat-bubble-mascot {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
  filter: drop-shadow(0 2px 4px rgba(47, 117, 99, 0.12));
}

.action-bubble-mascot {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  filter: drop-shadow(0 2px 5px rgba(47, 117, 99, 0.12));
}

.day-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.day-header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.day-card header .day-load {
  display: inline-flex;
  gap: 6px;
  padding: 0;
  background: transparent;
}

.day-load b {
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 720;
  white-space: nowrap;
}

.day-load .publish-load {
  color: var(--brand-strong);
  background: var(--brand-soft-2);
}

.day-load .shoot-load {
  color: #925d29;
  background: #faf0e4;
}

.day-card header .day-date {
  padding: 3px 7px;
  border-radius: 5px;
}

.compact-counts {
  display: inline-flex;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
  min-height: 16px;
}

.compact-counts b {
  display: inline-flex;
  align-items: center;
  min-height: 14px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--brand-soft-2);
  font-size: 9px;
  font-weight: 720;
  color: var(--brand-strong);
  white-space: nowrap;
}

.compact-counts .shoot-count {
  color: #95612f;
  background: #faf0e4;
}

.compact-counts.is-empty {
  min-height: 16px;
}

.month-date .compact-counts {
  display: flex;
  margin: 2px 0 0;
}

.month-date .compact-counts b { font-size: 9px; }

.week-date .compact-counts {
  display: flex;
  margin-top: 3px;
}

.week-day.is-selected .compact-counts b,
.month-day.is-selected .compact-counts b {
  color: rgba(255, 255, 255, 0.9);
}

.week-day {
  position: relative;
  min-height: 136px;
  grid-template-rows: 50px 58px;
  border: 0;
  background: #fff;
}

.month-day {
  position: relative;
  min-height: 72px;
  padding: 7px 5px 6px;
  grid-template-rows: 32px minmax(28px, 1fr);
  border: 0;
  background: #fff;
}

.week-grid,
.month-grid {
  gap: 1px;
  background: var(--line);
}

.weekday {
  min-height: 34px;
  padding: 9px 0 8px;
  border: 0;
  background: #f4f6f5;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.week-day.is-weekend:not(.is-selected),
.month-day.is-weekend:not(.is-selected) {
  background: #fbfcfb;
}

.week-day.has-events:not(.is-selected),
.month-day.has-events:not(.is-selected) {
  background: #fbfefd;
}

.week-day.has-events::before,
.month-day.has-events::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand);
  opacity: 0.7;
}

.week-day.has-shoot::after,
.month-day.has-shoot::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 6px;
  left: 7px;
  height: 2px;
  border-radius: 99px;
  background: #d29a5b;
  opacity: 0.9;
}

.week-day.is-today,
.month-day.is-today {
  background: #f2faf6;
  box-shadow: inset 0 0 0 1.5px #9bc5b8;
}

.week-day.is-selected,
.month-day.is-selected,
.week-day.is-selected.is-today,
.month-day.is-selected.is-today {
  background: #ecf7f2;
  box-shadow: inset 0 0 0 2px var(--brand);
}

.week-day.is-selected .week-date,
.week-day.is-selected .week-date strong,
.month-day.is-selected .month-date,
.month-day.is-selected .month-date strong {
  color: var(--brand-strong);
}

.week-day.is-selected .compact-counts b,
.month-day.is-selected .compact-counts b {
  color: var(--brand-strong);
  background: #fff;
}

.week-day.is-selected .compact-counts .shoot-count,
.month-day.is-selected .compact-counts .shoot-count {
  color: #95612f;
}

.week-day .dot-stack {
  grid-template-columns: repeat(4, 22px);
  grid-auto-rows: 22px;
  height: 50px;
  gap: 4px;
  margin-top: 0;
  padding: 1px 0 3px;
}

.month-day .dot-stack {
  grid-template-columns: repeat(3, 18px);
  grid-auto-rows: 18px;
  min-height: 22px;
  margin-top: 0;
  gap: 3px;
}

.month-day .shoot-calendar-wrap,
.month-day .calendar-more,
.month-day .calendar-client-mark {
  width: 18px;
  height: 18px;
}

.month-day .calendar-more {
  font-size: 9px;
}

.day-event-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bfd1ca transparent;
}

.event-section + .event-section {
  margin-top: 12px;
  padding-top: 2px;
}

.event-section-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 6px;
  padding: 4px 3px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.event-section-head strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.event-section-head span {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: var(--brand-soft-2);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.event-list { gap: 6px; }

.event-row,
.day-card.is-today .event-row,
.day-card.is-today .event-row.shoot-row,
.day-card.is-today .event-row.planned-shoot-row {
  gap: 8px;
  min-height: 54px;
  padding: 7px 8px;
  border-color: var(--line);
  border-left: 3px solid #79ae9f;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.event-row.shoot-row,
.day-card.is-today .event-row.shoot-row {
  border-left-color: #d29a5b;
  background: #fffcf8;
}

.event-row.planned-shoot-row,
.day-card.is-today .event-row.planned-shoot-row {
  border-left-color: #6f91a8;
  background: #f9fbfc;
}

.day-card.is-today {
  border-color: #a9c9be;
  background: #fbfefd;
  box-shadow: inset 0 3px 0 var(--brand);
}

.day-card.is-today header span {
  color: var(--brand-strong);
  background: var(--brand-soft-2);
}

.event-client-link {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
}

.event-avatar-mark.avatar-mark-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.event-main strong {
  font-size: 12.5px;
  font-weight: 670;
}

.event-main span {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.35;
}

.event-kind {
  display: inline-block;
  margin-right: 5px;
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.shoot-kind { color: #9a6127; }

.event-actions,
.detail-event-actions {
  gap: 4px;
  max-width: 104px;
}

.event-actions .event-time {
  padding: 3px 7px;
  font-size: 10px;
}

.event-action {
  min-height: 24px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 9.5px;
}

.empty-state.compact {
  padding: 12px 10px;
  border-style: solid;
  background: var(--surface-3);
}

@media (min-width: 1024px) {
  #homePage .schedule-view > .day-card {
    max-height: min(70vh, 720px);
  }

  #homePage .schedule-view > .day-card .event-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #homePage .schedule-view > .day-card .event-actions {
    grid-column: auto;
    display: flex;
    width: auto;
    max-width: 104px;
  }

  .single-day-detail .day-card,
  .week-inline-day .day-card {
    max-height: none;
  }
}

@media (max-width: 759px) {
  #homeSchedule .month-panel .legend,
  #homeSchedule .week-panel .legend {
    display: none;
  }

  #homeSchedule .month-day {
    min-height: 51px;
    padding: 5px 4px 4px;
    grid-template-rows: 24px minmax(16px, 1fr);
  }

  #homeSchedule .weekday {
    min-height: 28px;
    padding: 7px 0 6px;
    font-size: 9.5px;
  }

  #homeSchedule .month-date strong {
    margin-bottom: 0;
    font-size: 14px;
  }

  #homeSchedule .month-date .compact-counts,
  #homeSchedule .compact-counts.is-empty {
    min-height: 12px;
  }

  #homeSchedule .month-date .compact-counts {
    margin-top: 0;
  }

  #homeSchedule .month-date .compact-counts b {
    min-height: 11px;
    padding: 0 3px;
    font-size: 8px;
  }

  #homeSchedule .month-day .dot-stack {
    grid-template-columns: repeat(2, 16px);
    grid-auto-rows: 16px;
    min-height: 16px;
    gap: 2px;
  }

  #homeSchedule .month-day .shoot-calendar-wrap,
  #homeSchedule .month-day .calendar-more,
  #homeSchedule .month-day .calendar-client-mark {
    width: 16px;
    height: 16px;
  }

  #homeSchedule .month-day.has-events::before {
    width: 2px;
  }

  #homeSchedule .month-day.has-shoot::after {
    right: 5px;
    bottom: 4px;
    left: 5px;
  }

  #homeSchedule .event-row,
  #homeSchedule .day-card.is-today .event-row,
  #homeSchedule .day-card.is-today .event-row.shoot-row,
  #homeSchedule .day-card.is-today .event-row.planned-shoot-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  #homeSchedule .event-main strong,
  #homeSchedule .event-main span {
    white-space: normal;
  }

  #homeSchedule .event-main span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  #homeSchedule .event-actions,
  #homeSchedule .detail-event-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  #homeSchedule .event-actions .event-time {
    width: auto;
  }

  .mini-app:has(#homeSchedule .week-panel) .command-dock:not(.keyboard-active) .command-bar,
  .mini-app:has(#homeSchedule .week-panel) .command-dock:not(.keyboard-active) .command-result,
  .mini-app:has(#homeSchedule .week-panel) .command-dock:not(.keyboard-active) .chat-toggle,
  .mini-app:has(#homeSchedule .month-panel) .command-dock:not(.keyboard-active) .command-bar,
  .mini-app:has(#homeSchedule .month-panel) .command-dock:not(.keyboard-active) .command-result,
  .mini-app:has(#homeSchedule .month-panel) .command-dock:not(.keyboard-active) .chat-toggle {
    transform: translateY(130%);
    opacity: 0;
    pointer-events: none;
  }

  .mini-app:has(#homeSchedule .week-panel) .command-dock:not(.keyboard-active) .command-ball,
  .mini-app:has(#homeSchedule .month-panel) .command-dock:not(.keyboard-active) .command-ball {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
  }
}

@media (min-width: 1200px) {
  .command-dock {
    width: min(380px, calc(100vw - 56px));
  }

  .mini-app:has(.chat-panel:not(.hidden)) .app-header,
  .mini-app:has(.chat-panel:not(.hidden)) main,
  .mini-app:has(.chat-panel:not(.hidden)) .icp-footer {
    margin-right: 406px;
  }

  .mini-app:has(#homeSchedule .week-panel) #homePage .home-controls,
  .mini-app:has(#homeSchedule .month-panel) #homePage .home-controls,
  .mini-app:has(#homeSchedule .week-panel) #homePage .schedule-view,
  .mini-app:has(#homeSchedule .month-panel) #homePage .schedule-view {
    width: calc(100% - 406px);
    max-width: 820px;
  }
}
