@import "https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap";

/* src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
  :root {
    --background: 220 14% 97%;
    --foreground: 220 10% 10%;
    --card: 0 0% 100%;
    --card-foreground: 220 10% 10%;
    --popover: 0 0% 100%;
    --popover-foreground: 220 10% 10%;
    --primary: 247 88% 65%;
    --primary-foreground: 0 0% 100%;
    --secondary: 220 14% 94%;
    --secondary-foreground: 220 10% 10%;
    --muted: 220 14% 94%;
    --muted-foreground: 220 8% 48%;
    --accent: 247 88% 65%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 72% 58%;
    --destructive-foreground: 0 0% 100%;
    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 247 88% 65%;
    --radius: 0.65rem;
  }
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* src/App.css */
:root {
  --ink:#17191d;
  --muted:#7d838d;
  --line:#e7e8ec;
  --soft:#f5f6f8;
  --accent:#6c57f5;
  --accent-soft:#efedff;
  --success:#45a96d;
  --danger:#d84d57;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 1024px;
  background: #f7f7f8;
  color: var(--ink);
  font-family:
    "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
button,
input {
  font: inherit;
}
button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.app-shell {
  display: flex;
  min-height: 100dvh;
}
.app-loading {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
}
.project-sidebar {
  position: sticky;
  top: 0;
  width: 250px;
  height: 100vh;
  padding: 28px 18px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 9px 26px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  background: #17191d;
  box-shadow: 6px 6px 0 #dad4ff;
}
.brand-lockup strong {
  font-size: 18px;
  letter-spacing: -1px;
}
.brand-lockup strong span {
  color: var(--accent);
}
.brand-lockup small {
  display: block;
  margin-top: 3px;
  color: #a0a5ad;
  font: 8px "DM Mono", monospace;
  letter-spacing: 1.5px;
}
.workspace-switcher {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}
.workspace-avatar,
.profile-avatar {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: white;
  background:
    linear-gradient(
      135deg,
      #806af8,
      #4d3ed8);
  font-size: 11px;
  font-weight: 700;
}
.workspace-switcher div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.workspace-switcher span {
  display: block;
  color: #8a9099;
  font-size: 9px;
}
.workspace-switcher strong {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}
.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 8px 9px;
}
.project-head span {
  color: #a1a5ad;
  font: 9px "DM Mono", monospace;
  letter-spacing: 1.2px;
}
.new-project-button {
  width: 100%;
  padding: 10px 11px;
  border: 1px dashed #cbc6f1;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.new-project-button:hover {
  background: #faf9ff;
}
.project-tree {
  margin-top: 18px;
  flex: 1;
  overflow-y: auto;
}
.project-node {
  position: relative;
  margin-bottom: 5px;
}
.tree-row {
  position: relative;
  min-height: 35px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  color: #616772;
  font-size: 11px;
}
.tree-row.parent {
  padding-left: 2px;
}
.tree-row.child {
  margin-left: 25px;
  padding-left: 10px;
  cursor: pointer;
}
.tree-row.child:before {
  content: "";
  position: absolute;
  left: -9px;
  top: -18px;
  bottom: 17px;
  border-left: 1px solid #e1e3e7;
}
.tree-row.child:after {
  content: "";
  position: absolute;
  left: -9px;
  top: 17px;
  width: 8px;
  border-top: 1px solid #e1e3e7;
}
.tree-row.active {
  background: var(--accent-soft);
  color: #392d8d;
  font-weight: 700;
}
.tree-row span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-row input {
  flex: 1;
  width: 70px;
  padding: 4px 6px;
  border: 1px solid #bdb5f6;
  border-radius: 5px;
  outline: 2px solid #ece9ff;
}
.tree-chevron {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #a1a6ae;
}
.tree-more {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  opacity: 0;
}
.tree-row:hover .tree-more,
.tree-row.active .tree-more {
  opacity: 1;
}
.tree-more:hover {
  background: #fff;
}
.tree-menu {
  position: absolute;
  z-index: 8;
  right: 3px;
  top: 31px;
  width: 142px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(22, 24, 30, .13);
}
.tree-menu button {
  width: 100%;
  padding: 8px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  font-size: 10px;
}
.tree-menu button:hover {
  background: var(--soft);
}
.tree-menu .danger {
  color: var(--danger);
}
.child-list {
  position: relative;
}
.add-child {
  margin: 4px 0 7px 33px;
  padding: 7px 10px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8b9099;
  font-size: 10px;
}
.add-child:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.sidebar-footer {
  width: 100%;
  padding: 13px 8px 2px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}
.sidebar-footer > div:nth-child(2) {
  flex: 1;
}
.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}
.sidebar-footer strong {
  font-size: 11px;
}
.sidebar-footer span {
  margin-top: 2px;
  color: #989da5;
  font-size: 9px;
}
.main-area {
  flex: 1;
  min-width: 0;
}
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 61px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(12px);
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
}
.topbar span {
  color: #9a9fa8;
}
.topbar i {
  font-style: normal;
  color: #c2c5ca;
}
.topbar strong {
  font-size: 11px;
}
.topbar em {
  margin-left: 8px;
  padding: 5px 8px;
  border-radius: 20px;
  color: #777d86;
  background: #f4f5f7;
  font-size: 9px;
  font-style: normal;
}
.topbar em span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}
.top-account {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}
.content-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding: 30px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 19px;
}
.eyebrow,
.section-kicker {
  color: #7967ed;
  font: 8px "DM Mono", monospace;
  letter-spacing: 1.25px;
}
.eyebrow span {
  display: inline-block;
  width: 13px;
  margin-right: 5px;
  border-top: 1px solid #7967ed;
  vertical-align: middle;
}
.page-heading h1 {
  margin: 5px 0 4px;
  font-size: 24px;
  letter-spacing: -1.15px;
}
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.primary-button,
.outline-button {
  padding: 10px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  transition: 160ms ease;
}
.primary-button {
  color: white;
  background: #17191d;
  box-shadow: 0 6px 18px rgba(23, 25, 29, .14);
}
.primary-button:hover {
  transform: translateY(-1px);
  background: #292b32;
}
.primary-button:active,
.outline-button:active {
  transform: scale(.98);
}
.outline-button {
  border: 1px solid var(--line);
  background: #fff;
}
.full {
  width: 100%;
}
.model-console {
  padding: 16px;
  border-radius: 14px;
  color: white;
  background:
    linear-gradient(
      110deg,
      #17191d 0%,
      #191a20 44%,
      #3b3378 100%);
  box-shadow: 0 18px 45px rgba(38, 34, 72, .12);
}
.model-console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.model-console-head h2 {
  margin: 5px 0 3px;
  font-size: 17px;
  letter-spacing: -.5px;
}
.model-console-head p {
  margin: 0;
  color: #9c9eaa;
  font-size: 9px;
}
.api-settings-button {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .07);
  font-size: 10px;
  font-weight: 700;
}
.api-settings-button:hover {
  background: rgba(255, 255, 255, .12);
}
.model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}
.model-card {
  position: relative;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: rgba(255, 255, 255, .04);
  transition: 180ms ease;
}
.model-card:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .08);
}
.model-card.selected {
  border-color: #8b77ff;
  background: rgba(108, 87, 245, .12);
}
.model-orb {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
}
.model-orb span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #17191d;
}
.model-orb.kimi span {
  width: 15px;
  height: 15px;
  background:
    repeating-linear-gradient(
      35deg,
      #17191d 0 2px,
      #fff 2px 4px);
}
.model-card div:nth-child(2) {
  min-width: 0;
}
.model-card strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-card code {
  display: block;
  margin-top: 4px;
  color: #9c9eaa;
  font: 7px "DM Mono", monospace;
}
.model-card small {
  display: block;
  margin-top: 4px;
  color: #b7b9c1;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selected-mark {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--accent);
}
.provider-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: #858893;
  font-size: 7px;
}
.provider-dot:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: #666;
}
.provider-dot.online:before {
  background: #e4b840;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin: 14px 0;
  align-items: stretch;
}
.metric-card {
  position: relative;
  height: 148px;
  min-height: 148px;
  padding: 14px 34px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbc6e9 transparent;
}
.metric-card::-webkit-scrollbar {
  width: 5px;
}
.metric-card::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: #cbc6e9;
}
.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}
.metric-card > span:first-child {
  position: sticky;
  z-index: 2;
  top: -14px;
  margin: -14px -34px 0 -14px;
  padding: 14px 34px 8px 14px;
  background: #fff;
}
.metric-card strong {
  display: block;
  margin: 6px 0;
  font-size: 19px;
  line-height: 1.38;
  overflow-wrap: anywhere;
}
.metric-card > svg {
  position: absolute;
  right: 13px;
  bottom: 13px;
  color: #a8adb5;
}
.metric-card.accent {
  background: #fff;
  color: var(--ink);
}
.metric-lines {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}
.metric-lines strong,
.metric-lines small {
  margin: 0;
  display: block;
}
.score-metric-card .metric-lines strong {
  color: #2f286c;
  font-size: 18px;
}
.score-metric-card .metric-lines small {
  color: #605a7e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.duration-shot-card .metric-lines strong {
  font-size: 18px;
}
.duration-shot-card .metric-lines small {
  color: #555b66;
  font-size: 12px;
  font-weight: 700;
}
.duration-shot-card > svg {
  bottom: 15px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 14px;
  margin-top: 14px;
}
.panel {
  min-height: 440px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.panel-header {
  height: 66px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h2 {
  margin: 5px 0 0;
  font-size: 13px;
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-analyze-button {
  padding: 8px 11px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  background: #17191d;
  font-size: 9px;
  font-weight: 700;
}
.panel-analyze-button:active {
  transform: scale(.98);
}
.replace-button {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7060dd;
  font-size: 9px;
}
.hidden-input {
  display: none;
}
.video-empty {
  width: calc(100% - 32px);
  height: 295px;
  margin: 16px;
  border: 1px dashed #d6d3e8;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fbfbfc;
}
.upload-plus {
  width: 54px;
  height: 54px;
  border: 1px solid #dbd7f8;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #fff;
  box-shadow: 0 12px 28px rgba(94, 78, 180, .1);
}
.video-empty strong {
  margin-top: 16px;
  font-size: 13px;
}
.video-empty p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 9px;
}
.video-empty small {
  color: #abaeb6;
  font-size: 8px;
}
.video-ready {
  padding: 16px;
}
.video-ready video {
  width: 100%;
  height: 275px;
  border-radius: 10px;
  background: #16181c;
  object-fit: contain;
}
.file-ready-row {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.file-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}
.file-ready-row > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.file-ready-row strong,
.file-ready-row span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-ready-row strong {
  font-size: 10px;
}
.file-ready-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.analysis-progress {
  margin: 0 16px 16px;
  padding: 12px;
  border-radius: 9px;
  background: #f7f6ff;
}
.analysis-progress > div:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
}
.analysis-progress strong {
  margin-left: auto;
}
.progress-track {
  height: 5px;
  margin-top: 9px;
  border-radius: 10px;
  background: #e6e3fb;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 500ms ease;
}
.summary-box {
  margin: 0 16px 16px;
  padding: 13px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 9px;
  color: var(--accent);
}
.summary-box strong {
  font-size: 10px;
  color: var(--ink);
}
.summary-box p {
  margin: 5px 0 0;
  color: #666c75;
  font-size: 9px;
  line-height: 1.7;
}
.parse-status {
  padding: 5px 9px;
  border-radius: 20px;
  color: #9e7c22;
  background: #fff7db;
  font-size: 8px;
}
.parse-status.done {
  color: #2a7d4a;
  background: #eaf8ef;
}
.breakdown-empty {
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.empty-visual {
  position: relative;
  width: 55px;
  height: 55px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #a3a6ad;
  background: #f3f4f6;
}
.empty-visual span {
  position: absolute;
  width: 7px;
  height: 7px;
  right: 6px;
  top: 6px;
  border-radius: 50%;
  background: #e1b74b;
}
.breakdown-empty strong {
  margin-top: 16px;
  font-size: 12px;
}
.breakdown-empty p {
  max-width: 290px;
  margin: 7px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}
.result-toolbar {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
}
.result-tabs {
  display: flex;
  gap: 4px;
}
.result-tabs button {
  padding: 6px 8px;
  border-radius: 6px;
  color: #91969e;
  font-size: 9px;
}
.result-tabs .active {
  color: var(--accent);
  background: var(--accent-soft);
}
.result-toolbar label {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.result-toolbar input {
  width: 105px;
  border: 0;
  outline: 0;
  font-size: 8px;
}
.result-list {
  max-height: 330px;
  overflow-y: auto;
  padding: 10px 14px;
}
.result-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px 10px 1fr;
  gap: 8px;
  padding: 10px 0;
}
.result-row:after {
  content: "";
  position: absolute;
  left: 42px;
  top: 29px;
  bottom: -9px;
  border-left: 1px solid #e5e3f1;
}
.result-row:last-child:after {
  display: none;
}
.result-row time {
  color: #7060dd;
  font: 8px "DM Mono", monospace;
}
.result-dot {
  z-index: 1;
  width: 7px;
  height: 7px;
  margin-top: 2px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px #bcb5ee;
}
.result-row header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.result-row header strong {
  font-size: 10px;
}
.result-row header em {
  padding: 3px 5px;
  border-radius: 4px;
  color: #7967ed;
  background: #f0eeff;
  font-size: 7px;
  font-style: normal;
}
.result-row p {
  margin: 5px 0 0;
  color: #666c75;
  font-size: 9px;
  line-height: 1.65;
}
.no-results {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 9px;
}
.cancel-analysis-button {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #c9c1f5;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #5e50c7;
  background: rgba(255, 255, 255, .86);
  font-size: 9px;
  font-weight: 800;
  transition: 160ms ease;
}
.cancel-analysis-button:hover {
  border-color: #9e91ee;
  color: #4e3fc0;
  background: #fff;
}
.cancel-analysis-button:active {
  transform: scale(.98);
}
.cancel-analysis-button:focus-visible {
  outline: 2px solid #8170e8;
  outline-offset: 2px;
}
.analysis-error-panel {
  margin: 12px 16px;
  padding: 13px 14px;
  border: 1px solid #f0b8bd;
  border-radius: 10px;
  background: #fff7f7;
  color: #7c2931;
}
.analysis-error-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.analysis-error-head > span {
  min-width: 0;
}
.analysis-error-head b,
.analysis-error-head small {
  display: block;
}
.analysis-error-head b {
  font-size: 12px;
}
.analysis-error-head small {
  margin-top: 3px;
  color: #a25b62;
  font-size: 9px;
}
.analysis-error-head button {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #e9a7ae;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
}
.analysis-error-panel p {
  max-height: 110px;
  margin: 10px 0 7px;
  padding: 9px;
  border-radius: 7px;
  background: #fff;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 10px/1.65 "DM Mono", monospace;
}
.analysis-error-panel > small {
  color: #9c5e65;
  font-size: 9px;
}
.toast {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  max-width: 390px;
  padding: 10px 12px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  background: #24262c;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .2);
  font-size: 10px;
}
.toast span {
  flex: 1;
}
.toast button {
  color: #acb0b7;
}
.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  z-index: 25;
  inset: 0;
  background: rgba(22, 24, 29, .42);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
}
.api-modal,
.upload-modal {
  position: relative;
  width: 430px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(18, 20, 28, .24);
}
.large-modal,
.upload-modal.wide {
  width: min(720px, calc(100vw - 40px));
}
.modal-close {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #8e939c;
}
.modal-close:hover {
  background: var(--soft);
}
.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-title > div:first-child span,
.modal-title > span {
  color: var(--accent);
  font: 8px "DM Mono", monospace;
  letter-spacing: 1px;
}
.modal-title h2 {
  margin: 5px 0 0;
  font-size: 18px;
}
.modal-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}
.secure-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}
.api-provider-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.api-provider-grid label,
.user-section label {
  display: block;
  font-size: 10px;
  font-weight: 700;
}
.api-provider-grid small {
  display: block;
  height: 26px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
}
.key-input {
  margin-top: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.key-input:focus-within {
  border-color: #b9b0f4;
  outline: 2px solid #f0edff;
}
.key-input input {
  width: 100%;
  padding: 10px 0;
  border: 0;
  outline: 0;
  font-size: 10px;
}
.alias-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.alias-section h3 {
  margin: 0;
  font-size: 12px;
}
.alias-section > p {
  margin: 5px 0 11px;
  color: var(--muted);
  font-size: 8px;
}
.alias-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.alias-row span {
  color: #686e78;
  font-size: 10px;
  font-weight: 700;
}
.alias-row input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  outline: 0;
}
.alias-row input:focus {
  border-color: #ada3ef;
  outline: 2px solid #f0edff;
}
.model-mapping-row {
  grid-template-columns: 66px minmax(180px, 1fr) 190px;
}
.model-mapping-row code {
  padding: 10px 11px;
  border-radius: 7px;
  background: var(--soft);
  color: #666c76;
  font: 10px "DM Mono", monospace;
  white-space: nowrap;
}
.modal-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.upload-drop {
  height: 210px;
  border: 1px dashed #cfd1d8;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #a6aab1;
  background: #fafafa;
  cursor: pointer;
}
.upload-drop:hover {
  border-color: #afa5f1;
  background: #fbfaff;
}
.upload-drop input {
  display: none;
}
.upload-drop strong {
  margin-top: 13px;
  color: #626771;
  font-size: 12px;
}
.upload-drop p {
  margin: 7px 0;
  font-size: 9px;
}
.upload-file-zone {
  margin-top: 17px;
}
.upload-file-zone > span {
  font-size: 10px;
  font-weight: 700;
}
.upload-file-row {
  margin-top: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.upload-file-row b {
  padding: 5px;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  font: 9px "DM Mono", monospace;
}
.upload-file-row strong {
  flex: 1;
  font-size: 10px;
}
.upload-file-row em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.upload-file-empty {
  margin-top: 8px;
  padding: 16px;
  border-radius: 9px;
  text-align: center;
  color: var(--muted);
  background: var(--soft);
  font-size: 9px;
}
.drawer-backdrop {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}
.account-drawer {
  width: 440px;
  height: 100%;
  padding: 0;
  background: #fff;
  box-shadow: -20px 0 60px rgba(20, 22, 28, .16);
  overflow-y: auto;
}
.account-drawer > header {
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.account-drawer header span {
  color: var(--accent);
  font: 8px "DM Mono", monospace;
  letter-spacing: 1px;
}
.account-drawer header h2 {
  margin: 3px 0 0;
  font-size: 16px;
}
.account-hero {
  padding: 22px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: white;
  background: #315ff6;
  font-size: 18px;
  font-weight: 800;
}
.profile-avatar {
  object-fit: cover;
}
.avatar-editor {
  position: relative;
}
.avatar-editor > input {
  display: none;
}
.avatar-editor > button {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 24px;
  height: 24px;
  border: 2px solid white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--accent);
}
.account-hero strong,
.account-hero span {
  display: block;
}
.account-hero strong {
  font-size: 13px;
}
.account-hero span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.user-section {
  padding: 17px 20px;
  border-top: 1px solid var(--line);
}
.drawer-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-section-head h3,
.user-section > h3 {
  margin: 0;
  font-size: 12px;
}
.drawer-section-head span {
  padding: 3px 7px;
  border-radius: 20px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 8px;
}
.user-list {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.user-row {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-row:last-child {
  border: 0;
}
.user-row strong,
.user-row span {
  display: block;
}
.user-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-list-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: white;
  background: #6c57f5;
  font-size: 10px;
  font-weight: 800;
}
.user-row strong {
  font-size: 10px;
}
.user-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.user-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.user-actions button {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
}
.danger-text {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--danger);
  font-size: 9px;
}
.user-row.editing-user {
  display: block;
}
.user-edit-form {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.user-edit-form input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  font-size: 9px;
}
.user-edit-form > div {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.user-edit-form button {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 8px;
}
.user-edit-form .save-mini {
  color: white;
  background: var(--accent);
}
.user-section label {
  margin-top: 10px;
}
.user-section input {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  font-size: 10px;
}
.user-section .outline-button {
  margin-top: 12px;
}
.oss-fixed {
  margin: 12px 0;
  padding: 11px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6658c1;
  background: #f5f3ff;
}
.oss-fixed strong,
.oss-fixed span {
  display: block;
}
.oss-fixed strong {
  font-size: 10px;
}
.oss-fixed span {
  margin-top: 3px;
  color: #8a819f;
  font-size: 8px;
}
.drawer-section-head .oss-online {
  color: #2e8951;
  background: #e9f8ef;
}
.oss-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.65;
}
.drawer-note {
  margin: 14px 20px;
  padding: 12px;
  border-radius: 9px;
  display: flex;
  gap: 8px;
  color: #6f62c7;
  background: #f5f3ff;
}
.drawer-note p {
  margin: 0;
  font-size: 8px;
  line-height: 1.6;
}
.account-drawer footer {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  background: #fff;
}
.auth-brand {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(
      circle at 70% 18%,
      rgba(108, 87, 245, .3),
      transparent 28%),
    linear-gradient(
      145deg,
      #17191d,
      #242138);
}
.brand-lockup.large {
  margin: 0;
}
.brand-lockup.large .brand-mark {
  width: 40px;
  height: 40px;
}
.brand-lockup.large strong {
  font-size: 22px;
}
.auth-copy {
  max-width: 590px;
}
.auth-copy > span,
.form-eyebrow {
  color: #9584ff;
  font: 9px "DM Mono", monospace;
  letter-spacing: 1.6px;
}
.auth-copy h1 {
  max-width: 520px;
  margin: 13px 0;
  font-size: 45px;
  line-height: 1.14;
  letter-spacing: -2px;
}
.auth-copy p {
  max-width: 460px;
  color: #b6b8c2;
  font-size: 13px;
  line-height: 1.8;
}
.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
}
.auth-form {
  width: min(400px, 100%);
  display: grid;
  gap: 18px;
}
.auth-form h2 {
  margin: 5px 0 4px;
  font-size: 23px;
}
.auth-form > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
}
.auth-form input {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
}
.auth-form input:focus {
  border-color: #ada3ef;
  outline: 2px solid #f0edff;
}
.form-error {
  padding: 10px;
  border-radius: 8px;
  color: #b13843;
  background: #fff0f1;
  font-size: 9px;
}
.spin {
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.project-sidebar {
  width: 272px;
}
.brand-lockup small,
.project-head span,
.eyebrow,
.section-kicker {
  font-size: 10px;
}
.new-project-button,
.tree-row {
  font-size: 13px;
}
.tree-row {
  min-height: 40px;
}
.add-child {
  font-size: 12px;
}
.sidebar-footer strong {
  font-size: 13px;
}
.sidebar-footer span {
  font-size: 11px;
}
.topbar > div,
.topbar strong,
.top-account {
  font-size: 12px;
}
.page-heading h1 {
  font-size: 30px;
}
.page-heading p {
  font-size: 13px;
}
.model-console {
  padding: 20px;
}
.model-console-head h2 {
  font-size: 21px;
}
.model-console-head p {
  font-size: 12px;
}
.model-card {
  min-height: 98px;
  padding: 15px;
}
.model-card strong {
  font-size: 15px;
}
.model-card code {
  font-size: 9px;
}
.model-card small {
  font-size: 11px;
}
.provider-dot {
  font-size: 9px;
}
.metric-card span,
.metric-card small {
  font-size: 11px;
}
.metric-card strong {
  font-size: 23px;
}
.workspace-grid {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
}
.panel {
  min-height: 550px;
}
.panel-header {
  height: 76px;
  padding: 17px 20px;
}
.panel-header h2 {
  font-size: 17px;
}
.replace-button,
.panel-analyze-button {
  font-size: 12px;
}
.video-empty {
  height: 340px;
}
.video-empty strong {
  font-size: 16px;
}
.video-empty p {
  font-size: 12px;
}
.video-empty small {
  font-size: 11px;
}
.breakdown-empty {
  height: 430px;
}
.breakdown-empty strong {
  font-size: 16px;
}
.breakdown-empty p {
  max-width: 390px;
  font-size: 12px;
}
.result-toolbar {
  padding: 14px 18px;
  align-items: center;
}
.result-tabs button {
  font-size: 12px;
  padding: 8px 11px;
}
.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.export-button {
  padding: 8px 11px;
  border: 1px solid #b8b0ef;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5f4fd0;
  background: #f6f4ff;
  font-size: 11px;
  font-weight: 700;
}
.result-toolbar input {
  width: 125px;
  font-size: 11px;
}
.result-list {
  max-height: 450px;
  padding: 13px 18px;
}
.result-row {
  grid-template-columns: 48px 12px 1fr;
  gap: 10px;
  padding: 14px 0;
}
.result-row:after {
  left: 53px;
  top: 34px;
}
.result-row time {
  font-size: 11px;
}
.result-row header strong {
  font-size: 14px;
}
.result-row header em {
  font-size: 10px;
}
.result-row p {
  font-size: 13px;
  line-height: 1.8;
}
.shot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 7px 0;
  color: #6b7280;
  font-size: 11px;
}
.dialogue-line {
  padding: 8px 10px;
  border-left: 3px solid #315fe8;
  color: #1747c7;
  background: #f4f7ff;
}
.shot-notes {
  color: #697386 !important;
  font-size: 11px !important;
}
.summary-box strong {
  font-size: 13px;
}
.summary-box p {
  font-size: 12px;
}
.tree-edit-zone {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tree-edit-zone input {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid #afa5ef;
  border-radius: 5px;
  outline: 2px solid #eeebff;
  font-size: 12px;
}
.tree-edit-zone button {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--accent);
}
.toast {
  font-size: 12px;
  animation: toastIn .2s ease both;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.summary-box p,
.story-reconstruction > p {
  white-space: pre-wrap;
}
.story-reconstruction {
  max-height: 450px;
  overflow-y: auto;
  padding: 22px 24px 28px;
}
.story-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}
.story-heading div {
  display: grid;
  gap: 3px;
}
.story-heading strong {
  font-size: 14px;
  color: var(--ink);
}
.story-heading span {
  font-size: 10px;
  color: var(--muted);
}
.story-reconstruction > p {
  margin: 18px 0 0;
  color: #3f4651;
  font-size: 13px;
  line-height: 2;
  text-align: justify;
}
.story-reconstruction:not(.plot-summary-view) > p {
  white-space: pre-wrap;
  font-variant-numeric: tabular-nums;
}
.story-reconstruction:not(.plot-summary-view) > p::first-line {
  color: #2f286c;
  font-weight: 800;
}
.shot-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  margin: 10px 0 !important;
}
.shot-field b {
  color: #6d5bd1;
  font-size: 11px;
}
.shot-field span {
  min-width: 0;
}
.detailed-shot .dialogue-line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  white-space: pre-wrap;
}
.detailed-shot .dialogue-line b {
  color: #315fe8;
}
.narrative-role {
  color: #69717e !important;
  font-size: 11px !important;
}
.brand-lockup {
  align-items: center;
  gap: 12px;
  margin-left: 6px;
  margin-right: 6px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}
