:root {
  --sw-bg: #f6f3ec;
  --sw-ink: #1c2420;
  --sw-muted: #5c6b63;
  --sw-line: #d8d2c4;
  --sw-card: #fffdf8;
  --sw-accent: #0f6b4c;
  --sw-accent-2: #c45c26;
  --sw-live: #1a6b8a;
  --sw-moments: #8a5a1a;
  --sw-ground: #5a6b1a;
  --sw-radius: 12px;
  --sw-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sw-font);
  color: var(--sw-ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #e8f2ec 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #f5e8dc 0%, transparent 50%),
    var(--sw-bg);
}

.sw-app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.sw-top {
  display: grid;
  grid-template-columns: minmax(6rem, 1fr) auto minmax(6rem, 1fr);
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--sw-line);
}
.sw-brand {
  min-width: 0;
  justify-self: start;
}
.sw-brand h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  font-weight: 700;
  line-height: 1.15;
}
.sw-method {
  margin: 0;
  justify-self: center;
  text-align: center;
  color: var(--sw-accent);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 107, 76, 0.12), rgba(196, 92, 38, 0.1));
  border: 1px solid rgba(15, 107, 76, 0.28);
  box-shadow: 0 2px 12px rgba(15, 107, 76, 0.1);
  white-space: nowrap;
}
.sw-daybar {
  display: inline-flex;
  align-items: stretch;
  gap: 0.35rem;
  flex-shrink: 0;
  justify-self: end;
}
.sw-daybar-nav {
  width: 2.4rem;
  border: 1px solid var(--sw-line);
  background: var(--sw-card);
  color: var(--sw-ink);
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.sw-daybar-nav:hover {
  border-color: var(--sw-accent);
  color: var(--sw-accent);
  background: #fff;
}
.sw-daybar-main {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  min-width: 11.5rem;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid rgba(15, 107, 76, 0.35);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(232, 242, 236, 0.95), rgba(255, 253, 248, 0.98));
  box-shadow: 0 2px 10px rgba(15, 107, 76, 0.08);
  cursor: pointer;
  overflow: hidden;
}
.sw-daybar-main:hover {
  border-color: var(--sw-accent);
}
.sw-daybar-label {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--sw-ink);
  line-height: 1.2;
}
.sw-daybar-plan {
  font-size: 0.75rem;
  color: var(--sw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}
.sw-daybar-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
}
.sw-daybar-today {
  border: 1px solid var(--sw-accent);
  background: var(--sw-accent);
  color: #fff;
  border-radius: 10px;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sw-daybar-today:hover {
  filter: brightness(1.05);
}
.sw-daybar-today[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .sw-top {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand day"
      "method method";
  }
  .sw-brand { grid-area: brand; }
  .sw-method {
    grid-area: method;
    justify-self: stretch;
    letter-spacing: 0.1em;
    font-size: 1.05rem;
  }
  .sw-daybar {
    grid-area: day;
    width: auto;
  }
  .sw-daybar-main {
    flex: 1;
    min-width: 0;
  }
  .sw-daybar-plan {
    max-width: none;
  }
}

.sw-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--sw-line);
}
.sw-ch {
  border: 1px solid transparent;
  background: transparent;
  color: var(--sw-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
}
.sw-ch:hover { color: var(--sw-ink); background: rgba(0,0,0,0.04); }
.sw-ch.active {
  color: #fff;
  background: var(--sw-accent);
  border-color: var(--sw-accent);
}
.sw-ch[data-view="live"].active { background: var(--sw-live); border-color: var(--sw-live); }
.sw-ch[data-view="moments"].active { background: var(--sw-moments); border-color: var(--sw-moments); }
.sw-ch[data-view="ground"].active { background: var(--sw-ground); border-color: var(--sw-ground); }

.sw-main.hidden, .sw-tab-pane.hidden { display: none; }

.sw-hero {
  margin-bottom: 1.25rem;
}
.sw-hero h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.sw-hero p { margin: 0; color: var(--sw-muted); max-width: 42rem; line-height: 1.5; }

.sw-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.sw-card {
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.sw-card:hover {
  border-color: var(--sw-accent);
  transform: translateY(-1px);
}
.sw-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.sw-card .meta { font-size: 0.82rem; color: var(--sw-muted); margin: 0.15rem 0; }
.sw-card .title-line {
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
  line-height: 1.4;
  min-height: 2.6em;
}
.sw-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: #e8efe9;
  color: var(--sw-accent);
  font-weight: 600;
}
.sw-badge.warn { background: #f5ebe3; color: var(--sw-accent-2); }

.sw-panel {
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}
.sw-panel.muted { background: #f3f0e8; }
.sw-panel h3 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.sw-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.sw-panel-head h3 { margin: 0; }

.sw-panel label {
  display: block;
  font-size: 0.8rem;
  color: var(--sw-muted);
  margin-bottom: 0.75rem;
}
.sw-panel input[type="text"],
.sw-panel textarea,
.sw-panel select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  background: #fff;
  color: var(--sw-ink);
}
.sw-panel textarea { resize: vertical; }

.sw-btn {
  border: 1px solid var(--sw-line);
  background: #fff;
  color: var(--sw-ink);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.sw-btn:hover { border-color: var(--sw-muted); }
.sw-btn.primary {
  background: var(--sw-accent);
  border-color: var(--sw-accent);
  color: #fff;
}
.sw-btn.primary:hover { filter: brightness(1.05); }
.sw-btn.ghost { background: transparent; }
.sw-btn.small { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.sw-btn.danger { color: #a33; border-color: #e0c4c4; }

.sw-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-top: 0.5rem;
}
.sw-row.end { justify-content: flex-end; }
.sw-row label { margin-bottom: 0; flex: 0 0 auto; min-width: 8rem; }

.sw-list { margin: 0; padding-left: 1.2rem; color: var(--sw-ink); }
.sw-list li { margin-bottom: 0.4rem; line-height: 1.4; }
.sw-list .empty { list-style: none; margin-left: -1.2rem; color: var(--sw-muted); }

.sw-hint { color: var(--sw-muted); font-size: 0.88rem; margin: 0 0 0.75rem; }

.sw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.sw-tab {
  border: none;
  background: transparent;
  color: var(--sw-muted);
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.sw-tab.active {
  color: var(--sw-accent);
  border-bottom-color: var(--sw-accent);
  font-weight: 600;
}

.sw-ch-head { margin-bottom: 0.75rem; }
.sw-ch-head h2 { margin: 0 0 0.25rem; }

.sw-tactics { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.85rem; }
.sw-tactic {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.sw-tactic input[type="text"] {
  flex: 1;
  margin: 0;
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font: inherit;
}
.sw-tactic input[type="checkbox"] { width: 1.1rem; height: 1.1rem; }

.sw-schedule {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.sw-slot {
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  gap: 0.4rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  background: #fff;
}
.sw-slot-times {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  grid-column: 2 / 4;
}
.sw-slot-times-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.sw-slot input[type="time"],
.sw-slot input[type="text"] {
  margin: 0;
  border: 1px solid var(--sw-line);
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  font: inherit;
  font-size: 0.88rem;
  background: #fff;
}
.sw-slot-main {
  grid-column: 2 / 5;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.sw-slot-main input.activity { font-weight: 600; }
.sw-slot-main input.why { color: var(--sw-muted); }
.sw-slot input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.35rem;
}
.sw-slot .sw-btn { margin-top: 0.15rem; }
@media (max-width: 720px) {
  .sw-slot {
    grid-template-columns: auto 1fr auto;
  }
  .sw-slot-times, .sw-slot-main { grid-column: 2 / 3; }
}

.sw-rhythm {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.sw-rhythm-row {
  display: grid;
  grid-template-columns: 6.5rem 5.5rem 1fr;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--sw-line);
  font-size: 0.9rem;
}
.sw-rhythm-row.done {
  opacity: 0.55;
  text-decoration: line-through;
}
.sw-rhythm-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--sw-accent);
  white-space: nowrap;
}
.sw-rhythm-ch {
  font-size: 0.78rem;
  color: var(--sw-muted);
  white-space: nowrap;
}
.sw-rhythm-act {
  line-height: 1.35;
}
.sw-rhythm-act small {
  display: block;
  color: var(--sw-muted);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}
@media (max-width: 640px) {
  .sw-rhythm-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.sw-issue-list, .sw-script-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.sw-issue, .sw-script {
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: #fff;
}
.sw-issue h4, .sw-script h4 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}
.sw-issue .body, .sw-script .body {
  font-size: 0.88rem;
  color: var(--sw-muted);
  white-space: pre-wrap;
  line-height: 1.45;
  margin: 0.25rem 0;
}
.sw-issue .actions, .sw-script .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.sw-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: #eeeae0;
  color: var(--sw-muted);
  margin-right: 0.25rem;
}

.sw-table-wrap { overflow-x: auto; }
.sw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.sw-table th, .sw-table td {
  border-bottom: 1px solid var(--sw-line);
  padding: 0.55rem 0.4rem;
  text-align: left;
  vertical-align: top;
}
.sw-table th { color: var(--sw-muted); font-weight: 600; font-size: 0.78rem; }
.sw-table td input, .sw-table td textarea {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  padding: 0.2rem;
  resize: vertical;
}
.sw-table td input:focus, .sw-table td textarea:focus {
  border-color: var(--sw-line);
  background: #fff;
  outline: none;
  border-radius: 4px;
}

.sw-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sw-ink);
  color: #fff;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.sw-dlg {
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius);
  padding: 1.25rem;
  max-width: 28rem;
  width: calc(100% - 2rem);
  background: var(--sw-card);
}
.sw-dlg::backdrop { background: rgba(20, 30, 25, 0.35); }
.sw-dlg h3 { margin: 0 0 0.85rem; }
.sw-dlg label {
  display: block;
  font-size: 0.8rem;
  color: var(--sw-muted);
  margin-bottom: 0.65rem;
}
.sw-dlg input, .sw-dlg textarea, .sw-dlg select {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font: inherit;
}

.sw-ch[data-view="assistant"].active {
  background: #1f4e79;
  border-color: #1f4e79;
}
.sw-ch[data-view="fde"].active {
  background: #0f6b4c;
  border-color: #0f6b4c;
}
.sw-ch[data-view="compare"].active {
  background: #4338ca;
  border-color: #4338ca;
}
.sw-ch[data-view="cases"].active {
  background: #b45309;
  border-color: #b45309;
}
.sw-compare-actions {
  margin: -0.35rem 0 1rem;
}
.sw-compare-axes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.sw-compare-axis {
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  background: #fff;
}
.sw-compare-axis header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.sw-compare-axis h4 {
  margin: 0;
  font-size: 1.05rem;
}
.sw-compare-axis p {
  margin: 0.25rem 0;
  line-height: 1.5;
  font-size: 0.9rem;
}
.sw-compare-axis[data-axis="opentiger"] {
  border-color: #0f6b4c;
  box-shadow: inset 0 0 0 1px rgba(15, 107, 76, 0.15);
}
.sw-compare-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
}
.sw-compare-deep {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}
.sw-compare-deep-item {
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: #f8fafc;
}
.sw-compare-deep-item h4 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  color: #0f6b4c;
}
.sw-compare-deep-item p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.88rem;
}
.sw-cases-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.sw-cases-tab {
  border: 1px solid var(--sw-line);
  background: #fff;
  color: var(--sw-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}
.sw-cases-tab:hover { color: var(--sw-ink); border-color: #b45309; }
.sw-cases-tab.active {
  background: #b45309;
  border-color: #b45309;
  color: #fff;
  font-weight: 600;
}
.sw-ch[data-view="pricing"].active {
  background: #0f766e;
  border-color: #0f766e;
}

/* 收费标注 */
.sw-fold {
  margin: 0 0 0.85rem;
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  background: #fff;
  padding: 0.35rem 0.75rem 0.55rem;
}
.sw-fold > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--sw-ink);
  padding: 0.45rem 0;
  user-select: none;
}
.sw-fold > summary::-webkit-details-marker { display: none; }
.sw-fold > summary::before {
  content: "▸ ";
  color: var(--sw-muted);
  font-weight: 700;
}
.sw-fold[open] > summary::before { content: "▾ "; }
.sw-fold-tight {
  margin-top: 0.65rem;
  margin-bottom: 0;
  background: #fafafa;
}
.sw-fold-tight > summary {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--sw-muted);
}
.sw-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.sw-pricing-card {
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 45%);
}
.sw-pricing-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.sw-pricing-card-head h4 {
  margin: 0;
  font-size: 1.05rem;
}
.sw-pricing-tier {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.sw-pricing-card[data-tier="核心"] .sw-pricing-tier { background: #b45309; }
.sw-pricing-card[data-tier="入口"] .sw-pricing-tier { background: #0369a1; }
.sw-pricing-card[data-tier="增值"] .sw-pricing-tier { background: #64748b; }
.sw-pricing-label { margin: 0.35rem 0; font-size: 0.9rem; line-height: 1.45; }
.sw-pricing-bill { margin: 0.2rem 0; color: var(--sw-muted); font-size: 0.86rem; }
.sw-pricing-range {
  margin: 0.35rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f766e;
}
.sw-pricing-pitch {
  margin: 0.55rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* FDE 手册 */
.sw-fde-oneliner {
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 107, 76, 0.08);
  border: 1px solid rgba(15, 107, 76, 0.22);
  border-radius: var(--sw-radius);
  line-height: 1.55;
  color: var(--sw-ink);
  font-size: 0.95rem;
}
.sw-fde-case-panel .sw-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.sw-fde-case-panel .sw-panel-head h3 { margin: 0; }
.sw-fde-cases { display: flex; flex-direction: column; gap: 1rem; }
.sw-fde-case {
  border: 1px solid rgba(15, 107, 76, 0.28);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, #f7fbf9 0%, #fff 40%);
}
.sw-fde-case-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.sw-fde-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #0f6b4c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.sw-fde-ind { color: var(--sw-muted); font-size: 0.82rem; }
.sw-fde-case h4 { margin: 0.2rem 0 0.35rem; font-size: 1.15rem; }
.sw-fde-case-one { margin: 0 0 0.65rem; color: var(--sw-ink); line-height: 1.5; }
.sw-fde-pitch { margin: 0 0 0.85rem; line-height: 1.55; font-size: 0.92rem; }
.sw-fde-case-block { margin: 0.75rem 0; }
.sw-fde-case-block h5 { margin: 0 0 0.35rem; font-size: 0.92rem; color: #0f6b4c; }
.sw-fde-case-block p { margin: 0.25rem 0; line-height: 1.5; font-size: 0.9rem; }
.sw-fde-case-block ul, .sw-fde-case-block ol { margin: 0.2rem 0 0 1.1rem; padding: 0; }
.sw-fde-case-block li { margin: 0.25rem 0; line-height: 1.45; font-size: 0.9rem; }
.sw-fde-case .sw-muted { color: var(--sw-muted); }
.sw-fde-case-ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.75rem 0;
}
.sw-fde-case-ba > div {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--sw-line);
  background: #fff;
  font-size: 0.88rem;
  line-height: 1.5;
}
.sw-fde-case-ba h5 { margin: 0 0 0.35rem; font-size: 0.85rem; }
@media (max-width: 720px) {
  .sw-fde-case-ba { grid-template-columns: 1fr; }
}
.sw-fde-pipe { display: flex; flex-direction: column; gap: 0.4rem; }
.sw-fde-pipe-step {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  background: #fff;
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .sw-fde-pipe-step { grid-template-columns: 1fr; }
}
.sw-fde-metric-table { font-size: 0.86rem; }
.sw-loading { padding: 1rem 0.25rem; }
.sw-case-more { margin: 0.75rem 0; }
.sw-case-screens-wrap { margin-top: 1rem; }
.sw-case-screen-group { margin: 0.85rem 0 1.25rem; }
.sw-case-screen-group-head h5 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #9a3412;
}
.sw-case-screen-group-head .sw-hint { margin: 0 0 0.75rem; }
.sw-case-screen-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.sw-case-screen {
  display: grid;
  grid-template-columns: minmax(140px, 280px) 1fr;
  gap: 0.85rem 1rem;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--sw-line);
  border-radius: 12px;
  background: #fff;
  align-items: start;
}
.sw-case-screen-media {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.sw-case-screen-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  background: #0f172a08;
}
.sw-case-screen-no {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 1;
  min-width: 1.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}
.sw-case-screen figcaption h6 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  color: var(--sw-ink);
}
.sw-case-screen figcaption p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--sw-ink);
}
@media (max-width: 720px) {
  .sw-case-screen { grid-template-columns: 1fr; }
  .sw-case-screen-media img { max-height: 360px; }
}
.sw-pilot-acceptance {
  border: 1px solid #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 48%);
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
}
.sw-pilot-acceptance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.sw-pilot-acceptance-head h5 {
  margin: 0;
  color: #92400e;
}
.sw-pilot-acceptance h6 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
  color: var(--sw-ink);
}
.sw-pilot-signoff {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  font-size: 0.88rem;
  line-height: 1.5;
}
.sw-fde-ladder {
  display: grid;
  gap: 0.55rem;
}
.sw-fde-ladder-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 1px solid var(--sw-line);
  border-radius: 10px;
}
.sw-fde-step {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--sw-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}
.sw-fde-ladder-item strong { display: block; margin-bottom: 0.15rem; }
.sw-fde-ladder-item p { margin: 0; color: var(--sw-muted); font-size: 0.88rem; line-height: 1.4; }
.sw-fde-sop { display: flex; flex-direction: column; gap: 0.75rem; }
.sw-fde-phase {
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: #fff;
}
.sw-fde-phase header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
}
.sw-fde-phase header span { color: var(--sw-muted); font-size: 0.82rem; }
.sw-fde-phase ol { margin: 0.2rem 0 0.5rem 1.15rem; padding: 0; }
.sw-fde-phase li { margin: 0.25rem 0; line-height: 1.45; font-size: 0.9rem; }
.sw-fde-exit { margin: 0; font-size: 0.86rem; color: var(--sw-muted); }
.sw-fde-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (max-width: 720px) {
  .sw-fde-grid { grid-template-columns: 1fr; }
}
.sw-list-warn li { color: #9a3412; }
.sw-fde-subh { margin: 0.85rem 0 0.4rem; font-size: 0.95rem; }
.sw-fde-agenda { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.5rem 0 0.75rem; }
.sw-fde-agenda-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: #f8faf8;
  border-radius: 8px;
  border: 1px solid var(--sw-line);
  font-size: 0.88rem;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .sw-fde-agenda-row { grid-template-columns: 1fr; }
}
.sw-fde-scripts { display: flex; flex-direction: column; gap: 0.75rem; }
.sw-fde-script {
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: #fff;
}
.sw-fde-script h4 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.sw-fde-script p { margin: 0 0 0.55rem; white-space: pre-wrap; line-height: 1.5; font-size: 0.9rem; }

