:root {
  /* Shared with 有稿 v6: white page, warm-grey sidebar, ink text, olive actions, one orange accent. */
  --ink: #37352F;
  --muted: #787774;
  --faint: #A5A29C;
  --paper: #FFFFFF;
  --surface: #FFFFFF;
  --surface-strong: #ffffff;
  --line: #E9E9E7;
  --line-strong: #DCDBD6;
  --sidebar: #F7F7F5;
  --sidebar-text: #37352F;
  --hover: rgba(55, 53, 47, .045);
  --active: rgba(55, 53, 47, .09);
  --cover: #F7F6F3;
  --olive: #4F5B3E;
  --olive-dark: #3F4931;
  --olive-bg: #E8EBE0;
  --orange: #E2803F;
  --orange-bg: #FAE7D9;
  --orange-text: #9A4E1F;
  --rust: #4F5B3E;
  --rust-soft: #E8EBE0;
  --rose: #A2577A;
  --rose-soft: #F6E6EE;
  --blue: #44708F;
  --blue-soft: #E3EDF3;
  --green: #4F7D5E;
  --green-soft: #E3EFE6;
  --gold: #946B1E;
  --gold-soft: #FBF0D6;
  --danger: #B8483A;
  --day-width: 64px;
  --row-height: 88px;
  --project-width: 260px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  letter-spacing: 0;
}

button,
input,
select,
textarea { font: inherit; letter-spacing: 0; }

button { cursor: pointer; }

.hidden { display: none !important; }

.app-shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 18px 20px;
  color: var(--sidebar-text);
  background: var(--sidebar);
}