.brand-copy {
  min-width: 0;
}
.brand-lockup .brand-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -.35px;
  white-space: nowrap;
}
.brand-lockup .brand-copy small {
  font-size: 8px;
  letter-spacing: 1.05px;
  white-space: nowrap;
}
.brand-lockup.large .brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}
.brand-lockup.large .brand-mark img {
  width: 100%;
  height: 100%;
}
.brand-lockup.large .brand-copy strong {
  font-size: 18px;
}
.brand-lockup.large .brand-copy small {
  font-size: 9px;
}
.topbar > div {
  gap: 13px;
  font-size: 18px;
}
.topbar strong {
  font-size: 19px;
}
.topbar em {
  font-size: 12px;
}
.parse-status {
  padding: 7px 13px;
  font-size: 16px;
  font-weight: 700;
}
.account-hero {
  padding-bottom: 22px;
}
.user-actions .disabled-delete {
  color: #c6c8ce;
  font-size: 10px;
  cursor: not-allowed;
  user-select: none;
}
.section-collapse-trigger {
  width: 100%;
  padding: 2px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}
.section-collapse-trigger > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-collapse-trigger > svg {
  color: #959aa4;
  transition: transform 180ms ease;
}
.section-collapse-trigger > svg.expanded {
  transform: rotate(180deg);
}
.collapsible-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.add-user-section {
  padding-top: 18px;
  padding-bottom: 18px;
}
.oss-fixed {
  position: relative;
  padding-right: 44px;
}
.oss-fixed > div:not(.oss-menu-wrap) {
  flex: 1;
  min-width: 0;
}
.oss-menu-wrap {
  position: absolute;
  right: 8px;
  top: 8px;
}
.oss-more {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #7564db;
}
.oss-more:hover {
  background: #ebe7ff;
}
.oss-popover {
  position: absolute;
  z-index: 4;
  right: 0;
  top: 34px;
  width: 116px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(25, 27, 35, .14);
}
.oss-popover button {
  width: 100%;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 6px;
  font-size: 10px;
  text-align: left;
}
.oss-popover button:hover {
  background: var(--soft);
}
.oss-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}
.oss-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.oss-edit-actions .outline-button {
  width: auto;
}
.tree-row.child.is-generating {
  background-image:
    linear-gradient(
      90deg,
      rgba(116, 97, 222, .08),
      rgba(116, 97, 222, 0));
  background-size: 180% 100%;
  animation: project-row-flow 2.4s ease-in-out infinite;
}
.project-generation-indicator {
  margin-left: auto;
  padding: 3px 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #d8d0ff;
  border-radius: 10px;
  background: #f6f3ff;
}
.project-generation-indicator i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7561df;
  animation: project-dot-wave 1.05s ease-in-out infinite;
}
.project-generation-indicator i:nth-child(2) {
  animation-delay: .14s;
}
.project-generation-indicator i:nth-child(3) {
  animation-delay: .28s;
}
.project-child-name {
  position: relative;
  display: inline-block;
}
.project-unread-dot {
  position: absolute;
  right: -7px;
  top: -4px;
  width: 6px;
  height: 6px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: #e34f45;
  box-shadow: 0 0 0 1px rgba(211, 62, 51, .16);
}
.model-result-entries button.unread {
  position: relative;
  border-color: #e6a24e;
  color: #985616;
  background: #fff9ee;
  box-shadow: inset 0 0 0 1px rgba(230, 162, 78, .18);
}
.model-result-entries button.unread:after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #df8730;
}
.model-result-entries button.unread:hover {
  background: #fff4df;
}
.model-result-entries button.unread.active {
  border-color: #8f7cf0;
  color: #fff;
  background: #7461de;
  box-shadow: none;
}
.model-result-entries button.unread.active:after {
  display: none;
}
@keyframes project-row-flow {
  50% {
    background-position: 100% 0;
  }
}
@keyframes project-dot-wave {
  0%, 100% {
    transform: translateY(1px) scale(.7);
    opacity: .4;
  }
  50% {
    transform: translateY(-1px) scale(1.08);
    opacity: 1;
  }
}
@keyframes project-unread-pulse {
  0% {
    transform: scale(.65);
    opacity: .8;
  }
  80%, 100% {
    transform: scale(1.35);
    opacity: 0;
  }
}
.breakdown-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}
.breakdown-title-row h2 {
  margin: 0;
}
.model-result-entries {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 390px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.model-result-entries::-webkit-scrollbar {
  display: none;
}
.model-result-entries button {
  padding: 4px 7px;
  border: 1px solid #dcd8f4;
  border-radius: 5px;
  color: #7463d8;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.model-result-entries button:hover {
  background: #f7f5ff;
}
.model-result-entries button.active {
  border-color: #8f7cf0;
  color: #fff;
  background: #7461de;
}
.analysis-content {
  max-width: 1580px;
}
.viral-case-badge {
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}
.viral-case-badge:hover {
  border-color: #df9d8c;
  background: #fff8f5;
  transform: translateY(-1px);
}
.viral-case-badge:active {
  transform: scale(.98);
}
.viral-case-badge:focus-visible {
  outline: 2px solid #d97757;
  outline-offset: 3px;
}
.viral-case-library-modal {
  width: min(1040px, calc(100vw - 56px));
  max-height: min(760px, calc(100dvh - 60px));
}
.viral-case-library-note {
  margin: -5px 0 14px;
  color: #8a6961;
  font-size: 11px;
  line-height: 1.7;
}
.viral-case-list {
  flex: 1;
  min-height: 220px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d9a99d #fff4f0;
}
.viral-case-list article {
  padding: 0;
  border: 1px solid #efd7d0;
  border-radius: 12px;
  background: #fffaf8;
  overflow: hidden;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}
.viral-case-list article:hover {
  border-color: #e4bdb2;
}
.viral-case-list article.expanded {
  border-color: #e5c4bb;
  background: #fffdfc;
  box-shadow: 0 10px 28px rgba(123, 70, 57, .07);
}
.viral-case-list article header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
}
.viral-case-list article.expanded header {
  border-bottom: 1px solid #f0ddd8;
}
.viral-case-toggle {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: inherit;
  background: transparent;
}
.viral-case-toggle:focus-visible {
  outline: 2px solid #d97757;
  outline-offset: 3px;
  border-radius: 7px;
}
.viral-case-chevron {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #ead4ce;
  border-radius: 8px;
  color: #a65b4b;
  background: #fff;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}
.viral-case-toggle:hover .viral-case-chevron {
  border-color: #dca899;
  background: #fff3ef;
}
.viral-case-toggle > span:last-child {
  min-width: 0;
}
.viral-case-list article header b,
.viral-case-list article header small {
  display: block;
}
.viral-case-list article header b {
  font-size: 14px;
}
.viral-case-list article header small {
  margin-top: 3px;
  color: #9a7770;
  font-size: 10px;
}
.viral-case-list article header em {
  padding: 5px 8px;
  border-radius: 20px;
  color: #a84c3b;
  background: #fceae5;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.viral-case-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.viral-case-header-actions button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #ead4ce;
  border-radius: 7px;
  color: #8b6b64;
  background: #fff;
}
.viral-case-header-actions button:hover {
  border-color: #dca899;
  color: #a84c3b;
  background: #fff5f2;
}
.viral-case-header-actions button.danger:hover {
  border-color: #e7aaa5;
  color: #c4483f;
  background: #fff1ef;
}
.viral-case-content {
  max-height: 310px;
  margin: 12px 8px 12px 14px;
  padding: 0 12px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #d69282 #f8e8e3;
}
.viral-case-content::-webkit-scrollbar {
  width: 9px;
}
.viral-case-content::-webkit-scrollbar-track {
  border-radius: 10px;
  background: #f8e8e3;
}
.viral-case-content::-webkit-scrollbar-thumb {
  min-height: 46px;
  border: 2px solid #f8e8e3;
  border-radius: 10px;
  background: #d69282;
}
.viral-case-content::-webkit-scrollbar-thumb:hover {
  background: #c97866;
}
.viral-case-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.viral-case-editor textarea {
  min-height: 170px;
  padding: 12px;
  border: 1px solid #e1c8c1;
  border-radius: 9px;
  resize: vertical;
  color: #493b38;
  background: #fff;
  font:
    13px/1.8 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.viral-case-editor textarea:focus {
  outline: 2px solid #d97757;
  outline-offset: 2px;
}
.viral-case-editor > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.viral-case-editor .outline-button,
.viral-case-editor .primary-button {
  width: auto;
  min-width: 88px;
  padding: 8px 12px;
}
.viral-case-list article pre {
  margin: 12px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #493b38;
  font:
    13px/1.85 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.viral-case-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: #a5786d;
}
.viral-case-empty strong {
  margin: 9px 0 5px;
  color: #724c43;
}
.viral-case-empty p {
  max-width: 420px;
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
}
.material-progress {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.model-result-entries button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.model-result-entries button.generating {
  border-color: #9d8ff1;
  background: #f4f1ff;
  color: #5c4bc2;
}
.model-result-entries button.generating.active {
  color: #fff;
  background: #7461de;
}
.model-result-entries button.generating svg {
  flex: 0 0 auto;
}
.breakdown-report-box {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-content: start !important;
  gap: 10px;
}
.breakdown-report-box > svg {
  margin-top: 2px;
  color: #6c57f5;
}
.breakdown-report-box > div {
  min-width: 0;
}
.breakdown-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.breakdown-report-head > span {
  min-width: 0;
}
.breakdown-report-box strong,
.breakdown-report-box small {
  display: block;
}
.breakdown-report-box small {
  margin-top: 4px;
  color: #8a839f;
  font-size: 9px;
}
.case-import-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d9d1ff;
  border-radius: 8px;
  color: #6350cb;
  background: #f8f6ff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}
.case-import-button:hover {
  border-color: #a99bec;
  background: #f0edff;
  box-shadow: 0 5px 14px rgba(103, 83, 203, .13);
}
.case-import-button:active {
  transform: scale(.97);
}
.case-import-button:focus-visible {
  outline: 2px solid #7461de;
  outline-offset: 2px;
}
.case-import-button svg {
  flex: 0 0 auto;
}
.breakdown-report-box p {
  margin-top: 12px !important;
  white-space: pre-wrap;
  line-height: 1.85 !important;
}
.plot-summary-view > p {
  line-height: 2.05;
}
.no-results.missing-shots {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}
.no-results.missing-shots strong {
  color: #37324d;
  font-size: 14px;
}
.no-results.missing-shots p {
  max-width: 440px;
  margin: 0;
  color: #8a839f;
  font-size: 10px;
  line-height: 1.7;
}
.no-results.missing-shots button {
  margin-top: 6px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  color: #fff;
  background: #7461de;
  font-size: 11px;
  font-weight: 800;
}
.no-results.missing-shots button:hover {
  background: #6551d1;
}
.no-results.missing-shots button:active {
  transform: scale(.98);
}
.no-results.missing-shots button:focus-visible {
  outline: 2px solid #6d5ce7;
  outline-offset: 3px;
}
.model-card.confidential {
  min-height: 86px;
  justify-content: flex-start;
}
.model-card.confidential strong {
  font-size: 18px;
  letter-spacing: .2px;
}
.model-card.confidential .model-orb span {
  width: 13px;
  height: 13px;
}
.configured-key {
  position: relative;
}
.configured-key input {
  padding-right: 10px;
}
.verify-modal {
  position: relative;
  width: min(420px, calc(100vw - 40px));
  padding: 30px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(18, 20, 28, .24);
}
.verify-modal > .secure-icon {
  margin-bottom: 16px;
}
.verify-modal h2 {
  margin: 0;
  font-size: 20px;
}
.verify-modal > p {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.verify-modal > label {
  display: block;
  font-size: 11px;
  font-weight: 700;
}
.secure-settings-modal {
  width: min(620px, calc(100vw - 40px));
}
.secure-settings-modal .modal-actions {
  margin-top: 24px;
}
.oss-settings:not(:has(.oss-edit-form)) .oss-help {
  margin-top: 10px;
}
.workspace-grid {
  align-items: stretch;
}
.preview-panel,
.breakdown-panel {
  height: 1450px;
  min-height: 1450px;
  display: flex;
  flex-direction: column;
}
.preview-panel .summary-box {
  flex: 1;
  min-height: 0;
  margin-bottom: 16px;
  overflow-y: auto;
  align-items: flex-start;
  scrollbar-width: thin;
  scrollbar-color: #cbc6e9 transparent;
}
.preview-panel .summary-box::-webkit-scrollbar,
.result-list::-webkit-scrollbar,
.story-reconstruction::-webkit-scrollbar {
  width: 6px;
}
.preview-panel .summary-box::-webkit-scrollbar-thumb,
.result-list::-webkit-scrollbar-thumb,
.story-reconstruction::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #cbc6e9;
}
.breakdown-panel .breakdown-empty {
  height: auto;
  flex: 1;
  min-height: 0;
}
.breakdown-panel .result-list,
.breakdown-panel .story-reconstruction {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}
.breakdown-panel > .result-toolbar {
  flex: 0 0 auto;
}
.panel-analyze-button .spin {
  animation-duration: .72s;
}
.analysis-progress {
  position: relative;
  overflow: hidden;
  border: 1px solid #e4e0ff;
  background:
    linear-gradient(
      90deg,
      #faf9ff,
      #f3f0ff,
      #faf9ff);
  background-size: 200% 100%;
  animation: analysis-shimmer 2.2s ease-in-out infinite;
}
.analysis-progress:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      110deg,
      transparent 30%,
      rgba(255, 255, 255, .72) 46%,
      transparent 62%);
  transform: translateX(-120%);
  animation: analysis-sweep 2s ease-in-out infinite;
}
.analysis-progress > div:first-child {
  position: relative;
  z-index: 1;
}
.analysis-progress > div:first-child > span:nth-child(2) {
  display: grid;
  gap: 2px;
}
.analysis-progress b {
  font-size: 10px;
  color: #403b62;
}
.analysis-progress small {
  color: #88839f;
  font-size: 8px;
}
.analysis-pulse {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: #6957e8;
}
.analysis-pulse:before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid #a89cf4;
  border-radius: 50%;
  animation: analysis-pulse 1.6s ease-out infinite;
}
.analysis-pulse i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #7a67ed;
  animation: analysis-dot 1.2s ease-in-out infinite;
}
.analysis-pulse i:nth-of-type(1) {
  right: 1px;
  top: 6px;
}
.analysis-pulse i:nth-of-type(2) {
  right: -1px;
  top: 13px;
  animation-delay: .18s;
}
.analysis-pulse i:nth-of-type(3) {
  right: 2px;
  top: 20px;
  animation-delay: .36s;
}
.progress-track span {
  position: relative;
  background:
    linear-gradient(
      90deg,
      #6c57f5,
      #9585ff,
      #6c57f5);
  background-size: 200% 100%;
  animation: progress-flow 1.4s linear infinite;
}
.breakdown-empty.is-analyzing {
  background:
    radial-gradient(
      circle at 50% 44%,
      rgba(108, 87, 245, .08),
      transparent 28%);
}
.breakdown-empty.is-analyzing .empty-visual {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  color: #6c57f5;
  background: #faf9ff;
  box-shadow: 0 18px 50px rgba(108, 87, 245, .13);
}
.empty-visual .orbit {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(108, 87, 245, .26);
  border-radius: 50%;
  animation: orbit-spin 2.4s linear infinite;
}
.empty-visual .orbit:after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: 8px;
  top: 3px;
  border-radius: 50%;
  background: #6c57f5;
  box-shadow: 0 0 0 5px rgba(108, 87, 245, .1);
}
.empty-visual .orbit-two {
  inset: 17px;
  animation-duration: 1.7s;
  animation-direction: reverse;
}
.empty-visual .orbit-two:after {
  width: 6px;
  height: 6px;
  left: auto;
  right: 0;
  top: 8px;
  background: #e1b74b;
  box-shadow: none;
}
.orbit-core {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 8px 22px rgba(72, 60, 145, .14);
}
.orbit-core svg {
  animation: spin 1.2s linear infinite;
}
.scan-ring {
  position: absolute;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  right: 0 !important;
  top: 0 !important;
  border: 1px solid rgba(108, 87, 245, .3);
  border-radius: 50%;
  background: transparent !important;
  animation: analysis-pulse 1.8s ease-out infinite;
}
.thinking-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: #aaa6b8;
  font-size: 9px;
}
.thinking-steps span {
  transition: color 180ms ease;
}
.thinking-steps span.active {
  color: #6856dd;
  font-weight: 700;
}
.thinking-steps i {
  width: 22px;
  border-top: 1px dashed #d3cdef;
}
.parse-status:not(.done) {
  animation: status-breathe 1.5s ease-in-out infinite;
}
.summary-box strong:after {
  content: " \b7  \6bcf\5206\949f\7ea6 200\5b57";
  color: #9b96aa;
  font-size: 8px;
  font-weight: 500;
}
@keyframes analysis-shimmer {
  50% {
    background-position: 100% 0;
  }
}
@keyframes analysis-sweep {
  55%, 100% {
    transform: translateX(120%);
  }
}
@keyframes analysis-pulse {
  0% {
    transform: scale(.72);
    opacity: .8;
  }
  80%, 100% {
    transform: scale(1.25);
    opacity: 0;
  }
}
@keyframes analysis-dot {
  0%, 100% {
    transform: scale(.65);
    opacity: .35;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}
@keyframes progress-flow {
  to {
    background-position: -200% 0;
  }
}
@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes status-breathe {
  50% {
    transform: scale(1.04);
    filter: brightness(1.04);
  }
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rewrite-entry {
  min-width: 112px;
  padding: 8px 13px;
  border: 1px solid #efb3aa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #b54c3c;
  background: #fff8f6;
  font-size: 11px;
  font-weight: 800;
  transition: 160ms ease;
}
.rewrite-entry:hover,
.rewrite-entry.active {
  border-color: #d97757;
  color: #fff;
  background: #d97757;
}
.rewrite-entry:active {
  transform: scale(.98);
}
.rewrite-content {
  max-width: 1580px;
}
.rewrite-workbench {
  --rewrite:#d97757;
  --rewrite-soft:#fff3ef;
  --rewrite-line:#f0d8d1;
}
.rewrite-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.rewrite-eyebrow {
  color: var(--rewrite);
  font: 10px "DM Mono", monospace;
  letter-spacing: 1.25px;
}
.rewrite-eyebrow span {
  display: inline-block;
  width: 13px;
  margin-right: 5px;
  border-top: 1px solid var(--rewrite);
  vertical-align: middle;
}
.rewrite-heading h1 {
  margin: 6px 0 4px;
  font-size: 30px;
  letter-spacing: -1.15px;
}
.rewrite-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.originality-badge {
  padding: 10px 13px;
  border: 1px solid var(--rewrite-line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a94d3f;
  background: #fff;
}
.originality-badge b,
.originality-badge small {
  display: block;
}
.originality-badge b {
  font-size: 11px;
}
.originality-badge small {
  margin-top: 2px;
  color: #a77870;
  font-size: 9px;
}
.rewrite-console {
  background:
    linear-gradient(
      110deg,
      #211c1a 0%,
      #2d211d 46%,
      #6d372d 100%);
}
.rewrite-console .model-card.selected {
  border-color: #ee9a83;
  background: rgba(217, 119, 87, .16);
}
.rewrite-console .selected-mark {
  background: var(--rewrite);
}
.rewrite-rules {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px;
  padding: 0 4px;
  overflow-x: auto;
}
.rewrite-rules button {
  min-width: 150px;
  padding: 11px 14px;
  border-bottom: 2px solid transparent;
  text-align: left;
  color: #7f706d;
}
.rewrite-rules span,
.rewrite-rules small {
  display: block;
}
.rewrite-rules span {
  font-size: 13px;
  font-weight: 800;
}
.rewrite-rules small {
  max-width: 210px;
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.5;
}
.rewrite-rules button:hover {
  color: #b95645;
}
.rewrite-rules button.active {
  border-color: var(--rewrite);
  color: #a94333;
  background:
    linear-gradient(
      180deg,
      transparent,
      #fff4f0);
}
.rewrite-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.rewrite-pane {
  min-width: 0;
  height: 820px;
  border: 1px solid var(--rewrite-line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.rewrite-pane > header {
  height: 74px;
  flex: 0 0 74px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--rewrite-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.rewrite-pane header span {
  color: #b45a49;
  font: 9px "DM Mono", monospace;
  letter-spacing: 1.1px;
}
.rewrite-pane header h2 {
  margin: 5px 0 0;
  font-size: 16px;
}
.rewrite-pane header em {
  padding: 6px 9px;
  border-radius: 20px;
  color: #ad5a49;
  background: var(--rewrite-soft);
  font-size: 9px;
  font-style: normal;
}
.rewrite-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.rewrite-actions button {
  padding: 7px 9px;
  border: 1px solid var(--rewrite-line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #9d5346;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}
.rewrite-actions .generate-rewrite {
  padding: 9px 12px;
  border-color: var(--rewrite);
  color: #fff;
  background: var(--rewrite);
}
.rewrite-actions .final-draft-button {
  width: 96px;
  flex: 0 0 96px;
  justify-content: center;
  white-space: nowrap;
  border-color: #d9aa77;
  color: #96511d;
  background: #fff9ef;
}
.rewrite-actions .final-draft-button:hover {
  border-color: #c98642;
  background: #fff2dc;
}
.rewrite-actions .final-draft-button.finalized {
  border-color: #73a77d;
  color: #347044;
  background: #eff9f1;
}
.final-draft-modal {
  width: min(820px, 92vw);
}
.final-draft-modal-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.final-draft-modal-title h2 {
  margin-bottom: 5px;
}
.final-draft-modal-title > div {
  flex: 1 1 auto;
  min-width: 0;
}
.final-draft-title-input {
  display: block;
  width: 100%;
  margin: 2px 0 5px;
  padding: 5px 10px;
  border: 1px dashed #d3a99d;
  border-radius: 9px;
  outline: 0;
  color: #2f2523;
  background: #fff;
  font:
    800 24px/1.35 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.final-draft-title-input:focus {
  border-color: #d97757;
  outline: 2px solid #fff0ec;
}
.final-draft-title-input::placeholder {
  color: #bba49e;
  font-weight: 600;
}
.final-draft-modal-title p {
  margin: 0;
  color: #98766f;
  font-size: 10px;
}
.final-draft-modal-title em {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #9bc7a4;
  border-radius: 999px;
  color: #347044;
  background: #eff9f1;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}
.final-draft-preview {
  max-height: 54vh;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #ecd8d2;
  border-radius: 12px;
  background: #fffdfc;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d89b84 transparent;
}
.final-draft-preview::-webkit-scrollbar {
  width: 7px;
}
.final-draft-preview::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #d89b84;
}
.final-draft-preview pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #423634;
  font:
    12px/1.9 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.final-draft-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
}
.final-draft-modal-title em.pending {
  border-color: #e2bd7c;
  color: #8a6420;
  background: #fff8ea;
}
.final-draft-preview.editing {
  height: 54vh;
  max-height: 54vh;
  padding: 12px;
  border-style: dashed;
  border-color: #d3a99d;
  background: #fff;
}
.final-draft-editor {
  width: 100%;
  height: 100%;
  min-height: 260px;
  padding: 4px 6px;
  border: 0;
  outline: 0;
  resize: none;
  color: #423634;
  background: transparent;
  font:
    12px/1.9 "Manrope",
    "Microsoft YaHei",
    sans-serif;
  scrollbar-width: thin;
  scrollbar-color: #d89b84 transparent;
}
.danger-outline-button {
  padding: 8px 11px;
  border: 1px solid #e1a39c;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #b14339;
  background: #fff5f3;
  font-size: 10px;
  font-weight: 800;
}
.danger-outline-button:hover {
  border-color: #c85b50;
  color: #fff;
  background: #c85b50;
}
.finalized-modify-modal {
  width: min(500px, 90vw);
}
.finalized-modify-modal > span {
  display: block;
  margin-top: 10px;
  color: #b06454;
  font: 9px "DM Mono", monospace;
  letter-spacing: 1.15px;
}
.finalized-modify-modal h2 {
  margin: 8px 0 10px;
  font-size: 19px;
  line-height: 1.45;
}
.finalized-modify-modal p {
  margin: 0;
  color: #806a65;
  font-size: 11px;
  line-height: 1.8;
}
.finalized-warning-icon {
  width: 44px;
  height: 44px;
  border: 1px solid #efbdad;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #b44f3d;
  background: #fff3ee;
}
.confirm-unfinalize {
  background: #c9654f !important;
}
.rewrite-document {
  flex: 1;
  min-height: 0;
  padding: 22px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #deb7ac transparent;
}
.rewrite-document pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #34302f;
  font:
    12px/1.9 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.rewrite-document.output pre {
  font-size: 13px;
  line-height: 2;
}
.rewrite-document.empty {
  display: grid;
  place-items: center;
  background:
    linear-gradient(
      145deg,
      #fff,
      #fff9f7);
}
.rewrite-document.empty > div,
.rewrite-generating {
  max-width: 360px;
  display: grid;
  justify-items: center;
  text-align: center;
  color: #ad5b4b;
}
.rewrite-document.empty strong,
.rewrite-generating strong {
  margin-top: 12px;
  color: #382f2d;
  font-size: 15px;
}
.rewrite-document.empty p,
.rewrite-generating p {
  margin: 8px 0 0;
  color: #9b827d;
  font-size: 11px;
  line-height: 1.75;
}
.rewrite-document.empty button {
  margin-top: 14px;
  padding: 8px 11px;
  border: 1px solid var(--rewrite-line);
  border-radius: 7px;
  color: #a94c3c;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}
.rewrite-generating > span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--rewrite);
  animation: status-breathe 1.5s ease-in-out infinite;
}
.rewrite-error {
  margin: 0 18px 16px;
  padding: 10px 12px;
  border: 1px solid #edb4ae;
  border-radius: 8px;
  color: #a33e37;
  background: #fff5f4;
  font-size: 10px;
}
.rewrite-error.persistent {
  display: grid;
  gap: 5px;
  box-shadow: 0 7px 18px rgba(163, 62, 55, .08);
}
.rewrite-error.persistent strong {
  font-size: 11px;
}
.rewrite-error.persistent p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.rewrite-error.persistent small {
  color: #a97873;
  font-size: 9px;
}
.rewrite-mode {
  background: #fbf6f4;
}
.rewrite-mode .project-sidebar {
  border-color: #edd9d3;
  background: #fffaf8;
}
.rewrite-mode .brand-mark {
  box-shadow: 6px 6px 0 #f1cec4;
}
.rewrite-mode .project-head span {
  color: #b57a6d;
}
.rewrite-mode .new-project-button {
  border-color: #e9bdb1;
  color: #b75643;
  background: #fff;
}
.rewrite-mode .new-project-button:hover {
  background: #fff2ee;
}
.rewrite-mode .tree-row.child.active {
  color: #a94736;
  background: #fce9e3;
}
.rewrite-mode .tree-row.child.active:after {
  background: #d97757;
}
.rewrite-mode .add-child {
  color: #aa5a49;
}
.rewrite-mode .sidebar-footer {
  border-color: #edd9d3;
  background: #fffaf8;
}
.rewrite-mode .profile-avatar {
  background:
    linear-gradient(
      135deg,
      #dc866a,
      #a94b3a);
}
.rewrite-mode .topbar {
  border-color: #ead8d3;
  background: rgba(255, 250, 248, .92);
}
.rule-section {
  margin-top: 13px;
}
.rule-section-head {
  padding: 0 5px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}
.rule-section-head > div b,
.rule-section-head > div span {
  display: block;
}
.rule-section-head b {
  font-size: 14px;
  color: #9d4434;
}
.rule-section-head span {
  margin-top: 3px;
  color: #a88c85;
  font-size: 9px;
}
.rule-section-head > button {
  padding: 7px 9px;
  border: 1px solid var(--rewrite-line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #a74c3c;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
}
.rewrite-rules button {
  position: relative;
}
.rewrite-rules button i {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #bd7668;
  font-size: 8px;
  font-style: normal;
  opacity: 0;
}
.rewrite-rules button:hover i,
.rewrite-rules button.active i {
  opacity: 1;
}
.source-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.source-title-row h2 {
  flex: 0 0 auto;
}
.source-model-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 330px;
  overflow-x: auto;
}
.source-model-tabs button {
  padding: 4px 6px;
  border: 1px solid #ecd1ca;
  border-radius: 5px;
  color: #a85b4d;
  background: #fff;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.source-model-tabs button.active {
  border-color: #d97757;
  color: #fff;
  background: #d97757;
}
.custom-brief {
  padding: 13px 17px;
  border-bottom: 1px solid var(--rewrite-line);
  background: #fff9f7;
}
.custom-brief label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #b35443;
}
.custom-brief label span {
  display: grid;
  gap: 2px;
}
.custom-brief label b {
  font-size: 10px;
}
.custom-brief label small {
  color: #a88982;
  font-size: 8px;
}
.custom-brief textarea {
  width: 100%;
  height: 82px;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid #ead3cd;
  border-radius: 8px;
  resize: vertical;
  outline: 0;
  color: #433633;
  background: #fff;
  font:
    10px/1.6 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.custom-brief textarea:focus {
  border-color: #d97757;
  outline: 2px solid #fff0ec;
}
.expanded-api-modal {
  width: min(1120px, calc(100vw - 40px));
}
.api-provider-grid.extended {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.alias-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.alias-heading-row h3 {
  margin: 0;
}
.alias-heading-row > span {
  min-width: 92px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d7d0ff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6757d4;
  background: #f4f1ff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.alias-row.expanded {
  grid-template-columns: 58px minmax(120px, 1fr) minmax(180px, 1fr) 106px;
}
.dual-display-heading {
  align-items: center;
}
.display-counts {
  width: 214px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.display-counts span {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d7d0ff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6757d4;
  background: #f4f1ff;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.display-counts span:first-child {
  border-color: #83c5a0;
  color: #347653;
  background: #effaf3;
}
.alias-row.dual-display-row {
  grid-template-columns: 58px minmax(120px, 1fr) minmax(170px, 1fr) 214px;
}
.display-model-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.visible-model {
  padding: 7px 8px;
  border: 1px solid #dedbe9;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #777081;
  background: #fff;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.visible-model.active {
  border-color: #a99cf0;
  color: #5f50cc;
  background: #f2efff;
}
.visible-model.analysis.active {
  border-color: #83c5a0;
  color: #347653;
  background: #effaf3;
}
.visible-model.disabled {
  cursor: not-allowed;
  border-style: dashed;
  color: #aaa4af;
  background: #f7f7f8;
  opacity: .72;
}
.rule-editor-modal {
  position: relative;
  width: min(980px, calc(100vw - 56px));
  height: min(620px, calc(100dvh - 72px));
  padding: 26px 28px 22px;
  border: 1px solid #eac9c1;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 24px 80px rgba(83, 47, 38, .2);
  overflow: hidden;
}
.rule-editor-modal > span {
  flex: 0 0 auto;
  color: #c26652;
  font: 10px "DM Mono", monospace;
  letter-spacing: 1.3px;
}
.rule-editor-modal h2 {
  flex: 0 0 auto;
  margin: 7px 0 4px;
  font-size: 24px;
}
.rule-editor-modal > p {
  flex: 0 0 auto;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 10px;
}
.rule-editor-modal label {
  flex: 0 0 auto;
  display: grid;
  gap: 7px;
  margin-top: 13px;
  font-size: 10px;
  font-weight: 700;
}
.rule-editor-modal input,
.rule-editor-modal textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #e5d3ce;
  border-radius: 8px;
  outline: 0;
}
.rule-editor-modal textarea {
  min-height: 120px;
  resize: none;
  line-height: 1.7;
}
.rule-editor-modal input:focus,
.rule-editor-modal textarea:focus {
  border-color: #d97757;
  outline: 2px solid #fff0ec;
}
.rule-editor-modal label.rule-editor-body-label {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}
.rule-editor-modal .rule-editor-body {
  height: 100%;
}
.rule-editor-modal .modal-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 2px;
  background: #fff;
}
.rewrite-workbench .rewrite-pane header > div > span {
  font-size: 10.8px;
  line-height: 1.35;
}
.rewrite-workbench .rewrite-pane header h2 {
  font-size: 19.2px;
  line-height: 1.3;
}
.rewrite-workbench .rewrite-pane header em {
  padding: 7px 10px;
  font-size: 10.8px;
}
.rewrite-workbench .rule-section-head b {
  font-size: 16.8px;
  line-height: 1.25;
}
.rewrite-workbench .rule-section-head span {
  margin-top: 4px;
  font-size: 10.8px;
  line-height: 1.5;
}
.rewrite-workbench .rewrite-rules span {
  font-size: 15.6px;
  line-height: 1.3;
}
.rewrite-workbench .rewrite-rules small {
  max-width: 252px;
  margin-top: 5px;
  font-size: 10.8px;
  line-height: 1.5;
}
.rewrite-workbench .rewrite-rules button {
  min-width: 180px;
  padding: 13px 16px;
}
.rewrite-workbench .rewrite-document pre {
  font-size: 14.4px;
  line-height: 1.9;
}
.rewrite-workbench .rewrite-document.output pre {
  font-size: 15.6px;
  line-height: 2;
}
.rewrite-workbench .custom-brief label b {
  font-size: 12px;
  line-height: 1.35;
}
.rewrite-workbench .custom-brief label small {
  font-size: 9.6px;
  line-height: 1.5;
}
.rewrite-workbench .custom-brief textarea {
  min-height: 98px;
  margin-top: 10px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
}
.rewrite-workbench .source-model-tabs button {
  font-size: 9.6px;
  padding: 5px 7px;
}
.rule-tabs-section {
  margin: 16px 0 13px;
  min-height: 48px;
  border: 1px solid #e7b9ad;
  border-radius: 10px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #fff;
}
.rule-inline-title {
  padding: 0 18px;
  display: flex;
  align-items: center;
  border-right: 1px solid #efcfc7;
  color: #a94232;
  background: #fff8f5;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}
.rewrite-rule-tabs {
  min-width: 0;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
}
.rewrite-rule-tabs button {
  min-width: 116px;
  padding: 0 18px;
  border-right: 1px solid #f0d3cc;
  color: #985c51;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.rewrite-rule-tabs button:hover {
  color: #b84f3b;
  background: #fff8f5;
}
.rewrite-rule-tabs button.active {
  color: #fff;
  background: #d97757;
}
.rewrite-rule-tabs .add-rule-tab {
  min-width: 124px;
  color: #a95746;
  background: #fffaf8;
}
.analysis-rule-tabs-section {
  margin: 10px 0 13px;
  border-color: #bdb7ee;
}
.analysis-rule-tabs-section .rule-inline-title {
  border-color: #d2cef4;
  color: #5146a8;
  background: #f7f6ff;
}
.analysis-rule-tabs button {
  border-color: #d8d4f4;
  color: #665ea6;
}
.analysis-rule-tabs button:hover {
  color: #4f459e;
  background: #f5f3ff;
}
.analysis-rule-tabs button.active {
  color: #fff;
  background: #6759c8;
}
.analysis-rule-tabs .add-rule-tab {
  color: #5f54ad;
  background: #faf9ff;
}
.analysis-rule-modal {
  border-color: #d4cff4;
  box-shadow: 0 24px 80px rgba(49, 42, 111, .2);
}
.analysis-rule-modal > span {
  color: #6759c8;
}
.analysis-rule-modal .rule-detail-content {
  border-color: #ddd9f5;
  color: #393556;
  background: #f9f8ff;
  scrollbar-color: #aaa3df #f3f1ff;
}
.analysis-rule-modal .rule-detail-content::-webkit-scrollbar-track {
  background: #f3f1ff;
}
.analysis-rule-modal .rule-detail-content::-webkit-scrollbar-thumb {
  border-color: #f3f1ff;
  background: #aaa3df;
}
.analysis-rule-modal .primary-button {
  background: #6759c8;
}
.analysis-rule-modal .primary-button:hover {
  background: #5649b6;
}
.rule-detail-modal {
  position: relative;
  width: min(980px, calc(100vw - 56px));
  max-height: min(620px, calc(100dvh - 72px));
  padding: 26px 28px 22px;
  border: 1px solid #eac9c1;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 24px 80px rgba(83, 47, 38, .2);
  overflow: hidden;
}
.rule-detail-modal.rule-preview-modal {
  height: min(620px, calc(100dvh - 72px));
  max-height: none;
}
.rule-detail-modal.rule-preview-modal .rule-detail-content {
  min-height: 0;
  max-height: none;
}
.rule-detail-modal > span {
  flex: 0 0 auto;
  color: #bf6855;
  font: 10px "DM Mono", monospace;
  letter-spacing: 1.3px;
}
.rule-detail-modal h2 {
  flex: 0 0 auto;
  margin: 7px 0 14px;
  font-size: 24px;
}
.rule-detail-content {
  flex: 1;
  min-height: 180px;
  max-height: 390px;
  padding: 18px 20px;
  border: 1px solid #efd8d2;
  border-radius: 12px;
  color: #493b38;
  background: #fff9f7;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d9a99d #fff4f0;
}
.rule-detail-content::-webkit-scrollbar {
  width: 8px;
}
.rule-detail-content::-webkit-scrollbar-track {
  border-radius: 8px;
  background: #fff4f0;
}
.rule-detail-content::-webkit-scrollbar-thumb {
  border: 2px solid #fff4f0;
  border-radius: 8px;
  background: #d9a99d;
}
.rule-detail-modal .modal-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 2px;
  background: #fff;
}
.rule-detail-modal .modal-actions .danger-button {
  padding: 10px 14px;
  border: 1px solid #e1a39c;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #b14339;
  background: #fff5f3;
  font-size: 10px;
  font-weight: 700;
  transition: 160ms ease;
}
.rule-detail-modal .modal-actions .danger-button:hover {
  border-color: #c85b50;
  color: #fff;
  background: #c85b50;
  transform: translateY(-1px);
}
.rule-detail-modal .modal-actions .danger-button:active {
  transform: scale(.98);
}
.rule-detail-modal .modal-actions .danger-button.solid {
  border-color: #c0463a;
  color: #fff;
  background: #c0463a;
  box-shadow: 0 6px 18px rgba(192, 70, 58, .18);
}
.rule-detail-modal .modal-actions .danger-button.solid:hover {
  border-color: #a83b30;
  background: #a83b30;
}
.rule-delete-modal .rule-detail-content {
  min-height: 0;
  max-height: 200px;
}
.rule-delete-modal .rule-detail-content b {
  color: #b14339;
}
.rewrite-grid {
  align-items: stretch;
}
.rewrite-pane,
.chat-output-pane {
  height: 1040px;
}
.source-pane .rewrite-document {
  flex: 1;
  min-height: 0;
}
.output-model-tabs {
  max-width: 430px;
  overflow: visible;
}
.output-model-tabs button {
  position: relative;
  overflow: visible;
}
.output-model-tabs button.has-result:not(.active) {
  border-color: #d8aa9e;
  color: #a75040;
  background: #fff7f4;
}
.output-model-tabs button.generating {
  padding-top: 9px;
  border-color: #d9826d;
  color: #a84432;
  background: #fff3ef;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 87, .12);
}
.output-model-tabs button.generating.active {
  color: #fff;
  background: #d97757;
}
.output-model-loading {
  position: absolute;
  left: 50%;
  top: -9px;
  height: 9px;
  display: flex;
  align-items: center;
  gap: 2px;
  transform: translateX(-50%);
}
.output-model-loading i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d35f49;
  animation: project-dot-wave 1s ease-in-out infinite;
}
.output-model-loading i:nth-child(2) {
  animation-delay: .16s;
}
.output-model-loading i:nth-child(3) {
  animation-delay: .32s;
}
.output-model-tabs button.unread:not(.active) {
  border-color: #e8a34d;
  color: #975315;
  background: #fff9ec;
  box-shadow: inset 0 0 0 1px rgba(232, 163, 77, .18);
}
.output-model-tabs button.unread:after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e8872c;
}
.output-model-tabs button.unread.active:after {
  display: none;
}
.output-model-tabs button.failed:not(.active) {
  border-color: #dc8378;
  color: #ab3f34;
  background: #fff2f0;
}
.output-model-tabs button:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.model-card.generating {
  position: relative;
}
.rewrite-console .model-card.generating:not(.selected) {
  border-color: rgba(217, 119, 87, .7);
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 87, .08);
}
.rewrite-console .model-card.generating:not(.selected):hover {
  background: rgba(255, 255, 255, .08);
}
.model-card-loading {
  position: absolute;
  left: 15px;
  top: 9px;
  height: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: #c7543f;
}
.model-card-loading i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d97757;
  animation: project-dot-wave 1s ease-in-out infinite;
}
.model-card-loading i:nth-of-type(2) {
  animation-delay: .16s;
}
.model-card-loading i:nth-of-type(3) {
  animation-delay: .32s;
}
.chat-output-pane .custom-brief {
  flex: 0 0 auto;
}
.custom-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.custom-brief-head label {
  min-width: 0;
}
.brief-generate-button {
  flex: 0 0 auto;
  min-width: 118px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #df8f7b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #a94332;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  transition: 160ms ease;
}
.brief-generate-button:hover {
  color: #fff;
  background: #d97757;
}
.brief-generate-button:active {
  transform: scale(.98);
}
.brief-generate-button.cancel {
  border-color: #c95b47;
  color: #fff;
  background: #c95b47;
}
.brief-generate-button.cancel:hover {
  background: #b94b38;
}
.material-progress {
  padding: 12px 16px;
  border-bottom: 1px solid #eed8d2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  background: #fffdfc;
}
.material-progress > div {
  position: relative;
  min-width: 0;
  padding: 10px;
  border: 1px solid #eadbd7;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 25px 1fr;
  column-gap: 8px;
  align-items: center;
  background: #fff;
  transition:
    border-color .25s ease,
    background-color .25s ease,
    transform .25s ease;
}
.material-progress span {
  grid-row: 1/3;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #a8796e;
  background: #f5e9e5;
  font-size: 11px;
  font-weight: 900;
  transition: background-color .25s ease, color .25s ease;
}
.material-progress b {
  color: #6d504a;
  font-size: 11px;
}
.material-progress small {
  color: #a28a84;
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-progress > div.processing {
  border-color: #d97757;
  background: #fff8f5;
  transform: translateY(-1px);
}
.material-progress > div.processing:after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(217, 119, 87, .42);
  border-radius: 9px;
  opacity: 0;
  animation: material-status-pulse 1.45s ease-out infinite;
}
.material-progress > div.processing span {
  color: #fff;
  background: #d97757;
}
.material-progress > div.processing small {
  color: #bf604c;
}
.material-progress > div.complete {
  border-color: #b9d9bf;
  background: #f6fbf7;
}
.material-progress > div.complete span {
  color: #fff;
  background: #5d9b69;
}
.material-progress > div.complete b {
  color: #416b49;
}
.material-progress > div.complete small {
  color: #6d9074;
}
.material-progress > div.waiting {
  opacity: .68;
}
.rewrite-chat-stream {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  background: #fff;
}
.rewrite-chat-stream.empty {
  display: grid;
  place-items: center;
}
.chat-empty {
  text-align: center;
  color: #a07c73;
}
.chat-empty svg {
  color: #d97757;
}
.chat-empty strong {
  display: block;
  margin: 9px 0 5px;
  color: #6c4b44;
  font-size: 15px;
}
.chat-empty p {
  margin: 0;
  font-size: 11px;
}
.chat-message {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.chat-message.user {
  max-width: 82%;
  margin-left: auto;
  flex-direction: row-reverse;
}
.chat-avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #d97757;
}
.chat-message.user .chat-avatar {
  background: #84675f;
}
.chat-message > div:last-child {
  min-width: 0;
  max-width: calc(100% - 40px);
}
.chat-message > div > b {
  display: block;
  margin-bottom: 6px;
  color: #9a5c4e;
  font-size: 10px;
}
.chat-message-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.chat-message-head > b {
  display: block;
  margin-bottom: 0;
  color: #9a5c4e;
  font-size: 10px;
}
.chat-message pre {
  margin: 0;
  padding: 16px;
  border: 1px solid #edd5cf;
  border-radius: 4px 14px 14px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #342f2d;
  background: #fffaf8;
  font:
    14.4px/1.9 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.chat-message.user pre {
  padding: 12px 14px;
  border-radius: 14px 4px 14px 14px;
  color: #fff;
  background: #936f65;
  font-size: 13px;
  line-height: 1.7;
}
.chat-message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: #9b8a84;
  font-size: 10px;
  line-height: 1.5;
}
.chat-message.user .chat-message-meta {
  justify-content: flex-end;
}
.chat-message-meta .chat-meta-points {
  font-weight: 800;
}
.chat-message-meta .chat-meta-time {
  font-variant-numeric: tabular-nums;
}
.chat-message-meta .chat-meta-estimated {
  padding: 0 5px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 9px;
  opacity: .8;
}
.chat-generating {
  position: relative;
  inset: auto;
  width: calc(100% - 40px);
  max-width: 520px;
  min-height: 210px;
  margin: 0 auto 20px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid #efd8d2;
  border-radius: 14px;
  background: #fffaf8;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(114, 67, 56, .06);
}
.chat-generating:before,
.chat-generating:after {
  content: none;
}
.chat-generating strong {
  margin-top: 15px;
  color: #714a41;
  font-size: 16px;
}
.chat-generating p {
  max-width: 440px;
  margin: 7px auto 0;
  color: #a2766c;
  font-size: 11px;
  line-height: 1.7;
}
.generation-visual {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
}
.generation-orbit {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #d97757;
  box-shadow: 0 10px 26px rgba(217, 119, 87, .24);
  animation: generation-core 1.6s ease-in-out infinite;
}
.generation-visual > i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(217, 119, 87, .5);
  border-radius: 50%;
  animation: generation-ring 2s ease-out infinite;
}
.generation-visual > i:nth-of-type(2) {
  animation-delay: .55s;
}
.generation-visual > i:nth-of-type(3) {
  animation-delay: 1.1s;
}
.generation-wave {
  height: 30px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.generation-wave span {
  width: 4px;
  height: 10px;
  border-radius: 4px;
  background: #d97757;
  transform-origin: center;
  animation: generation-wave 1s ease-in-out infinite;
}
.generation-wave span:nth-child(2) {
  animation-delay: .12s;
}
.generation-wave span:nth-child(3) {
  animation-delay: .24s;
}
.generation-wave span:nth-child(4) {
  animation-delay: .36s;
}
.generation-wave span:nth-child(5) {
  animation-delay: .48s;
}
.generation-typing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #b16a5a;
  font-size: 10px;
}
.generation-typing i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d97757;
  animation: generation-dot 1.2s ease-in-out infinite;
}
.generation-typing i:nth-of-type(2) {
  animation-delay: .18s;
}
.generation-typing i:nth-of-type(3) {
  animation-delay: .36s;
}
.rewrite-chat-composer {
  padding: 12px 14px;
  border-top: 1px solid #ecd6d0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fffaf8;
}
.rewrite-chat-composer textarea {
  min-height: 76px;
  max-height: 160px;
  padding: 12px 14px;
  border: 1px solid #e6c9c1;
  border-radius: 11px;
  resize: vertical;
  outline: 0;
  color: #3f3532;
  background: #fff;
  font:
    12px/1.65 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.rewrite-chat-composer textarea:focus {
  border-color: #d97757;
  box-shadow: 0 0 0 3px rgba(217, 119, 87, .09);
}
.rewrite-chat-composer .generate-rewrite,
.rewrite-chat-composer .cancel-rewrite {
  align-self: stretch;
  height: auto;
  min-height: 76px;
  padding: 0 15px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
}
.rewrite-chat-composer .cancel-rewrite {
  border: 1px solid #da8f7d;
  color: #a84030;
  background: #fff3ef;
}
.rewrite-chat-composer .cancel-rewrite:hover {
  color: #fff;
  background: #c95743;
}
.rewrite-chat-composer textarea:disabled {
  color: #9b817a;
  background: #f8f2f0;
  cursor: not-allowed;
}
@keyframes material-status-pulse {
  0% {
    transform: scale(.98);
    opacity: .65;
  }
  75%, 100% {
    transform: scale(1.025);
    opacity: 0;
  }
}
@keyframes generation-halo {
  0%, 100% {
    transform: scale(.92);
    opacity: .62;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}
@keyframes generation-halo-inner {
  0%, 100% {
    transform: scale(1);
    opacity: .58;
  }
  50% {
    transform: scale(.9);
    opacity: .92;
  }
}
@keyframes generation-core {
  50% {
    transform: scale(1.07);
    filter: brightness(1.04);
  }
}
@keyframes generation-ring {
  0% {
    transform: scale(.72);
    opacity: .75;
  }
  80%, 100% {
    transform: scale(1.32);
    opacity: 0;
  }
}
@keyframes generation-wave {
  0%, 100% {
    transform: scaleY(.55);
    opacity: .45;
  }
  50% {
    transform: scaleY(2.3);
    opacity: 1;
  }
}
@keyframes generation-dot {
  0%, 70%, 100% {
    transform: translateY(0);
    opacity: .35;
  }
  35% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
@media (max-width: 1200px) {
  .rewrite-grid {
    grid-template-columns: 1fr;
  }
  .rewrite-pane {
    height: 700px;
  }
  .preview-panel,
  .breakdown-panel {
    height: auto;
    min-height: 760px;
  }
  .breakdown-panel .result-list,
  .breakdown-panel .story-reconstruction {
    max-height: 900px;
  }
  .model-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-sidebar {
    width: 240px;
  }
  .brand-lockup .brand-copy strong {
    font-size: 12px;
  }
  .brand-lockup .brand-copy small {
    font-size: 7px;
  }
  .content-wrap {
    padding: 22px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 850px) {
  body {
    min-width: 0;
  }
  .app-shell {
    display: block;
  }
  .project-sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
  .main-area {
    width: 100%;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .model-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    min-height: 330px;
    padding: 28px;
  }
  .auth-copy h1 {
    font-size: 32px;
  }
  .auth-form-wrap {
    padding: 28px;
  }
  .api-provider-grid {
    grid-template-columns: 1fr;
  }
  .alias-row {
    grid-template-columns: 1fr;
  }
  .account-drawer {
    width: min(440px, 100vw);
  }
  .page-heading {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }
  .topbar > div {
    font-size: 15px;
  }
  .topbar strong {
    font-size: 16px;
  }
}
@media (max-width: 760px) {
  .rule-detail-modal {
    width: calc(100vw - 28px);
    max-height: calc(100dvh - 28px);
    padding: 22px 18px 18px;
  }
  .rule-detail-modal.rule-preview-modal,
  .rule-editor-modal {
    width: calc(100vw - 28px);
    height: calc(100dvh - 28px);
    padding: 22px 18px 18px;
  }
  .rule-detail-content {
    max-height: calc(100dvh - 220px);
    padding: 15px;
    font-size: 13px;
  }
  .material-progress {
    grid-template-columns: 1fr;
  }
  .chat-generating {
    min-height: 220px;
  }
}
.viral-case-library-modal {
  height: min(760px, calc(100dvh - 60px));
  min-height: 0;
}
.viral-case-library-modal .viral-case-library-note {
  flex: 0 0 auto;
}
.viral-case-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 2px 8px 8px 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.viral-case-list article {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  isolation: isolate;
}
.viral-case-list article header {
  min-height: 52px;
  flex: 0 0 auto;
}
.viral-case-toggle,
.viral-case-header-actions {
  position: relative;
  z-index: 1;
}
.viral-case-content {
  max-height: min(310px, 38dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.viral-case-library-modal .modal-actions {
  flex: 0 0 auto;
}
.rewrite-mode .tree-row.child.is-generating {
  background-image:
    linear-gradient(
      90deg,
      rgba(217, 119, 87, .16),
      rgba(244, 184, 164, .08),
      rgba(217, 119, 87, 0));
  background-size: 220% 100%;
  animation: rewrite-project-row-flow 2.2s cubic-bezier(.16, 1, .3, 1) infinite;
}
.rewrite-mode .project-generation-indicator {
  position: relative;
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid #e9aa99;
  border-radius: 999px;
  gap: 4px;
  background: #fff2ed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 3px 10px rgba(169, 75, 58, .08);
  overflow: hidden;
}
.rewrite-mode .project-generation-indicator:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      transparent 20%,
      rgba(255, 255, 255, .92) 48%,
      transparent 76%);
  transform: translateX(-140%);
  animation: rewrite-indicator-sweep 2s ease-in-out infinite;
}
.rewrite-mode .project-generation-indicator i {
  position: relative;
  z-index: 1;
  width: 4px;
  height: 4px;
  background: #d97757;
  box-shadow: 0 0 0 1px rgba(217, 119, 87, .08);
  animation: rewrite-project-dot 1.05s ease-in-out infinite;
}
.rewrite-mode .project-generation-indicator i:nth-child(2) {
  background: #c85f47;
  animation-delay: .14s;
}
.rewrite-mode .project-generation-indicator i:nth-child(3) {
  background: #a94736;
  animation-delay: .28s;
}
@keyframes rewrite-project-row-flow {
  0%, 100% {
    background-position: 0 0;
  }
  50% {
    background-position: 100% 0;
  }
}
@keyframes rewrite-indicator-sweep {
  55%, 100% {
    transform: translateX(140%);
  }
}
@keyframes rewrite-project-dot {
  0%, 100% {
    transform: translateY(1px) scale(.72);
    opacity: .42;
  }
  50% {
    transform: translateY(-1px) scale(1.12);
    opacity: 1;
  }
}
@media (max-width: 760px) {
  .viral-case-library-modal {
    height: calc(100dvh - 28px);
  }
  .viral-case-content {
    max-height: 38dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.topbar-actions .rewrite-entry,
.topbar-actions .outline-entry,
.topbar-actions .analysis-entry {
  width: 112px;
  min-width: 112px;
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.analysis-entry,
.outline-entry {
  border: 1px solid var(--line);
}
.analysis-entry {
  color: #574cb4;
  background: #f6f4ff;
}
.analysis-entry:hover,
.analysis-entry.active {
  color: #fff;
  background: #6c57f5;
}
.outline-entry {
  border-color: #dcc69c;
  color: #956e2e;
  background: #fffaf0;
}
.outline-entry:hover,
.outline-entry.active {
  border-color: #b5863f;
  color: #fff;
  background: #b5863f;
}
.outline-mode {
  background: #fbf8f0;
}
.outline-mode .project-sidebar {
  border-color: #e7ddc8;
  background: #fffdf8;
}
.outline-mode .brand-mark {
  box-shadow: 6px 6px 0 #eadfca;
}
.outline-mode .topbar {
  border-color: #e7ddc8;
  background: rgba(255, 253, 248, .94);
}
.outline-mode .tree-row.child.active {
  color: #805c28;
  background: #f8edd5;
}
.outline-mode .tree-row.child.active:after {
  background: #b5863f;
}
.outline-mode .new-project-button {
  border-color: #dfc692;
  color: #9c7130;
}
.outline-workbench {
  --rewrite:#a87835;
  --rewrite-soft:#fff8e8;
  --rewrite-line:#e5d1a7;
}
.outline-workbench .rewrite-eyebrow {
  color: #a87835;
}
.outline-console {
  background:
    linear-gradient(
      110deg,
      #29231a 0%,
      #3b2e1e 46%,
      #76552d 100%);
}
.outline-console .model-card.selected {
  border-color: #d5ab63;
  background: rgba(181, 134, 63, .17);
}
.outline-console .selected-mark,
.outline-workbench .generate-rewrite {
  background: #b5863f;
}
.outline-rule-tabs-section {
  border-color: #dbc28f;
}
.outline-rule-tabs-section .rule-inline-title {
  border-color: #ead8ae;
  color: #8b642d;
  background: #fff8e7;
}
.outline-rule-tabs button {
  border-color: #ecdcb9;
  color: #8d6b38;
}
.outline-rule-tabs button.active {
  background: #b5863f;
}
.outline-workbench .rewrite-pane {
  border-color: #e5d1a7;
}
.outline-workbench .rewrite-pane > header {
  border-color: #eadcbf;
}
.outline-workbench .rewrite-pane header > div > span {
  color: #a27b40;
}
.outline-workbench .rewrite-pane header em {
  color: #9c763c;
  background: #fff8e8;
}
.outline-workbench .rewrite-document.empty {
  color: #b18b52;
}
.outline-workbench .rewrite-document.empty strong {
  color: #72552b;
}
.outline-workbench .rewrite-document.empty button {
  background: #b5863f;
}
.outline-workbench .source-model-tabs button {
  border-color: #e2cfa5;
  color: #97713c;
}
.outline-workbench .source-model-tabs button.active,
.outline-workbench .output-model-tabs button.active {
  background: #b5863f;
  border-color: #b5863f;
}
.outline-workbench .chat-empty svg {
  color: #b5863f;
}
.outline-workbench .chat-avatar {
  color: #fff;
  background: #b5863f;
}
.outline-workbench .chat-message > div > b,
.outline-workbench .chat-message-head > b {
  color: #99713a;
}
.outline-workbench .chat-message pre {
  border-color: #ead9b5;
  background: #fffaf0;
}
.outline-workbench .chat-message.user pre {
  color: #342f2d;
}
.outline-workbench .chat-generating {
  border-color: #e7d2a6;
  background: #fffaf0;
}
.outline-workbench .generation-orbit {
  background: #b5863f;
}
.outline-workbench .rewrite-chat-composer {
  border-color: #ead9b5;
}
.outline-workbench .rewrite-chat-composer textarea {
  border-color: #e2cfa5;
}
.outline-workbench .cancel-rewrite {
  color: #89642e;
  background: #fff7e7;
  border-color: #dfc692;
}
.outline-case-badge {
  border-color: #dfc692;
  color: #90692f;
  background: #fffaf0;
}
.outline-case-badge small {
  color: #ae8950;
}
.outline-case-library-modal {
  border-color: #dfc692;
}
.outline-case-library-note {
  color: #917446;
}
.outline-case-list article {
  border-color: #ead9b5;
  background: #fffaf0;
}
.outline-case-list article:hover {
  border-color: #d5b477;
}
.outline-case-list article.expanded {
  border-color: #d5b477;
  background: #fffdf8;
}
.outline-case-list .viral-case-chevron {
  border-color: #e5d2a9;
  color: #a17537;
}
.outline-case-list .viral-case-content {
  border-color: #ead9b5;
}
.outline-case-list .viral-case-header-actions em {
  color: #9a753e;
}
.outline-case-list .viral-case-editor textarea {
  border-color: #dfc692;
}
.rewrite-workbench .model-console .model-card.confidential,
.outline-workbench .model-console .model-card.confidential {
  min-height: 86px;
}
.rewrite-workbench .rewrite-pane,
.outline-workbench .rewrite-pane,
.rewrite-workbench .chat-output-pane,
.outline-workbench .chat-output-pane {
  height: 1040px;
}
.expanded-api-modal {
  width: min(1120px, calc(100vw - 40px));
}
.alias-row.dual-display-row {
  grid-template-columns: 54px minmax(104px, 0.85fr) minmax(150px, 0.95fr) minmax(180px, 1fr) minmax(340px, 1.5fr);
}
.dual-display-heading {
  display: grid;
  grid-template-columns: 54px minmax(104px, 0.85fr) minmax(150px, 0.95fr) minmax(180px, 1fr) minmax(340px, 1.5fr);
  gap: 10px;
  align-items: end;
}
.mapping-heading-copy {
  grid-column: 1 / 5;
  min-width: 0;
}
.mapping-heading-copy p {
  max-width: 650px;
  margin: 6px 0 0;
  color: #686e78;
  font-size: 10px;
  line-height: 1.55;
}
.display-counts {
  grid-column: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  gap: 5px;
}
.display-counts span {
  height: 32px;
  padding: 0 12px;
  border-radius: 20px;
  justify-content: flex-start;
  text-align: left;
  color: #6658d1;
  background: #efedff;
  font-size: 9px;
  white-space: nowrap;
}
.display-counts span:nth-child(3) {
  border-color: #d8bd86;
  color: #8b642d;
  background: #fff4dc;
}
.display-model-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.rewrite-console .model-console-head p,
.outline-console .model-console-head p {
  display: none;
}
.visible-model.outline {
  border-color: #dbc69c;
  color: #926c31;
}
.visible-model.outline.active {
  color: #fff;
  background: #b5863f;
}
.visible-model.disabled {
  cursor: not-allowed;
  color: #c1c4ca;
  background: #f5f6f8;
}
.outline-case-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
}
.outline-case-item {
  flex: 0 0 auto;
}
.outline-case-content pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.outline-case-library-modal {
  height: min(760px, calc(100dvh - 60px));
  min-height: 0;
}
.rule-detail-modal.outline-rule-modal,
.rule-editor-modal.outline-rule-modal {
  border-color: #dfc692;
}
.rule-detail-modal.outline-rule-modal > span,
.rule-editor-modal.outline-rule-modal > span {
  color: #a87835;
}
.outline-workbench .source-model-tabs button,
.outline-workbench .output-model-tabs button {
  border-color: #dfc89a;
  color: #17191d;
  background: #fffaf0;
}
.outline-workbench .source-model-tabs button:hover,
.outline-workbench .output-model-tabs button:hover {
  border-color: #c99a4c;
  color: #17191d;
  background: #f8e9ca;
}
.outline-workbench .source-model-tabs button.active,
.outline-workbench .output-model-tabs button.active {
  border-color: #b98635;
  color: #17191d;
  background: #f1d79f;
  box-shadow: inset 0 0 0 1px rgba(132, 91, 29, .12);
}
.outline-workbench .output-model-tabs button.has-result:not(.active) {
  border-color: #d6b877;
  color: #17191d;
  background: #fbf0d9;
}
.outline-workbench .output-model-tabs button.generating,
.outline-workbench .output-model-tabs button.generating.active {
  border-color: #c6903e;
  color: #17191d;
  background: #f8e3bb;
}
.outline-workbench .output-model-tabs button.unread:not(.active) {
  border-color: #dca248;
  color: #17191d;
  background: #fff2d5;
}
.outline-workbench .output-model-tabs button.failed:not(.active) {
  color: #17191d;
  background: #fff0ed;
}
.outline-workbench .rewrite-actions button {
  border-color: #d9bd84;
  color: #76511e;
  background: #fffaf0;
}
.outline-workbench .rewrite-actions button:hover {
  border-color: #b5863f;
  background: #f8e9ca;
}
.outline-workbench .rewrite-actions .final-draft-button {
  border-color: #c89a4e;
  color: #704817;
  background: #fff5df;
}
.outline-workbench .rewrite-actions .final-draft-button.finalized {
  border-color: #6f9c72;
  color: #315f39;
  background: #eff8f0;
}
.outline-workbench .custom-brief {
  border-color: #e4d0a5;
  background: #fffaf0;
}
.outline-workbench .custom-brief label {
  color: #865e27;
}
.outline-workbench .custom-brief label small {
  color: #8b7555;
}
.outline-workbench .custom-brief textarea {
  border-color: #d9c294;
  color: #302619;
  background: #fff;
}
.outline-workbench .custom-brief textarea:focus {
  border-color: #b5863f;
  outline: 2px solid #f7e8ca;
}
.outline-workbench .brief-generate-button {
  border-color: #c89a4e;
  color: #76511e;
  background: #fff;
}
.outline-workbench .brief-generate-button:hover {
  color: #fff;
  background: #a87835;
}
.outline-workbench .brief-generate-button.cancel {
  border-color: #98662f;
  color: #fff;
  background: #98662f;
}
.outline-workbench .outline-material-progress {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-color: #e5d1a7;
  background: #fffdf8;
}
.outline-workbench .outline-material-progress > div {
  border-color: #e5d4b3;
}
.outline-workbench .outline-material-progress span {
  color: #8b642d;
  background: #f5e8ce;
}
.outline-workbench .outline-material-progress b {
  color: #5f4827;
}
.outline-workbench .outline-material-progress small {
  color: #846f50;
}
.outline-workbench .outline-material-progress > div.processing {
  border-color: #b5863f;
  background: #fff7e7;
}
.outline-workbench .outline-material-progress > div.processing:after {
  border-color: rgba(181, 134, 63, .48);
}
.outline-workbench .outline-material-progress > div.processing span {
  color: #fff;
  background: #a87835;
}
.outline-workbench .outline-material-progress > div.processing small {
  color: #805a27;
}
.outline-final-draft-modal {
  border-color: #dfc692;
}
.outline-final-draft-modal > span {
  color: #a87835;
}
@media (max-width: 1200px) {
  .rewrite-workbench .rewrite-pane,
  .outline-workbench .rewrite-pane,
  .rewrite-workbench .chat-output-pane,
  .outline-workbench .chat-output-pane {
    height: 700px;
  }
  .expanded-api-modal {
    width: calc(100vw - 28px);
  }
  .outline-workbench .outline-material-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 850px) {
  body {
    min-width: 0;
  }
  .topbar-actions {
    width: 100%;
  }
  .topbar-actions button {
    flex: 1 1 140px;
  }
  .alias-row {
    grid-template-columns: 1fr;
  }
  .display-model-actions {
    width: 100%;
  }
  .api-security-cards {
    grid-template-columns: 1fr;
  }
  .outline-case-library-modal {
    width: calc(100vw - 28px);
  }
  .custom-brief-head {
    align-items: stretch;
    flex-direction: column;
  }
  .brief-generate-button {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .outline-case-library-modal {
    height: calc(100dvh - 28px);
  }
  .outline-workbench .outline-material-progress {
    grid-template-columns: 1fr;
  }
}
.api-security-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.api-security-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfd;
}
.api-security-card strong {
  display: block;
  font-size: 11px;
}
.api-security-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.api-card-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}
.api-relation-note {
  margin: 0 0 16px;
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: #5f5a78;
  background: #f7f5ff;
  font-size: 10px;
  line-height: 1.6;
}
.api-relation-note strong {
  display: block;
  margin-bottom: 3px;
  color: #3f386f;
  font-size: 10px;
}
.api-relation-note span {
  display: block;
}
.provider-note {
  display: inline-block;
  margin: 0 0 4px;
  padding: 1px 7px;
  border: 1px solid #d7d0ff;
  border-radius: 999px;
  color: #6757d4;
  background: #f4f1ff;
  font-size: 10px;
  font-style: normal;
  line-height: 1.5;
}
.model-id-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}
.model-id-cell code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-provider-tag {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 1px 7px;
  border: 1px solid #d7d0ff;
  border-radius: 999px;
  color: #6757d4;
  background: #f4f1ff;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}
.model-pricing-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 10px;
  color: #686e78;
}
.model-pricing-row label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.model-pricing-row input {
  width: 66px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #dcdfe6;
  border-radius: 7px;
  font-size: 11px;
  color: #2c3038;
  background: #fff;
}
.model-pricing-row input:focus {
  outline: none;
  border-color: #b9aefb;
  box-shadow: 0 0 0 2px #efeaff;
}
.model-pricing-row .pricing-unit {
  color: #9aa0aa;
  font-size: 9px;
}
@media (max-width: 850px) {
  .model-pricing-row {
    width: 100%;
  }
  .row-provider-tag {
    margin-left: 0;
  }
}
.account-drawer {
  width: 500px;
}
.sidebar-balance {
  color: var(--accent);
  font-weight: 700;
  margin-top: 3px;
}
.top-account .top-balance {
  margin-left: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
}
.balance-pill {
  color: #2f9e6b;
  font-weight: 700;
}
.account-rate-note {
  padding: 0 20px 10px;
  color: var(--muted);
  font-size: 11px;
}
.account-detail-link {
  margin: 0 20px 16px;
  padding: 8px;
  width: calc(100% - 40px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
}
.account-detail-link:hover {
  background: var(--accent-soft);
}
.account-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  font-size: 9px;
  cursor: pointer;
}
.account-link:hover {
  background: var(--accent-soft);
}
.user-actions {
  flex-wrap: nowrap;
}
.billing-detail {
  padding-bottom: 24px;
}
.billing-detail-header {
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.billing-detail-header span {
  color: var(--accent);
  font: 8px "DM Mono", monospace;
  letter-spacing: 1px;
}
.billing-detail-header h2 {
  margin: 3px 0 0;
  font-size: 14px;
}
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #2c3038;
  font-size: 11px;
  cursor: pointer;
}
.back-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.billing-hero {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.billing-hero strong {
  font-size: 11px;
  color: var(--muted);
}
.billing-hero .balance-amount {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  font-weight: 800;
  color: #2f9e6b;
}
.billing-hero .account-rate-note {
  padding: 0;
}
.billing-adjust {
  margin: 0 20px 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbff;
}
.billing-adjust h3 {
  margin: 0 0 10px;
  font-size: 12px;
}
.adjust-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.adjust-mode {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.adjust-mode button {
  padding: 8px 12px;
  border: 0;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.adjust-mode button.active {
  background: var(--accent);
  color: #fff;
}
.adjust-row input[type=number] {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
}
.adjust-reason {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  box-sizing: border-box;
}
.adjust-row input[type=number]:focus,
.adjust-reason:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.billing-ledger {
  padding: 0 20px;
}
.ledger-empty {
  color: var(--muted);
  font-size: 11px;
  padding: 14px 0;
}
.ledger-list {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.ledger-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.ledger-row:last-child {
  border-bottom: 0;
}
.ledger-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ledger-date {
  color: var(--muted);
  font-size: 10px;
}
.ledger-delta {
  font-size: 12px;
  font-weight: 700;
}
.ledger-delta.plus {
  color: #2f9e6b;
}
.ledger-delta.minus {
  color: var(--danger);
}
.ledger-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
.ledger-workspace {
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
}
.ledger-model {
  padding: 2px 7px;
  border-radius: 6px;
  background: #f0f1f4;
  color: #4b515b;
  font-size: 9px;
}
.ledger-provider {
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef6f0;
  color: #2f9e6b;
  font-size: 9px;
}
.ledger-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.ledger-after {
  color: #2c3038;
  font-weight: 600;
}
.ledger-reason {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
@media (max-width: 560px) {
  .account-drawer {
    width: 100vw;
  }
}
.topbar-actions .master-entry {
  width: 112px;
  min-width: 112px;
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid #bfe3da;
  color: #0b6a5c;
  background: #f1fbf7;
  transition: 160ms ease;
}
.topbar-actions .master-entry:hover,
.topbar-actions .master-entry.active {
  border-color: #0f8a78;
  color: #fff;
  background: #0f8a78;
}
.master-mode {
  background: #f4fbf9;
}
.master-mode .project-sidebar {
  border-color: #d5ebe4;
  background: #fbfffd;
}
.master-mode .brand-mark {
  box-shadow: 6px 6px 0 #d7ece5;
}
.master-mode .topbar {
  border-color: #d5ebe4;
  background: rgba(251, 255, 253, .94);
}
.master-mode .tree-row.child.active {
  color: #0b6a5c;
  background: #e4f6f0;
}
.master-mode .tree-row.child.active:after {
  background: #0f8a78;
}
.master-mode .new-project-button {
  border-color: #a8dbcd;
  color: #0b6a5c;
}
.master-workbench {
  --rewrite:#0f8a78;
  --rewrite-soft:#eefaf6;
  --rewrite-line:#c6e8de;
}
.master-workbench .rewrite-eyebrow {
  color: #0f8a78;
}
.master-console {
  background:
    linear-gradient(
      110deg,
      #082a26 0%,
      #0e4a40 46%,
      #17806f 100%);
}
.master-console .model-card.selected {
  border-color: #5fd0b8;
  background: rgba(15, 138, 120, .18);
}
.master-console .selected-mark,
.master-workbench .generate-rewrite {
  background: #0f8a78;
}
.master-rule-tabs-section {
  border-color: #bfe3da;
}
.master-rule-tabs-section .rule-inline-title {
  border-color: #d3ece5;
  color: #0b6a5c;
  background: #eefaf6;
}
.master-rule-tabs button {
  border-color: #d3ece5;
  color: #12776a;
}
.master-rule-tabs button.active {
  background: #0f8a78;
}
.master-workbench .rewrite-pane {
  border-color: #c6e8de;
}
.master-workbench .rewrite-pane > header {
  border-color: #d8efe9;
}
.master-workbench .rewrite-pane header > div > span {
  color: #128a78;
}
.master-workbench .rewrite-pane header em {
  color: #0b6a5c;
  background: #eefaf6;
}
.master-workbench .rewrite-document.empty {
  color: #5aa99b;
}
.master-workbench .rewrite-document.empty strong {
  color: #0b5449;
}
.master-workbench .rewrite-document.empty button {
  background: #0f8a78;
}
.master-workbench .source-model-tabs button {
  border-color: #bfe3da;
  color: #12776a;
}
.master-workbench .source-model-tabs button.active,
.master-workbench .output-model-tabs button.active {
  background: #0f8a78;
  border-color: #0f8a78;
}
.master-workbench .chat-empty svg {
  color: #0f8a78;
}
.master-workbench .chat-avatar {
  color: #fff;
  background: #0f8a78;
}
.master-workbench .chat-message > div > b,
.master-workbench .chat-message-head > b {
  color: #0b6a5c;
}
.master-workbench .chat-message pre {
  border-color: #d3ece5;
  background: #f1fbf7;
}
.master-workbench .chat-message.user pre {
  color: #20302c;
}
.master-workbench .chat-generating {
  border-color: #c9e9e0;
  background: #f1fbf7;
}
.master-workbench .generation-orbit {
  background: #0f8a78;
}
.master-workbench .rewrite-chat-composer {
  border-color: #d3ece5;
}
.master-workbench .rewrite-chat-composer textarea {
  border-color: #bfe3da;
}
.master-workbench .cancel-rewrite {
  color: #0b6a5c;
  background: #eafaf5;
  border-color: #a8dbcd;
}
.master-case-badge {
  border-color: #a8dbcd;
  color: #0b6a5c;
  background: #f1fbf7;
}
.master-case-badge small {
  color: #3f9486;
}
.master-workbench .source-model-tabs button,
.master-workbench .output-model-tabs button {
  border-color: #bfe3da;
  color: #17191d;
  background: #f1fbf7;
}
.master-workbench .source-model-tabs button:hover,
.master-workbench .output-model-tabs button:hover {
  border-color: #2aa894;
  color: #17191d;
  background: #ddf4ee;
}
.master-workbench .source-model-tabs button.active,
.master-workbench .output-model-tabs button.active {
  border-color: #0f8a78;
  color: #17191d;
  background: #bfe9de;
  box-shadow: inset 0 0 0 1px rgba(11, 106, 92, .12);
}
.master-workbench .output-model-tabs button.has-result:not(.active) {
  border-color: #9fd8cb;
  color: #17191d;
  background: #e6f7f2;
}
.master-workbench .output-model-tabs button.generating,
.master-workbench .output-model-tabs button.generating.active {
  border-color: #2aa894;
  color: #17191d;
  background: #cdeee6;
}
.master-workbench .output-model-tabs button.unread:not(.active) {
  border-color: #54c1ab;
  color: #17191d;
  background: #ddf5ef;
}
.master-workbench .output-model-tabs button.failed:not(.active) {
  color: #17191d;
  background: #fff0ed;
}
.master-workbench .rewrite-actions button {
  border-color: #a8dbcd;
  color: #0b6a5c;
  background: #f1fbf7;
}
.master-workbench .rewrite-actions button:hover {
  border-color: #0f8a78;
  background: #ddf4ee;
}
.master-workbench .rewrite-actions .final-draft-button {
  border-color: #31a994;
  color: #084f45;
  background: #e8f8f3;
}
.master-workbench .rewrite-actions .final-draft-button.finalized {
  border-color: #6f9c72;
  color: #315f39;
  background: #eff8f0;
}
.master-workbench .custom-brief {
  border-color: #cfeae2;
  background: #f1fbf7;
}
.master-workbench .custom-brief label {
  color: #0b6a5c;
}
.master-workbench .custom-brief label small {
  color: #4b7f75;
}
.master-workbench .custom-brief textarea {
  border-color: #bfe3da;
  color: #17302b;
  background: #fff;
}
.master-workbench .custom-brief textarea:focus {
  border-color: #0f8a78;
  outline: 2px solid #d6f1ea;
}
.master-workbench .brief-generate-button {
  border-color: #31a994;
  color: #0b6a5c;
  background: #fff;
}
.master-workbench .brief-generate-button:hover {
  color: #fff;
  background: #0f8a78;
}
.master-workbench .brief-generate-button.cancel {
  border-color: #0b6a5c;
  color: #fff;
  background: #0b6a5c;
}
.master-workbench .master-material-progress {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-color: #c6e8de;
  background: #fbfffd;
}
.master-workbench .master-material-progress > div {
  border-color: #d8efe9;
}
.master-workbench .master-material-progress span {
  color: #0b6a5c;
  background: #dcf3ed;
}
.master-workbench .master-material-progress b {
  color: #14453d;
}
.master-workbench .master-material-progress small {
  color: #4b7f75;
}
.master-workbench .master-material-progress > div.processing {
  border-color: #0f8a78;
  background: #eafaf5;
}
.master-workbench .master-material-progress > div.processing:after {
  border-color: rgba(15, 138, 120, .48);
}
.master-workbench .master-material-progress > div.processing span {
  color: #fff;
  background: #0f8a78;
}
.master-workbench .master-material-progress > div.processing small {
  color: #0b6a5c;
}
.rule-detail-modal.master-rule-modal,
.rule-editor-modal.master-rule-modal {
  border-color: #a8dbcd;
}
.rule-detail-modal.master-rule-modal > span,
.rule-editor-modal.master-rule-modal > span {
  color: #0f8a78;
}
.master-final-draft-modal {
  border-color: #a8dbcd;
}
.master-final-draft-modal > span {
  color: #0f8a78;
}
@media (max-width: 1200px) {
  .master-workbench .master-material-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .master-workbench .master-material-progress {
    grid-template-columns: 1fr;
  }
}
.visible-model.master.active {
  border-color: #5fc7b4;
  color: #0b6a5c;
  background: #e8f8f3;
}
.visible-model.master:hover {
  border-color: #2aa894;
  color: #0b6a5c;
}
.display-counts span:nth-child(4) {
  border-color: #a8dbcd;
  color: #0b6a5c;
  background: #effaf7;
}
.rewrite-workbench .chat-message-meta .chat-meta-points {
  color: #b4553a;
}
.outline-workbench .chat-message-meta .chat-meta-points {
  color: #8b642d;
}
.master-workbench .chat-message-meta .chat-meta-points {
  color: #0b6a5c;
}
.chat-message.user .chat-message-meta .chat-meta-points {
  color: #e8c9bf;
}
.outline-workbench .outline-material-progress[data-steps="5"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .outline-workbench .outline-material-progress[data-steps="5"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .outline-workbench .outline-material-progress[data-steps="5"] {
    grid-template-columns: 1fr;
  }
}
.project-tree-empty {
  margin: 10px 2px 0;
  padding: 10px 12px;
  border: 1px dashed #dfe3e8;
  border-radius: 10px;
  color: #8a9099;
  font-size: 11.5px;
  line-height: 1.7;
  background: #fafbfc;
}
.master-reference-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  flex-wrap: wrap;
}
.master-reference-source label {
  font-size: 11px;
  color: #7d9c95;
  letter-spacing: .04em;
}
.master-reference-source select {
  max-width: 330px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #d8efe9;
  border-radius: 8px;
  background: #fff;
  color: #14453d;
  font-size: 12px;
  outline: none;
}
.master-reference-source select:focus {
  border-color: #0f8a78;
  box-shadow: 0 0 0 2px #d6f1ea;
}
.master-reference-source select:disabled {
  color: #a8adb5;
  background: #f6f7f9;
}
.master-reference-source small {
  font-size: 11px;
  color: #0b6a5c;
}
.master-workbench .source-pane > header {
  height: auto;
  flex: 0 0 auto;
  min-height: 84px;
}
.master-workbench .source-pane > header > .master-reference-source,
.master-reference-source {
  margin-top: 6px;
}
.rewrite-grid > .rewrite-pane > header {
  height: auto;
  min-height: 84px;
  flex: 0 0 auto;
}
.rewrite-pane > header.pane-head-staggered {
  padding: 10px 18px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  align-items: start;
  gap: 0;
}
.rewrite-pane > header.pane-head-staggered > div {
  grid-area: 1 / 1 / 3 / 2;
  min-width: 0;
}
.rewrite-pane > header.pane-head-staggered > .rewrite-actions {
  grid-area: 1 / 1 / 2 / 2;
  align-self: start;
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 6px;
  min-width: 0;
}
.rewrite-pane > header.pane-head-staggered > em {
  grid-area: 1 / 1 / 2 / 2;
  align-self: start;
  justify-self: end;
  white-space: nowrap;
  max-width: 100%;
}
.rewrite-pane > header.pane-head-staggered .source-title-row {
  margin-top: 22px;
  flex-wrap: wrap;
  row-gap: 6px;
}
.rewrite-pane > header.pane-head-staggered .source-model-tabs {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 13px 5px;
  overflow: visible;
}
.panel-header.pane-head-staggered {
  height: auto;
  min-height: 78px;
  padding: 12px 20px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  align-items: start;
  gap: 0;
}
.panel-header.pane-head-staggered > div {
  grid-area: 1 / 1 / 3 / 2;
  min-width: 0;
}
.panel-header.pane-head-staggered > .parse-status {
  grid-area: 1 / 1 / 2 / 2;
  align-self: start;
  justify-self: end;
  white-space: nowrap;
}
.panel-header.pane-head-staggered .breakdown-title-row {
  margin-top: 30px;
  flex-wrap: wrap;
  row-gap: 6px;
}
.panel-header.pane-head-staggered .model-result-entries {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 13px 5px;
  overflow: visible;
}
.pane-source-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.rewrite-pane > header.pane-head-staggered > .pane-source-actions {
  grid-area: 1 / 1 / 2 / 2;
  align-self: start;
  justify-self: end;
}
.clear-source-button,
.restore-source-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 20px;
  border: 1px solid var(--rewrite-line);
  background: #fff;
  color: #8a6a4f;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.clear-source-button:hover:not(:disabled) {
  border-color: var(--rewrite);
  color: var(--rewrite);
  background: var(--rewrite-soft);
}
.clear-source-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.restore-source-button {
  border-color: var(--rewrite);
  color: var(--rewrite);
  background: var(--rewrite-soft);
}
.rewrite-document.editable {
  display: flex;
  padding: 0;
}
.rewrite-document.editable .rewrite-document-input {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 22px;
  border: 0;
  outline: 0;
  background: transparent;
  resize: none;
  color: #34302f;
  font:
    14.4px/1.9 "Manrope",
    "Microsoft YaHei",
    sans-serif;
}
.rewrite-document.editable .rewrite-document-input::placeholder {
  color: #a4938d;
}
.master-workbench .rewrite-document.editable .rewrite-document-input {
  color: #0b4b41;
}
.outline-workbench .rewrite-document.editable .rewrite-document-input {
  color: #5a4324;
}
.rewrite-actions button.plan-import-idle {
  opacity: .5;
  border-style: dashed;
  cursor: not-allowed;
}
.material-updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 20px;
  border: 1px solid var(--rewrite-line);
  background: var(--rewrite-soft);
  color: var(--rewrite);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
  vertical-align: middle;
  white-space: nowrap;
}
.rewrite-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.rewrite-heading-actions .originality-badge {
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}
.export-project-button:hover {
  border-color: #e0b07f;
  background: #fffaf3;
  transform: translateY(-1px);
}
.export-project-button.active {
  border-color: #c98a4b;
  background: #fff4e2;
}
.batch-viral-button:hover:not(.running) {
  border-color: #df9d8c;
  background: #fff8f5;
  transform: translateY(-1px);
}
.batch-viral-button.running {
  position: relative;
  overflow: hidden;
  border-color: #d97757;
  background-image:
    linear-gradient(
      115deg,
      #fdeee9 0%,
      #ffd9cb 45%,
      #fdeee9 100%);
  background-size: 220% 100%;
  color: #b83f24;
  animation: viralBatchGlow 1.9s ease-in-out infinite, viralBatchSheen 3.4s linear infinite;
}
.batch-viral-button.running svg {
  animation: viralBatchPulse 1.4s ease-in-out infinite;
}
.batch-viral-button:focus-visible,
.export-project-button:focus-visible {
  outline: 2px solid #d97757;
  outline-offset: 3px;
}
@keyframes viralBatchPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .32;
  }
}
.viral-batch-banner {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid #f0d8d1;
  border-radius: 12px;
  background: #fffaf8;
}
.viral-batch-banner.running {
  border-color: #e9b9a6;
  background: #fff6f2;
}
.viral-batch-banner.failed {
  border-color: #e2a396;
  background: #fdf1ee;
}
.viral-batch-banner.done {
  border-color: #cfe0d1;
  background: #f6fbf7;
}
.viral-batch-banner.stopped {
  border-color: #e6dfd6;
  background: #faf9f7;
}
.viral-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.viral-batch-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8a4a3a;
  font-size: 12px;
  font-weight: 600;
}
.viral-batch-banner.done .viral-batch-title {
  color: #2f6b3a;
}
.viral-batch-banner.stopped .viral-batch-title {
  color: #6b6257;
}
.viral-batch-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid #e6cfc7;
  border-radius: 16px;
  background: #fff;
  color: #8a5a4a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.viral-batch-actions button:hover {
  border-color: #d97757;
  color: #c0492c;
  background: #fff4f0;
}
.viral-batch-logs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 132px;
  overflow-y: auto;
}
.viral-batch-log {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid #eadfd9;
  border-radius: 14px;
  background: #fff;
  color: #7a6a62;
  font-family: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.viral-batch-log.running {
  border-color: #e0a98f;
  background: #fdefe8;
  color: #b8492a;
  font-weight: 600;
}
.viral-batch-log.done {
  border-color: #c6dcc8;
  background: #f4fbf5;
  color: #2f6b3a;
}
.viral-batch-log.failed {
  border-color: #e0a79b;
  background: #fdeeeb;
  color: #b3402a;
  font-weight: 600;
}
.viral-batch-log.skipped {
  opacity: .6;
}
.viral-batch-log em {
  font-style: normal;
  color: #9a8d86;
  font-size: 10px;
}
.viral-batch-log:hover {
  border-color: #d97757;
  color: #b8492a;
}
.viral-batch-message {
  padding: 8px 10px;
  border-radius: 9px;
  background: #fdecea;
  color: #a63b22;
  font-size: 11.5px;
  line-height: 1.6;
  word-break: break-all;
}
.viral-export-modal {
  width: min(980px, calc(100vw - 56px));
  height: min(620px, calc(100dvh - 72px));
  display: flex;
  flex-direction: column;
}
.viral-export-note {
  margin: 6px 0 12px;
  color: #7a6a62;
  font-size: 12px;
  line-height: 1.7;
}
.viral-export-note b {
  color: #c0492c;
}
.viral-export-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.viral-export-summary span {
  padding: 6px 11px;
  border: 1px solid #f0d8d1;
  border-radius: 16px;
  background: #fffaf8;
  color: #8a6a5f;
  font-size: 11px;
}
.viral-export-summary span b {
  color: #c0492c;
  font-size: 12.5px;
}
.viral-export-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid #f0e3dd;
  border-radius: 10px;
  background: #fffdfc;
}
.viral-export-row {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #f6ece8;
  color: #3c3a38;
  font-size: 12px;
}
.viral-export-row:last-child {
  border-bottom: 0;
}
.viral-export-row b {
  color: #c0b3ac;
  font-size: 11px;
}
.viral-export-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viral-export-row em {
  padding: 2px 8px;
  border: 1px solid #e6dfd6;
  border-radius: 12px;
  color: #7a6f66;
  font-size: 10.5px;
  font-style: normal;
  white-space: nowrap;
}
.viral-export-row em.finalized {
  border-color: #c6dcc8;
  background: #f4fbf5;
  color: #2f6b3a;
}
.viral-export-row small {
  color: #9a8d86;
  font-size: 10.5px;
  white-space: nowrap;
}
.viral-export-missing {
  margin: 10px 0 0;
  color: #a63b22;
  font-size: 11.5px;
  line-height: 1.6;
}
.batch-viral-button.starting {
  opacity: .72;
  cursor: progress;
}
.batch-viral-button.running::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      transparent 28%,
      rgba(255, 255, 255, .78) 50%,
      transparent 72%);
  transform: translateX(-130%);
  animation: viralBatchSweep 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes viralBatchGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 87, .46);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(217, 119, 87, 0);
  }
}
@keyframes viralBatchSheen {
  0% {
    background-position: 132% 0;
  }
  100% {
    background-position: -32% 0;
  }
}
@keyframes viralBatchSweep {
  0% {
    transform: translateX(-130%);
  }
  62%, 100% {
    transform: translateX(130%);
  }
}
.viral-batch-modal,
.viral-batch-report {
  width: min(980px, calc(100vw - 56px));
  height: min(620px, calc(100dvh - 72px));
  display: flex;
  flex-direction: column;
}
.viral-batch-note {
  margin: 6px 0 12px;
  color: #7a6a62;
  font-size: 12px;
  line-height: 1.75;
}
.viral-batch-note b {
  color: #c0492c;
}
.viral-batch-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-bottom: 13px;
  padding: 11px 13px;
  border: 1px solid #f0d8d1;
  border-radius: 11px;
  background: #fffaf8;
  font-size: 11.5px;
}
.viral-batch-facts span {
  color: #a3928a;
}
.viral-batch-facts b {
  color: #4a413c;
  font-weight: 600;
}
.viral-batch-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid #f0d8d1;
  border-radius: 12px;
  background: #fffdfc;
}
.viral-batch-range label {
  color: #8a6a5f;
  font-size: 12px;
  font-weight: 600;
}
.viral-batch-range-start {
  padding: 5px 11px;
  border: 1px solid #e6dfd6;
  border-radius: 14px;
  background: #faf7f5;
  color: #7a6f66;
  font-size: 12px;
}
.viral-batch-range-dash {
  color: #c0b3ac;
}
.viral-batch-range-input {
  width: 96px;
  padding: 7px 11px;
  border: 1.5px solid #d97757;
  border-radius: 10px;
  background: #fff;
  color: #b83f24;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  letter-spacing: .04em;
}
.viral-batch-range-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 119, 87, .18);
}
.viral-batch-range-unit {
  color: #8a6a5f;
  font-size: 12px;
}
.viral-batch-range small {
  color: #a3928a;
  font-size: 10.5px;
}
.viral-batch-skip-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f0dfc6;
  border-radius: 11px;
  background: #fffbf2;
}
.viral-batch-skip-tip em {
  padding: 3px 9px;
  border: 1px solid #e8d3ae;
  border-radius: 12px;
  background: #fff;
  color: #9a6a24;
  font-size: 11px;
  font-style: normal;
}
.viral-batch-skip-tip small {
  flex: 1 1 100%;
  color: #9a8d86;
  font-size: 10.5px;
  line-height: 1.6;
}
.primary-button.all-button {
  border-color: #b8492a;
  background:
    linear-gradient(
      135deg,
      #d97757,
      #b8492a);
}
.viral-batch-report-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid #f0e3dd;
  border-radius: 10px;
  background: #fffdfc;
}
.viral-batch-report-row {
  display: grid;
  grid-template-columns: 30px minmax(110px, max-content) 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #f6ece8;
  color: #3c3a38;
  font-size: 12px;
}
.viral-batch-report-row:last-child {
  border-bottom: 0;
}
.viral-batch-report-row b {
  color: #c0b3ac;
  font-size: 11px;
}
.viral-batch-report-name {
  font-weight: 600;
}
.viral-batch-report-reason {
  color: #8a6a5f;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .viral-batch-modal,
  .viral-batch-report {
    width: calc(100vw - 28px);
    height: calc(100dvh - 28px);
  }
  .viral-batch-report-row {
    grid-template-columns: 24px 1fr;
  }
  .viral-batch-report-reason {
    grid-column: 2;
  }
}
@media (max-width: 760px) {
  .rewrite-heading-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .viral-export-modal {
    width: calc(100vw - 28px);
    height: calc(100dvh - 28px);
  }
}