/* 背稿 */
.sw-pitch-lenses {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sw-pitch-lenses li {
  line-height: 1.45;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}
.sw-pitch-elevator-panel {
  background: linear-gradient(135deg, #fff7ed, #fff);
  border-color: #fdba74;
}
.sw-pitch-elevator {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 600;
  color: #9a3412;
  white-space: pre-wrap;
}
.sw-pitch-memo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}
.sw-pitch-memo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 0.8rem;
  color: #065f46;
}
.sw-pitch-memo-chip b { font-weight: 700; }
.sw-pitch-main { display: flex; flex-direction: column; gap: 0.75rem; }
.sw-pitch-seg {
  border: 1px solid var(--sw-line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
}
.sw-pitch-seg header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.45rem;
}
.sw-pitch-seg header strong { font-size: 1rem; }
.sw-pitch-seg-meta {
  color: var(--sw-muted);
  font-size: 0.8rem;
}
.sw-pitch-seg-q {
  margin: 0 0 0.4rem;
  color: #0f6b4c;
  font-size: 0.92rem;
  line-height: 1.45;
}
.sw-pitch-seg-body {
  margin: 0 0 0.55rem;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 0.95rem;
  color: #0f172a;
}
.sw-pitch-qa { display: flex; flex-direction: column; gap: 0.65rem; }
.sw-pitch-qa-item {
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: #f8faf8;
}
.sw-pitch-qa-item h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  color: #0f6b4c;
}
.sw-pitch-qa-item p {
  margin: 0 0 0.5rem;
  line-height: 1.55;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

/* 短视频脚本库 */
.sw-ch-pin {
  border-color: #c45c26 !important;
  color: #9a3f12 !important;
  background: #fff4ec !important;
  font-weight: 700;
}
.sw-ch-pin.active {
  background: #c45c26 !important;
  color: #fff !important;
  border-color: #c45c26 !important;
}
.sw-pin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--sw-radius);
  border: 1.5px solid #e8b48a;
  background:
    linear-gradient(135deg, #fff8f2 0%, #fffdf8 55%, #f3faf6 100%);
  box-shadow: 0 8px 24px rgba(196, 92, 38, 0.08);
}
.sw-pin-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: #c45c26;
}
.sw-pin h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}
.sw-pin p {
  margin: 0;
  color: var(--sw-muted);
  max-width: 36rem;
  line-height: 1.5;
  font-size: 0.92rem;
}
.sw-video-featured {
  display: grid;
  gap: 0.75rem;
}
.sw-video-card {
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  background: #fff;
  padding: 0.85rem 1rem;
}
.sw-video-card.featured {
  border-color: #e8b48a;
  background: #fffaf5;
}
.sw-video-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.55rem;
}
.sw-video-card header strong {
  font-size: 1rem;
}
.sw-video-card .sw-video-meta {
  color: var(--sw-muted);
  font-size: 0.8rem;
}
.sw-video-card .body {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.9rem;
  margin: 0 0 0.65rem;
}
.sw-video-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sw-video-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.55rem;
  margin: 0.65rem 0 0.85rem;
}
.sw-video-type {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--sw-line);
  background: #fff;
}
.sw-video-type strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}
.sw-video-type span {
  color: var(--sw-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.sw-video-scripts {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.sw-video-script {
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  background: #fff;
  padding: 0.9rem 1rem;
}
.sw-video-script.hidden-by-filter { display: none; }
.sw-video-script header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  margin-bottom: 0.55rem;
}
.sw-video-script h4 {
  margin: 0;
  font-size: 1.02rem;
}
.sw-video-shots {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin: 0.5rem 0 0.75rem;
}
.sw-video-shots th,
.sw-video-shots td {
  border: 1px solid var(--sw-line);
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
.sw-video-shots th {
  background: #f3efe6;
  font-weight: 600;
}
.sw-video-shots td:first-child {
  white-space: nowrap;
  color: var(--sw-accent);
  font-weight: 600;
}
.sw-video-series {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.55rem;
}
.sw-video-series-item {
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  border: 1px dashed var(--sw-line);
  background: #fffdf8;
}
.sw-video-series-item strong {
  display: block;
  margin-bottom: 0.25rem;
}
.sw-video-series-item span {
  display: block;
  color: var(--sw-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.sw-script.sw-script-pin {
  border-color: #e8b48a;
  background: #fffaf5;
}
.sw-script .actions .sw-btn.copy-ok {
  opacity: 0.85;
}

/* 销售助理：占满顶栏下方剩余视口，避免输入框被裁切 */
body:has(#view-assistant:not(.hidden)) {
  height: 100%;
  overflow: hidden;
}
body:has(#view-assistant:not(.hidden)) .sw-app {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
  overflow: hidden;
}
body:has(#view-assistant:not(.hidden)) .sw-top,
body:has(#view-assistant:not(.hidden)) .sw-channels {
  flex-shrink: 0;
}
body:has(#view-assistant:not(.hidden)) .sw-channels {
  margin-bottom: 0.65rem;
  padding-bottom: 0.55rem;
}
.sw-main-assist {
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sw-assist-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sw-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(30, 41, 59, 0.04), 0 8px 24px rgba(30, 41, 59, 0.05);
}
.sw-assist-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--sw-line);
  background: #f8fafc;
  flex-shrink: 0;
}
.sw-assist-chat-head strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.sw-assist-head-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.sw-assist-head-actions select {
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font: inherit;
  font-size: 0.82rem;
  background: #fff;
  color: var(--sw-ink);
}
.sw-assist-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 42%);
}
.sw-msg {
  max-width: 92%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sw-msg.user { align-self: flex-end; }
.sw-msg.bot { align-self: flex-start; }
.sw-msg-bubble {
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  line-height: 1.55;
  font-size: 0.92rem;
  white-space: pre-wrap;
}
.sw-msg.user .sw-msg-bubble {
  background: #1d4ed8;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.sw-msg.bot .sw-msg-bubble {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-left-radius: 4px;
}
.sw-msg.bot .sw-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.sw-msg .sw-suggest {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.sw-msg .sw-suggest-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.86rem;
  cursor: pointer;
  color: #0f172a;
}
.sw-msg .sw-suggest-item:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.sw-msg .sw-card-mini {
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.86rem;
  color: #0f172a;
}
.sw-msg .sw-card-mini h4 {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
}
.sw-assist-composer {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--sw-line);
  background: #fff;
  flex-shrink: 0;
  align-items: flex-end;
}
.sw-assist-composer textarea {
  flex: 1;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.92rem;
  resize: none;
  min-height: 2.6rem;
  max-height: 7rem;
  background: #f8fafc;
  color: var(--sw-ink);
}
.sw-assist-composer textarea:focus {
  outline: none;
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.sw-assist-composer .sw-btn.primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  min-height: 2.6rem;
  padding: 0.5rem 1rem;
}
.sw-assist-composer .sw-btn.primary:hover {
  filter: brightness(1.06);
}
.sw-assist-empty {
  margin: auto;
  text-align: center;
  max-width: 22rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 1.5rem 1rem;
}
.sw-assist-empty strong {
  display: block;
  color: #0f172a;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.sw-msg.typing .sw-msg-bubble {
  color: #64748b;
  font-style: italic;
}
.sw-poster-preview {
  margin: 0 0 0.55rem;
}
.sw-poster-img {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 10px;
  border: 1px solid var(--sw-line);
  background: #eee;
}

@media (max-width: 640px) {
  .sw-app { padding: 0.75rem 0.85rem 2.5rem; }
  .sw-brand h1 { font-size: 1.35rem; }
  .sw-assist-composer { flex-wrap: wrap; }
  .sw-assist-composer .sw-btn { width: 100%; }
}