.brand { padding: 0 8px 24px; }
.brand p,
.kicker {
  margin: 0 0 8px;
  color: var(--rust);
  font-size: 11px;
  font-weight: 700;
}
.brand p { color: #c89578; }
.brand strong { font-size: 20px; font-weight: 650; }

.nav {
  display: grid;
  gap: 4px;
  padding: 14px 0 20px;
  border-top: 1px solid #403f3d;
  border-bottom: 1px solid #403f3d;
}

.nav-item {
  width: 100%;
  padding: 11px 10px;
  border: 0;
  border-left: 2px solid transparent;
  color: #bdb9b1;
  background: transparent;
  text-align: left;
  font-size: 14px;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.nav-item:hover,
.nav-item.active {
  border-left-color: #dd9068;
  color: #fff;
  background: #32312f;
}

.sidebar-section { padding: 22px 8px 0; }
.sidebar-bottom { margin-top: auto; }
.sidebar-label {
  margin: 0 0 12px;
  color: #8f8b84;
  font-size: 11px;
  font-weight: 700;
}

.member-list { display: grid; gap: 10px; }
.member-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: #d9d5cd;
  font-size: 12px;
}
.member-dot { width: 8px; height: 8px; border-radius: 50%; background: #62a783; }
.member-row small { display: block; color: #89857f; }

.text-command,
.file-command {
  display: block;
  width: 100%;
  padding: 8px 0;
  border: 0;
  color: #a9a59e;
  background: transparent;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}
.text-command:hover { color: #fff; }
.file-command input { display: none; }

.main {
  min-width: 0;
  padding: 38px 42px 72px;
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.app-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 650;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mode-badge,
.sync-status {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.sync-status[data-state="saving"] { color: var(--gold); }
.sync-status[data-state="error"] { color: var(--danger); border-color: #d9aaa4; }
.sync-status[data-state="offline"] { color: var(--muted); }
.current-user { color: var(--ink); font-weight: 650; }

.view { display: none; padding-top: 26px; }
.view.active { display: block; animation: view-in .22s ease; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .view.active { animation: none; }
}

.button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 600;
  font-size: 13px;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.button:hover { border-color: #9f9990; }
.button:active { transform: translateY(1px); }
.button.primary { border-color: var(--rust); color: #fff; background: var(--rust); }
.button.primary:hover { background: #a5572f; border-color: #a5572f; }
.button.compact { min-height: 32px; padding: 0 10px; font-size: 12px; }
.button.danger { color: var(--danger); }

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}
input,
select { height: 38px; padding: 0 10px; }
textarea { min-height: 82px; padding: 10px; resize: vertical; line-height: 1.55; }
input:focus,
select:focus,
textarea:focus { border-color: var(--rust); box-shadow: 0 0 0 2px rgba(184, 100, 59, .1); }

.topic-toolbar { display: grid; gap: 14px; }
.quick-add {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px auto;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.project-add {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  gap: 8px;
  width: min(100%, 560px);
}
.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(130px, 1fr));
  gap: 8px;
}
.topic-summary,
.schedule-summary {
  display: flex;
  gap: 18px;
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.topic-summary strong,
.schedule-summary strong { color: var(--ink); font-size: 17px; }

.topic-list { border-top: 1px solid var(--line); }
.topic-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) 130px 120px 132px 120px 104px;
  gap: 12px;
  align-items: start;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
}
.topic-row:hover { background: rgba(255, 255, 255, .45); }
.topic-title-input {
  height: auto;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  resize: none;
}
.topic-title-input:focus { box-shadow: none; }
.topic-copy { min-width: 0; }
.topic-copy p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.topic-meta { margin-top: 8px; color: var(--faint); font-size: 11px; }
.topic-actions { display: grid; gap: 6px; }
.inline-link { color: var(--rust); text-decoration: none; font-size: 12px; font-weight: 650; }
.inline-link:hover { text-decoration: underline; }

.topic-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0 2px;
  border-top: 1px dashed var(--line);
}
.field-group { display: grid; gap: 6px; }
.field-group.wide { grid-column: span 2; }
.field-group span { color: var(--muted); font-size: 11px; font-weight: 650; }

.schedule-toolbar,
.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.review-toolbar { justify-content: flex-start; }
.review-toolbar input { max-width: 420px; }
.review-toolbar select { width: 220px; }
.month-control { display: flex; align-items: center; gap: 8px; }
.month-control strong { min-width: 105px; text-align: center; }

.timeline-shell {
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.timeline-scroll {
  max-height: 64vh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bcb6ac #ece9e3;
}
.timeline-grid { display: grid; min-width: max-content; }
.timeline-corner,
.timeline-date,
.production-cell,
.day-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.timeline-corner,
.timeline-date {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 58px;
  background: #ece9e3;
}
.timeline-corner {
  left: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.timeline-date {
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}
.timeline-date strong { color: var(--ink); font-size: 15px; }
.timeline-date.today { box-shadow: inset 0 -3px 0 var(--rust); }
.production-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  min-height: var(--row-height);
  padding: 12px;
  background: var(--surface);
}
.production-cell input { height: auto; padding: 0; border: 0; font-weight: 650; background: transparent; }
.production-cell small { display: block; margin-top: 8px; color: var(--muted); }
.production-cell .production-delete { margin-top: 10px; padding: 0; }
.day-cell { position: relative; min-height: var(--row-height); background: #fdfcf9; }
.day-cell:nth-child(even) { background: #faf8f4; }
.day-cell.drop-target { background: var(--rust-soft); }
.task-chip {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 30px;
  width: calc(var(--span) * var(--day-width) - 6px);
  margin: 12px 3px 0;
  padding: 4px 12px 4px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #3a3834;
  background: var(--gold-soft);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
  cursor: grab;
}
.task-chip[data-span="1"] {
  justify-content: center;
  padding: 4px 3px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.08;
  font-size: 10px;
}
.task-chip[data-stage="脚本"] { background: var(--rose-soft); }
.task-chip[data-stage="拍摄"] { background: var(--gold-soft); }
.task-chip[data-stage="剪辑"] { background: var(--blue-soft); }
.task-chip[data-stage="包装"] { background: #e8e3ef; }
.task-chip[data-stage="发布"] { color: #fff; background: var(--rust); }
.task-chip.done { opacity: .52; text-decoration: line-through; }
.task-chip.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(36, 36, 35, .2);
}
.selection-count { color: var(--rust); }
.selection-marquee {
  position: fixed;
  z-index: 20;
  border: 1px solid rgba(190, 98, 54, .85);
  background: rgba(190, 98, 54, .14);
  pointer-events: none;
}
.resize-handle { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: ew-resize; }

.production-list { display: grid; gap: 18px; margin-top: 28px; }
.production-card { border-top: 2px solid var(--ink); padding-top: 14px; }
.production-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}
.production-card h2 { margin: 0; font-size: 21px; font-weight: 650; }
.production-card-meta { margin-top: 8px; color: var(--muted); font-size: 12px; }
.progress-track { height: 5px; margin: 16px 0; background: #dedbd4; }
.progress-fill { height: 100%; background: var(--green); }
.production-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.subsection-title { display: flex; justify-content: space-between; margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.task-list,
.media-list { border-top: 1px solid var(--line); }
.task-row,
.media-row {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.task-row { grid-template-columns: 22px minmax(120px, 1fr) 110px 116px 72px; }
.media-row { grid-template-columns: minmax(90px, .8fr) minmax(130px, 1fr) 106px 110px 32px; }
.task-row input[type="checkbox"] { width: 16px; height: 16px; }
.row-command { border: 0; color: var(--danger); background: transparent; font-size: 15px; }
.order-commands { display: flex; gap: 4px; }
.order-commands button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}
.order-commands button:disabled { opacity: .25; }
.inline-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-top: 8px; }

.review-list { display: grid; gap: 24px; }
.review-row { padding: 18px 0 24px; border-top: 2px solid var(--ink); }
.review-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.review-heading h2 { margin: 7px 0 0; font-size: 21px; font-weight: 650; }
.review-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.review-state { color: var(--muted); font-size: 11px; font-weight: 700; }
.review-state[data-health="有业务反馈"] { color: var(--green); }
.review-state[data-health="高传播"] { color: var(--rust); }
.review-date-field { display: grid; gap: 5px; width: 150px; }
.review-date-field span,
.review-metrics span,
.review-notes span { color: var(--muted); font-size: 11px; font-weight: 650; }
.review-metrics {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1.6fr) repeat(6, minmax(110px, .7fr));
  gap: 8px;
  margin-top: 18px;
}
.review-metrics label,
.review-notes label { display: grid; gap: 6px; }
.review-notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }

.review-toolbar { justify-content: flex-start; }
.review-toolbar input { max-width: 340px; }
.review-toolbar select { max-width: 220px; }
.review-list { border-top: 1px solid var(--line); }
.review-row { padding: 18px 4px; border-bottom: 1px solid var(--line); }
.review-row-header { display: flex; justify-content: space-between; gap: 20px; }
.review-row h2 { margin: 0; font-size: 18px; }
.review-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.review-grid .wide { grid-column: span 2; }

.empty-state { padding: 42px 12px; color: var(--muted); text-align: center; }
.login-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(32, 32, 31, .92);
}
.login-panel { width: min(420px, 100%); padding: 32px; background: var(--surface); }
.login-panel h1 { margin: 0 0 26px; font-size: 28px; }
.login-panel form { display: grid; gap: 14px; }
.login-panel label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.form-error { min-height: 18px; margin: 12px 0 0; color: var(--danger); font-size: 12px; }

.password-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
}
.password-dialog::backdrop { background: rgba(32, 32, 31, .72); }
.password-dialog h2 { margin: 0 0 22px; font-size: 24px; }
.dialog-topic-name { margin: -10px 0 20px; color: var(--muted); font-size: 13px; }
.password-dialog form,
.password-dialog label { display: grid; gap: 12px; }
.password-dialog label { gap: 6px; color: var(--muted); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid #4c4a47;
  border-radius: 5px;
  color: #fff;
  background: #2c2b29;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .18s ease;
  font-size: 12px;
}
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .topic-row { grid-template-columns: minmax(240px, 1fr) 120px 120px 110px; }
  .topic-actions { grid-column: span 2; grid-template-columns: repeat(2, 1fr); }
  .production-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 16px; }
  .brand { padding-bottom: 14px; }
  .nav { grid-template-columns: repeat(5, 1fr); padding: 10px 0; }
  .nav-item { border-left: 0; border-bottom: 2px solid transparent; text-align: center; }
  .nav-item.active { border-bottom-color: #dd9068; }
  .sidebar-section { display: none; }
  .main { padding: 24px 16px 54px; }
  .app-header { align-items: flex-start; }
  .app-header h1 { font-size: 28px; }
  .header-status { flex-wrap: wrap; justify-content: flex-end; }
  .quick-add { grid-template-columns: 1fr; }
  .project-add { grid-template-columns: 1fr; width: 100%; }
  .filters { grid-template-columns: 1fr 1fr; }
  .topic-row { grid-template-columns: 1fr 1fr; }
  .topic-copy { grid-column: 1 / -1; }
  .topic-detail { grid-template-columns: 1fr; }
  .field-group.wide { grid-column: auto; }
  .schedule-toolbar { align-items: flex-start; flex-direction: column; }
  .schedule-summary { flex-wrap: wrap; }
  .month-control { flex-wrap: wrap; }
  .production-card-header { grid-template-columns: 1fr; }
  .production-card-header .month-control { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .production-card-header .month-control select,
  .production-card-header .month-control .inline-link,
  .production-card-header .month-control button { grid-column: 1 / -1; }
  .task-row { grid-template-columns: 22px minmax(0, 1fr); }
  .task-row input[type="date"],
  .task-row select,
  .task-row .order-commands { grid-column: 2; }
  .media-row { grid-template-columns: 1fr; }
  .media-row .row-command { justify-self: start; }
  .review-toolbar { align-items: stretch; flex-direction: column; }
  .review-toolbar input,
  .review-toolbar select { width: 100%; max-width: none; }
  .review-heading { flex-direction: column; }
  .review-date-field { width: 100%; }
  .review-metrics { grid-template-columns: 1fr 1fr; }
  .review-metrics .wide-metric { grid-column: 1 / -1; }
  .review-notes { grid-template-columns: 1fr; }
}

/* ============ 目标作战 ============ */
.goal-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.goal-card {
  padding: 22px 24px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  box-shadow: 0 1px 2px rgba(32, 32, 31, .04), 0 10px 28px -18px rgba(32, 32, 31, .18);
}
.goal-card.empty { border-style: dashed; background: var(--surface); }

.goal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.goal-card-header h2 { margin: 0; font-size: 22px; font-weight: 650; }

.goal-period-nav { display: flex; align-items: center; gap: 6px; }
.goal-nav-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  font-size: 14px;
  line-height: 1;
  transition: border-color .15s ease, color .15s ease;
}
.goal-nav-btn:hover { border-color: var(--rust); color: var(--rust); }
.goal-nav-btn.today { font-size: 12px; }
.goal-period-label {
  min-width: 108px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.goal-period-label.current { color: var(--ink); font-weight: 650; }

.goal-empty-hint { margin: 18px 0 12px; color: var(--muted); font-size: 13px; }
.goal-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 96px auto;
  gap: 8px;
  margin-bottom: 8px;
}

.goal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
}
.goal-title-input {
  height: auto;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
}
.goal-title-input:focus { box-shadow: none; border-color: var(--rust); }
.goal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.goal-fields label,
.goal-manual-value { display: grid; gap: 6px; }
.goal-fields span,
.goal-manual-value span { color: var(--muted); font-size: 11px; font-weight: 650; }

.goal-progress {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border-radius: 8px;
  background: var(--paper);
}
.goal-numbers { display: flex; align-items: baseline; gap: 8px; }
.goal-numbers strong {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.goal-numbers span { color: var(--muted); font-size: 13px; }
.goal-track { height: 6px; margin: 14px 0 10px; border-radius: 3px; }
.goal-track .progress-fill { border-radius: 3px; transition: width .3s ease; }
.goal-progress-note {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: 12px;
}
.goal-progress-note > span { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.goal-progress-note em { color: var(--faint); font-style: normal; }
.goal-manual-value { width: 110px; }
.goal-manual-value input { height: 32px; }

.goal-items { padding-top: 16px; border-top: 1px solid var(--line); }
.goal-item-list { display: grid; }
.goal-item-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto 28px;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.goal-item-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); }
.goal-item-label {
  height: 32px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
}
.goal-item-label:hover { border-color: var(--line); background: var(--surface-strong); }
.goal-item-label:focus { border-color: var(--rust); background: var(--surface-strong); box-shadow: none; }
.goal-item-row.done .goal-item-label { color: var(--faint); text-decoration: line-through; }
.goal-item-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.goal-item-create {
  grid-template-columns: minmax(0, 1fr) 84px auto;
  margin-top: 10px;
}
.goal-card-footer { display: flex; justify-content: flex-end; padding-top: 10px; }
.text-command.danger { width: auto; color: var(--danger); }
.text-command.danger:hover { color: var(--danger); text-decoration: underline; }

@media (max-width: 1100px) {
  .goal-board { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .goal-card { padding: 16px; }
  .goal-card-header { flex-direction: column; }
  .goal-body { grid-template-columns: 1fr; }
  .goal-create-grid { grid-template-columns: 1fr 1fr; }
  .goal-fields { grid-template-columns: 1fr; }
  .goal-numbers strong { font-size: 36px; }
}

/* 目标健康度 */
.goal-health {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
}
.goal-health-chip {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--line);
}
.goal-health[data-status="ahead"] .goal-health-chip,
.goal-health[data-status="achieved"] .goal-health-chip { color: #fff; background: var(--green); }
.goal-health[data-status="on_track"] .goal-health-chip { color: #fff; background: var(--blue); }
.goal-health[data-status="at_risk"] .goal-health-chip { color: #fff; background: var(--gold); }
.goal-health[data-status="behind"] .goal-health-chip,
.goal-health[data-status="missed"] .goal-health-chip { color: #fff; background: var(--danger); }
.goal-health-text { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============ 今日 ============ */
.today-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.today-summary > div {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  box-shadow: 0 1px 2px rgba(32, 32, 31, .04);
}
.today-summary strong {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.today-summary strong small { color: var(--faint); font-size: 16px; font-weight: 600; }
.today-summary strong.warn { color: var(--danger); }
.today-summary span { color: var(--muted); font-size: 12px; }

.today-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.today-panel {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  box-shadow: 0 1px 2px rgba(32, 32, 31, .04);
}
.today-panel .subsection-title { margin-bottom: 6px; }
.today-panel .subsection-title.overdue-title { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

.today-task-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.today-task-row:last-child { border-bottom: 0; }
.today-task-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); }
.today-task-copy { display: grid; gap: 2px; min-width: 0; }
.today-task-copy strong { font-size: 13px; }
.today-task-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.today-overdue-tag { color: var(--danger); font-size: 11px; font-style: normal; font-weight: 700; }

.today-publish-row {
  display: grid;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.today-publish-row:last-child { border-bottom: 0; }
.today-publish-row strong { font-size: 13px; }
.today-publish-row span { color: var(--muted); font-size: 12px; }
.today-empty { padding: 14px 0; margin: 0; color: var(--faint); font-size: 12px; }

@media (max-width: 1100px) {
  .today-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .today-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .today-summary > div { padding: 12px 14px; }
  .today-summary strong { font-size: 24px; }
  .today-panel { padding: 14px 16px; }
}

/* ============ 复盘：星级与规则库 ============ */
.review-heading-side { display: grid; gap: 10px; justify-items: end; }
.star-rating { display: flex; gap: 2px; }
.star-rating .star {
  padding: 0 2px;
  border: 0;
  color: var(--line-strong);
  background: transparent;
  font-size: 20px;
  line-height: 1;
  transition: color .12s ease, transform .12s ease;
}
.star-rating .star:hover { transform: scale(1.15); }
.star-rating .star.on { color: var(--gold); }

.rule-panel {
  margin: 0 0 20px;
  padding: 16px 20px;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  background: #faf6ec;
}
.rule-list { display: grid; }
.rule-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed var(--gold-soft);
  font-size: 13px;
}
.rule-row:last-child { border-bottom: 0; }
.rule-stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; }
.rule-text { color: var(--ink); }
.rule-source {
  overflow: hidden;
  color: var(--faint);
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .rule-row { grid-template-columns: 1fr; gap: 4px; }
  .rule-source { text-align: left; }
}


/* ---- 有稿 v6 visual layer: Notion-like chrome shared across 问号引力 tools ---- */
body { -webkit-font-smoothing: antialiased; font-size: 15px; }
.sidebar { padding: 10px 8px 12px; border-right: 1px solid var(--line); color: var(--ink); background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 9px; padding: 8px 10px 14px; }
.brand-mark { width: 24px; height: 24px; flex: none; border-radius: 6px; display: grid; place-items: center; background: var(--olive-bg); color: var(--olive); font-size: 14px; font-weight: 700; }
.brand strong { font-size: 15px; font-weight: 650; }
.brand p { display: none; }
.nav { gap: 1px; padding: 0; border: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 5px 10px; border: 0; border-radius: 6px; color: var(--muted); font-size: 14px; }
.nav-item .icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { border: 0; color: var(--ink); background: var(--hover); }
.nav-item.active { border: 0; color: var(--ink); background: var(--active); font-weight: 600; }
.sidebar-section { padding: 18px 10px 0; }
.sidebar-label { color: var(--faint); font-size: 12px; font-weight: 500; }
.member-row { color: var(--ink); font-size: 13px; }
.member-dot { background: #6E9F5C; }
.member-row small { color: var(--faint); }
.text-command, .file-command { padding: 5px 0; color: var(--muted); font-size: 13px; }
.text-command:hover, .file-command:hover { color: var(--ink); }

.main { padding: 36px 48px 72px; }
.app-header { padding-bottom: 20px; }
.app-header .kicker { display: none; }
.app-header h1 { font-size: 34px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.kicker { color: var(--faint); font-weight: 600; letter-spacing: .04em; }
.mode-badge, .sync-status { border: 0; border-radius: 4px; padding: 2px 8px; background: rgba(55, 53, 47, .06); color: var(--muted); }
.mode-badge { background: var(--olive-bg); color: var(--olive); }
.sync-status[data-state="saving"] { color: var(--orange-text); background: var(--orange-bg); }
.sync-status[data-state="error"] { color: var(--danger); background: #FBE4E0; }

.button { min-height: 34px; border-color: var(--line-strong); border-radius: 6px; background: #fff; font-weight: 500; font-size: 14px; }
.button:hover { border-color: var(--line-strong); background: var(--hover); }
.button.primary { border-color: var(--olive); background: var(--olive); color: #fff; }
.button.primary:hover { border-color: var(--olive-dark); background: var(--olive-dark); }
.button.compact { min-height: 30px; font-size: 13px; }
.button.danger { color: var(--danger); }
input, select, textarea { border-color: var(--line-strong); border-radius: 6px; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: #C9C8C2; }
input:focus, select:focus, textarea:focus { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(79, 91, 62, .14); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.inline-link { color: var(--olive); }
.topic-row { border-radius: 4px; }
.topic-row:hover { background: var(--hover); }
.topic-summary strong, .schedule-summary strong { font-weight: 700; }

.timeline-shell { border-radius: 8px; }
.timeline-corner, .timeline-date { background: var(--cover); }
.timeline-date.today { box-shadow: inset 0 -3px 0 var(--orange); }
.day-cell { background: #fff; }
.day-cell:nth-child(even) { background: #FCFCFB; }
.day-cell.drop-target { background: var(--orange-bg); }
.task-chip { border-radius: 4px; color: var(--ink); }
.task-chip[data-stage="发布"] { color: #fff; background: var(--orange); }
.selection-count { color: var(--orange-text); }
.selection-marquee { border-color: rgba(226, 128, 63, .85); background: rgba(226, 128, 63, .12); }
.production-card { border-top: 1px solid var(--line); }

.login-layer { background: var(--paper); }
.login-panel { border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(55, 53, 47, .1), 0 8px 30px rgba(55, 53, 47, .08); }
.login-panel .art { display: block; width: 120px; height: 90px; margin: 0 0 6px -6px; }
.art { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.art .w { fill: #fff; } .art .o2 { fill: var(--orange); } .art .ink { fill: var(--ink); } .art .eye { stroke-width: 3.6; }
.password-dialog { border: 0; border-radius: 10px; box-shadow: 0 0 0 1px rgba(15, 15, 15, .05), 0 12px 40px rgba(15, 15, 15, .2); }
.password-dialog::backdrop { background: rgba(15, 15, 15, .4); }
.toast { border-radius: 8px; background: var(--ink); color: #fff; }
.production-card-header .inline-link, .production-card-header .button, .row-command { white-space: nowrap; flex: none; }
@media (max-width: 760px) {
  .sidebar { padding: 0; border: 0; background: #fff; }
  .brand { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
  .nav-item { flex: 1; flex-direction: column; justify-content: center; gap: 2px; min-height: 48px; padding: 4px 0; border: 0; color: var(--faint); font-size: 11px; text-align: center; background: none; }
  .nav-item:hover, .nav-item.active { border: 0; background: none; }
  .nav-item.active { color: var(--ink); }
  .main { padding: 24px 16px 104px; }
  .app-header h1 { font-size: 26px; }
  .toast { left: 16px; right: 16px; bottom: 84px; max-width: none; }
}

/* ---- Phone density: smaller type, shorter controls, fewer controls per row ---- */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .brand { padding: 10px 16px; }
  .brand-mark { width: 22px; height: 22px; font-size: 12px; }
  .brand strong { font-size: 14px; }
  .main { padding: 14px 14px 92px; }
  .app-header { flex-direction: row; align-items: center; gap: 8px; padding-bottom: 10px; }
  .app-header h1 { font-size: 22px; }
  .header-status { flex-wrap: nowrap; gap: 6px; font-size: 11px; }
  .sync-status { display: none; }
  .view { padding-top: 12px; }
  input, select { height: 34px; padding: 0 9px; font-size: 14px; }
  textarea { font-size: 14px; }
  .button { min-height: 32px; padding: 0 10px; font-size: 13px; }
  .button.compact { min-height: 28px; padding: 0 9px; font-size: 12px; }
  .nav-item { min-height: 44px; font-size: 10px; }
  .nav-item .icon { width: 19px; height: 19px; }

  /* 选题库: one add bar, two filters, tag-like selects, one-line actions */
  .topic-toolbar { gap: 8px; }
  .quick-add { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding-bottom: 10px; }
  .quick-add input[name="title"] { grid-column: 1 / -1; }
  .project-add { display: none; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .filters input[type="search"] { grid-column: 1 / -1; }
  .filters select[name="content_line"], .filters select[name="priority"], .filters select[name="owner_id"] { display: none; }
  .topic-summary, .schedule-summary { gap: 12px; margin: 10px 0 4px; font-size: 11px; }
  .topic-summary strong, .schedule-summary strong { font-size: 15px; }
  .topic-row { gap: 6px; padding: 12px 2px; }
  .topic-title-input { min-height: 0; height: auto; field-sizing: content; font-size: 15px; }
  .topic-copy p { margin-top: 2px; font-size: 12px; }
  .topic-meta { margin-top: 2px; }
  .topic-row > select { height: 28px; padding: 0 6px; border-color: transparent; background-color: var(--cover); font-size: 12px; color: var(--muted); }
  .topic-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }
  .topic-detail { gap: 8px; }

  /* 制作排期: narrower days, two-line task rows, no reorder buttons */
  :root { --day-width: 44px; --row-height: 64px; }
  .schedule-toolbar { gap: 8px; margin-bottom: 4px; }
  .month-control { gap: 6px; }
  .month-control strong { min-width: 0; font-size: 14px; }
  .timeline-corner { padding: 0 10px; font-size: 11px; }
  .timeline-date strong { font-size: 13px; }
  .production-cell { padding: 8px 10px; font-size: 12px; }
  .production-list { gap: 16px; margin-top: 18px; }
  .production-card h2 { font-size: 17px; }
  .production-card-header { gap: 10px; }
  .production-card-header .month-control { gap: 6px; }
  .production-card-header .month-control select,
  .production-card-header .month-control .inline-link,
  .production-card-header .month-control button { grid-column: auto; }
  .progress-track { margin: 10px 0; }
  .task-row { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr); gap: 4px 6px; padding: 6px 0; }
  .task-row [data-task-field="label"] { grid-column: 2 / -1; }
  .task-row input[type="date"] { grid-column: 2; }
  .task-row select { grid-column: 3; }
  .task-row .order-commands { display: none; }
  .task-row input:not([type="checkbox"]), .task-row select,
  .media-row input, .media-row select { height: 30px; border-color: transparent; background-color: var(--cover); font-size: 13px; }
  .media-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 6px; }
  .media-row input[data-media-field="scene"] { grid-column: 1 / -1; }
  .inline-create { gap: 6px; }

  /* 今日 / 目标 / 复盘 */
  .today-summary { gap: 8px; }
  .today-summary > div { padding: 10px 12px; }
  .today-summary strong { font-size: 22px; }
  .today-summary strong small { font-size: 13px; }
  .today-summary span { font-size: 11px; }
  .today-panel { padding: 12px 14px; }
  .today-task-copy strong { font-size: 13px; }
  .subsection-title { font-size: 12px; }
  .empty-state { padding: 22px 8px; }
  .toast { padding: 9px 12px; font-size: 12px; }
}
