: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: #a09098;

  --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;
}

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;
}

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

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) 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); }
}

/* 浮窗坐在输入框正上方、宽度撑满，只需从底边纵向长出来 —— 不要 translateX */
@keyframes chat-panel-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@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;
}

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

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

.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-med) 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;
}

.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: auto 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-main {
  min-width: 0;
}

.event-main strong,
.event-main span {
  overflow-wrap: anywhere;
}

.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;
}

/* 日历小点：拍摄态同样用红环 */
.shoot-calendar-mark {
  position: relative;
  overflow: visible !important;
  box-shadow: 0 0 0 2px #d83b50, 0 0 0 3.5px white;
}
.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);
}

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

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

.week-day {
  min-height: 124px;
  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: 44px minmax(32px, 1fr);
  align-items: start;
}

.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;
}

.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: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-head .muted-text {
  color: #a86075;
  font-size: 12px;
}

.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;
}

.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;
}

.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;
}

.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);
}

.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-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;
}

.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);
}

.command-dock {
  position: fixed;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom, 0));
  width: min(100vw, 430px);
  transform: translateX(-50%);
  padding: 0 16px;
  pointer-events: none;
  z-index: 20;
  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.dock-ball .command-ball {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.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: 36px;
  height: 36px;
  margin: 0 auto 2px;
  border: 2px solid currentColor;
  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::before,
.tab-icon::after {
  content: "";
  position: absolute;
}

.calendar-icon::before {
  width: 17px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 4px;
  background:
    linear-gradient(currentColor 0 0) 3px 5px / 3px 3px no-repeat,
    linear-gradient(currentColor 0 0) 8px 5px / 3px 3px no-repeat,
    linear-gradient(currentColor 0 0) 13px 5px / 3px 3px no-repeat,
    linear-gradient(currentColor 0 0) 3px 10px / 3px 3px no-repeat,
    linear-gradient(currentColor 0 0) 8px 10px / 3px 3px no-repeat;
}

.calendar-icon::after {
  top: 8px;
  width: 15px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.chart-icon::before {
  left: 9px;
  bottom: 9px;
  width: 4px;
  height: 10px;
  border-radius: 99px 99px 2px 2px;
  background: currentColor;
  box-shadow:
    7px -5px 0 currentColor,
    14px -1px 0 currentColor;
}

.chart-icon::after {
  left: 8px;
  bottom: 7px;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.user-icon::before {
  top: 8px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.user-icon::after {
  bottom: 8px;
  width: 18px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.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 32px;
    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 auto;
    grid-template-areas:
      "nav header"
      "nav main"
      "nav dock"
      "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;
  }

  /* 命令 dock 桌面上不再 fixed，固定在容器底部 */
  .command-dock {
    grid-area: dock;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 18px;
    padding: 0;
    max-width: 760px;
    justify-self: center;
  }

  .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;
  }

  #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(50vh, calc(100vh - 104px - env(safe-area-inset-bottom, 0) - 200px));
  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 var(--motion-med) var(--ease-out);
  pointer-events: auto;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.chat-panel.hidden { display: 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-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;
  overflow-y: auto;
  padding: 10px 14px 14px;
  scroll-behavior: smooth;
}

.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 > 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;
}
.chat-bubble.action-bubble > span {
  max-width: 100%;
  background: linear-gradient(135deg, #fff8ef, #f3e1e5);
  border: 1px solid #e8c8cc;
  color: #2b1a1d;
  border-bottom-left-radius: 6px;
}
.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-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;
}
