:root {
  --bg: #f3f3f5;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #8a8a8e;
  --line: #ececee;
  --line-strong: #e2e2e6;
  --soft: #f7f7f8;
  --chip: #f0f0f2;
  --accent: #111111;
  --blue: #3b6cff;
  --green: #2f9d63;
  --shipinhao: #fa9d3b;
  --shipinhao-text: #a85a00;
  --gongzhonghao: #2b6b4f;
  --xiaohongshu: #c1263b;
  --douyin: #222222;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 10px 28px rgba(17, 17, 17, 0.04);
  --radius: 20px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "SF Pro Text", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font-size: 15px; line-height: 1.65; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.topbar {
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand {
  justify-self: start;
  text-decoration: none;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--soft);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.tab {
  text-decoration: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: #444;
}
.tab:hover { color: var(--ink); }
.tab.on { background: #111; color: #fff; }

#app { min-height: calc(100vh - 64px); }
.view { padding: 28px 36px 48px; }
.view[hidden], [hidden] { display: none !important; }

.date-line {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.hero-status {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
  font-weight: 300;
  font-size: 40px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.hero-status.compact { font-size: 28px; text-align: left; margin: 8px 0 12px; }
.hero-status .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25em;
  font-weight: 400;
  position: relative;
  z-index: 0;
  padding: 0 4px;
}
.hero-status .num::before {
  content: "";
  position: absolute;
  inset: 4px -6px;
  background: #ececee;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.9;
}

.capture {
  width: min(560px, 100%);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.capture input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  min-width: 0;
}
.send {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #d9d9de;
  color: #fff;
  font-size: 16px;
  display: grid;
  place-items: center;
}
.capture:focus-within .send, .send:hover { background: #111; }

.insp-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 8px auto 28px;
  max-width: min(1760px, 100%);
}
.filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
}
.insp-cols {
  display: flex;
  align-items: center;
  gap: 4px;
}
.insp-cols-label {
  color: var(--muted);
  font-size: 13px;
  margin-right: 4px;
  white-space: nowrap;
}
.chip {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.chip.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.idea-grid {
  --idea-cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--idea-cols), minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: stretch;
}
.idea-grid[data-cols="5"] { max-width: 1560px; }
.idea-grid[data-cols="6"] { max-width: 1760px; }
.idea-grid[data-cols="5"] .idea-cover,
.idea-grid[data-cols="5"] .idea-cover-placeholder { height: 140px; }
.idea-grid[data-cols="6"] .idea-cover,
.idea-grid[data-cols="6"] .idea-cover-placeholder { height: 120px; }
.idea-grid[data-cols="5"] .idea-card h3,
.idea-grid[data-cols="6"] .idea-card h3 { font-size: 14px; }
.idea-grid[data-cols="6"] .excerpt {
  -webkit-line-clamp: 3;
  min-height: calc(1.45em * 3);
  max-height: calc(1.45em * 3);
}
.idea-grid[data-cols="5"] .idea-meta,
.idea-grid[data-cols="6"] .idea-meta { flex-wrap: wrap; }
.idea-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0;
  text-align: left;
  background: #fff;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.idea-card:hover { transform: translateY(-1px); }
.idea-cover,
.idea-cover-placeholder {
  width: 100%;
  height: 180px;
  flex: 0 0 auto;
  object-fit: cover;
  display: block;
  background: var(--chip);
}
.idea-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 18px 14px;
}
.idea-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex: 0 0 auto; }
.idea-card h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.45em * 2);
}
.idea-card .excerpt {
  margin-top: 8px;
  color: #555;
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.45em * 4);
  max-height: calc(1.45em * 4);
}
.idea-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 24px;
}
.dot-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.dot-label .dot { width: 8px; height: 8px; border-radius: 50%; background: #7c7cff; }
.dot-label .dot.saved { background: var(--green); }
.status-chip {
  font-size: 11px;
  color: var(--muted);
  background: var(--chip);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.status-chip.ok { color: var(--green); background: #e8f6ee; }
.status-chip.pending { color: var(--green); background: #e8f6ee; }
.status-chip.done { color: var(--muted); background: var(--chip); }
.status-chip.overdue { color: #8a5a12; background: #f8efd8; }

.page-title { font-size: 36px; font-weight: 500; letter-spacing: 0.02em; }
.summary-line, .hint, .tz-note { color: var(--muted); font-size: 13px; margin-top: 6px; }
.empty-inline, .empty-panel { color: var(--muted); font-size: 14px; padding: 16px 0; }
.empty-panel { padding: 48px 16px; text-align: center; }

.content-head, .dashboard-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dashboard-head { flex-direction: column; align-items: stretch; }
.content-tools { display: flex; gap: 10px; align-items: center; }
.content-tools input[type="search"] {
  width: 260px;
  border: 0;
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  box-shadow: var(--shadow);
  outline: none;
}
.seg { display: flex; background: var(--chip); border-radius: 10px; padding: 3px; }
.seg-btn { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font-size: 13px; color: #555; }
.seg-btn.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.content-edit { display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 16px; align-items: start; }
.piece-rail, .queue-rail, .dash-col, .editor-pane, .board-col {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.piece-rail { padding: 16px 12px; position: sticky; top: 80px; }
.rail-label, .rail-head h2 { font-size: 13px; color: var(--muted); font-weight: 650; }
.piece-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 10px;
  margin-top: 4px;
}
.piece-item:hover, .piece-item.on { background: var(--soft); }
.piece-item strong { display: block; font-size: 13px; line-height: 1.4; }

.editor-pane { padding: 20px; }
.editor-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.theme-field { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.theme-field span { font-size: 12px; color: var(--muted); }
.theme-field input, .field input, .field textarea, .field select, input[type="date"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 12px;
  background: var(--soft);
  outline: none;
}
.theme-field input:focus, .field input:focus, .field textarea:focus, .field select:focus, input[type="date"]:focus {
  border-color: #111;
  background: #fff;
}
.status-line { min-height: 1.4em; font-size: 13px; color: var(--muted); flex: 1; }
.status-line.dirty { color: #8a3b12; }
.status-line.ok { color: var(--green); }

.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.platform {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  background: #fff;
}
.platform.focused { outline: 2px solid #111; }
.platform-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.platform-name { font-size: 15px; font-weight: 700; }
.platform[data-platform="shipinhao"] .platform-name { color: var(--shipinhao-text); }
.platform[data-platform="gongzhonghao"] .platform-name { color: var(--gongzhonghao); }
.platform[data-platform="xiaohongshu"] .platform-name { color: var(--xiaohongshu); }
.platform[data-platform="douyin"] .platform-name { color: var(--douyin); }
.independent { font-size: 11px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field span, .cover-label { font-size: 12px; color: var(--muted); }
.field textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.platform[data-platform="gongzhonghao"] textarea { min-height: 180px; }
.cover-row, .slot-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thumb, .slot {
  width: 64px; height: 64px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--soft) center/cover no-repeat;
  display: grid; place-items: center;
  font-size: 11px; color: var(--muted);
  overflow: hidden;
}
.thumb.has-image, .slot.has-image { border-style: solid; }
.thumb img, .slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-btn, .linkish { border: 0; background: none; color: #333; cursor: pointer; padding: 0; text-decoration: underline; font-size: 12px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-actions { display: flex; flex-direction: column; gap: 2px; }

.btn {
  border: 0;
  background: var(--chip);
  border-radius: 999px;
  padding: 8px 16px;
}
.btn.primary { background: #111; color: #fff; }
.btn.ghost { background: transparent; }
.ghost-btn, .today-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
}
.today-btn { padding: 6px 14px; }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.board-col { padding: 14px; min-height: 240px; background: var(--soft); box-shadow: none; }
.board-col h3 { font-size: 14px; font-weight: 650; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.board-card {
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.board-card .when { color: var(--blue); font-size: 12px; margin-top: 6px; }
.board-card img { width: 100%; height: 100px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; display: block; }

.schedule-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  padding: 20px 24px 32px;
  align-items: start;
}
.schedule-main { min-width: 0; }
.cal-hero { padding: 8px 8px 0; }
.cal-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cal-month-block { display: flex; align-items: flex-start; gap: 14px; }
.cal-month-num { font-size: 88px; font-weight: 400; line-height: 0.85; letter-spacing: -0.04em; }
.cal-year { color: var(--muted); font-size: 14px; margin-top: 10px; }
.cal-month-name { font-size: 28px; font-weight: 300; font-style: italic; }
.cal-stats { display: flex; gap: 28px; color: var(--muted); font-size: 13px; }
.cal-stats b { display: block; color: var(--ink); font-size: 22px; font-weight: 500; }
.cal-nav { display: flex; gap: 8px; align-items: center; }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.dow {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 4px;
}
.day {
  min-height: 118px;
  background: #f7f7f8;
  border-radius: 16px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid transparent;
}
.day.mute { opacity: 0.45; }
.day.today { background: #efefef; }
.day .num {
  font-size: 22px;
  font-weight: 450;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.day.today .num { background: #111; color: #fff; }
.day.drag-over, .queue-list.drag-over { outline: 2px solid #111; background: #ececee; }

.queue-rail { padding: 18px 16px; position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rail-head p { font-size: 12px; color: var(--muted); }
.queue-list { min-height: 80px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.queue-group { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.queue-item, .cal-item {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 10px 28px 10px 12px;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid var(--line);
  min-width: 0;
  overflow: hidden;
}
.cal-item { padding: 4px 20px 4px 6px; font-size: 11px; box-shadow: none; }
.item-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #666;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.12);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
}
.item-remove:hover, .item-remove:focus {
  background: #c44747;
  color: #fff;
  box-shadow: none;
  outline: none;
}
.cal-item .item-remove {
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  font-size: 12px;
}
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.32);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.confirm-dialog {
  width: min(420px, 100%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 22px 22px 18px;
}
.confirm-dialog h2 { font-size: 18px; font-weight: 650; margin: 0 0 10px; }
.confirm-dialog p { margin: 0; font-size: 14px; line-height: 1.65; color: #333; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.confirm-actions .btn.danger {
  background: #c44747;
  color: #fff;
  border-color: #c44747;
}
.queue-item:active, .cal-item:active { cursor: grabbing; }
.queue-item.selected, .cal-item.selected { border-color: #111; }
.item-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.item-meta { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 0 0 auto; }
.item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 650; }
.queue-item small, .cal-item small {
  display: block; color: var(--muted); font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-item small { display: none; }
.cal-item .item-head { flex-wrap: nowrap; gap: 4px; }
.cal-item .item-meta { gap: 4px; }
.cal-item .issue-no { font-size: 10px; padding: 0 6px; }
.cal-item .status-chip {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-item .item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  word-break: break-word;
}
.platform-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 999px;
  line-height: 1.7;
  white-space: nowrap;
}
.platform-badge.shipinhao { background: var(--shipinhao); color: var(--ink); }
.platform-badge.gongzhonghao { background: #e7f1ec; color: var(--gongzhonghao); }
.platform-badge.xiaohongshu { background: #fde8eb; color: var(--xiaohongshu); }
.platform-badge.douyin { background: #ececec; color: var(--douyin); }

.fallback-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.fallback-row input[type="date"] { width: auto; padding: 4px 8px; }

.dash-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-col { padding: 18px; }
.dash-col h2 { font-size: 18px; font-weight: 550; }
.dash-col.pending h2 { color: var(--green); }
.dash-month-group {
  margin: 16px 0 8px;
}
.dash-month-group:first-child { margin-top: 4px; }
.dash-month {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.dash-month::-webkit-details-marker { display: none; }
.dash-month::marker { content: ""; font-size: 0; }
.dash-month-chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}
.dash-month-group[open] .dash-month-chevron { transform: rotate(0deg); }
.dash-month-label { min-width: 0; }
.dash-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--soft);
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
  cursor: pointer;
}
.dash-row:hover { background: #eeeef1; }
.dash-row .theme { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.dash-row .when { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.dash-row .dash-publish {
  font-size: 13px;
  padding: 6px 12px;
  background: #111;
  color: #fff;
}
.dash-row .dash-publish:hover { opacity: 0.9; }
.dash-row .dash-reschedule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-self: end;
}
.dash-row .dash-reschedule input[type="date"] {
  width: auto;
  padding: 4px 8px;
  font-size: 12px;
}
.dash-row .dash-reschedule-btn {
  font-size: 13px;
  padding: 6px 12px;
}
.dash-row .when .sched-date { color: inherit; }
.dash-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--chip); }

.noscript { padding: 20px; }


.benchmark {
  max-width: 1180px;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: start;
}
.benchmark-card, .benchmark-history {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px 24px;
}
.benchmark-card h2, .benchmark-history h3 {
  font-size: 18px;
  font-weight: 650;
}
.benchmark-card .hint { margin: 8px 0 16px; }
.benchmark-browser,
.benchmark-key {
  background: var(--soft);
  border-radius: 14px;
  padding: 12px 14px 14px;
  margin-bottom: 16px;
}
.benchmark-browser {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.benchmark-browser p,
.benchmark-key p {
  font-size: 13px;
  color: #444;
  margin: 0;
  flex: 1;
}
.benchmark-browser .btn { flex: 0 0 auto; }
.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}
.source-pill {
  font-size: 12px;
  color: #333;
  background: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid var(--line);
}
.benchmark-key p {
  font-size: 13px;
  color: #444;
  margin-bottom: 10px;
}
.benchmark-key-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.benchmark-key-row .field { flex: 1; min-width: 0; }
.benchmark-key-row .btn { flex: 0 0 auto; margin-bottom: 0; }
.benchmark-form { display: flex; flex-direction: column; gap: 12px; }
.benchmark-form textarea { min-height: 140px; resize: vertical; }
.benchmark-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.benchmark-actions .status-line { flex: 1; min-width: 160px; margin: 0; }
.benchmark-result { margin-top: 18px; }
.benchmark-source {
  font-size: 13px;
  color: #555;
  margin-bottom: 12px;
}
.benchmark-source a { color: #333; word-break: break-all; }
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.analysis-block {
  background: var(--soft);
  border-radius: 14px;
  padding: 12px 14px;
}
.analysis-block.wide { grid-column: 1 / -1; }
.analysis-block h4 {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 6px;
}
.analysis-block p, .analysis-block li { font-size: 14px; line-height: 1.65; }
.analysis-block ul { margin: 0; padding-left: 1.2em; }
.analysis-warn {
  background: #f8ecec;
  color: #8a2b2b;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 10px;
}
.benchmark-history .empty-inline { padding: 12px 0 0; }
.analysis-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--soft);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0 0;
  cursor: pointer;
}
.analysis-item:hover { background: var(--chip); }
.analysis-item.on { outline: 1px solid #111; }
.analysis-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.analysis-item h4 {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  flex: 1;
}
.analysis-item .when { color: var(--muted); font-size: 12px; margin-top: 6px; }
.analysis-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .idea-grid[data-cols="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benchmark { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .content-edit, .schedule-view, .dash-grid, .platforms { grid-template-columns: 1fr; }
  .piece-rail, .queue-rail { position: static; }
  .cal-month-num { font-size: 64px; }
  .hero-status { font-size: 30px; }
  .board { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .idea-grid { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; height: auto; gap: 8px; padding: 10px; }
  .tabs { justify-self: start; overflow-x: auto; }
  .view { padding: 16px; }
}


.platform-rail {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 10px;
  position: sticky;
  top: 80px;
}
.platform-rail .rail-label { margin: 0 6px 8px; }
.platform-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 10px;
  margin-top: 4px;
}
.platform-btn:hover { background: var(--soft); }
.platform-btn.on { background: #111; color: #fff; }
.platform-btn strong { display: block; font-size: 14px; }
.platform-btn small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.platform-btn.on small { color: rgba(255,255,255,0.72); }
.platform-btn[data-platform="shipinhao"]:not(.on) strong { color: var(--shipinhao-text); }
.platform-btn[data-platform="gongzhonghao"]:not(.on) strong { color: var(--gongzhonghao); }
.platform-btn[data-platform="xiaohongshu"]:not(.on) strong { color: var(--xiaohongshu); }
.platform-btn[data-platform="douyin"]:not(.on) strong { color: var(--douyin); }

.editor-theme-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.theme-switch, .theme-field { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.theme-switch span, .theme-field span { font-size: 12px; color: var(--muted); }
.theme-switch select {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 12px;
  background: #fff;
  outline: none;
  min-width: 220px;
  max-width: 360px;
}

.studio-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 20px;
  align-items: start;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 16px;
  margin-bottom: 14px;
}
.studio-title {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 32px;
  font-weight: 550;
  line-height: 1.35;
  outline: none;
  resize: none;
  min-height: 88px;
  padding: 0;
}
.studio-tags { margin-top: 10px; max-width: 420px; }
.cover-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #ececf0, #d9d9de);
  border: 1px solid var(--line);
}
.cover-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-card .cover-actions {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cover-card .pill-btn {
  background: rgba(255,255,255,0.94);
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.studio-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.studio-meta .stat { display: inline-flex; align-items: center; gap: 6px; }
.studio-schedule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.studio-schedule input[type="date"] {
  width: auto;
  padding: 4px 8px;
}
.studio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.studio-actions .btn,
.studio-actions .studio-published {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  box-sizing: border-box;
  vertical-align: middle;
}
.studio-actions .btn.primary { background: #111; color: #fff; }
.studio-actions .studio-published {
  color: var(--muted);
  cursor: default;
}
.studio-actions .btn.copied { background: #e8f6ee; color: var(--green); }

.studio-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  min-height: 480px;
}
.studio-cols.article { grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr); }
.script-panel, .shots-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 20px;
  min-width: 0;
  min-height: 480px;
}
.panel-label { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.script-panel textarea {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  resize: vertical;
  min-height: 52vh;
  font-size: 20px;
  line-height: 1.7;
  font-weight: 400;
  padding: 0;
}
.shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shot-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--soft);
  min-width: 0;
}
.shot-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ececf0;
  display: grid;
  place-items: center;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 300;
  color: rgba(17,17,17,0.14);
  pointer-events: none;
  letter-spacing: 0.04em;
}
.shot-frame.has-image .shot-num { color: rgba(255,255,255,0.35); }
.shot-upload {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
}
.shot-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.shot-body textarea {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  resize: vertical;
  min-height: 44px;
  font-size: 12px;
  line-height: 1.5;
}
.shot-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.shot-tools button { border: 0; background: transparent; color: var(--muted); font-size: 11px; padding: 0; }
.shot-add {
  border: 1px dashed var(--line-strong);
  background: #fff;
  border-radius: 14px;
  padding: 18px 8px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .platform-rail { position: static; }
  .studio-head, .studio-cols, .studio-cols.article, .shot-grid { grid-template-columns: 1fr; }
  .studio-title { font-size: 26px; }
}

.editor-theme-bar { align-items: flex-end; }
.editor-theme-bar .status-line {
  flex: 1 1 200px;
  min-width: 140px;
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-theme-bar .status-line.dirty,
.editor-theme-bar .status-line.ok {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.studio-title { min-height: 52px; max-height: 120px; font-size: 30px; }
.studio-tags {
  display: block;
  width: 100%;
  max-width: 480px;
  margin-top: 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 0;
  background: transparent;
}
.studio-tags:focus { border-color: #111; background: transparent; outline: none; }
.studio-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 560px;
  margin-top: 4px;
}
.studio-tags-row .studio-tags {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  max-width: none;
}
.studio-tags-row .btn {
  flex: 0 0 auto;
  background: var(--chip);
  padding: 4px 10px;
  font-size: 12px;
}
.keep-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}
.keep-tags input { margin: 0; }
.studio-head { padding: 18px 22px 14px; }
.studio-meta { margin-top: 10px; }
.studio-actions { margin-top: 10px; }

.issue-no {
  font-size: 12px;
  color: var(--muted);
  background: var(--chip);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  line-height: 1.6;
}
#editor-issue {
  margin: 0 0 10px;
  align-self: center;
  font-size: 13px;
  font-weight: 650;
  color: #333;
  background: var(--soft);
}
.idea-delete {
  border: 0;
  background: transparent;
  color: #8a2b2b;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
.idea-delete:hover { text-decoration: underline; }
.btn.danger {
  background: #f8ecec;
  color: #8a2b2b;
}
.studio-actions .btn.danger { background: #f8ecec; color: #8a2b2b; }
#delete-piece {
  margin: 0 0 8px;
  flex: 0 0 auto;
}
.item-issue, .dash-row .issue-no, .board-card .issue-no {
  margin-top: 4px;
  display: inline-block;
}

#benchmark-url-recognized { margin: 4px 0 0; color: var(--green); }

.topbar-actions { justify-self: end; display: flex; align-items: center; }
.settings-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}
.settings-btn:hover { background: var(--soft); }
.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.28);
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 80px 24px 24px;
}
.settings-panel {
  width: min(420px, 100%);
  max-height: calc(100vh - 104px);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 20px 22px 24px;
}
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.settings-head h2 { font-size: 20px; font-weight: 600; }
.settings-block { margin-bottom: 22px; }
.settings-block h3 { font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.settings-block .btn { margin-top: 10px; }
.settings-block .hint { margin-top: 8px; }

.analyze-view {
  padding: 16px 20px 20px;
  height: calc(100vh - 64px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.analyze-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.analyze-setup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 14px;
}
.analyze-setup p { margin: 0; font-size: 13px; color: #555; }
.analyze-setup .btn { margin: 0; }
.analyze-bar {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px 10px;
  box-shadow: var(--shadow);
}
.analyze-bar-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.analyze-url-field { flex: 1; min-width: 0; }
.analyze-platform-field { flex: 0 0 180px; }
.analyze-bar .btn { margin-bottom: 0; height: 40px; }
.analyze-bar .field span { font-size: 12px; color: var(--muted); }
.analyze-bar input, .analyze-bar select, .analyze-bar textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 8px 12px;
  outline: none;
}
.analyze-bar #benchmark-url-recognized { margin: 6px 0 0; color: var(--green); }
.analyze-extra { margin-top: 8px; }
.analyze-extra summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.analyze-extra .field { margin-top: 8px; }
.analyze-extra textarea { min-height: 72px; }
.analyze-bar .status-line { margin: 8px 0 0; }
.analyze-columns {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 240px;
  gap: 16px;
}
@media (min-width: 1280px) {
  .analyze-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 260px;
  }
}
@media (min-width: 1440px) {
  .analyze-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 280px;
  }
}
.analyze-col {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 20px;
}
.analyze-history { /* width comes from the grid track (220–280px) */ }
.analyze-col h3 {
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 12px;
}
.analyze-source-head { margin-bottom: 12px; }
.analyze-source-head .kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.analyze-source-head h2 {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.analyze-meta { color: #555; font-size: 13px; margin: 4px 0; }
.analyze-link {
  display: block;
  color: #333;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-all;
  margin: 8px 0 10px;
}
.analyze-excerpt, .analyze-body {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.analyze-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.analyze-images img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--chip);
  display: block;
}
.analysis-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.analysis-block { background: transparent; padding: 0; border: 0; }
.analysis-block h4 {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.analysis-block p {
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  margin: 0 0 8px;
}
.analysis-block p:last-child { margin-bottom: 0; }
.analysis-block ul { margin: 0; padding-left: 1.2em; }
.analysis-block li { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.analyze-history .analysis-item {
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.analyze-history .analysis-item:last-child { border-bottom: 0; }
.analyze-history .analysis-item h4 {
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.analyze-history .analysis-item.on {
  outline: none;
  background: var(--soft);
  border-radius: 12px;
  margin: 0 -8px;
  padding: 10px 8px;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}
.draft-chat {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 16px;
  min-width: 0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}
.chat-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}
.chat-sub {
  margin: 4px 0 10px;
  font-size: 12px;
  color: var(--muted);
}
.chat-log {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  max-height: 46vh;
  padding-right: 2px;
}
.chat-empty {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0;
}
.chat-msg {
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.chat-msg.user {
  background: var(--soft);
  align-self: flex-end;
  max-width: 92%;
}
.chat-msg.assistant {
  background: var(--chip);
  align-self: stretch;
}
.chat-receipts, .chat-errors {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.chat-receipts li { color: #2c6a3a; }
.chat-errors li { color: #8a2b2b; }
.chat-undo {
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
.chat-undo:hover { text-decoration: underline; }
.chat-composer {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-composer textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 10px;
  resize: vertical;
  min-height: 64px;
  outline: none;
}
.chat-composer textarea:focus { border-color: #111; }
.format-toggle, .style-pick, .gen-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.format-toggle .chip.on, .insp-cols .chip.on { background: #111; color: #fff; }
.studio-actions .chip {
  border: 0;
  background: var(--chip);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
}
.studio-actions .chip.on { background: #111; color: #fff; }
#studio-style {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px 10px;
  background: #fff;
  max-width: 220px;
}
.studio-actions .btn:disabled, .chat-composer .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.style-panel { max-width: 720px; width: min(720px, calc(100vw - 32px)); }
.style-list { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 18px; }
.style-cat { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.style-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.style-card {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: none;
}
.style-card.on { border-color: #111; background: var(--soft); }
.style-card strong { display: block; font-size: 14px; }
.style-card p { margin: 4px 0 8px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.style-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.style-card-actions button, .style-none {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
.style-none { margin-bottom: 8px; }
@media (max-width: 1280px) {
  .studio-layout { grid-template-columns: 1fr; }
  .draft-chat { position: static; max-height: none; }
}
@media (max-width: 720px) {
  .style-cards { grid-template-columns: 1fr; }
}

/* 公众号工作室：手机宽度预览 + 出图 / 推草稿 */
.gzh-work { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.gzh-toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  align-items: center;
}
.gzh-toolbar-left, .gzh-toolbar-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gzh-field-inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.gzh-field-inline select { min-width: 140px; }
.gzh-pill {
  font-size: 12px; color: var(--muted); background: var(--soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.gzh-cols {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(240px, 1fr);
  gap: 18px;
  align-items: start;
}
.gzh-phone-wrap { position: sticky; top: 80px; }
.gzh-phone {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  background: #111;
  border-radius: 28px;
  padding: 12px 10px 18px;
  box-shadow: var(--shadow);
}
.gzh-screen {
  background: #fff;
  min-height: 520px;
  border-radius: 18px;
  overflow: hidden;
  color: #3f3f3f;
}
.gzh-cover {
  display: block; width: 100%; border: 0; padding: 0; background: #e8edf3;
  aspect-ratio: 2.35 / 1; overflow: hidden; cursor: pointer;
}
.gzh-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gzh-cover span, .gzh-figure-empty {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 72px;
  color: #7b8798; font-size: 13px; padding: 12px; text-align: center;
}
.gzh-cover.on, .gzh-section.on { outline: 2px solid var(--blue); outline-offset: -2px; }
.gzh-title, .gzh-sub, .gzh-summary, .gzh-section h2, .gzh-section-body {
  outline: none; white-space: pre-wrap; word-break: break-word;
}
.gzh-title {
  margin: 14px 2px 8px; font-size: 22px; line-height: 1.4; font-weight: 700;
}
.gzh-sub { margin: 0 2px 10px; font-size: 14px; line-height: 1.7; }
.gzh-summary { margin: 0 0 16px; padding: 12px 14px; font-size: 14px; line-height: 1.8; }
.gzh-title:empty::before, .gzh-sub:empty::before, .gzh-summary:empty::before,
.gzh-section h2:empty::before, .gzh-section-body:empty::before {
  content: attr(data-placeholder);
  color: #98a2b3;
  font-weight: 400;
}
.gzh-section { margin: 8px 0; padding: 4px 2px 8px; }
.gzh-section h2 {
  margin: 22px 0 10px; font-size: 18px; line-height: 1.5; font-weight: 700;
  padding-left: 8px;
}
.gzh-section-body { min-height: 2.4em; }
.gzh-figure { margin: 10px 0 16px; text-align: center; }
.gzh-figure img { width: 100%; display: block; }
.gzh-caption { margin: 8px 0 0; font-size: 12px; line-height: 1.6; }
.gzh-divider { margin: 18px 8px; }
.gzh-divider.dots { text-align: center; letter-spacing: 8px; color: #c0c0c0; border: 0; }
.gzh-add-section {
  display: block; width: calc(100% - 16px); margin: 8px auto 16px;
  border: 1px dashed var(--line-strong); background: transparent;
  border-radius: 10px; padding: 10px; color: var(--muted);
}
.gzh-phone-tip { margin: 10px 4px 0; }
.gzh-inspector {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 16px 20px; min-height: 320px;
}
.gzh-inspector h3 { font-size: 16px; margin-bottom: 6px; }
.gzh-inspector h4 { font-size: 13px; margin: 16px 0 8px; color: var(--muted); font-weight: 600; }
.gzh-field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: 13px; color: var(--muted); }
.gzh-field input, .gzh-field textarea, .gzh-field-inline select,
.settings-block input, .settings-block select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 10px; background: #fff;
}
.gzh-inspector-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.gzh-versions { display: flex; flex-direction: column; gap: 8px; }
.gzh-version {
  display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: center;
  text-align: left; border: 1px solid var(--line); background: var(--soft);
  border-radius: 12px; padding: 6px; color: inherit;
}
.gzh-version.on { border-color: var(--blue); background: #eef3ff; }
.gzh-version img { width: 88px; height: 50px; object-fit: cover; border-radius: 8px; display: block; }
.gzh-version div { display: flex; flex-direction: column; gap: 2px; }
.gzh-version span { font-size: 12px; color: var(--muted); line-height: 1.4; }
@media (max-width: 960px) {
  .gzh-cols { grid-template-columns: 1fr; }
  .gzh-phone-wrap { position: static; }
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
.btn-spinner {
  width: 0.95em;
  height: 0.95em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -0.15em;
  margin-right: 0.4em;
  animation: btn-spin 0.7s linear infinite;
  flex: none;
}
button.is-loading, .btn.is-loading {
  opacity: 0.8;
  cursor: progress;
}
.status-chip.queued { color: #8a5a12; background: #f8efd8; }
.gzh-current-preview {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  margin: 10px 0 4px;
}
.gzh-current-preview img {
  width: 160px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.gzh-version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.gzh-version-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
}

/* Login */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg);
}
.login-card {
  width: min(420px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px 32px;
}
.login-brand {
  display: inline-block;
  margin-bottom: 20px;
}
.login-card h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.login-account {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .field span { display: block; margin-bottom: 6px; font-size: 13px; color: #444; }
.login-submit { width: 100%; padding: 10px 16px; margin-top: 4px; }
.login-error { color: #8a3b12; min-height: 1.4em; }
.login-hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; line-height: 1.6; }
.topbar-actions { gap: 8px; }
.logout-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  text-decoration: none;
}
.logout-link:hover { background: var(--soft); }
