/* packages/breakdown/src/styles/shortory-legal.css */
.shortory-legal-links {
  display: flex;
  color: #69736e;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
  line-height: 1.7;
}

.shortory-legal-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shortory-legal-consent {
  text-align: left;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.7;
}

.shortory-legal-consent label {
  display: flex;
  align-items:  flex-start;
  gap: 8px;
}

.shortory-legal-consent input {
  accent-color: #a56834;
  flex: none;
  margin: 4px 0;
  width: 16px !important;
  height: 16px !important;
}

.shortory-legal-consent nav {
  margin-top: 8px;
}

.shortory-legal-page {
  color: #27352f;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  background: #faf8f2;
  min-height: 100vh;
  padding: 32px max(20px, 50vw - 425px);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
}

.shortory-legal-page header {
  display: flex;
  border-bottom: 1px solid #ddd8cc;
  justify-content: space-between;
  align-items:  center;
  padding-bottom: 24px;
}

.shortory-legal-page header a {
  letter-spacing: .18em;
  color: #a56834;
  font-size: 13px;
}

.shortory-legal-page button {
  background: #fff;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  padding: 8px 16px;
}

.shortory-legal-page h1 {
  margin: 36px 0 12px;
  font-size: 30px;
  line-height: 1.4;
}

.shortory-legal-meta {
  color: #71796d;
  font-size: 13px;
}

.shortory-legal-page h2 {
  margin: 32px 0 12px;
  font-size: 20px;
}

.shortory-legal-page p {
  margin: 12px 0;
  line-height: 1.9;
}

.shortory-legal-page footer {
  display: flex;
  border-top: 1px solid #ddd8cc;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  font-size: 13px;
}

.shortory-legal-page a {
  color: #925c30;
}

.shortory-legal-page header nav {
  display: flex;
  align-items:  center;
  gap: 20px;
}

.shortory-legal-page header nav a {
  letter-spacing: normal;
  font-size: 13px;
}

.bd-modal .shortory-legal-consent > label {
  display: flex;
  cursor: pointer;
  flex-direction: row;
  align-items:  flex-start;
  gap: 8px;
  line-height: 1.7;
}

.bd-modal .shortory-legal-consent input[type="checkbox"] {
  box-sizing: border-box;
  cursor: pointer;
  min-width: 16px;
  max-width: 16px;
  min-height: 16px;
  max-height: 16px;
  padding: 0;
}

/* packages/breakdown/src/styles/shortory-support.css */
.bd-app .shortory-support-entry {
  display: inline-flex;
  color: var(--amber, #a96732);
  background: none;
  border: 0;
  flex-shrink: 0;
  justify-content: center;
  align-items:  center;
  gap: 7px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
}

.bd-app .shortory-support-entry:hover {
  background: #f3eade;
}

.bd-app .shortory-support-inline {
  display: flex;
  min-height: 44px;
  margin: 6px auto 0;
}

.shortory-support-entry:focus-visible {
  outline: 2px solid #a96732;
  outline-offset: 2px;
}

.bd-modal.shortory-support-dialog:not(.shortory-commerce) {
  width: min(360px, 100vw - 32px);
}

.shortory-support-content {
  text-align: center;
  padding: 8px 0 4px;
}

.shortory-support-content > img {
  display: block;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e9e1d5;
  border-radius: 12px;
  width: min(256px, 100%);
  margin: 0 auto;
  padding: 12px;
}

.shortory-support-content p {
  color: #756a5e;
  overflow-wrap: anywhere;
  margin: 16px 0 4px;
  font-size: 14px;
  line-height: 1.7;
}

.shortory-support-content [role="alert"] {
  border: 1px solid #e9e1d5;
  border-radius: 10px;
  padding: 18px;
}

@media (width >= 761px) {
  .bd-app-studio > .site-header > .shortory-support-entry {
    width: 40px;
    padding: 9px;
  }

  .bd-app-studio:not(.rail-expanded) > .site-header > .shortory-support-entry span {
    display: none;
  }

  .bd-app-studio.rail-expanded > .site-header > .shortory-support-entry {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (width <= 760px) {
  .site-header > .shortory-support-entry span {
    display: none;
  }

  .bd-app .site-header > .shortory-support-entry {
    min-width: 36px;
    padding: 8px;
  }
}

/* packages/breakdown/src/styles/shortory-report.css */
.script-content.shortory-report {
  white-space: normal;
  min-width: 0;
  line-height: 1.9;
}

.shortory-report > :first-child {
  margin-top: 0;
}

.shortory-report > :last-child {
  margin-bottom: 0;
}

.shortory-report h1, .shortory-report h2, .shortory-report h3, .shortory-report h4, .shortory-report h5, .shortory-report h6 {
  color: var(--ink);
  margin: 1.6em 0 .65em;
  font-family: inherit;
  font-weight: 650;
  line-height: 1.5;
}

.shortory-report h1 {
  font-size: 1.55em;
}

.shortory-report h2 {
  font-size: 1.3em;
}

.shortory-report h3 {
  font-size: 1.12em;
}

.shortory-report p {
  margin: .7em 0;
}

.shortory-report ul, .shortory-report ol {
  margin: .7em 0;
  padding-left: 1.7em;
}

.shortory-report ul {
  list-style: disc;
}

.shortory-report ol {
  list-style: decimal;
}

.shortory-report li {
  margin: .3em 0;
  padding-left: .15em;
}

.shortory-report li > p {
  margin: .25em 0;
}

.shortory-report strong {
  font-weight: 700;
}

.shortory-report a {
  color: #995e2c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shortory-report blockquote {
  color: #657065;
  border-left: 3px solid #d8bd98;
  margin: 1em 0;
  padding: .2em 1em;
}

.shortory-report hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.5em 0;
}

.shortory-report code {
  background: #f3efe6;
  border-radius: 3px;
  padding: .1em .3em;
  font-family: monospace;
  font-size: .88em;
}

.shortory-report pre {
  white-space: pre;
  overflow: auto;
  background: #f3efe6;
  border-radius: 6px;
  padding: 14px;
}

.shortory-report pre code {
  background: none;
  padding: 0;
}

.shortory-report-table {
  overflow-x: auto;
  max-width: 100%;
  margin: 1em 0;
}

.shortory-report table {
  border-collapse: collapse;
  width: 100%;
  font-size: .9em;
  line-height: 1.7;
}

.shortory-report th, .shortory-report td {
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  min-width: 90px;
  padding: 9px 12px;
}

.shortory-report th {
  background: #f5f1e8;
  font-weight: 650;
}

.shortory-report img {
  max-width: 100%;
  height: auto;
}

/* packages/breakdown/src/styles/shortory-password.css */
.shortory-password-change {
  display: flex;
  justify-content: center;
  padding: 64px 24px;
}

.shortory-password-change form {
  display: grid;
  border: 1px solid var(--line, #dce2dc);
  background: #fff;
  border-radius: 14px;
  gap: 18px;
  width: min(100%, 460px);
  padding: 30px;
}

.shortory-password-change h1 {
  margin: 0;
  font-size: 26px;
}

.shortory-password-change p {
  color: #627269;
  margin: 0;
  line-height: 1.6;
}

.shortory-password-change label {
  display: grid;
  gap: 8px;
}

.shortory-password-change input {
  border: 1px solid #ced8d0;
  border-radius: 6px;
  width: 100%;
  padding: 12px;
}

.shortory-password-change footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.shortory-password-change .password-error {
  color: #be3535;
}

/* packages/breakdown/src/styles/breakdown.css */
:root {
  --buncss-light: initial;
  --buncss-dark: ;
  color-scheme: light;
  --ink: #242624;
  --muted: #858780;
  --paper: #faf9f5;
  --line: #e5e3db;
  --amber: #b87b23;
  --accent: #e6ad53;
  --night: #181b1e;
  color: var(--ink);
  background: var(--paper);
  font-family: Noto Sans SC, PingFang SC, sans-serif;
  font-size: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button, input, textarea {
  font: inherit;
}

button, a, input, textarea {
  outline-offset: 4px;
}

button {
  cursor: pointer;
  border: 1px solid var(--line);
  color: inherit;
  display: inline-flex;
  background: #fff;
  border-radius: 7px;
  justify-content: center;
  align-items:  center;
  gap: 7px;
  padding: 9px 14px;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  border-color: #bda47d;
}

a {
  color: inherit;
  text-decoration: none;
}

input, textarea {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  border-radius: 6px;
  min-width: 0;
  padding: 11px 12px;
}

input[type="checkbox"] {
  accent-color: var(--amber);
  width: 15px;
  height: 15px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

h1, h2, h3, p {
  margin: 0;
}

small {
  font-size: 11px;
}

button.primary {
  background: var(--amber);
  color: #fff;
  border-color: var(--amber);
  font-weight: 600;
}

.icon {
  background: none;
  border: 0;
  padding: 6px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.eyebrow {
  letter-spacing: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.site-header {
  border-bottom: 1px solid var(--line);
  display: flex;
  background: #faf9f5;
  align-items:  center;
  gap: 32px;
  height: 80px;
  padding: 0 38px;
}

.brand-button {
  background: none;
  border: 0;
  padding: 0;
}

.brand {
  display: flex;
  text-align: left;
  letter-spacing: 4px;
  align-items:  center;
  gap: 12px;
  font-family: Noto Serif SC, serif;
  font-size: 26px;
  font-weight: 700;
}

.brand small {
  display: block;
  letter-spacing: 1.8px;
  margin-top: 3px;
  font: 8px Noto Sans SC, sans-serif;
}

.brand-mark {
  background: var(--night);
  color: var(--accent);
  display: grid;
  border-radius: 8px;
  place-items:  center;
  width: 42px;
  height: 42px;
}

.header-note {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 28px;
  font-size: 12px;
}

.account {
  display: flex;
  align-items:  center;
  gap: 20px;
  margin-left: auto;
  font-size: 13px;
}

.account small {
  color: var(--muted);
}

.notice {
  display: flex;
  position: fixed;
  z-index: 100;
  background: #fff2d8;
  border: 1px solid #dfb56f;
  border-radius: 8px;
  justify-content: space-between;
  align-items:  center;
  max-width: 90vw;
  padding: 12px 18px;
  font-size: 13px;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 18px #0001;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 110px;
  max-width: 1180px;
  margin: 9vh auto;
  padding: 30px;
}

.auth-editorial {
  padding-top: 25px;
}

.auth-editorial h1 {
  margin: 22px 0;
  font-family: Noto Serif SC, serif;
  font-size: 54px;
  line-height: 1.5;
}

.auth-editorial h1 span {
  color: var(--amber);
}

.auth-editorial p {
  color: #72766e;
  line-height: 2;
}

.frame-decoration {
  display: flex;
  color: var(--muted);
  align-items:  center;
  gap: 18px;
  margin-top: 55px;
  font-size: 11px;
}

.frame-decoration > div {
  background: var(--line);
  flex: 1;
  height: 1px;
}

.auth-card {
  border: 1px solid var(--line);
  display: flex;
  background: #fff;
  border-radius: 12px;
  flex-direction: column;
  align-self:  center;
  gap: 23px;
  padding: 35px;
  box-shadow: 0 16px 40px #292c2010;
}

.auth-card h2 {
  font-family: Noto Serif SC, serif;
  font-size: 23px;
}

.auth-card label {
  font-size: 12px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
}

.auth-links button {
  color: var(--muted);
  border: 0;
  padding: 0;
  font-size: 12px;
}

.library {
  max-width: 1360px;
  margin: 0 auto;
  padding: 58px 44px;
}

.library-heading {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 20px;
}

.library h1 {
  margin: 12px 0 15px;
  font: 600 34px Noto Serif SC, serif;
}

.library-heading p {
  color: var(--muted);
  font-size: 13px;
}

.count {
  vertical-align: middle;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 20px;
  margin-left: 14px;
  padding: 3px 10px;
  font: 13px Noto Sans SC, sans-serif;
}

.library-toolbar {
  display: flex;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items:  center;
  margin: 40px 0 24px;
  padding-bottom: 15px;
  font-size: 13px;
}

.search {
  color: var(--muted);
  flex-direction: row;
  align-items:  center;
}

.search input {
  background: none;
  border: 0;
  padding: 5px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.project-card {
  display: block;
  text-align: left;
  overflow: hidden;
  border-radius: 10px;
  padding: 0;
  transition: transform .18s, box-shadow .18s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px #0001;
}

.project-cover {
  color: #bbbaaa;
  display: flex;
  letter-spacing: 2px;
  background: #29302f;
  flex-direction: column;
  justify-content: space-between;
  align-items:  center;
  height: 190px;
  padding: 18px 22px;
  font-size: 9px;
}

.film-index {
  color: #f7e7c9;
  align-self:  flex-start;
}

.cover-1 {
  background: #413932;
}

.cover-2 {
  background: #343d49;
}

.project-caption {
  padding: 20px;
}

.project-caption h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 17px;
}

.project-caption p {
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 11px;
}

.new-project {
  display: flex;
  color: var(--muted);
  background: none;
  border-style: dashed;
  flex-direction: column;
  justify-content: center;
  min-height: 285px;
}

.new-project h2 {
  color: var(--ink);
  margin-top: 15px;
  font-size: 15px;
}

.new-project p {
  font-size: 12px;
}

.studio {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 80px);
}

.studio-toolbar {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
  align-items:  center;
  gap: 14px;
  height: 64px;
  padding: 0 24px;
}

.studio-toolbar h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 30vw;
  font-size: 16px;
}

.divider {
  background: var(--line);
  width: 1px;
  height: 20px;
}

.toolbar-right {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

.toolbar-right button {
  font-size: 12px;
}

.running {
  color: var(--amber);
}

.studio-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.episode-nav {
  border-right: 1px solid var(--line);
  display: flex;
  background: #f5f4ee;
  flex-direction: column;
  flex-shrink: 0;
  width: 220px;
}

.nav-hidden .episode-nav {
  display: none;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  padding: 18px;
  font-size: 12px;
  font-weight: 600;
}

.select-all {
  display: flex;
  color: var(--muted);
  flex-direction: row;
  align-items:  center;
  padding: 0 18px 12px;
  font-size: 11px;
}

.episode-list {
  overflow: auto;
  flex: 1;
}

.episode-item {
  display: flex;
  border-left: 3px solid #0000;
  align-items:  center;
  gap: 7px;
  padding: 4px 12px;
}

.episode-item.selected {
  border-left-color: var(--amber);
  background: #eae6da;
}

.episode-item > button {
  text-align: left;
  background: none;
  border: 0;
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
  padding: 12px 3px;
}

.episode-number {
  color: #96978e;
  flex-shrink: 0;
  width: 30px;
  font: 18px Georgia, serif;
}

.episode-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.episode-name small {
  display: block;
  color: var(--muted);
  margin-top: 7px;
  font-size: 10px;
}

.nav-footnote {
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 20px;
  font-size: 10px;
  line-height: 1.9;
}

.workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.workspace-controls {
  display: flex;
  background: #f0efe8;
  flex-shrink: 0;
  justify-content: space-between;
  align-items:  center;
  height: 40px;
  padding: 0 16px;
}

.mobile-tabs {
  display: none;
}

.comparison {
  display: flex;
  flex: 1;
  min-height: 0;
}

.viewing-panel {
  width: var(--video-width);
  background: var(--night);
  color: #cdcfc8;
  display: flex;
  overflow: auto;
  flex-direction: column;
  min-width: 0;
}

.viewer-label {
  display: flex;
  letter-spacing: 1px;
  color: #92998d;
  justify-content: space-between;
  padding: 23px;
  font-size: 10px;
}

.live-dot {
  display: inline-block;
  background: var(--accent);
  border-radius: 50%;
  width: 5px;
  height: 5px;
  margin-right: 7px;
}

.video-stage {
  display: flex;
  background: #111315;
  flex: 1;
  justify-content: center;
  align-items:  center;
  min-height: 240px;
  max-height: 65vh;
  margin: 0 20px;
}

.video-stage video {
  object-fit: contain;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
}

.empty-video {
  text-align: center;
  color: #6e746e;
  padding: 25px;
}

.empty-video h2 {
  color: #cccbbd;
  margin: 18px 0 12px;
  font: 18px Noto Serif SC, serif;
}

.empty-video p {
  font-size: 11px;
}

.empty-video button {
  color: var(--accent);
  background: none;
  border-color: #5e513b;
  margin: 25px auto 0;
  font-size: 12px;
}

.viewer-footer {
  display: flex;
  color: #92998d;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 23px;
  font-size: 10px;
}

.scene-index {
  border-top: 1px solid #ffffff14;
  min-height: 150px;
  padding: 24px;
}

.scene-index > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.scene-index button {
  color: #b3baa9;
  background: #ffffff05;
  border-color: #ffffff0b;
  justify-content: flex-start;
  font-family: monospace;
  font-size: 11px;
}

.scene-index button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-left: 10px;
  font-family: Noto Sans SC, sans-serif;
}

.splitter {
  cursor: col-resize;
  touch-action: none;
  background: #d5d2c9;
  flex-shrink: 0;
  width: 5px;
}

.splitter:hover {
  background: var(--amber);
}

.manuscript {
  display: flex;
  background: #fffef9;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.document-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  flex-shrink: 0;
  gap: 12px;
  padding: 0 18px;
}

.document-tabs button {
  white-space: nowrap;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid #0000;
  border-radius: 0;
  padding: 17px 6px;
  font-size: 11px;
}

.document-tabs button[aria-selected="true"] {
  border-bottom-color: var(--amber);
  color: var(--amber);
}

.document-heading {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  padding: 26px 28px 19px;
}

.document-heading h2 {
  margin-top: 9px;
  font: 600 23px Noto Serif SC, serif;
}

.export-menu {
  display: flex;
  color: var(--muted);
  gap: 9px;
  font-size: 10px;
}

.export-menu a {
  display: flex;
  align-items:  center;
  gap: 4px;
}

.document-body {
  overflow: auto;
  flex: 1;
  padding: 0 28px 40px;
}

.scene-card {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.scene-meta {
  display: flex;
  color: var(--muted);
  align-items:  center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 9px;
}

.timecode {
  color: var(--amber);
  background: #f8eddb;
  border: 0;
  border-radius: 3px;
  padding: 4px 6px;
  font: 10px monospace;
}

.scene-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.scene-actions button {
  background: none;
  border: 0;
  padding: 3px 4px;
  font-size: 10px;
}

.script-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 15px / 2.15 Noto Serif SC, serif;
}

.document-empty {
  text-align: center;
  color: #b0b1a8;
  padding: 80px 0;
}

.document-empty h3 {
  color: #74776c;
  margin: 22px 0 15px;
  font: 18px Noto Serif SC, serif;
}

.document-empty p {
  font-size: 11px;
  line-height: 2;
}

.editor textarea {
  resize: vertical;
  width: 100%;
  min-height: 260px;
  line-height: 1.9;
}

.editor > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.focus-script .viewing-panel, .focus-script .splitter, .focus-video .manuscript, .focus-video .splitter {
  display: none;
}

.focus-video .viewing-panel {
  width: 100%;
}

.progress-drawer {
  position: fixed;
  z-index: 20;
  border-left: 1px solid var(--line);
  overflow: auto;
  background: #fff;
  width: 380px;
  max-width: 95vw;
  padding: 24px;
  top: 80px;
  bottom: 0;
  right: 0;
  box-shadow: -12px 0 40px #0002;
}

.progress-drawer header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 25px;
}

.progress-drawer h2 {
  font-size: 17px;
}

.job-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 16px;
}

.job-card > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.job-card > small {
  color: var(--muted);
  display: block;
  margin-top: 9px;
}

.job-card p {
  color: #a34831;
  margin-top: 10px;
  font-size: 12px;
}

.job-card > button {
  margin-top: 12px;
  font-size: 11px;
}

.job-card ol {
  list-style: none;
  padding: 0;
}

.job-card li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  font-size: 11px;
}

.job-card li small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.event-dot {
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 6px;
}

.bd-modal {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  border-radius: 12px;
  width: 540px;
  max-width: 92vw;
  max-height: 85dvh;
  padding: 25px;
  box-shadow: 0 22px 80px #0003;
}

.bd-modal::backdrop {
  backdrop-filter: blur(3px);
  background: #14191880;
}

.bd-modal header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 24px;
}

.bd-modal h2 {
  font-size: 20px;
}

.bd-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}

.bd-modal pre {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 45vh;
}

.bd-modal details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.upload-list {
  overflow: auto;
  max-height: 45vh;
  margin-top: 18px;
}

.upload-list > div {
  display: flex;
  border-bottom: 1px solid var(--line);
  align-items:  center;
  gap: 12px;
  padding: 12px 0;
}

.upload-list input {
  width: 70px;
}

.upload-list span {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.upload-list span:first-of-type {
  flex: 1;
}

.upload-list small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.quote {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  padding: 20px 0;
}

.quote strong {
  color: var(--amber);
  font: 28px Georgia, serif;
}

.quote small {
  font: 12px Noto Sans SC, sans-serif;
}

.replace-check {
  flex-direction: row;
  align-items:  center;
  margin-top: 18px;
  font-size: 12px;
}

@media (width <= 1100px) {
  .episode-nav {
    width: 180px;
  }

  .site-header {
    padding: 0 24px;
  }

  .document-heading {
    padding: 20px;
  }

  .document-body {
    padding: 0 20px 30px;
  }

  .toolbar-right button {
    padding: 8px;
  }

  .auth-layout {
    gap: 40px;
  }

  .auth-editorial h1 {
    font-size: 44px;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 760px) {
  .site-header {
    height: 66px;
    padding: 0 16px;
  }

  .brand {
    font-size: 22px;
  }

  .header-note, .account small {
    display: none;
  }

  .account {
    gap: 8px;
    font-size: 11px;
  }

  .auth-layout {
    display: block;
    margin: 25px auto;
    padding: 20px;
  }

  .auth-editorial h1 {
    font-size: 34px;
  }

  .auth-editorial p, .frame-decoration {
    display: none;
  }

  .auth-card {
    margin-top: 25px;
  }

  .library {
    padding: 32px 20px;
  }

  .library-heading {
    align-items:  flex-start;
  }

  .library h1 {
    font-size: 26px;
  }

  .library-heading p {
    max-width: 200px;
    line-height: 1.8;
  }

  .library-heading > button {
    padding: 10px;
    font-size: 11px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .studio {
    height: calc(100dvh - 66px);
  }

  .studio-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
    min-height: 62px;
    padding: 10px;
  }

  .studio-toolbar h1 {
    max-width: 70vw;
    font-size: 13px;
  }

  .toolbar-right {
    justify-content: flex-end;
    width: 100%;
  }

  .toolbar-right button {
    font-size: 10px;
  }

  .episode-nav {
    position: absolute;
    z-index: 12;
    width: 210px;
    top: 170px;
    bottom: 0;
    box-shadow: 8px 0 20px #0002;
  }

  .mobile-tabs {
    display: flex;
    gap: 5px;
    margin-left: 8px;
    margin-right: auto;
  }

  .mobile-tabs button {
    background: none;
    border: 0;
    padding: 3px 8px;
    font-size: 10px;
  }

  .mobile-tabs button[aria-pressed="true"] {
    color: var(--amber);
    background: #fff;
  }

  .comparison .splitter {
    display: none;
  }

  .comparison .viewing-panel, .comparison .manuscript {
    width: 100%;
  }

  .comparison.mobile-video .manuscript, .comparison.mobile-script .viewing-panel {
    display: none;
  }

  .focus-script .comparison.mobile-video .viewing-panel, .focus-video .comparison.mobile-script .manuscript {
    display: flex;
  }

  .video-stage {
    min-height: 200px;
  }

  .progress-drawer {
    top: 66px;
  }

  .document-tabs {
    gap: 9px;
  }

  .document-tabs button {
    font-size: 11px;
  }

  .studio-toolbar .divider {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.scene-card.scene-active {
  border-left: 2px solid var(--amber, #b88024);
  padding-left: 16px;
}

.legacy-report {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.legacy-report summary {
  color: #806744;
  cursor: pointer;
  margin-bottom: 15px;
  font-size: 12px;
}

.legacy-report .scene-actions {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.scene-card .scene-actions button[aria-label] {
  color: #87857b;
  background: none;
  border: 0;
  width: 30px;
  height: 30px;
  padding: 5px;
}

.scene-card .scene-actions button[aria-label]:hover:not(:disabled) {
  color: #8d592d;
  background: #f5efe4;
}

.scene-card .scene-actions button[aria-label="删除场次"]:hover:not(:disabled) {
  color: #a94031;
  background: #fff0eb;
}

.bd-modal button.danger {
  color: #fff;
  background: #a94031;
  border-color: #a94031;
  font-weight: 600;
}

.bd-modal button.danger:hover:not(:disabled) {
  background: #8d2f22;
  border-color: #8d2f22;
}

.structured-scene {
  display: flex;
  border-top: 1px solid #eee9df;
  flex-direction: column;
  gap: 0;
}

.structured-node {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 46px;
  border-bottom: 1px solid #f0ece4;
  align-items:  start;
  gap: 16px;
  padding: 15px 3px;
}

.node-rail {
  display: flex;
  color: #9a968b;
  letter-spacing: .08em;
  flex-direction: column;
  gap: 7px;
  font-size: 10px;
}

.node-time {
  color: #9d671c;
  background: #f6eee1;
  border: 0;
  justify-content: flex-start;
  padding: 4px 5px;
  font: 11px ui-monospace, monospace;
}

.node-main p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 15px / 1.9 Noto Serif SC, serif;
}

.node-dialogue .node-main {
  border-left: 2px solid #dbc29b;
  padding-left: 14px;
}

.node-speaker {
  display: block;
  color: #9e6b2d;
  margin-bottom: 5px;
  font-size: 11px;
}

.node-speaker small {
  font-weight: 400;
}

.node-on_screen_text .node-main p {
  color: #7f6d53;
  background: #f8f4ea;
  padding: 5px 10px;
}

.node-edit {
  color: #9d7a4d;
  background: none;
  border: 0;
  padding: 4px;
  font-size: 10px;
}

.node-editor textarea {
  resize: vertical;
  width: 100%;
  min-height: 80px;
}

.node-editor > div {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 8px;
}

.node-editor button {
  padding: 5px 8px;
  font-size: 11px;
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  padding: 2px 0 32px;
}

.entity-card {
  background: #fffdf8;
  border: 1px solid #e7e0d5;
  border-radius: 9px;
  min-width: 0;
  padding: 19px;
  box-shadow: 0 4px 20px #37312208;
}

.entity-card-head {
  display: flex;
  align-items:  center;
  gap: 10px;
}

.entity-icon {
  color: #a36b25;
  display: grid;
  background: #f7ecd9;
  border-radius: 7px;
  flex: none;
  place-items:  center;
  width: 34px;
  height: 34px;
}

.entity-card h3 {
  margin-top: 3px;
  font: 600 17px Noto Serif SC, serif;
}

.entity-status {
  color: #99958b;
  white-space: nowrap;
  margin-left: auto;
  font-size: 10px;
}

.entity-description {
  white-space: pre-wrap;
  margin-top: 17px;
  font-size: 12px;
  line-height: 1.9;
}

.entity-aliases, .entity-facts {
  color: #77776d;
  white-space: pre-wrap;
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.75;
}

.entity-links {
  display: flex;
  border-top: 1px solid #eee8df;
  flex-wrap: wrap;
  align-items:  center;
  gap: 6px;
  margin-top: 17px;
  padding-top: 13px;
}

.entity-links > span {
  color: #918e83;
  margin-right: 4px;
  font-size: 10px;
}

.entity-links button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #966a31;
  background: #f9f5ec;
  max-width: 100%;
  padding: 4px 6px;
  font-size: 10px;
}

.entity-links small {
  color: #aaa59b;
}

.entity-edit {
  color: #97671f;
  background: none;
  border-color: #dfd4c2;
  width: 100%;
  margin-top: 15px;
  font-size: 11px;
}

.entity-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.entity-editor label {
  color: #78776f;
  gap: 5px;
  font-size: 10px;
}

.entity-editor input, .entity-editor textarea {
  width: 100%;
  padding: 8px;
  font-size: 12px;
}

.entity-editor textarea {
  resize: vertical;
  min-height: 66px;
}

.entity-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-view-actions {
  display: flex;
  align-items:  center;
  gap: 8px;
  margin-left: auto;
}

.source-toggle {
  color: #5c5b52;
  background: #faf9f4;
  border-color: #ddd9ce;
  padding: 5px 10px;
  font-size: 11px;
}

.source-toggle[aria-pressed="true"] {
  color: #9d671c;
  background: #fff4e2;
  border-color: #e7c993;
}

.focus-script .manuscript {
  width: 100%;
}

.focus-script .document-body {
  background: #f5f3ee;
  padding: 26px max(28px, 50% - 500px) 56px;
}

.focus-script .document-body > .scene-card, .focus-script .document-body > .entity-grid, .focus-script .document-body > .legacy-report, .focus-script .document-body > .document-empty {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.focus-script .scene-card {
  background: #fffef9;
  border: 1px solid #e8e4da;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 24px 34px;
  box-shadow: 0 8px 28px #3931230a;
}

.focus-script .document-heading {
  padding-left: max(28px, 50% - 500px);
  padding-right: max(28px, 50% - 500px);
}

.entity-card-actions {
  display: flex;
  align-items:  center;
  gap: 8px;
  margin-top: 15px;
}

.entity-card-actions > button:first-child {
  background: none;
  flex: none;
  padding: 8px 10px;
  font-size: 11px;
}

.entity-card-actions .entity-edit {
  flex: 1;
  margin-top: 0;
}

@media (width <= 760px) {
  .structured-node {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }

  .node-edit {
    grid-column: 2;
    justify-self: end;
  }

  .entity-grid {
    grid-template-columns: 1fr;
  }

  .workspace-view-actions {
    gap: 3px;
  }

  .source-toggle {
    display: none;
  }

  .focus-script .document-body {
    padding: 14px 12px 32px;
  }

  .focus-script .scene-card {
    padding: 14px 12px;
  }

  .focus-script .document-heading {
    padding: 20px 16px;
  }

  .toolbar-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .toolbar-right button {
    white-space: nowrap;
    min-height: 38px;
    font-size: 12px;
  }

  .toolbar-right button svg {
    flex-shrink: 0;
  }

  .episode-nav {
    top: 220px;
  }
}

.project-nav-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-bottom: 20px;
}

.project-nav-scroll .episode-list {
  overflow: visible;
  flex: none;
}

.nav-section-label {
  display: flex;
  color: #77776f;
  letter-spacing: .04em;
  align-items:  center;
  gap: 8px;
  padding: 15px 17px 8px;
  font-size: 11px;
  font-weight: 650;
}

.nav-section-label > span {
  color: #9c9b91;
  margin-left: auto;
  font-size: 10px;
}

.nav-data-heading {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 18px;
}

.nav-group-link, .nav-entity-link, .scene-tree button {
  text-align: left;
  background: none;
  border: 0;
  border-radius: 0;
  justify-content: flex-start;
  width: 100%;
}

.nav-group-link {
  display: flex;
  align-items:  center;
  gap: 9px;
  padding: 10px 17px;
  font-size: 12px;
  font-weight: 600;
}

.nav-group-link > span {
  color: #9a978d;
  margin-left: auto;
  font-size: 10px;
}

.nav-group-link > svg:last-child {
  color: #aaa79b;
}

.nav-group-link.active {
  color: #9c651b;
  background: #efe9dc;
}

.nav-entity-link {
  display: block;
  color: #686a64;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 16px 6px 41px;
  font-size: 11px;
}

.nav-entity-link:hover, .scene-tree button:hover {
  background: #ebe7dd;
}

.scene-tree {
  border-left: 1px solid #d8d3c8;
  margin: 0 10px 6px 38px;
}

.scene-tree button {
  display: flex;
  color: #7b796d;
  gap: 8px;
  padding: 6px 5px 6px 10px;
  font-size: 10px;
  line-height: 1.5;
}

.scene-tree button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-tree button span:first-child {
  color: #a98958;
  flex: none;
}

.structured-scene {
  border-top: 0;
}

.node-editor-heading {
  display: flex;
  color: #848176;
  justify-content: space-between;
  align-items:  center;
  gap: 10px;
  padding: 3px 2px 14px;
  font-size: 11px;
}

.node-editor-heading > span {
  color: #57574f;
  font-weight: 650;
}

.node-editor-heading small {
  color: #aaa69c;
}

.structured-node {
  grid-template-columns: 90px minmax(0, 1fr) 68px;
  border-bottom: 0;
  gap: 12px;
  min-height: 52px;
  padding: 10px 2px;
}

.structured-node.node-scene_heading {
  border-bottom: 1px solid #e9e3d8;
  margin: 4px 0 9px;
  padding: 12px 2px 17px;
}

.structured-node.node-active {
  outline: 1px solid #ead6b5;
  background: #fffcf5;
  border-radius: 8px;
  padding: 12px;
}

.node-rail {
  flex-direction: row;
  align-items:  flex-start;
  gap: 7px;
  padding-top: 7px;
}

.node-symbol {
  color: #b8ad9b;
  flex: none;
  width: 18px;
  font-size: 16px;
  line-height: 1;
}

.node-time {
  letter-spacing: 0;
  min-width: 0;
  padding: 3px 4px;
  font-size: 10px;
}

.node-main {
  min-width: 0;
}

.node-content-button {
  display: block;
  text-align: left;
  color: #3b3b37;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: none;
  border: 0;
  width: 100%;
  padding: 3px 6px;
  font: 15px / 1.85 Noto Serif SC, serif;
}

.node-content-button:hover:not(:disabled) {
  background: #f8f3e9;
  border-color: #0000;
}

.node-dialogue .node-main {
  border-left: 0;
  padding-left: 0;
}

.node-dialogue .node-content-button {
  padding-left: 25px;
}

.node-speaker {
  color: #3e3c36;
  margin-bottom: 2px;
  font: 600 13px / 1.6 Noto Serif SC, serif;
}

.node-speaker small {
  color: #958b7a;
  font-size: 12px;
}

.node-parenthetical .node-content-button {
  color: #817a6c;
  padding-left: 24px;
  font-style: italic;
}

.node-on_screen_text .node-content-button {
  color: #766448;
  background: #f8f4ea;
}

.scene-heading-line small {
  display: block;
  color: #a8844b;
  margin-bottom: 6px;
  font: 10px Noto Sans SC, sans-serif;
}

.scene-heading-line h3 {
  font: 600 17px / 1.5 Noto Serif SC, serif;
}

.node-kind {
  color: #aaa69c;
  white-space: nowrap;
  place-self:  start end;
  padding-top: 8px;
  font-size: 10px;
}

.node-insert-line {
  display: flex;
  border-top: 1px solid #0000;
  justify-content: center;
  align-items:  center;
  height: 8px;
}

.node-insert-line button {
  opacity: 0;
  position: relative;
  z-index: 1;
  color: #97703a;
  background: #fffdf8;
  border-color: #dfd1b8;
  border-radius: 13px;
  padding: 3px 8px;
  font-size: 10px;
}

.structured-scene:hover .node-insert-line:hover {
  border-color: #e8e0d1;
}

.node-insert-line:hover button {
  opacity: 1;
}

.node-insert-line button:focus-visible {
  opacity: 1;
}

.node-active + .node-insert-line button {
  opacity: 1;
}

.node-insert-editor {
  background: #fffdf8;
  border: 1px solid #e2cba7;
  border-radius: 8px;
  margin: 10px 0 15px 90px;
  padding: 14px 18px;
}

.node-type-toolbar {
  display: flex;
  background: #f5f2eb;
  border: 1px solid #ebe5da;
  border-radius: 14px;
  flex-wrap: wrap;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 4px;
}

.node-type-toolbar button {
  display: flex;
  color: #77766e;
  background: none;
  border: 0;
  flex-direction: column;
  gap: 2px;
  min-width: 47px;
  padding: 5px 7px;
  font-size: 9px;
}

.node-type-toolbar button[aria-pressed="true"] {
  color: #9a6827;
  background: #fff;
  box-shadow: 0 1px 5px #0001;
}

.node-type-toolbar button:hover:not(:disabled) {
  border-color: #0000;
}

.node-metadata {
  display: flex;
  gap: 10px;
  margin: 8px 0;
}

.node-metadata label {
  color: #8a867a;
  flex: 1;
  gap: 4px;
  min-width: 0;
  font-size: 10px;
}

.node-metadata select, .node-metadata input {
  color: #474640;
  background: #fff;
  border: 1px solid #e3ddcf;
  border-radius: 6px;
  width: 100%;
  padding: 8px;
  font-size: 12px;
}

.node-editor textarea, .node-insert-editor textarea {
  resize: vertical;
  background: none;
  border: 0;
  border-bottom: 1px solid #ece7dd;
  border-radius: 0;
  width: 100%;
  min-height: 68px;
  padding: 8px;
  font: 15px / 1.8 Noto Serif SC, serif;
}

.node-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 10px;
  margin-top: 10px;
}

.node-editor-footer > span {
  color: #aaa49a;
  font-size: 10px;
}

.node-editor-footer > div {
  display: flex;
  gap: 5px;
}

.node-editor-footer button {
  padding: 6px 8px;
  font-size: 11px;
}

.node-danger {
  color: #ad5e4d;
}

.node-editor-footer .node-danger:hover {
  border-color: #d9ad9f;
}

@media (width <= 760px) {
  .structured-node {
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 6px;
  }

  .node-kind {
    display: none;
  }

  .node-rail {
    gap: 1px;
  }

  .node-time {
    padding: 3px;
    font-size: 9px;
  }

  .node-content-button {
    font-size: 14px;
  }

  .node-insert-editor {
    margin-left: 55px;
    padding: 10px;
  }

  .node-type-toolbar {
    justify-content: center;
    width: 100%;
  }

  .node-type-toolbar button {
    min-width: 40px;
  }

  .node-metadata {
    flex-direction: column;
  }

  .node-editor-footer {
    flex-direction: column;
    align-items:  flex-end;
  }

  .node-editor-heading small {
    display: none;
  }

  .node-insert-line button {
    opacity: 1;
  }

  .episode-nav {
    width: 240px;
  }
}

.scene-heading-line strong {
  display: block;
  color: #3b3b37;
  font: 600 17px / 1.5 Noto Serif SC, serif;
}

.node-scene_heading .node-content-button {
  padding: 2px 4px;
}

.entity-overview, .entity-detail-view {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.entity-overview-heading {
  display: flex;
  color: #474740;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 3px 0 19px;
  font-size: 12px;
  font-weight: 600;
}

.entity-overview-heading small {
  color: #97958b;
  font-weight: 400;
}

.entity-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.entity-summary-card {
  display: flex;
  text-align: left;
  background: #fffdf9;
  border: 1px solid #e7e1d5;
  border-radius: 5px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 220px;
  padding: 20px 21px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: 0 5px 18px #39312309;
}

.entity-summary-card:hover:not(:disabled) {
  border-color: #c9ae7e;
  transform: translateY(-2px);
  box-shadow: 0 12px 27px #39312314;
}

.entity-summary-card:focus-visible {
  border-color: #c9ae7e;
  transform: translateY(-2px);
  box-shadow: 0 12px 27px #39312314;
}

.entity-summary-top {
  display: flex;
  color: #a18b69;
  align-items:  center;
  gap: 9px;
}

.entity-summary-top .entity-icon {
  width: 32px;
  height: 32px;
}

.entity-summary-top > svg:last-child {
  color: #b6b0a4;
  margin-left: auto;
}

.entity-summary-kind {
  letter-spacing: .06em;
  font-size: 10px;
}

.entity-summary-card > strong {
  color: #30312e;
  overflow-wrap: anywhere;
  margin: 17px 0 9px;
  font: 600 18px / 1.5 Noto Serif SC, serif;
}

.entity-summary-excerpt {
  color: #76766f;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  min-height: 4.8em;
  font-size: 12px;
  line-height: 1.8;
}

.entity-summary-footer {
  color: #a29e91;
  border-top: 1px solid #eee9df;
  margin-top: auto;
  padding-top: 13px;
  font-size: 10px;
}

.entity-back {
  color: #90704a;
  background: none;
  border: 0;
  margin-bottom: 17px;
  padding: 6px 2px;
  font-size: 12px;
}

.entity-back:hover:not(:disabled) {
  color: #6f4d24;
  border-color: #0000;
}

.entity-detail-card {
  padding: 28px 32px;
}

.entity-detail-card .entity-card-head {
  border-bottom: 1px solid #eee8dc;
  padding-bottom: 20px;
}

.entity-detail-card h3 {
  font-size: 23px;
}

.entity-detail-sections {
  display: grid;
  gap: 18px;
  padding: 25px 0 5px;
}

.entity-detail-sections section {
  min-width: 0;
}

.entity-detail-sections h4 {
  color: #8c846f;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
}

.entity-detail-sections .entity-description, .entity-detail-sections .entity-facts {
  color: #484945;
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
}

.entity-detail-card .entity-links {
  margin-top: 22px;
}

.entity-detail-card .entity-card-actions {
  justify-content: flex-end;
}

.entity-detail-card .entity-edit {
  flex: none;
  width: auto;
  padding: 8px 14px;
}

@media (width <= 760px) {
  .entity-overview-heading {
    padding: 0 2px;
  }

  .entity-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .entity-summary-card {
    min-height: 175px;
    padding: 16px;
  }

  .entity-summary-card > strong {
    margin: 10px 0 5px;
  }

  .entity-summary-excerpt {
    -webkit-line-clamp: 2;
    min-height: 0;
  }

  .entity-detail-card {
    padding: 20px 17px;
  }

  .entity-detail-card h3 {
    font-size: 20px;
  }
}

.episode-nav .panel-title {
  color: #858177;
  padding: 12px 16px 8px;
  font-size: 11px;
}

.episode-nav .project-nav-scroll {
  padding-bottom: 12px;
}

.episode-nav .nav-group-link {
  min-height: 37px;
  padding: 8px 16px;
  font-weight: 500;
}

.episode-nav-heading {
  display: flex;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  align-items:  center;
  gap: 5px;
  margin-top: 10px;
  padding: 9px 10px 5px 13px;
}

.episode-nav-heading > button:first-child {
  color: #676961;
  background: none;
  border: 0;
  min-width: 0;
  padding: 5px 2px;
  font-size: 11px;
  font-weight: 600;
}

.episode-nav-heading > button:first-child span {
  color: #98968d;
  margin-left: 2px;
  font-weight: 400;
}

.episode-nav-heading svg:last-child {
  transition: transform .15s;
}

.episode-nav-heading svg.collapsed {
  transform: rotate(-90deg);
}

.episode-select-toggle {
  color: #986f36;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 5px;
  font-size: 10px;
}

.episode-search {
  display: flex;
  color: #a4a197;
  background: #fff;
  border: 1px solid #e6e2d9;
  border-radius: 6px;
  flex-direction: row;
  align-items:  center;
  gap: 7px;
  height: 32px;
  margin: 3px 12px 7px;
  padding: 0 9px;
}

.episode-search input {
  outline-offset: 2px;
  background: none;
  border: 0;
  width: 100%;
  padding: 2px 0;
  font-size: 11px;
}

.project-nav-scroll .episode-list {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  max-height: clamp(220px, 44vh, 470px);
}

.episode-item {
  gap: 5px;
  min-height: 34px;
  padding: 2px 9px;
}

.episode-item > button {
  gap: 7px;
  min-height: 30px;
  padding: 4px 2px;
}

.episode-number {
  color: #9a9588;
  width: 23px;
  font: 11px ui-monospace, monospace;
}

.episode-name {
  flex: 1;
  min-width: 0;
  font-size: 11px;
}

.episode-ready {
  background: #a7a093;
  border-radius: 50%;
  flex: none;
  width: 5px;
  height: 5px;
}

.episode-item.selected .episode-ready {
  background: var(--amber);
}

.episode-nav .select-all {
  color: #77766b;
  padding: 3px 13px 8px;
}

.episode-no-results {
  color: var(--muted);
  padding: 10px 15px;
  font-size: 11px;
}

.scene-tree {
  margin-left: 28px;
}

.scene-tree button {
  padding-top: 4px;
  padding-bottom: 4px;
}

@media (width >= 761px) {
  .document-tabs {
    display: none;
  }
}

.workspace-episode-label {
  color: #777970;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 50%;
  font-size: 11px;
}

.document-heading {
  padding-top: 17px;
  padding-bottom: 13px;
}

.document-heading h2 {
  margin: 0;
  font-size: 20px;
}

.scene-meta {
  margin-bottom: 7px;
}

.scene-card {
  padding-top: 15px;
}

.scene-heading-line small {
  display: none;
}

.node-kind {
  opacity: 0;
  transition: opacity .15s;
}

.structured-node:hover .node-kind, .structured-node:focus-within .node-kind {
  opacity: 1;
}

.focus-script .document-body {
  padding-top: 14px;
}

.focus-script .scene-card {
  margin-bottom: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.entity-overview-heading {
  align-items:  center;
  margin: 0 0 13px;
  font-size: 12px;
}

.entity-search {
  display: flex;
  color: #999488;
  background: #fff;
  border: 1px solid #e6e1d6;
  border-radius: 7px;
  flex-direction: row;
  align-items:  center;
  gap: 7px;
  min-width: 200px;
  height: 34px;
  padding: 0 10px;
}

.entity-search input {
  background: none;
  border: 0;
  width: 100%;
  padding: 3px 0;
  font-size: 11px;
}

.entity-grid {
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 9px;
  padding-bottom: 24px;
}

.entity-summary-card {
  box-shadow: none;
  border-radius: 7px;
  min-height: 138px;
  padding: 14px 15px;
}

.entity-summary-card:hover:not(:disabled) {
  transform: none;
  box-shadow: 0 4px 15px #39312312;
}

.entity-summary-card:focus-visible {
  transform: none;
  box-shadow: 0 4px 15px #39312312;
}

.entity-summary-title {
  display: flex;
  color: #3a3b36;
  justify-content: space-between;
  align-items:  center;
  gap: 8px;
}

.entity-summary-title strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 600 15px / 1.5 Noto Serif SC, serif;
}

.entity-summary-title svg {
  color: #b9ae9d;
  flex: none;
}

.entity-summary-excerpt {
  -webkit-line-clamp: 2;
  min-height: 0;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.65;
}

.entity-summary-footer {
  border: 0;
  margin-top: auto;
  padding-top: 8px;
  font-size: 10px;
}

.entity-no-results {
  color: var(--muted);
  padding: 18px 3px;
  font-size: 12px;
}

@media (width <= 760px) {
  .document-tabs {
    gap: 4px;
    padding: 0 12px;
  }

  .document-tabs button {
    padding: 11px 5px;
    font-size: 10px;
  }

  .workspace-controls {
    height: 34px;
    padding: 0 12px;
  }

  .workspace-episode-label {
    max-width: 42%;
    font-size: 10px;
  }

  .document-heading {
    padding: 13px 15px 10px;
  }

  .document-heading h2 {
    font-size: 17px;
  }

  .entity-overview-heading {
    gap: 8px;
    margin-bottom: 11px;
  }

  .entity-search {
    width: 160px;
    min-width: 0;
    height: 31px;
  }

  .entity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .entity-summary-card {
    min-height: 136px;
    padding: 11px;
  }

  .entity-summary-title strong {
    font-size: 13px;
  }

  .entity-summary-excerpt {
    font-size: 10px;
  }

  .entity-summary-footer {
    font-size: 9px;
  }
}

.global-rail-toggle, .global-rail-links, .account-center {
  display: none;
}

@media (width >= 761px) {
  .bd-app-studio .site-header {
    position: fixed;
    z-index: 24;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    flex-direction: column;
    gap: 9px;
    width: 52px;
    height: 100dvh;
    padding: 9px 5px;
    inset: 0 auto 0 0;
  }

  .bd-app-studio .brand {
    letter-spacing: 0;
    gap: 0;
  }

  .bd-app-studio .brand > span:last-child, .bd-app-studio .header-note, .bd-app-studio .account {
    display: none;
  }

  .bd-app-studio .brand-mark {
    width: 38px;
    height: 38px;
  }

  .bd-app-studio .account-center {
    display: block;
    position: relative;
    width: 100%;
    margin-top: auto;
  }

  .bd-app-studio .account-trigger {
    background: none;
    border: 0;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 3px;
  }

  .bd-app-studio .account-trigger:hover, .bd-app-studio .account-trigger[aria-expanded="true"] {
    background: #eee8dc;
  }

  .bd-app-studio .account-avatar {
    display: grid;
    color: #74511f;
    background: #e8d6b7;
    border-radius: 50%;
    flex: none;
    place-items:  center;
    width: 32px;
    height: 32px;
    font-size: 13px;
    font-weight: 700;
  }

  .bd-app-studio .account-trigger-info, .bd-app-studio .account-trigger-chevron {
    display: none;
  }

  .bd-app-studio .account-popover {
    position: absolute;
    z-index: 35;
    background: #fffdf9;
    border: 1px solid #e5ddcf;
    border-radius: 10px;
    width: 230px;
    padding: 14px;
    bottom: 0;
    left: calc(100% + 12px);
    box-shadow: 0 14px 36px #29271f25;
  }

  .bd-app-studio .account-popover > strong {
    display: block;
    overflow-wrap: anywhere;
    margin-bottom: 13px;
    font-size: 12px;
  }

  .bd-app-studio .account-popover > div {
    display: flex;
    color: #8a877e;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    font-size: 11px;
  }

  .bd-app-studio .account-popover > div b {
    color: #4e4b43;
    font-size: 12px;
  }

  .bd-app-studio .account-popover > button {
    color: #635c51;
    background: none;
    border: 0;
    border-top: 1px solid #eee9df;
    border-radius: 0;
    justify-content: flex-start;
    width: 100%;
    margin-top: 10px;
    padding: 9px 3px 2px;
    font-size: 11px;
  }

  .bd-app-studio .global-rail-toggle {
    display: flex;
    color: #777970;
    width: 38px;
    height: 34px;
    padding: 7px;
  }

  .bd-app-studio .global-rail-links {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
  }

  .bd-app-studio .global-rail-links button {
    color: #737870;
    background: none;
    border: 0;
    justify-content: flex-start;
    width: 100%;
    height: 37px;
    padding: 0 10px;
  }

  .bd-app-studio .global-rail-links button:hover {
    background: #eee9dd;
  }

  .bd-app-studio .global-rail-links button span {
    display: none;
  }

  .bd-app-studio.rail-expanded .site-header {
    align-items: stretch;
    width: 184px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .bd-app-studio.rail-expanded .brand {
    gap: 8px;
  }

  .bd-app-studio.rail-expanded .brand > span:last-child {
    display: block;
    letter-spacing: 2px;
    font-size: 18px;
  }

  .bd-app-studio.rail-expanded .brand small {
    letter-spacing: 1px;
    font-size: 7px;
  }

  .bd-app-studio.rail-expanded .global-rail-toggle {
    align-self:  flex-end;
  }

  .bd-app-studio.rail-expanded .global-rail-links button {
    gap: 9px;
    font-size: 12px;
  }

  .bd-app-studio.rail-expanded .global-rail-links button span {
    display: block;
  }

  .bd-app-studio.rail-expanded .account-trigger {
    background: #fffdf9;
    border: 1px solid #e5dfd2;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    height: 52px;
    padding: 5px 7px;
  }

  .bd-app-studio.rail-expanded .account-trigger-info {
    display: flex;
    text-align: left;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .bd-app-studio.rail-expanded .account-trigger-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
  }

  .bd-app-studio.rail-expanded .account-trigger-info small {
    color: #908a7d;
    font-size: 10px;
  }

  .bd-app-studio.rail-expanded .account-trigger-chevron {
    display: block;
    color: #a59d90;
    flex: none;
    margin-left: auto;
  }

  .bd-app-studio.rail-expanded .studio {
    margin-left: 184px;
  }

  .bd-app-studio .studio {
    height: 100dvh;
    margin-left: 52px;
  }

  .bd-app-studio .studio-toolbar {
    gap: 8px;
    height: 47px;
    min-height: 47px;
    padding: 0 12px;
  }

  .bd-app-studio .studio-toolbar h1 {
    max-width: 36vw;
    font-size: 13px;
  }

  .bd-app-studio .toolbar-right {
    gap: 6px;
  }

  .bd-app-studio .toolbar-right button {
    min-height: 31px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .bd-app-studio .toolbar-right button:nth-child(-n+3) {
    width: 32px;
    padding: 5px;
    font-size: 0;
  }

  .bd-app-studio .toolbar-right button:nth-child(-n+3) svg {
    width: 15px;
    height: 15px;
  }

  .bd-app-studio .episode-nav {
    width: 218px;
  }

  .bd-app-studio .nav-hidden .episode-nav {
    display: flex;
    width: 218px;
  }

  .bd-app-studio .episode-nav .panel-title .icon {
    display: none;
  }

  .bd-app-studio .workspace-controls {
    height: 33px;
    padding: 0 12px;
  }

  .bd-app-studio .workspace-controls > .icon:first-child {
    display: none;
  }

  .bd-app-studio .document-heading {
    min-height: 42px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .bd-app-studio .document-heading h2 {
    font-size: 16px;
  }

  .bd-app-studio .focus-script .document-body {
    padding-top: 8px;
  }
}

@media (width <= 760px) {
  .bd-app-studio .site-header {
    position: static;
    flex-direction: row;
    width: auto;
    height: 66px;
  }

  .bd-app-studio .studio {
    height: calc(100dvh - 66px);
    margin-left: 0;
  }

  .bd-app-studio .nav-hidden .episode-nav {
    display: none;
  }

  .bd-app-studio .studio-toolbar {
    height: auto;
    min-height: 62px;
  }
}

.library-empty {
  display: flex;
  color: #8e8b80;
  text-align: center;
  border: 1px dashed #ddd8ca;
  border-radius: 10px;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  gap: 12px;
  min-height: 250px;
}

.library-empty h2 {
  color: #494a43;
  font: 600 17px Noto Serif SC, serif;
}

.library-empty p, .library-empty button {
  font-size: 12px;
}

.form-issue {
  color: #a64032;
  background: #fff2ee;
  border: 1px solid #e9c6bd;
  border-radius: 7px;
  margin-top: 12px;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.5;
}

@media (width <= 760px) {
  .bd-app-studio .site-header {
    height: 52px;
    padding: 0 12px;
  }

  .bd-app-studio .brand {
    gap: 8px;
    font-size: 18px;
  }

  .bd-app-studio .brand small {
    display: none;
  }

  .bd-app-studio .brand-mark {
    width: 32px;
    height: 32px;
  }

  .bd-app-studio .brand-mark svg {
    width: 19px;
    height: 19px;
  }

  .bd-app-studio .studio {
    height: calc(100dvh - 52px);
  }

  .bd-app-studio .studio-toolbar {
    gap: 4px 8px;
    min-height: 87px;
    padding: 7px 10px;
  }

  .bd-app-studio .studio-toolbar h1 {
    max-width: calc(100% - 48px);
    font-size: 12px;
  }

  .bd-app-studio .toolbar-right {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-left: 0;
  }

  .bd-app-studio .toolbar-right button {
    min-height: 40px;
    padding: 4px 5px;
  }

  .bd-app-studio .toolbar-right button:nth-child(-n+3) {
    flex-direction: column;
    flex: none;
    gap: 1px;
    width: 55px;
    font-size: 9px;
  }

  .bd-app-studio .toolbar-right button:nth-child(-n+3) svg {
    width: 15px;
    height: 15px;
  }

  .bd-app-studio .toolbar-right .primary {
    flex: 1;
    font-size: 11px;
  }

  .bd-app-studio .studio-body {
    position: relative;
  }

  .bd-app-studio .episode-nav {
    width: min(290px, 85vw);
    top: 0;
    bottom: 0;
    box-shadow: 8px 0 28px #0002;
  }

  .bd-app-studio .progress-drawer {
    max-width: 100vw;
    top: 0;
    bottom: 0;
  }

  .bd-app-studio .document-tabs button {
    min-height: 38px;
  }

  .bd-app-studio .workspace-controls {
    height: 31px;
  }
}

.bd-app-studio .workspace-controls {
  justify-content: flex-start;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
}

.workspace-toolbar-actions {
  display: flex;
  white-space: nowrap;
  align-items:  center;
  gap: 6px;
  min-width: 0;
}

.workspace-toolbar-actions button {
  height: 28px;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}

.workspace-toolbar-actions button svg {
  flex: none;
  width: 14px;
  height: 14px;
}

.workspace-toolbar-actions .source-toggle {
  display: inline-flex;
  margin-right: 4px;
}

.workspace-toolbar-actions .primary {
  background: #ab6935;
  border-color: #ab6935;
}

.workspace-toolbar-actions .running {
  color: #a25f28;
  background: #fff8eb;
  border-color: #d8b98f;
}

.workspace-toolbar-actions button:focus-visible {
  outline: 2px solid #ad6c35;
  outline-offset: 2px;
}

.workspace-view-actions {
  flex: none;
  margin-left: auto;
}

@media (width <= 1100px) {
  .workspace-toolbar-actions button:nth-child(n+2):nth-child(-n+4) {
    width: 30px;
    padding: 4px;
  }

  .workspace-toolbar-actions button:nth-child(n+2):nth-child(-n+4) span {
    display: none;
  }
}

@media (width <= 760px) {
  .bd-app-studio .studio-toolbar {
    height: 44px;
    min-height: 44px;
    padding: 0 10px;
  }

  .bd-app-studio .workspace-controls {
    gap: 3px;
    height: 44px;
    padding: 0 8px;
  }

  .bd-app-studio .workspace-controls > .icon:first-child {
    display: inline-flex;
    flex: none;
  }

  .workspace-toolbar-actions {
    overflow-x: auto;
    scrollbar-width: none;
    gap: 4px;
  }

  .workspace-toolbar-actions::-webkit-scrollbar {
    display: none;
  }

  .workspace-toolbar-actions .source-toggle {
    display: none;
  }

  .workspace-toolbar-actions button {
    height: 34px;
    min-height: 34px;
  }

  .workspace-toolbar-actions button:nth-child(n+2):nth-child(-n+4) {
    flex: none;
    width: 34px;
  }

  .workspace-toolbar-actions .primary {
    flex: none;
    padding: 4px 7px;
  }

  .workspace-view-actions {
    gap: 2px;
  }

  .mobile-tabs {
    gap: 2px;
    margin-left: 0;
  }

  .mobile-tabs button {
    padding: 5px 6px;
  }
}

.document-body.is-empty {
  display: flex;
  justify-content: center;
  align-items:  center;
  min-height: 0;
}

.document-empty-action {
  color: #8c887e;
  text-align: center;
  width: min(100%, 440px);
  padding: 16px 20px 44px;
}

.document-empty-icon {
  display: grid;
  color: #a96531;
  background: #fbf7ef;
  border: 1px solid #e2d8c8;
  border-radius: 50%;
  place-items:  center;
  width: 66px;
  height: 66px;
  margin: 0 auto 20px;
}

.document-empty-index {
  display: block;
  letter-spacing: .22em;
  color: #a96531;
  font: 600 10px Fraunces, Noto Serif SC, serif;
}

.document-empty-action h3 {
  color: #33372f;
  margin: 13px 0 10px;
  font: 500 clamp(22px, 2vw, 27px) / 1.5 Noto Serif SC, serif;
}

.document-empty-action p {
  color: #797c73;
  max-width: 360px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.8;
}

button.document-empty-cta {
  color: #fff;
  background: #a96531;
  border: 1px solid #a96531;
  border-radius: 7px;
  min-width: 210px;
  min-height: 44px;
  margin: 27px auto 0;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 18px #a9653124;
}

button.document-empty-cta:hover:not(:disabled) {
  background: #8c532c;
  border-color: #8c532c;
  box-shadow: 0 10px 22px #a9653130;
}

button.document-empty-cta:focus-visible {
  outline: 2px solid #a96531;
  outline-offset: 3px;
}

.document-empty-action > small {
  display: block;
  color: #8b8a81;
  margin-top: 12px;
  font-size: 11px;
}

@media (width <= 760px) {
  .document-empty-action {
    padding: 20px 12px 60px;
  }

  .document-empty-icon {
    width: 58px;
    height: 58px;
  }

  .document-empty-action h3 {
    font-size: 21px;
  }
}

.session-status {
  display: grid;
  color: var(--muted);
  text-align: center;
  place-items:  center;
  min-height: calc(100dvh - 80px);
  padding: 32px;
}

.session-status h1 {
  color: var(--ink);
  margin: 0 0 12px;
  font-size: 20px;
}

.session-status p {
  font-size: 14px;
  line-height: 1.8;
}

.session-status button {
  margin-top: 16px;
}

.session-status-mark {
  display: block;
  background: var(--amber);
  animation: 1.6s ease-in-out infinite session-wait;
  border-radius: 2px;
  width: 40px;
  height: 3px;
  margin: 0 auto 20px;
}

@keyframes session-wait {
  50% {
    opacity: .3;
    transform: scaleX(.65);
  }
}

@media (prefers-reduced-motion: reduce) {
  .session-status-mark {
    animation: none;
  }
}

.episode-nav .project-nav-scroll .episode-list {
  overflow: visible;
  max-height: none;
}

.episode-sticky {
  position: sticky;
  z-index: 3;
  background: #f5f4ee;
  border-bottom: 1px solid #e8e5dc;
  padding-bottom: 6px;
  top: 0;
}

.episode-sticky .episode-search {
  margin-bottom: 8px;
}

.episode-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 12px 2px;
}

.episode-filter button {
  display: inline-flex;
  color: #6d6f67;
  white-space: nowrap;
  background: #fffdf8;
  border: 1px solid #e3ded3;
  border-radius: 999px;
  flex: none;
  align-items:  center;
  gap: 4px;
  height: 24px;
  min-height: 0;
  padding: 0 9px;
  font-size: 11px;
}

.episode-filter button span {
  color: #a3a095;
  font-variant-numeric: tabular-nums;
}

.episode-filter button[aria-pressed="true"] {
  color: #fff;
  background: #3a443e;
  border-color: #3a443e;
}

.episode-filter button[aria-pressed="true"] span {
  color: #d6d9d2;
}

.episode-list {
  padding-top: 4px;
}

.episode-item .episode-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.episode-item .season-episode-status {
  background: #efece4;
  border-radius: 999px;
  flex: none;
  max-width: none;
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1.5;
}

.episode-item .season-episode-status.status-completed {
  background: #86ab8f;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  padding: 0;
}

.episode-item .season-episode-status.status-running {
  color: #a96b2f;
  background: #f6e8d6;
}

.episode-item .season-episode-status.status-partial {
  color: #8a6a2a;
  background: #f4ecd8;
}

.episode-item .season-episode-status.status-failed {
  color: #a4472f;
  background: #f7e3dd;
}

.episode-nav .project-nav-scroll {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding-bottom: 0;
}

.episode-nav .project-nav-scroll > * {
  flex: none;
}

.episode-nav .project-nav-scroll > .episode-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  flex: auto;
  min-height: 96px;
}

.episode-nav .project-nav-scroll > .episode-list::-webkit-scrollbar {
  display: none;
}

.episode-sticky {
  position: static;
}

.scene-dock {
  display: flex;
  background: #f1efe8;
  border-top: 1px solid #e8e5dc;
  flex-direction: column;
  flex: none;
  min-height: 0;
  max-height: 40%;
  padding: 10px 10px 12px;
}

.scene-dock h3 {
  display: flex;
  color: #4c5550;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 2px 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

.scene-dock h3 span {
  color: #98968d;
  font-size: 11px;
  font-weight: 400;
}

.scene-dock-list {
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.scene-dock-list::-webkit-scrollbar {
  display: none;
}

.scene-dock-list button {
  display: flex;
  color: #2f3a33;
  text-align: left;
  background: #fffefb;
  border: 1px solid #e6e1d6;
  border-radius: 10px;
  flex: none;
  align-items:  center;
  gap: 5px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
  box-shadow: 0 1px 2px #2d21100a;
}

.scene-dock-list button:hover {
  border-color: #d4b892;
}

.scene-dock-index, .scene-dock-time {
  color: #8e8b80;
  flex: none;
}

.scene-dock-type {
  color: #4c5550;
  flex: none;
}

.scene-dock-place {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.shortory-translation-button {
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 29px;
  margin-left: 0;
  padding: 7px 10px;
  font-size: 12px;
}

/* packages/breakdown/src/styles/shortory-commerce.css */
.bd-modal.shortory-commerce {
  color: #26312e;
  overflow-y: auto;
  background: #faf8f2;
  border: 1px solid #ded8cb;
  border-radius: 18px;
  width: min(1040px, 100vw - 32px);
  max-width: 1040px;
  max-height: calc(100dvh - 40px);
  padding: 28px 32px;
  box-shadow: 0 30px 100px #1b282940;
}

.shortory-commerce > header {
  display: flex;
  border-bottom: 1px solid #e4dfd3;
  justify-content: space-between;
  align-items:  center;
  margin: 0 0 24px;
  padding: 0 0 18px;
}

.shortory-commerce > header h2 {
  margin: 5px 0 0;
  font-size: 18px;
}

.commerce-kicker {
  letter-spacing: .18em;
  color: #a46433;
  font-size: 10px;
}

.commerce-intro h3 {
  font-family: var(--font-display, "Noto Serif SC", serif);
  margin: 0 0 8px;
  font-size: 27px;
  font-weight: 500;
}

.commerce-intro p, .commerce-footnote {
  color: #72796f;
  font-size: 12px;
  line-height: 1.8;
}

.commerce-balance {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 12px 24px;
  padding: 18px 0;
  font-size: 12px;
}

.commerce-balance > span {
  display: flex;
  color: #747b72;
  align-items:  center;
  gap: 8px;
}

.commerce-balance strong {
  font-variant-numeric: tabular-nums;
  color: #27312d;
  font-size: 21px;
}

.commerce-tabs {
  display: flex;
  border-bottom: 1px solid #ded8cb;
  gap: 24px;
  margin: 0 0 24px;
}

.commerce-tabs button {
  color: #7a7d73;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 12px 0;
}

.commerce-tabs button[aria-selected="true"] {
  color: #9f612d;
  box-shadow: 0 2px #ac6937;
}

.commerce-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.commerce-plan {
  display: flex;
  background: #fffefb;
  border: 1px solid #e2dccf;
  border-radius: 12px;
  flex-direction: column;
  align-items: stretch;
  padding: 25px 22px;
}

.commerce-plan.tier-pro {
  background: linear-gradient(155deg, #f4e9d8, #fffefb 65%);
  border-color: #b57b49;
}

.commerce-plan h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 13px 0;
  font-size: 24px;
}

.commerce-plan h3 small {
  color: #999182;
  letter-spacing: .1em;
  font-size: 10px;
}

.commerce-price {
  font-variant-numeric: tabular-nums;
  margin: 12px 0;
  font-size: 33px;
  font-weight: 650;
}

.commerce-price small {
  color: #838477;
  font-size: 12px;
  font-weight: 400;
}

.commerce-plan ul {
  list-style: none;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 12px 0;
  font-size: 12px;
}

.commerce-plan li {
  display: flex;
  align-items:  center;
  gap: 7px;
}

.commerce-plan li svg {
  color: #a77644;
}

.commerce-unit {
  display: block;
  color: #858376;
  margin: 8px 0 22px;
  font-size: 11px;
}

.shortory-commerce .primary {
  color: #fff;
  display: flex;
  background: #a96632;
  border-color: #a96632;
  justify-content: center;
  align-items:  center;
  gap: 10px;
  min-height: 42px;
}

.commerce-plan .primary {
  margin-top: auto;
  font-size: 12px;
}

.shortory-commerce button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.shortory-commerce button:focus-visible {
  outline: 2px solid #b47742;
  outline-offset: 3px;
}

.commerce-packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.commerce-pack {
  display: flex;
  text-align: left;
  color: #30392f;
  background: #fffefb;
  border: 1px solid #dfdacd;
  border-radius: 10px;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 18px;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.commerce-pack:hover {
  border-color: #b78254;
}

.commerce-pack.selected {
  background: #fcf2e3;
  border-color: #aa6a33;
  box-shadow: 0 0 0 2px #aa6a3318;
}

.commerce-pack-top {
  display: flex;
  color: #a06735;
  justify-content: space-between;
  align-items:  center;
  min-height: 17px;
  font-size: 10px;
}

.commerce-pack > strong {
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  line-height: 1.3;
}

.commerce-pack > strong small {
  margin-left: 7px;
  font-size: 11px;
  font-weight: 400;
}

.commerce-pack > span:not(.commerce-pack-top) {
  color: #8a887a;
  font-size: 11px;
}

.commerce-pack > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
}

.commerce-pack b {
  font-size: 19px;
}

.commerce-pack > div small {
  color: #8b8679;
  font-size: 10px;
}

.commerce-pack-purchase {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 14px;
  margin: 24px 0 8px;
}

.commerce-pack-purchase > span {
  display: flex;
  color: #888172;
  align-items:  center;
  gap: 7px;
  font-size: 11px;
}

.commerce-pack-purchase .primary {
  min-width: 240px;
}

.commerce-lots {
  border-top: 1px solid #e3ddd0;
  margin-top: 25px;
  padding-top: 17px;
  font-size: 12px;
}

.commerce-lots summary {
  cursor: pointer;
  color: #75796d;
}

.commerce-lots > div {
  display: flex;
  border-bottom: 1px solid #eee9de;
  align-items:  center;
  gap: 16px;
  padding: 13px 0;
}

.commerce-lots small {
  color: #929182;
  margin-left: auto;
}

.commerce-lots p {
  color: #8e8c80;
  font-size: 11px;
  line-height: 1.8;
}

.commerce-simulation {
  color: #947442;
  background: #efe7d6;
  border-radius: 5px;
  padding: 9px 12px;
  font-size: 11px;
}

.commerce-orders article {
  display: flex;
  border-bottom: 1px solid #e9e4d8;
  align-items:  center;
  gap: 18px;
  padding: 16px 0;
  font-size: 12px;
}

.commerce-orders article > div {
  flex: 1;
  min-width: 0;
}

.commerce-orders small {
  display: block;
  color: #989587;
  margin-top: 5px;
  font-size: 10px;
}

.commerce-checkout {
  max-width: 560px;
  margin: auto;
  padding-bottom: 12px;
}

.commerce-back {
  font-size: 11px;
}

.commerce-checkout h3 {
  margin: 24px 0 10px;
  font-family: Noto Serif SC, serif;
  font-size: 25px;
}

.commerce-checkout h4 {
  color: #a26635;
  font-weight: 500;
}

.commerce-checkout dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: baseline;
  gap: 17px;
  padding: 20px 0;
  font-size: 13px;
}

.commerce-checkout dt {
  color: #888274;
}

.commerce-checkout dd {
  text-align: right;
  margin: 0;
}

.commerce-checkout footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.commerce-success, .commerce-error {
  display: flex;
  border-radius: 6px;
  align-items:  center;
  gap: 8px;
  padding: 12px;
  font-size: 12px;
}

.commerce-success {
  color: #42674a;
  background: #e8efe4;
}

.commerce-error {
  color: #8d4b33;
  background: #f7e9df;
}

.commerce-error button {
  margin-left: auto;
}

.commerce-spinner {
  animation: 1s linear infinite commerce-turn;
}

@keyframes commerce-turn {
  to {
    transform: rotate(360deg);
  }
}

@media (width <= 760px) {
  .bd-modal.shortory-commerce {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 20px 16px;
  }

  .commerce-intro h3 {
    font-size: 23px;
  }

  .commerce-plans {
    grid-template-columns: 1fr;
  }

  .commerce-plan {
    padding: 20px;
  }

  .commerce-plan ul {
    gap: 12px;
  }

  .commerce-packs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .commerce-pack {
    gap: 9px;
    padding: 13px;
  }

  .commerce-pack > strong {
    font-size: 25px;
  }

  .commerce-pack > div {
    flex-wrap: wrap;
    gap: 7px;
  }

  .commerce-pack-purchase {
    position: sticky;
    display: grid;
    grid-template-columns: 1fr;
    background: #faf8f2;
    padding: 14px 0;
    bottom: -20px;
  }

  .commerce-pack-purchase .primary {
    width: 100%;
  }

  .commerce-orders article {
    flex-wrap: wrap;
    gap: 10px;
  }

  .commerce-orders article > div {
    flex-basis: 55%;
  }

  .commerce-tabs {
    gap: 20px;
  }

  .commerce-tabs button {
    font-size: 12px;
  }

  .commerce-checkout dl {
    gap: 13px;
    font-size: 12px;
  }

  .commerce-lots > div {
    flex-wrap: wrap;
    gap: 8px;
  }

  .commerce-lots small {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .commerce-pack {
    transition: none;
  }

  .commerce-spinner {
    animation: none;
  }
}

.site-header .commerce-entry {
  display: flex;
  white-space: nowrap;
  color: #a26635;
  background: #fffaf0;
  border-color: #e3d8c4;
  justify-content: center;
  align-items:  center;
  gap: 7px;
  font-size: 12px;
}

.site-header .commerce-entry svg {
  flex: none;
}

@media (width >= 761px) {
  .bd-app-studio .site-header .commerce-entry {
    background: none;
    border: 0;
    width: 40px;
    height: 37px;
    padding: 8px;
  }

  .bd-app-studio .site-header .commerce-entry span {
    display: none;
  }

  .bd-app-studio.rail-expanded .site-header .commerce-entry {
    justify-content: flex-start;
    gap: 9px;
    width: 100%;
  }

  .bd-app-studio.rail-expanded .site-header .commerce-entry span {
    display: inline;
  }
}

@media (width <= 760px) {
  .site-header .commerce-entry {
    flex: none;
    padding: 8px;
  }

  .site-header .commerce-entry span {
    display: none;
  }

  .bd-app > .site-header {
    gap: 10px;
  }

  .bd-app > .site-header .brand-button {
    min-width: 0;
  }

  .bd-app > .site-header .account {
    margin-left: auto;
  }
}

@media (width <= 380px) {
  .bd-app > .site-header .account > span {
    display: none;
  }
}

.commerce-channel {
  display: flex;
  color: #817a6c;
  flex-wrap: wrap;
  align-items:  center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 11px;
}

.commerce-channel button {
  background: #fffdf8;
  border: 1px solid #e5dbca;
  padding: 7px 12px;
  font-size: 11px;
}

.commerce-channel button[aria-pressed="true"] {
  color: #8b572f;
  background: #f8eddb;
  border-color: #b27949;
}

.commerce-payment-state {
  color: #7d613e;
  background: #f2eadb;
  border-radius: 7px;
  padding: 13px 15px;
  font-size: 13px;
}

.commerce-cashier {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin: 22px 0;
}

.commerce-cashier img {
  background: #fff;
  border: 1px solid #e5dfd3;
  border-radius: 9px;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.commerce-cashier a.primary {
  text-decoration: none;
  border-radius: 7px;
  min-width: 220px;
  padding: 12px;
}

.commerce-checkout textarea {
  display: block;
  font: inherit;
  resize: vertical;
  background: #fffef9;
  border: 1px solid #e0d7c7;
  border-radius: 7px;
  width: 100%;
  min-height: 100px;
  margin-top: 8px;
  padding: 12px;
}

.commerce-refund-label {
  color: #9a703f;
  font-size: 11px;
}

.commerce-checkout footer {
  flex-wrap: wrap;
  align-items:  center;
}

.commerce-checkout footer small {
  color: #8f806d;
  font-size: 11px;
  line-height: 1.6;
}

.commerce-choice {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 20px;
  margin-bottom: 22px;
}

.commerce-choice strong {
  font-size: 15px;
  font-weight: 550;
}

.commerce-choice p {
  color: #7e8175;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.7;
}

.commerce-choice > button {
  display: flex;
  color: #9b6237;
  text-align: left;
  background: none;
  border: 0;
  align-items:  center;
  gap: 7px;
  padding: 8px 0;
  font-size: 11px;
}

.commerce-plan-top {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 8px;
  min-height: 24px;
}

.commerce-badge {
  display: inline-flex;
  color: #995c30;
  white-space: nowrap;
  background: #a9663214;
  border-radius: 20px;
  align-items:  center;
  gap: 5px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 500;
}

.commerce-plan h3 {
  font-family: var(--font-display, serif);
  margin: 17px 0 9px;
  font-size: 26px;
  font-weight: 600;
}

.commerce-position {
  color: #35433b;
  min-height: 38px;
  margin: 0 0 7px;
  font-size: 13px;
  line-height: 1.5;
}

.commerce-audience {
  color: #848477;
  min-height: 37px;
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.65;
}

.commerce-allowance {
  display: flex;
  border-top: 1px solid #e7dfd1;
  align-items: baseline;
  gap: 8px;
  padding: 17px 0 10px;
}

.commerce-allowance strong {
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  line-height: 1;
}

.commerce-allowance span {
  color: #7e8073;
  font-size: 11px;
}

.commerce-plan ul {
  gap: 14px;
  padding: 12px 0;
}

.commerce-plan li {
  font-size: 11px;
  line-height: 1.6;
}

.commerce-plan li svg {
  flex: none;
}

.commerce-unit {
  color: #97653e;
  font-size: 12px;
  line-height: 1.7;
}

.commerce-unit small {
  display: block;
  color: #939080;
  margin-top: 4px;
  font-size: 10px;
}

.commerce-pack-breakdown em {
  color: #a26232;
  font-style: normal;
}

.commerce-pack-purchase > div > span {
  display: flex;
  align-items:  center;
  gap: 7px;
  font-size: 12px;
}

.commerce-pack-purchase > div > small {
  display: block;
  color: #858071;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.7;
}

.commerce-included {
  border-top: 1px solid #e3ddd0;
  margin-top: 28px;
  padding: 22px 0;
}

.commerce-included h4 {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 500;
}

.commerce-included > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.commerce-included article {
  position: relative;
  padding-left: 26px;
}

.commerce-included svg {
  position: absolute;
  color: #a46d3f;
  top: 1px;
  left: 0;
}

.commerce-included h5 {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 550;
}

.commerce-included p {
  color: #858477;
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
}

.commerce-rules {
  color: #757b70;
  border-top: 1px solid #e3ddd0;
  padding: 18px 0;
  font-size: 12px;
}

.commerce-rules summary {
  cursor: pointer;
  line-height: 1.6;
}

.commerce-rules dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 15px;
  margin-top: 20px;
  font-size: 11px;
  line-height: 1.8;
}

.commerce-rules dt {
  color: #4b584e;
}

.commerce-rules dd {
  margin: 0;
}

.commerce-intro h3 {
  letter-spacing: -.02em;
}

.library-allowance {
  display: flex;
  color: #828274;
  flex-wrap: wrap;
  align-items:  center;
  gap: 18px;
  padding: 0 0 23px;
  font-size: 12px;
}

.library-allowance strong {
  color: #39483c;
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}

.library-allowance button {
  display: flex;
  color: #a56b3e;
  background: none;
  border: 0;
  align-items:  center;
  gap: 5px;
}

.library-scopes {
  display: flex;
  gap: 20px;
}

.library-scopes button {
  color: #989587;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 10px 0;
}

.library-scopes button[aria-selected="true"] {
  color: #9f612d;
  box-shadow: 0 2px #ac6937;
}

.library-scopes span {
  margin-left: 4px;
  font-size: 10px;
}

.library-project {
  display: flex;
  text-align: left;
  overflow: hidden;
  flex-direction: column;
  padding: 0;
}

.library-project-open {
  display: block;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  width: 100%;
  padding: 0;
}

.library-project-open .project-cover {
  width: 100%;
}

.library-project-actions {
  display: flex;
  justify-content: flex-end;
  align-items:  center;
  gap: 12px;
  min-height: 44px;
  padding: 0 18px 15px;
}

.library-project-actions > span {
  color: #959181;
  margin-right: auto;
  font-size: 11px;
}

.library-project-actions button {
  display: flex;
  color: #897656;
  background: none;
  border: 0;
  align-items:  center;
  gap: 6px;
  padding: 5px;
  font-size: 11px;
}

.library-archive-banner {
  display: flex;
  color: #866443;
  background: #f3eadb;
  border-bottom: 1px solid #e6dcc9;
  justify-content: space-between;
  align-items:  center;
  gap: 15px;
  padding: 12px 22px;
  font-size: 12px;
}

.library-archive-banner button {
  white-space: nowrap;
  color: #8a633a;
  background: #fffdf8;
  border-color: #d7c5ab;
  font-size: 12px;
}

@media (width <= 760px) {
  .commerce-choice {
    flex-direction: column;
    align-items:  flex-start;
    gap: 6px;
  }

  .commerce-plan .commerce-position, .commerce-plan .commerce-audience {
    min-height: 0;
  }

  .commerce-included > div {
    grid-template-columns: 1fr;
    gap: 21px;
  }

  .commerce-rules dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .commerce-rules dd {
    margin-bottom: 12px;
  }

  .commerce-pack-purchase {
    z-index: 2;
  }

  .commerce-packs .commerce-pack-top {
    align-items:  flex-start;
    gap: 4px;
  }

  .commerce-packs .commerce-badge {
    padding: 3px 6px;
    font-size: 8px;
  }

  .library-allowance {
    gap: 8px 18px;
  }

  .library-allowance > span:nth-child(2) {
    flex-basis: 100%;
    font-size: 11px;
  }

  .library-scopes {
    white-space: nowrap;
    gap: 14px;
  }

  .library-toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .library-archive-banner {
    flex-wrap: wrap;
    line-height: 1.7;
  }
}

.commerce-upgrade-note {
  color: #80603e;
  background: #f5ede0;
  border: 1px solid #e5d8c4;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.8;
}

.commerce-upgrade-note dl {
  gap: 10px;
  padding-bottom: 0;
  font-size: 11px;
}

.commerce-upgrade-note dt {
  color: #85735d;
}

.commerce-upgrade-note p + p {
  margin-top: 10px;
}

.commerce-current-period {
  display: flex;
  color: #888170;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 0 0 17px;
  font-size: 11px;
}

.commerce-current-period strong {
  color: #8f603b;
  font-variant-numeric: tabular-nums;
}

.quota-guidance {
  color: var(--ink);
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.8;
}

.bd-modal > p {
  line-height: 1.8;
}

.bd-modal select {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  border-radius: 7px;
  width: 100%;
  padding: 12px;
}

.export-menu button {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 4px 6px;
  font-size: 11px;
}

a.export-download {
  display: inline-flex;
  background: var(--amber);
  color: #fff;
  border-radius: 7px;
  justify-content: center;
  align-items:  center;
  min-height: 38px;
  padding: 8px 14px;
  font-weight: 600;
}

.commerce-project-need {
  background: #f7ede2;
  border-left: 3px solid #ad6935;
  margin: 12px 0;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.7;
}

.commerce-capacity {
  color: #93613c;
  min-height: 33px;
  font-size: 11px;
  line-height: 1.5;
}

.comparison-mode {
  color: var(--muted);
  white-space: nowrap;
  font-size: 11px;
}

@media (width <= 760px) {
  .comparison-mode {
    display: none;
  }

  .quota-guidance {
    font-size: 13px;
  }

  .bd-modal footer {
    flex-wrap: wrap;
  }
}

.recovery-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.draft-recovery-note, .draft-recovery-conflict {
  color: #80552f;
  background: #fbf1e4;
  border: 1px solid #ead7bf;
  border-radius: 8px;
  flex: none;
  margin: 8px 16px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
}

.draft-recovery-conflict pre {
  overflow: auto;
  white-space: pre-wrap;
  max-height: 180px;
}

.draft-recovery-conflict button {
  margin-top: 8px;
  padding: 5px 8px;
  font-size: 12px;
}

@media (width <= 760px) {
  .account .balance-unit {
    display: inline;
    color: var(--muted);
    font-size: 10px;
  }

  .bd-modal button {
    min-height: 40px;
  }

  .bd-modal footer {
    gap: 8px;
  }
}

.season-selection-summary {
  display: flex;
  color: #795638;
  background: #fcf5ea;
  border-bottom: 1px solid #e9d6bd;
  flex: none;
  align-items:  center;
  gap: 12px;
  min-width: 0;
  padding: 7px 14px;
  font-size: 12px;
}

.season-selection-summary > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.season-selection-summary > strong {
  flex: none;
}

.season-selection-summary button {
  color: #965c2f;
  background: none;
  border: 0;
  flex: none;
  padding: 3px 6px;
  font-size: 11px;
}

.season-selection-tools {
  padding: 0 12px 9px;
  font-size: 11px;
}

.season-selection-tools .select-all {
  display: flex;
  flex-direction: row;
  align-items:  center;
  gap: 6px;
  padding: 4px 0;
}

.season-selection-tools > div {
  display: flex;
  gap: 6px;
}

.season-selection-tools button {
  padding: 4px 6px;
  font-size: 10px;
}

.season-selection-tools > small {
  display: block;
  color: #9a6d40;
  padding-top: 6px;
  line-height: 1.5;
}

@media (width <= 760px) {
  .season-selection-summary {
    gap: 8px;
    padding: 7px 10px;
    font-size: 11px;
  }
}

.entity-links .entity-links-heading {
  display: flex;
  color: var(--muted);
  justify-content: space-between;
  align-items:  center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.entity-links-heading select {
  background: var(--paper);
  border: 1px solid var(--line);
  font: inherit;
  color: var(--ink);
  border-radius: 6px;
  max-width: 155px;
  padding: 6px 8px;
}

.entity-links > button {
  align-items:  flex-start;
}

.entity-links > button > span {
  text-align: left;
  min-width: 0;
  line-height: 1.7;
}

.entity-links > button small {
  display: block;
  color: var(--muted);
  white-space: normal;
  font-size: 11px;
}

.entity-links > button > svg {
  flex: none;
  margin-top: 4px;
}

.entity-edit-scope {
  color: var(--muted);
  background: #fbf5eb;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.7;
}

.entity-edit-scope strong {
  display: block;
  color: #9b643b;
  font-weight: 500;
}

@media (width <= 760px) {
  .entity-links > button {
    min-height: 44px;
  }

  .entity-links-heading select {
    max-width: 150px;
    min-height: 40px;
  }
}

.entity-detail-card .entity-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.entity-detail-card .entity-links > button {
  width: 100%;
  padding: 8px 10px;
}

.entity-links .entity-links-heading {
  width: 100%;
  margin-bottom: 4px;
}

.draft-recovery-conflict button + button {
  margin-left: 8px;
}

.bd-modal.shortory-commerce {
  position: fixed;
  overflow-y: auto;
  background: radial-gradient(70% 50% at 50% 0%, #f6ead8 0%, #0000 70%), radial-gradient(circle, #e7dfd166 1px, #0000 1.2px) 0 0 / 18px 18px, #faf8f2;
  border: 0;
  border-radius: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 64px 32px 48px;
  inset: 0;
}

.bd-modal.shortory-commerce::backdrop {
  background: #faf8f2;
}

.commerce-stage {
  max-width: 1120px;
  margin: 0 auto;
}

.commerce-close {
  position: fixed;
  z-index: 3;
  display: grid;
  color: #4c5550;
  background: #fffdf8;
  border: 1px solid #e2dbcd;
  border-radius: 50%;
  place-items:  center;
  width: 40px;
  height: 40px;
  padding: 0;
  top: 20px;
  right: 24px;
  box-shadow: 0 2px 8px #2d21100d;
}

.commerce-close:hover {
  background: #fff;
  border-color: #c9b9a2;
}

.shortory-commerce .commerce-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 22px;
}

.commerce-intro h2 {
  font-family: var(--font-display, "Noto Serif SC", serif);
  letter-spacing: -.01em;
  color: #26312e;
  margin: 10px 0 8px;
  font-size: 34px;
  font-weight: 500;
}

.commerce-intro p {
  color: #7a7d73;
  margin: 0;
  font-size: 13px;
}

.shortory-commerce .commerce-tabs {
  background: #f1ebe0;
  border: 1px solid #e4dccd;
  border-radius: 999px;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 28px;
  padding: 4px;
}

.shortory-commerce .commerce-tabs button {
  color: #7a7d73;
  box-shadow: none;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
}

.shortory-commerce .commerce-tabs button[aria-selected="true"] {
  color: #8f552a;
  background: #fffdf8;
  box-shadow: 0 1px 4px #2d211014;
}

.shortory-commerce .commerce-channel {
  justify-content: center;
}

.shortory-commerce .commerce-project-need {
  max-width: 720px;
  margin: 0 auto 18px;
}

.shortory-commerce .commerce-plans {
  align-items: stretch;
  gap: 20px;
}

.shortory-commerce .commerce-plan {
  background: #fffefb;
  border-color: #e6dfd2;
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 10px 30px #2d21100a;
}

.shortory-commerce .commerce-plan.tier-pro {
  background: linear-gradient(165deg, #f5e8d4, #fffefb 60%);
  border-color: #c79a72;
  box-shadow: 0 16px 40px #8a4f2a1f;
}

.commerce-status {
  display: flex;
  color: #7d7d72;
  flex-wrap: wrap;
  justify-content: center;
  align-items:  center;
  gap: 8px 0;
  margin: 26px auto 8px;
  font-size: 12px;
}

.commerce-status > span {
  display: inline-flex;
  align-items:  center;
  gap: 6px;
  padding: 0 14px;
}

.commerce-status > span + span {
  border-left: 1px solid #e2dbcd;
}

.commerce-status svg {
  color: #a46d3f;
}

.commerce-status strong {
  color: #2f3a33;
  font-variant-numeric: tabular-nums;
}

.commerce-fineprint {
  max-width: 880px;
  margin: 0 auto;
}

.commerce-fineprint > .commerce-footnote {
  text-align: center;
}

.commerce-stage > .commerce-success, .commerce-stage > .commerce-error {
  max-width: 720px;
  margin: 16px auto 0;
}

.shortory-commerce .commerce-checkout {
  margin-top: 8px;
}

@media (width <= 760px) {
  .bd-modal.shortory-commerce {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    padding: 64px 16px 32px;
  }

  .commerce-close {
    top: 12px;
    right: 12px;
  }

  .commerce-intro h2 {
    font-size: 24px;
    line-height: 1.4;
  }

  .shortory-commerce .commerce-tabs {
    margin-bottom: 22px;
  }

  .shortory-commerce .commerce-tabs button {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 12px;
  }

  .commerce-status {
    justify-content: flex-start;
    gap: 6px 0;
  }

  .commerce-status > span {
    padding: 0 10px 0 0;
  }

  .commerce-status > span + span {
    border-left: 0;
  }
}

.shortory-commerce .commerce-plan h3 {
  margin: 14px 0 6px;
}

.shortory-commerce .commerce-position {
  min-height: 0;
  margin-bottom: 4px;
}

.shortory-commerce .commerce-audience {
  min-height: 0;
  margin-bottom: 6px;
}

.shortory-commerce .commerce-lots {
  border-top: 0;
  margin-top: 0;
}

.shortory-commerce .commerce-orders {
  max-width: 880px;
  margin: 0 auto;
}

.bd-modal.shortory-analysis-selector {
  overflow: auto;
  background: #fffdf9;
  width: 760px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  padding: 24px 26px;
}

.shortory-analysis-selector > header {
  margin-bottom: 22px;
}

.shortory-analysis-selector > header h2 {
  display: flex;
  align-items:  center;
  gap: 10px;
  font-size: 18px;
}

.shortory-analysis-selector > header h2 svg {
  color: #a96b39;
}

.analysis-selector-range {
  display: flex;
  border-bottom: 1px solid #ede7dc;
  flex-wrap: wrap;
  align-items:  flex-end;
  gap: 10px;
  padding-bottom: 20px;
}

.analysis-selector-range label {
  display: flex;
  color: #657069;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
}

.analysis-selector-range input {
  color: #26342f;
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: 1px solid #e3ddd2;
  border-radius: 8px;
  width: 100px;
  height: 40px;
  padding: 0 11px;
  font-size: 14px;
}

.analysis-selector-range input:focus {
  outline: 2px solid #d5a277;
  outline-offset: 1px;
}

.analysis-selector-dash {
  color: #a5aaa0;
  padding-bottom: 12px;
}

.analysis-selector-range button {
  color: #a66636;
  background: none;
  border: 0;
  padding: 10px;
  font-size: 12px;
}

.analysis-selector-range small {
  color: #92948b;
  margin-left: auto;
  padding-bottom: 11px;
  font-size: 11px;
}

.analysis-selector-heading {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin: 20px 0 10px;
  font-size: 12px;
}

.analysis-selector-heading strong {
  color: #303a34;
}

.analysis-selector-heading span {
  color: #9a704e;
}

.analysis-selector-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #dac8b5 transparent;
  gap: 9px;
  max-height: min(38dvh, 310px);
  padding: 1px 3px 3px 1px;
}

.analysis-selector-card {
  display: flex;
  background: #fff;
  border: 1px solid #e9ded0;
  border-radius: 9px;
  align-items:  flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 75px;
  padding: 13px 11px;
}

.analysis-selector-card-number {
  font-variant-numeric: tabular-nums;
  color: #a96b39;
  flex: none;
  padding-top: 2px;
  font-size: 11px;
}

.analysis-selector-card > div {
  min-width: 0;
}

.analysis-selector-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #27352e;
  font-size: 12px;
  font-weight: 600;
}

.analysis-selector-card small {
  display: block;
  color: #8d968c;
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.4;
}

.analysis-selector-status {
  display: inline-block;
  background: #c4a275;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  margin-right: 5px;
}

.analysis-selector-status.status-completed {
  background: #78a286;
}

.analysis-selector-status.status-failed {
  background: #bd765b;
}

.analysis-selector-note, .analysis-selector-alert {
  color: #8d735d;
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.7;
}

.analysis-selector-alert {
  color: #a24836;
}

.shortory-analysis-selector > footer {
  display: flex;
  border-top: 1px solid #eee7db;
  align-items:  center;
  gap: 9px;
  margin-top: 24px;
  padding-top: 17px;
}

.analysis-selector-total {
  display: flex;
  color: #777f75;
  flex-direction: column;
  gap: 4px;
  margin-right: auto;
  font-size: 11px;
}

.analysis-selector-total strong {
  color: #a46332;
  font-variant-numeric: tabular-nums;
  font-size: 19px;
}

.analysis-selector-total small {
  color: #a3a49b;
  font-size: 10px;
}

.bd-modal .analysis-selector-card {
  cursor: pointer;
  flex-direction: row;
  margin: 0;
}

.analysis-selector-card[data-selected="false"] {
  background: #f8f7f3;
  border-color: #e7e5df;
}

.bd-modal .analysis-selector-card > input[type="checkbox"] {
  accent-color: #a66636;
  flex: none;
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 1px 0 0;
  padding: 0;
}

.analysis-selector-card:focus-within {
  outline: 2px solid #d5a277;
  outline-offset: 1px;
}

.analysis-selector-card > input:disabled {
  cursor: default;
}

@media (width <= 760px) {
  .bd-modal.shortory-analysis-selector {
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 20px 16px;
  }

  .analysis-selector-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 35dvh;
  }

  .analysis-selector-range input {
    width: 78px;
  }

  .analysis-selector-range small {
    margin-left: 0;
  }

  .shortory-analysis-selector > footer {
    gap: 8px;
  }

  .analysis-selector-total {
    flex: 1 0 100%;
    margin-bottom: 4px;
  }
}

.shortory-commerce .commerce-plans, .shortory-commerce .commerce-packs {
  gap: 20px;
}

.shortory-commerce .commerce-pack {
  border-radius: 16px;
  padding: 24px;
}

.shortory-commerce .commerce-pack b, .shortory-commerce .commerce-price {
  font-size: 30px;
  font-weight: 650;
  line-height: 1.3;
}

.shortory-commerce .commerce-plan .primary, .shortory-commerce .commerce-pack-purchase .primary {
  min-height: 44px;
}

.shortory-commerce .commerce-pack-purchase {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 24px;
  margin: 24px 0 8px;
}

.commerce-pack-action {
  flex: 0 0 280px;
}

.commerce-pack-action > .primary {
  width: 100%;
}

.shortory-commerce .commerce-plan-top {
  min-height: 24px;
}

.shortory-commerce .commerce-position, .shortory-commerce .commerce-audience {
  min-height: 1.8em;
}

.bd-modal.shortory-purchase-confirm:not(.shortory-commerce) {
  box-sizing: border-box;
  color: #29352f;
  overflow: hidden;
  scrollbar-gutter: auto;
  background: #fffdf9;
  border: 1px solid #e2dacd;
  border-radius: 16px;
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  box-shadow: 0 24px 80px #1b282933;
}

.bd-modal.shortory-purchase-confirm[open] {
  display: flex;
  flex-direction: column;
}

.shortory-purchase-confirm > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.purchase-confirm-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  min-height: 0;
}

.shortory-purchase-confirm::backdrop {
  backdrop-filter: blur(3px);
  background: #17221e66;
}

.bd-modal.shortory-purchase-confirm > header {
  position: static;
  display: flex;
  border: 0;
  flex: none;
  justify-content: space-between;
  align-items:  center;
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
}

.bd-modal.shortory-purchase-confirm > header:before {
  content: none;
}

.shortory-purchase-confirm > header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.shortory-purchase-confirm .icon {
  color: #767c72;
  background: none;
  border: 0;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 4px;
}

.purchase-confirm-product {
  background: #f7f3eb;
  border: 1px solid #ebe3d6;
  border-radius: 10px;
  padding: 18px 20px;
}

.purchase-confirm-product h3 {
  font-size: 22px;
  font-family: var(--font-display, "Noto Serif SC", serif);
  overflow-wrap: anywhere;
  margin: 6px 0 10px;
  font-weight: 500;
}

.purchase-confirm-price {
  font-variant-numeric: tabular-nums;
  margin: 0 0 14px;
  font-size: 30px;
  font-weight: 650;
}

.purchase-confirm-price small {
  color: #7d8076;
  font-size: 12px;
  font-weight: 400;
}

.purchase-confirm-product dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid #e4ddcf;
  gap: 10px 16px;
  margin: 0;
  padding-top: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.purchase-confirm-product dt {
  color: #757c72;
}

.purchase-confirm-product dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  margin: 0;
}

.purchase-confirm-note {
  color: #777c70;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.65;
}

.purchase-confirm-price + .purchase-confirm-note {
  margin: 0 0 14px;
}

.purchase-confirm-consent {
  border: 1px solid #0000;
  border-radius: 8px;
  margin-top: 18px;
  padding: 8px;
}

.purchase-confirm-consent .shortory-legal-consent {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.purchase-confirm-consent .shortory-legal-links {
  gap: 4px 12px;
  margin: 6px 0 0 24px;
  font-size: 11px;
}

.purchase-confirm-consent[data-attention] {
  background: #fff4e7;
  border-color: #c78a54;
}

.purchase-confirm-error {
  color: #9b4c24;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.purchase-confirm-consent .purchase-confirm-error {
  margin-left: 24px;
}

.shortory-purchase-confirm form > footer {
  display: flex;
  border-top: 1px solid #eae3d7;
  flex: none;
  justify-content: flex-end;
  align-items:  center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
}

.shortory-purchase-confirm footer button {
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 13px;
}

.shortory-purchase-confirm footer .primary {
  display: flex;
  color: #fff;
  background: #a96632;
  border: 1px solid #a96632;
  justify-content: center;
  align-items:  center;
  gap: 8px;
  min-width: 170px;
}

.shortory-purchase-confirm button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.shortory-purchase-confirm button:focus-visible {
  outline: 2px solid #a96632;
  outline-offset: 3px;
}

@media (width <= 760px) {
  .shortory-commerce .commerce-pack-purchase {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .commerce-pack-action {
    flex: auto;
  }

  .commerce-pack-action > .primary {
    min-width: 0;
  }

  .bd-modal.shortory-purchase-confirm:not(.shortory-commerce) {
    padding: 20px;
  }

  .purchase-confirm-product {
    padding: 16px;
  }

  .shortory-purchase-confirm footer .primary {
    flex: 1;
    min-width: 0;
  }

  .shortory-commerce .commerce-pack {
    padding: 18px;
  }
}

/* packages/breakdown/src/styles/shortory-brand.css */
:root {
  --ink: #202825;
  --muted: #78817a;
  --paper: #f7f5ee;
  --line: #e2dfd4;
  --amber: #a96531;
  --accent: #d89b5c;
  --night: #17211f;
}

.site-header {
  background: #f7f5ee;
}

.brand-button {
  border-radius: 9px;
}

.brand-button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.locale-switch {
  color: #415249;
  letter-spacing: .02em;
  background: #fffdf9;
  border: 1px solid #d7d1c5;
  border-radius: 7px;
  min-width: 44px;
  height: 31px;
  margin-left: auto;
  padding: 5px 9px;
  font: 700 11px / 1 Noto Sans SC, sans-serif;
}

.locale-switch:hover {
  color: #995927;
  border-color: #a96531;
}

.locale-switch:focus-visible {
  outline: 2px solid #995927;
  outline-offset: 2px;
}

.brand {
  letter-spacing: -1.25px;
  gap: 11px;
  font-family: Fraunces, Georgia, serif;
  font-size: 29px;
  font-weight: 620;
  line-height: 1;
}

.brand-mark {
  display: grid;
  color: inherit;
  background: none;
  border-radius: 12px;
  place-items:  center;
  width: 42px;
  height: 42px;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-wordmark {
  display: block;
  white-space: nowrap;
}

.brand-wordmark > img {
  display: block;
  width: 132px;
  height: auto;
}

.brand small {
  letter-spacing: .55px;
  color: #717c74;
  white-space: nowrap;
  margin-top: 6px;
  font: 600 8px / 1.1 Noto Sans SC, sans-serif;
}

.header-note {
  color: #717b73;
}

.auth-card {
  background: #fffefb;
  border-color: #e4ddce;
  box-shadow: 0 24px 70px #17211f14;
}

.auth-card > .eyebrow, .library-heading .eyebrow {
  color: var(--amber);
}

.library h1 {
  letter-spacing: -.03em;
}

.project-cover {
  position: relative;
  overflow: hidden;
  color: #f7f1e6;
  background: #17211f;
}

.project-cover:before {
  content: "";
  position: absolute;
  opacity: .18;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, #0000 0 45px, #eedbc0 45px 46px), linear-gradient(145deg, #0000 52%, #d89b5c 52.2%, #0000 52.5%);
  inset: 0;
}

.project-cover > * {
  position: relative;
}

.project-cover svg {
  color: #d89b5c;
}

.cover-1 {
  background: #30403a;
}

.cover-2 {
  background: #4b3b31;
}

.project-card:hover:not(:disabled) {
  border-color: #c2a17e;
}

.viewer-label .live-dot {
  background: #d89b5c;
}

.timecode {
  background: #f3e9db;
}

@media (width >= 761px) {
  .bd-app-studio .brand-mark {
    width: 38px;
    height: 38px;
  }

  .bd-app-studio .locale-switch {
    width: 40px;
    min-width: 40px;
    height: 32px;
    margin-left: 0;
    padding: 4px;
    font-size: 10px;
  }

  .bd-app-studio.rail-expanded .locale-switch {
    width: 100%;
    font-size: 11px;
  }

  .bd-app-studio.rail-expanded .brand {
    gap: 7px;
  }

  .bd-app-studio.rail-expanded .brand-wordmark > img {
    width: 112px;
  }

  .bd-app-studio.rail-expanded .brand small {
    letter-spacing: 0;
    font-size: 6px;
  }
}

@media (width <= 760px) {
  .locale-switch {
    min-width: 40px;
    height: 30px;
    padding: 4px 7px;
  }

  .brand {
    letter-spacing: -.9px;
    font-size: 24px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-wordmark > img {
    width: 111px;
  }

  .bd-app-studio .brand-mark, .bd-app-studio .brand-mark svg {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card {
    transition: none;
  }
}

/* packages/breakdown/src/styles/shortory-home.css */
.shortory-home {
  background: #f7f5ee;
  min-height: calc(100dvh - 80px);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
  grid-template-areas: "narrative auth" "image auth";
  align-items:  start;
  gap: 29px clamp(45px, 6vw, 112px);
  max-width: 1510px;
  margin: 0 auto;
  padding: 78px 52px 94px;
}

.home-narrative {
  grid-area: narrative;
  border-left: 2px solid #c79461;
  min-width: 0;
  padding: 14px 0 0 34px;
}

.home-kicker {
  display: inline-flex;
  color: #995927;
  letter-spacing: .21em;
  align-items:  center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
}

.home-kicker-line {
  background: #a96531;
  width: 31px;
  height: 1px;
}

.home-narrative h1 {
  letter-spacing: -.055em;
  color: #202825;
  max-width: 920px;
  margin: 28px 0 20px;
  font: 600 clamp(46px, 5vw, 72px) / 1.32 Noto Serif SC, serif;
}

.home-narrative h1 em {
  color: #a96531;
  font-style: normal;
}

.home-lead {
  color: #667269;
  font-size: 15px;
  line-height: 2;
}

.home-available {
  display: grid;
  grid-template-columns: auto 1fr auto;
  border-top: 1px solid #dbd4c5;
  align-items:  center;
  column-gap: 14px;
  max-width: 710px;
  margin-top: 36px;
  padding: 15px 0 0;
}

.home-available-index {
  letter-spacing: .12em;
  color: #9d8e7a;
  font: 10px / 1.2 Fraunces, Georgia, serif;
}

.home-available strong {
  letter-spacing: .04em;
  font-size: 15px;
}

.home-available > span:nth-child(3) {
  color: #385846;
  background: #e6efe8;
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 600;
}

.home-available p {
  grid-column: 2 / 4;
  color: #727c71;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
}

.home-cinematic-image {
  position: relative;
  grid-area: image;
  overflow: hidden;
  background: #17211f;
  border-radius: 3px;
  min-width: 0;
  height: clamp(240px, 28vw, 380px);
  margin: 0;
  box-shadow: 0 18px 45px #17211f1a;
}

.home-cinematic-image:after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: linear-gradient(#0000, #111a18ba);
  inset: 35% 0 0;
}

.home-cinematic-image img, .home-method-image img {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.home-cinematic-image img {
  object-position: center 49%;
}

.home-cinematic-image figcaption {
  position: absolute;
  z-index: 1;
  display: flex;
  color: #fffdf7;
  justify-content: space-between;
  align-items:  end;
  gap: 20px;
  font-size: 12px;
  bottom: 23px;
  left: 26px;
  right: 26px;
}

.home-cinematic-image figcaption > span:first-child {
  font: 600 26px / 1.2 Noto Serif SC, serif;
}

.home-cinematic-image figcaption > span:last-child {
  display: inline-flex;
  color: #e9cba8;
  align-items:  center;
  gap: 7px;
  font-size: 11px;
}

.home-auth-column {
  grid-area: auth;
  padding-top: 75px;
}

.home-auth-card {
  background: #fffefb;
  gap: 17px;
  width: 100%;
  padding: 32px 34px 28px;
}

.home-auth-card .eyebrow {
  letter-spacing: .16em;
  font-size: 10px;
}

.home-auth-card h2 {
  margin: 1px 0 0;
  font: 600 25px / 1.45 Noto Serif SC, serif;
}

.home-auth-intro {
  color: #717a71;
  margin: -8px 0 6px;
  font-size: 12px;
  line-height: 1.75;
}

.home-auth-card label {
  color: #394239;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}

.home-auth-card input {
  width: 100%;
  height: 44px;
}

.home-auth-card > .primary {
  width: 100%;
  height: 45px;
  margin-top: 7px;
  font-size: 13px;
}

.home-auth-card .auth-links {
  margin-top: 1px;
}

.home-auth-footnote {
  color: #858b83;
  border-top: 1px solid #ebe6dc;
  margin-top: 5px;
  padding-top: 15px;
  font-size: 11px;
  line-height: 1.7;
}

.home-explore {
  display: flex;
  color: #526257;
  background: none;
  border: 0;
  border-bottom: 1px solid #cbc4b6;
  border-radius: 0;
  justify-content: space-between;
  align-items:  center;
  gap: 10px;
  width: 100%;
  margin: 24px 1px 0;
  padding: 0 0 10px;
  font-size: 12px;
}

.home-explore:hover {
  color: #a96531;
}

.home-method {
  background: #edeee8;
  padding: 82px max(52px, 50vw - 703px) 104px;
}

.home-method-heading {
  max-width: 950px;
  margin: 0 auto 39px 0;
}

.home-method-heading .eyebrow {
  color: #a96531;
}

.home-method-heading h2 {
  letter-spacing: -.04em;
  margin: 15px 0 12px;
  font: 600 clamp(28px, 3vw, 40px) / 1.45 Noto Serif SC, serif;
}

.home-method-heading p {
  color: #69756a;
  font-size: 14px;
  line-height: 1.8;
}

.home-method-content {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  align-items:  center;
  gap: clamp(36px, 5vw, 90px);
}

.home-method-image {
  position: relative;
  overflow: hidden;
  background: #c9bba6;
  border-radius: 3px;
  height: 440px;
  margin: 0;
}

.home-method-image img {
  object-position: center 48%;
}

.home-method-image figcaption {
  position: absolute;
  color: #fff;
  background: linear-gradient(#0000, #161b18b3);
  padding: 30px 24px 18px;
  font-size: 12px;
  bottom: 0;
  left: 0;
  right: 0;
}

.home-method-steps {
  display: flex;
  flex-direction: column;
}

.home-method-steps > div {
  display: grid;
  grid-template-columns: 28px 27px 1fr;
  border-top: 1px solid #cdd4c8;
  align-items:  center;
  column-gap: 18px;
  padding: 22px 0;
}

.home-method-steps > div:last-child {
  border-bottom: 1px solid #cdd4c8;
}

.home-method-steps span {
  color: #a96531;
  font: 600 12px Georgia, serif;
}

.home-method-steps svg {
  color: #637d6e;
}

.home-method-steps h3 {
  font: 600 18px Noto Serif SC, serif;
}

.home-method-steps p {
  grid-column: 3;
  color: #68746a;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.75;
}

.home-footer {
  display: flex;
  color: #758078;
  align-items:  center;
  gap: 22px;
  max-width: 1510px;
  margin: auto;
  padding: 30px 52px 38px;
  font-size: 12px;
}

.home-footer > img {
  display: block;
  width: 112px;
  height: auto;
}

.home-footer small {
  letter-spacing: .08em;
  margin-left: auto;
}

@media (width <= 1050px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr) 330px;
    column-gap: 32px;
    padding: 60px 32px 80px;
  }

  .home-narrative {
    padding-left: 22px;
  }

  .home-narrative h1 {
    font-size: clamp(39px, 4.5vw, 58px);
  }

  .home-auth-column {
    padding-top: 48px;
  }

  .home-auth-card {
    padding: 26px;
  }

  .home-available {
    grid-template-columns: auto 1fr;
  }

  .home-available > span:nth-child(3) {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
  }

  .home-available strong {
    grid-column: 1 / 3;
    margin-top: 9px;
  }

  .home-available p {
    grid-column: 1 / 3;
  }

  .home-method {
    padding: 70px 32px;
  }
}

@media (width <= 760px) {
  .shortory-home {
    min-height: calc(100dvh - 66px);
  }

  .home-hero {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 30px 20px 56px;
  }

  .home-narrative {
    width: 100%;
    padding: 7px 0 0 16px;
  }

  .home-kicker {
    letter-spacing: .11em;
    font-size: 10px;
  }

  .home-kicker-line {
    width: 18px;
  }

  .home-narrative h1 {
    margin: 15px 0 10px;
    font-size: clamp(32px, 8.4vw, 48px);
    line-height: 1.35;
  }

  .home-lead {
    font-size: 12px;
    line-height: 1.85;
  }

  .home-lead br {
    display: none;
  }

  .home-available {
    margin-top: 20px;
    padding-top: 12px;
  }

  .home-available-index {
    font-size: 9px;
  }

  .home-available strong {
    font-size: 13px;
  }

  .home-available p {
    font-size: 11px;
  }

  .home-auth-column {
    order: 1;
    width: 100%;
    padding-top: 25px;
  }

  .home-auth-card {
    gap: 15px;
    margin: 0;
    padding: 25px 22px;
  }

  .home-auth-card h2 {
    font-size: 22px;
  }

  .home-explore {
    display: none;
  }

  .home-cinematic-image {
    order: 2;
    width: 100%;
    height: 230px;
    margin-top: 26px;
  }

  .home-cinematic-image figcaption {
    bottom: 16px;
    left: 18px;
    right: 18px;
  }

  .home-cinematic-image figcaption > span:first-child {
    font-size: 19px;
  }

  .home-cinematic-image figcaption > span:last-child {
    font-size: 10px;
  }

  .home-method {
    padding: 50px 20px 64px;
  }

  .home-method-heading h2 {
    font-size: 27px;
  }

  .home-method-heading p {
    font-size: 12px;
  }

  .home-method-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .home-method-image {
    width: 100%;
    height: 240px;
  }

  .home-method-steps {
    width: 100%;
  }

  .home-method-steps > div {
    padding: 18px 0;
  }

  .home-method-steps h3 {
    font-size: 16px;
  }

  .home-footer {
    gap: 10px;
    padding: 24px 20px 32px;
  }

  .home-footer p {
    font-size: 10px;
  }

  .home-footer small {
    font-size: 9px;
  }
}

.library {
  max-width: 1240px;
  padding: 40px 40px 64px;
}

.library-heading {
  align-items:  flex-end;
  margin-bottom: 22px;
}

.library-heading h1 {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 30px;
}

.library-continue {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  background: linear-gradient(120deg, #fffdf8, #f8efe2);
  border: 1px solid #e6dfd2;
  border-radius: 16px;
  align-items:  center;
  gap: 28px;
  padding: 18px;
  box-shadow: 0 10px 30px #2d21100a;
}

.library-continue-cover {
  display: block;
  overflow: hidden;
  background: none;
  border: 0;
  border-radius: 10px;
  width: 100%;
  padding: 0;
}

.library-continue-body {
  display: flex;
  flex-direction: column;
  align-items:  flex-start;
  gap: 8px;
  min-width: 0;
}

.library-continue-body h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.4;
}

.library-continue-body p {
  color: #5f665f;
  margin: 0;
  font-size: 13px;
}

.library-continue-body small {
  display: inline-flex;
  color: #8e8b80;
  align-items:  center;
  gap: 5px;
  font-size: 12px;
}

.library-continue-body .primary {
  display: inline-flex;
  align-items:  center;
  gap: 8px;
  min-height: 40px;
  margin-top: 8px;
  padding: 0 18px;
}

.library-continue.is-empty {
  grid-template-columns: auto minmax(0, 1fr) auto;
  color: #9a6a3f;
}

.library-continue.is-empty h2 {
  color: var(--ink);
  margin: 0 0 4px;
  font-size: 18px;
}

.library-continue.is-empty p {
  color: #7e8175;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.library-continue.is-empty .primary {
  display: inline-flex;
  align-items:  center;
  gap: 6px;
}

.library-summary {
  display: flex;
  color: #7d7d72;
  flex-wrap: wrap;
  align-items:  center;
  gap: 8px 0;
  margin: 18px 0 0;
  padding: 12px 4px;
  font-size: 12px;
}

.library-summary > span {
  display: inline-flex;
  align-items:  center;
  gap: 6px;
  padding: 0 16px;
}

.library-summary > span:first-child {
  padding-left: 0;
}

.library-summary > span + span {
  border-left: 1px solid #e2dbcd;
}

.library-summary svg {
  color: #a46d3f;
}

.library-summary strong {
  color: #2f3a33;
  font-variant-numeric: tabular-nums;
}

.library-summary em {
  color: #9a9789;
  font-style: normal;
}

.library-summary .library-over {
  display: inline-flex;
  color: #b0553a;
  align-items:  center;
  gap: 4px;
  margin-left: 6px;
}

.library-summary .library-over svg {
  color: #b0553a;
}

.library-summary > button {
  display: inline-flex;
  color: #9a6033;
  background: none;
  border: 0;
  align-items:  center;
  gap: 5px;
  margin-left: auto;
  padding: 4px 0;
  font-size: 12px;
}

.library .library-toolbar {
  margin: 18px 0 20px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.library-card {
  position: relative;
  overflow: hidden;
  background: #fffefb;
  border: 1px solid #e6e1d6;
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.library-card:hover {
  border-color: #d4c3aa;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px #2d211012;
}

.library-card-open {
  display: block;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  width: 100%;
  padding: 0;
}

.library-card-body {
  padding: 12px 14px 14px;
}

.library-card-body h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  overflow: hidden;
  -webkit-box-orient: vertical;
  min-height: 2.8em;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.library-card-body p {
  display: flex;
  color: #8e8b80;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 11px;
}

.library-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1d2422;
}

.library-cover img {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.library-cover-glyph {
  position: absolute;
  display: grid;
  font-family: var(--font-display, "Noto Serif SC", serif);
  color: #f6ead8cc;
  place-items:  center;
  font-size: 42px;
  inset: 0;
}

.library-cover.is-large .library-cover-glyph {
  font-size: 64px;
}

.library-cover.tone-0 {
  background: linear-gradient(135deg, #27302d, #3b4a43);
}

.library-cover.tone-1 {
  background: linear-gradient(135deg, #3d2f25, #6a4a33);
}

.library-cover.tone-2 {
  background: linear-gradient(135deg, #26303b, #3d4c5c);
}

.library-cover.tone-3 {
  background: linear-gradient(135deg, #3a2d33, #5d4450);
}

.library-status {
  position: absolute;
  color: #5f665f;
  background: #fffdf8e6;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  line-height: 1.5;
  top: 10px;
  left: 10px;
  box-shadow: 0 1px 4px #0002;
}

.library-status.status-running {
  color: #9a5a24;
}

.library-status.status-completed {
  color: #3f6b4c;
}

.library-status.status-partial {
  color: #8a6a2a;
}

.library-status.status-failed {
  color: #a4472f;
}

.library-menu {
  position: absolute;
  top: 8px;
  right: 8px;
}

.library-menu > .icon {
  display: grid;
  color: #4c5550;
  opacity: 0;
  background: #fffdf8d9;
  border: 0;
  border-radius: 50%;
  place-items:  center;
  width: 28px;
  height: 28px;
  padding: 0;
  transition: opacity .15s;
}

.library-card:hover .library-menu > .icon, .library-menu > .icon[aria-expanded="true"] {
  opacity: 1;
}

.library-menu > .icon:focus-visible {
  opacity: 1;
}

.library-menu-list {
  position: absolute;
  z-index: 4;
  background: #fff;
  border: 1px solid #e6dfd2;
  border-radius: 8px;
  min-width: 120px;
  padding: 4px;
  top: 32px;
  right: 0;
  box-shadow: 0 8px 24px #2d21101f;
}

.library-menu-list button {
  display: flex;
  color: #4c5550;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  align-items:  center;
  gap: 7px;
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
}

.library-menu-list button:hover:not(:disabled) {
  background: #f6f0e6;
}

@media (width <= 1100px) {
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (width <= 900px) {
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-continue {
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 20px;
  }
}

@media (width <= 760px) {
  .library {
    padding: 24px 16px 48px;
  }

  .library-continue {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .library-continue-body h2 {
    white-space: normal;
    font-size: 18px;
  }

  .library-continue-body .primary {
    justify-content: center;
    width: 100%;
  }

  .library-continue.is-empty {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .library-summary {
    gap: 6px 0;
  }

  .library-summary > span {
    padding: 0 12px 0 0;
  }

  .library-summary > span + span {
    border-left: 0;
  }

  .library-summary > button {
    margin-left: 0;
  }

  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .library-card-body {
    padding: 10px 10px 12px;
  }

  .library-card-body p {
    flex-direction: column;
    gap: 2px;
  }

  .library-menu > .icon {
    opacity: 1;
    width: 32px;
    height: 32px;
  }

  .bd-app .account > span {
    white-space: nowrap;
  }
}

.bd-app:not(.bd-app-studio) > .site-header {
  gap: 12px;
}

.bd-app:not(.bd-app-studio) > .site-header .account {
  display: none;
}

.bd-app:not(.bd-app-studio) > .site-header .commerce-entry {
  order: 1;
  height: 38px;
  margin-left: auto;
}

.bd-app:not(.bd-app-studio) > .site-header .locale-switch {
  order: 2;
  height: 38px;
  margin-left: 0;
}

.bd-app:not(.bd-app-studio) .account-center {
  display: block;
  position: relative;
  order: 3;
}

.bd-app:not(.bd-app-studio) .account-trigger {
  display: flex;
  background: #fffdf9;
  border: 1px solid #e3dccf;
  border-radius: 999px;
  align-items:  center;
  gap: 8px;
  height: 42px;
  padding: 4px 10px 4px 5px;
}

.bd-app:not(.bd-app-studio) .account-trigger:hover, .bd-app:not(.bd-app-studio) .account-trigger[aria-expanded="true"] {
  background: #fff;
  border-color: #cdbfa8;
}

.bd-app:not(.bd-app-studio) .account-avatar {
  display: grid;
  color: #74511f;
  background: #e8d6b7;
  border-radius: 50%;
  flex: none;
  place-items:  center;
  width: 30px;
  height: 30px;
  font-size: 13px;
  font-weight: 700;
}

.bd-app:not(.bd-app-studio) .account-trigger-info {
  display: flex;
  flex-direction: column;
  align-items:  flex-start;
  gap: 1px;
  min-width: 0;
  max-width: 160px;
  line-height: 1.3;
}

.bd-app:not(.bd-app-studio) .account-trigger-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #3d453f;
  max-width: 100%;
  font-size: 11px;
  font-weight: 600;
}

.bd-app:not(.bd-app-studio) .account-trigger-info small {
  color: #8e8a7f;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.bd-app:not(.bd-app-studio) .account-trigger-chevron {
  color: #a59d90;
  flex: none;
}

.bd-app:not(.bd-app-studio) .account-popover {
  position: absolute;
  z-index: 35;
  background: #fffdf9;
  border: 1px solid #e5ddcf;
  border-radius: 10px;
  width: 240px;
  padding: 14px;
  top: calc(100% + 8px);
  right: 0;
  box-shadow: 0 14px 36px #29271f25;
}

.bd-app:not(.bd-app-studio) .account-popover > strong {
  display: block;
  overflow-wrap: anywhere;
  margin-bottom: 12px;
  font-size: 12px;
}

.bd-app:not(.bd-app-studio) .account-popover > div {
  display: flex;
  color: #8a877e;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
}

.bd-app:not(.bd-app-studio) .account-popover > div b {
  color: #4e4b43;
}

.bd-app:not(.bd-app-studio) .account-popover > button {
  display: flex;
  color: #635c51;
  background: none;
  border: 0;
  border-top: 1px solid #eee9df;
  border-radius: 0;
  justify-content: flex-start;
  align-items:  center;
  gap: 7px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 3px 2px;
  font-size: 12px;
}

@media (width <= 760px) {
  .bd-app:not(.bd-app-studio) > .site-header {
    gap: 8px;
  }

  .bd-app:not(.bd-app-studio) .account-trigger {
    border-radius: 50%;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 4px;
  }

  .bd-app:not(.bd-app-studio) .account-trigger-info, .bd-app:not(.bd-app-studio) .account-trigger-chevron {
    display: none;
  }

  .bd-app:not(.bd-app-studio) > .site-header .commerce-entry, .bd-app:not(.bd-app-studio) > .site-header .locale-switch {
    height: 40px;
  }
}

.home-pricing-link {
  display: flex;
  color: #9b622e;
  text-decoration: underline;
  text-underline-offset: 4px;
  align-items:  center;
  gap: 8px;
  width: -moz-fit-content;
  width: fit-content;
  margin-bottom: 24px;
  font-size: 14px;
}

/* packages/breakdown/src/styles/shortory-typography.css */
:root {
  --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-manuscript: "Noto Serif SC", "Songti SC", "STSong", serif;
}

html[lang="en-US"] {
  --font-ui: "Source Sans 3", "Noto Sans SC", sans-serif;
  --font-display: "Fraunces", "Noto Serif SC", serif;
  --font-manuscript: "Source Serif 4", "Noto Serif SC", serif;
}

body, button, input, textarea, select, .brand small, .locale-switch, .scene-heading-line small, .scene-index button span, .quote small, .count {
  font-family: var(--font-ui);
}

.home-method-steps span, .quote strong {
  font-family: Fraunces, Georgia, serif;
}

.home-narrative h1, .home-cinematic-image figcaption > span:first-child, .home-auth-card h2, .home-method-heading h2, .home-method-steps h3, .library h1, .library-empty h2, .document-heading h2, .document-empty h3, .empty-video h2, .entity-card h3, .entity-summary-card > strong, .entity-summary-title strong {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-kerning: normal;
}

.script-content, .node-main p, .node-content-button, .node-speaker, .scene-heading-line h3, .scene-heading-line strong, .node-editor textarea, .node-insert-editor textarea, .editor textarea {
  font-family: var(--font-manuscript);
  font-kerning: normal;
}

.timecode, .node-time, .episode-number, .home-available-index {
  font-variant-numeric: tabular-nums;
}

html[lang="en-US"] .home-narrative h1 {
  letter-spacing: -.045em;
  max-width: 840px;
  font-size: clamp(48px, 5vw, 70px);
  line-height: 1.12;
}

html[lang="en-US"] .home-auth-card h2, html[lang="en-US"] .home-method-heading h2, html[lang="en-US"] .library h1 {
  letter-spacing: -.035em;
  line-height: 1.15;
}

html[lang="en-US"] .home-auth-card h2 {
  margin-bottom: 4px;
}

html[lang="en-US"] .home-method-heading h2 {
  max-width: 800px;
}

html[lang="en-US"] .home-kicker, html[lang="en-US"] .eyebrow, html[lang="en-US"] .film-index {
  letter-spacing: .12em;
}

html[lang="en-US"] .script-content, html[lang="en-US"] .node-main p, html[lang="en-US"] .node-content-button {
  font-size: 16px;
  line-height: 1.85;
}

html[lang="en-US"] .node-speaker {
  font-size: 13px;
  line-height: 1.5;
}

html[lang="en-US"] .scene-heading-line h3, html[lang="en-US"] .scene-heading-line strong {
  line-height: 1.4;
}

html[lang="en-US"] .editor textarea, html[lang="en-US"] .node-editor textarea, html[lang="en-US"] .node-insert-editor textarea {
  font-size: 16px;
  line-height: 1.8;
}

@media (width <= 760px) {
  .home-lead br {
    display: block;
  }

  html[lang="en-US"] .home-narrative h1 {
    letter-spacing: -.04em;
    font-size: clamp(35px, 9vw, 46px);
    line-height: 1.15;
  }

  html[lang="en-US"] .home-auth-card h2 {
    font-size: 24px;
  }
}

/* packages/breakdown/src/styles/shortory-assistant.css */
.shortory-assistant {
  display: flex;
  border-left: 1px solid var(--line);
  color: var(--ink);
  z-index: 3;
  background: #fff;
  flex-direction: column;
  flex: 0 0 384px;
  width: 384px;
  min-width: 0;
  height: 100%;
  font-family: Noto Sans SC, PingFang SC, sans-serif;
}

.shortory-assistant-context {
  background: #faf9f5;
  border-bottom: 1px solid #eae7de;
  flex: none;
  padding: 8px 12px 9px;
}

.shortory-assistant-project {
  display: flex;
  background: #faf9f5;
  align-items:  center;
  gap: 8px;
  min-width: 0;
  padding: 0 0 7px;
}

.shortory-assistant-project strong {
  color: #5d625c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.shortory-assistant-close {
  display: grid;
  color: #8c918a;
  background: none;
  border: 0;
  border-radius: 8px;
  flex: none;
  place-items:  center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}

.shortory-assistant-close:hover {
  color: var(--ink);
  background: #f7f5ee;
}

.shortory-assistant-stages {
  display: flex;
  flex: none;
  gap: 3px;
}

.shortory-assistant-stages span {
  background: #dfe1dd;
  border-radius: 50%;
  width: 6px;
  height: 6px;
}

.shortory-assistant-stages span.active {
  background: #bd8554;
}

.shortory-assistant-conversation {
  position: relative;
  display: flex;
  cursor: pointer;
  background: #fff;
  border: 1px solid #e7e4dc;
  border-radius: 10px;
  flex-direction: row;
  align-items:  center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 10px;
  box-shadow: 0 1px 2px #17211f08;
}

.shortory-assistant-conversation-row {
  display: flex;
  align-items:  center;
  gap: 6px;
}

.shortory-assistant-conversation-row > .shortory-assistant-conversation {
  flex: 1;
  min-width: 0;
}

.shortory-assistant-icon {
  display: grid;
  color: #7d736a;
  background: #fff;
  border: 1px solid #e7e4dc;
  border-radius: 10px;
  flex: none;
  place-items:  center;
  width: 34px;
  height: 38px;
  min-height: 38px;
  padding: 0;
}

.shortory-assistant-icon:not(:disabled):hover {
  color: #a96531;
  border-color: #d6c4ad;
}

.shortory-assistant-icon:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.shortory-assistant-conversation:focus-within {
  outline: 2px solid #d9b89855;
  border-color: #ba895e;
}

.shortory-assistant-conversation-icon {
  display: grid;
  color: #a96531;
  flex: none;
  place-items:  center;
  width: 22px;
  height: 22px;
}

.shortory-assistant-conversation-text {
  text-align: left;
  flex: 1;
  min-width: 0;
}

.shortory-assistant-conversation strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #28312b;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.shortory-assistant-conversation > svg {
  color: #939a95;
  flex: none;
}

.shortory-assistant-conversation select {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  inset: 0;
}

.shortory-assistant-conversation select:disabled {
  cursor: default;
}

.shortory-assistant-task-status {
  display: flex;
  color: #7d806f;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items:  center;
  gap: 5px;
  margin: 8px 1px 0;
  font-size: 11px;
}

.shortory-assistant-task-status.status-running {
  color: #a96531;
}

.shortory-assistant-task-status.status-failed {
  color: #a94639;
}

.shortory-assistant-task-status.status-running:before {
  content: "";
  animation: 2s ease-in-out infinite shortory-progress-pulse;
  background: #c77c3d;
  border-radius: 50%;
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 4px #f6e8da;
}

.shortory-assistant-task-status button {
  color: #95673e;
  background: none;
  border: 0;
  padding: 3px 5px;
  font-size: 11px;
}

.shortory-assistant-task-status p {
  color: #a94639;
  overflow-wrap: anywhere;
  width: 100%;
  font-size: 11px;
  line-height: 1.6;
}

.shortory-assistant-stream-wrap {
  position: relative;
  background: linear-gradient(#fff 0%, #fffdf9 100%);
  flex: 1;
  min-height: 0;
}

.shortory-assistant-stream {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #d8d4cc transparent;
  scrollbar-gutter: stable;
  height: 100%;
  padding: 15px 17px 34px;
}

.shortory-chat-divider {
  display: flex;
  color: #a1a8ad;
  letter-spacing: .01em;
  white-space: nowrap;
  align-items:  center;
  gap: 12px;
  margin: 13px 0 17px;
  font-size: 11px;
}

.shortory-chat-divider:before, .shortory-chat-divider:after {
  content: "";
  background: #e4e7e6;
  flex: 1;
  height: 1px;
}

.shortory-chat-user-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.shortory-chat-user-bubble {
  color: #26322b;
  overflow-wrap: anywhere;
  background: #f4f0e9;
  border-radius: 15px 15px 4px;
  max-width: 88%;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.75;
}

.shortory-chat-agent-message {
  color: #1e2924;
  overflow-wrap: anywhere;
  margin: 13px 0 22px;
  font-size: 13px;
  line-height: 1.85;
}

.shortory-chat-agent-message p {
  margin: 0 0 9px;
}

.shortory-chat-agent-message p:last-child {
  margin-bottom: 0;
}

.shortory-chat-agent-message ul, .shortory-chat-agent-message ol {
  margin: 7px 0 10px;
  padding-left: 19px;
}

.shortory-chat-agent-message li {
  margin: 3px 0;
  padding-left: 2px;
}

.shortory-chat-agent-message pre {
  overflow: auto;
  background: #f7f5ef;
  border-radius: 8px;
  margin: 8px 0;
  padding: 10px;
  font-size: 11px;
  line-height: 1.5;
}

.shortory-chat-agent-message code {
  font-size: 11px;
}

.shortory-chat-agent-message a {
  color: #a96531;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shortory-chat-agent-message > small {
  display: block;
  color: #98998f;
  margin-top: 6px;
  font-size: 10px;
}

.shortory-chat-process {
  color: #8e9798;
  margin: 9px 0 15px;
}

.shortory-chat-process > summary, .shortory-chat-process-head {
  display: flex;
  list-style: none;
  cursor: pointer;
  align-items:  center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  padding: 5px 3px;
  font-size: 11px;
}

.shortory-chat-process-head {
  cursor: default;
}

.shortory-chat-process.is-active {
  background: linear-gradient(145deg, #fffaf3 0%, #fffdf9 72%);
  border: 1px solid #eedac5;
  border-radius: 13px;
  padding: 9px 12px 8px;
  box-shadow: 0 5px 17px #9a63340d;
}

.shortory-chat-process.is-active .shortory-chat-process-head span:nth-child(2) {
  color: #96552c;
  font-weight: 700;
}

.shortory-chat-process-mark {
  display: grid;
  color: #9d836d;
  place-items:  center;
}

.shortory-chat-process.is-active .shortory-chat-process-mark {
  color: #b8733d;
  animation: 2.4s ease-in-out infinite shortory-icon-float;
}

.shortory-chat-process > summary::-webkit-details-marker {
  display: none;
}

.shortory-chat-process > summary span {
  color: #697980;
  font-weight: 550;
}

.shortory-chat-process > summary small {
  color: #9c9da2;
  font-size: 10px;
}

.shortory-chat-process > summary em {
  color: #aaa9a4;
  font-size: 10px;
  font-style: normal;
}

.shortory-chat-process > summary svg {
  transition: transform .15s;
}

.shortory-chat-process[open] > summary svg {
  transform: rotate(180deg);
}

.shortory-chat-process-steps {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d8cbbd transparent;
  border-left: 1px solid #e6e8e4;
  max-height: 320px;
  margin: 6px 0 0 8px;
  padding: 3px 0 2px 12px;
}

.shortory-chat-process-steps:focus-visible {
  outline: 2px solid #c2895c;
  outline-offset: 3px;
  border-radius: 4px;
}

.shortory-chat-process.is-active .shortory-chat-process-steps {
  border-left-color: #e8c9a9;
}

.shortory-chat-step {
  position: relative;
  display: flex;
  color: #66736d;
  gap: 9px;
  padding: 6px 2px 7px 0;
  font-size: 11px;
}

.shortory-chat-step-icon {
  display: grid;
  color: #9b8069;
  background: #f2f0eb;
  border-radius: 7px;
  flex: none;
  place-items:  center;
  width: 21px;
  height: 21px;
}

.shortory-chat-step.pending .shortory-chat-step-icon {
  color: #aa6637;
  background: #f9e9d7;
}

.shortory-chat-step.done .shortory-chat-step-icon {
  color: #548565;
  background: #e7f2e9;
}

.shortory-chat-step.error .shortory-chat-step-icon {
  color: #ac4b3e;
  background: #fae9e6;
}

.shortory-chat-step-dot {
  position: absolute;
  background: #ba9a75;
  border-radius: 50%;
  width: 5px;
  height: 5px;
  top: 12px;
  left: -15px;
}

.shortory-chat-step.pending .shortory-chat-step-dot {
  background: #ce8a42;
  box-shadow: 0 0 0 3px #f6ebdc;
}

.shortory-chat-step.done .shortory-chat-step-dot {
  background: #78a284;
}

.shortory-chat-step.error .shortory-chat-step-dot {
  background: #b64f41;
}

.shortory-chat-step.uncertain .shortory-chat-step-dot {
  background: #b77b32;
  box-shadow: 0 0 0 3px #f6ebdc;
}

.shortory-chat-step strong {
  overflow-wrap: anywhere;
  font-weight: 550;
}

.shortory-chat-step p {
  color: #78837c;
  overflow-wrap: anywhere;
  margin-top: 4px;
  line-height: 1.5;
}

.shortory-chat-step.error p {
  color: #a94639;
}

.shortory-chat-step small {
  display: block;
  color: #a1a6a1;
  margin-top: 3px;
  font-size: 10px;
}

.shortory-chat-empty {
  display: flex;
  text-align: center;
  color: #969e98;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  gap: 12px;
  min-height: 160px;
  padding: 25px;
  font-size: 12px;
  line-height: 1.8;
}

.shortory-chat-jump {
  position: absolute;
  color: #516258;
  background: #fff;
  border: 1px solid #e3e1d9;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  padding: 0;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 5px 18px #17211f1c;
}

.shortory-chat-jump:hover {
  background: #f7f5ee;
}

.shortory-chat-composer {
  background: #faf9f5;
  border-top: 1px solid #eae7de;
  flex: none;
  padding: 10px 12px;
  box-shadow: 0 -6px 19px #2d211008;
}

.shortory-chat-input-wrap {
  display: flex;
  background: #fff;
  border: 1px solid #dfd8cf;
  border-radius: 14px;
  flex-direction: column;
  gap: 2px;
  padding: 8px 8px 8px 12px;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 2px 8px #1f261809;
}

.shortory-chat-input-wrap:focus-within {
  border-color: #b97748;
  box-shadow: 0 0 0 3px #e4b99344;
}

.shortory-chat-input-wrap textarea {
  resize: none;
  field-sizing: content;
  overflow-y: auto;
  scrollbar-width: thin;
  outline: 0;
  color: #29342d;
  font: inherit;
  background: none;
  border: 0;
  width: 100%;
  min-height: 24px;
  max-height: 180px;
  padding: 2px 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.shortory-chat-input-wrap textarea::placeholder {
  color: #a8aaa3;
}

.shortory-chat-input-wrap textarea:disabled {
  cursor: not-allowed;
}

.shortory-chat-input-wrap button {
  display: grid;
  color: #fff;
  background: #a96839;
  border: 0;
  border-radius: 50%;
  flex: none;
  place-items:  center;
  width: 32px;
  height: 32px;
  transition: background .15s, transform .15s;
}

.shortory-chat-input-wrap button:not(:disabled):hover {
  background: #8a4f29;
  transform: translateY(-1px);
}

.shortory-chat-input-wrap button:disabled {
  color: #aaa8a2;
  cursor: not-allowed;
  background: #ddd9d2;
}

.shortory-chat-input-actions {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 8px;
  min-height: 32px;
}

.shortory-quota {
  position: relative;
  display: inline-flex;
}

.shortory-chat-input-wrap .shortory-quota-ring {
  color: inherit;
  background: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
}

.shortory-chat-input-wrap .shortory-quota-ring:not(:disabled):hover {
  background: #f4eee6;
  transform: none;
}

.shortory-quota-ring circle {
  fill: none;
  stroke-width: 2.4;
}

.shortory-quota-ring circle:first-child {
  stroke: #ebe4da;
}

.shortory-quota-ring circle:last-child {
  stroke: #a96839;
  stroke-linecap: round;
  transform-origin: center;
  transition: stroke-dashoffset .3s;
  transform: rotate(-90deg);
}

.shortory-quota.is-empty .shortory-quota-ring circle:last-child {
  stroke: #c0503a;
}

.shortory-quota-tip {
  position: absolute;
  z-index: 5;
  display: none;
  color: #d6d2ca;
  pointer-events: none;
  background: #22201c;
  border-radius: 8px;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: 240px;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.45;
  bottom: calc(100% + 8px);
  left: 0;
  box-shadow: 0 6px 18px #0002;
}

.shortory-quota-tip strong {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.shortory-quota:hover .shortory-quota-tip, .shortory-quota:focus-within .shortory-quota-tip {
  display: flex;
}

.shortory-quota-card {
  position: absolute;
  z-index: 6;
  color: #29342d;
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 12px;
  width: min(300px, 100vw - 48px);
  padding: 12px 14px;
  font-size: 12px;
  bottom: calc(100% + 10px);
  left: -4px;
  box-shadow: 0 10px 30px #2d21101f;
}

.shortory-quota-card header {
  display: flex;
  color: #7d776d;
  justify-content: space-between;
  align-items:  center;
  gap: 8px;
  margin-bottom: 10px;
}

.shortory-chat-input-wrap .shortory-quota-card header button {
  color: #29342d;
  background: none;
  border-radius: 0;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
}

.shortory-chat-input-wrap .shortory-quota-card header button:hover {
  color: #8a4f29;
  background: none;
  transform: none;
}

.shortory-quota-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.shortory-quota-row span {
  font-weight: 600;
}

.shortory-quota-row small {
  color: #8b877e;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.shortory-quota-bar {
  overflow: hidden;
  background: #eeeae3;
  border-radius: 3px;
  height: 5px;
  margin: 7px 0 10px;
}

.shortory-quota-bar span {
  display: block;
  background: #a96839;
  border-radius: 3px;
  height: 100%;
}

.shortory-quota.is-empty .shortory-quota-bar span {
  background: #c0503a;
}

.shortory-quota-card p {
  color: #9b9c95;
  margin: 0;
  font-size: 11px;
}

.shortory-chat-meta {
  display: flex;
  color: #9b9c95;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items:  center;
  gap: 4px 10px;
  margin: 6px 2px 0;
  font-size: 11px;
  line-height: 1.5;
}

.shortory-chat-hint {
  display: inline-flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 2px 8px;
}

@keyframes shortory-progress-pulse {
  50% {
    box-shadow: 0 0 0 7px #f6e8da44;
    opacity: .68;
  }
}

@keyframes shortory-icon-float {
  50% {
    transform: translateY(-2px);
    opacity: .72;
  }
}

@media (width <= 1100px) {
  .shortory-assistant {
    position: absolute;
    z-index: 21;
    width: min(384px, 100vw);
    height: auto;
    top: 0;
    bottom: 0;
    right: 0;
    box-shadow: -12px 0 36px #17211f24;
  }
}

@media (width <= 760px) {
  .shortory-assistant {
    width: 100vw;
    max-width: 100vw;
  }

  .shortory-assistant-context {
    padding: 9px 10px;
  }

  .shortory-assistant-stream {
    padding: 11px 14px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shortory-chat-process > summary svg, .shortory-chat-input-wrap, .shortory-chat-input-wrap button {
    transition: none;
  }

  .shortory-chat-jump {
    scroll-behavior: auto;
  }

  .shortory-assistant-task-status.status-running:before, .shortory-chat-process.is-active .shortory-chat-process-mark {
    animation: none;
  }
}

.shortory-conversation-mode {
  display: flex;
  color: #8b7865;
  justify-content: space-between;
  align-items:  center;
  gap: 8px;
  margin: 6px 2px 0;
  font-size: 11px;
  line-height: 1.5;
}

.shortory-conversation-mode > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.shortory-conversation-mode button {
  color: #985e31;
  background: #f4ecdf;
  border: 0;
  flex: none;
  padding: 3px 6px;
  font-size: 10px;
}

@media (width <= 760px) {
  .shortory-chat-composer {
    padding-bottom: max(13px, env(safe-area-inset-bottom));
    overflow: visible;
    max-height: 48dvh;
  }

  .shortory-chat-input-wrap textarea {
    font-size: 16px;
  }

  .shortory-chat-input-wrap button, .shortory-assistant-close {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
}

.season-job-episodes {
  color: #887353;
  background: #fffdf9;
  border: 1px solid #e9e2d5;
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 11px;
}

.season-job-episodes summary {
  cursor: pointer;
}

.season-job-episodes > div {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  overflow: auto;
  gap: 4px;
  max-height: 130px;
  margin-top: 9px;
}

.season-job-episodes button {
  color: #a19078;
  background: #f7f2e9;
  border-radius: 4px;
  min-width: 0;
  min-height: 25px;
  padding: 4px 0;
  font-size: 10px;
}

.season-job-episodes button.completed {
  color: #4e7756;
  background: #eaf3ea;
  border-color: #c9ddc9;
}

.season-job-episodes button[aria-current="true"] {
  outline: 2px solid #b27a46;
  outline-offset: 0;
}

.season-job-episodes p {
  margin-top: 8px;
  line-height: 1.6;
}

@media (width <= 760px) {
  .season-job-episodes > div {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .season-job-episodes button {
    min-height: 32px;
  }
}

.shortory-chat-agent-message {
  min-width: 0;
  max-width: 100%;
}

.shortory-message-table {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbbba7 transparent;
  background: #fffefa;
  border: 1px solid #e5ddd1;
  border-radius: 8px;
  max-width: 100%;
  margin: 12px 0 16px;
}

.shortory-message-table:focus-visible {
  outline: 2px solid #b77b46;
  outline-offset: 2px;
}

.shortory-message-table table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 380px;
  font-size: 12px;
  line-height: 1.7;
}

.shortory-message-table th, .shortory-message-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #eae3d9;
  border-right: 1px solid #eae3d9;
  min-width: 72px;
  max-width: 280px;
  padding: 9px 12px;
}

.shortory-message-table th {
  color: #5f4a37;
  text-align: left;
  background: #f3eee5;
  font-weight: 600;
}

.shortory-message-table tbody tr:nth-child(2n) {
  background: #faf7f1;
}

.shortory-message-table tr > :last-child {
  border-right: 0;
}

.shortory-message-table tbody tr:last-child > td {
  border-bottom: 0;
}

.shortory-message-table p {
  margin: 0;
}

/* packages/web/src/styles/source/writer-v2.css */
.wv2-list, .wv2-project-list, .wv2-workspace, .wv2-dialog {
  --wv2-paper: #fffdf8;
  --wv2-bg: #f3f0e9;
  --wv2-ink: #302e28;
  --wv2-muted: #756f62;
  --wv2-line: #e4dfd4;
  --wv2-accent: #9b621d;
  --wv2-soft: #f7e9cb;
  color: var(--wv2-ink);
  background: var(--wv2-bg);
  font-family: Noto Sans SC, PingFang SC, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, sans-serif;
}

.dark .wv2-list, .dark .wv2-project-list, .dark .wv2-workspace, .dark .wv2-dialog {
  --wv2-paper: #20252a;
  --wv2-bg: #171c20;
  --wv2-ink: #e6e2d8;
  --wv2-muted: #b5b1a7;
  --wv2-line: #383e44;
  --wv2-accent: #e8b874;
  --wv2-soft: #373022;
}

.wv2-list button {
  display: inline-flex;
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  justify-content: center;
  align-items:  center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  transition: background .15s, color .15s;
  font-size: 13px;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)) {
  display: inline-flex;
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  justify-content: center;
  align-items:  center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  transition: background .15s, color .15s;
  font-size: 13px;
}

:-moz-any(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)) {
  display: inline-flex;
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  justify-content: center;
  align-items:  center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  transition: background .15s, color .15s;
  font-size: 13px;
}

:is(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)) {
  display: inline-flex;
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  justify-content: center;
  align-items:  center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  transition: background .15s, color .15s;
  font-size: 13px;
}

.wv2-list button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):disabled {
  opacity: .45;
  cursor: not-allowed;
}

:-moz-any(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):disabled {
  opacity: .45;
  cursor: not-allowed;
}

:is(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):disabled {
  opacity: .45;
  cursor: not-allowed;
}

.wv2-list button:hover:not(:disabled) {
  background: var(--wv2-soft);
}

:-webkit-any(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):hover:not(:disabled) {
  background: var(--wv2-soft);
}

:-moz-any(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):hover:not(:disabled) {
  background: var(--wv2-soft);
}

:is(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):hover:not(:disabled) {
  background: var(--wv2-soft);
}

.wv2-list input:focus {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

.wv2-list button:focus-visible {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):focus-visible {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:-moz-any(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):focus-visible {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:is(.wv2-workspace, .wv2-dialog) button:where(:not(.wv2-shared-pane *)):focus-visible {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) input:where(:not(.wv2-shared-pane *)):focus {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:-moz-any(.wv2-workspace, .wv2-dialog) input:where(:not(.wv2-shared-pane *)):focus {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:is(.wv2-workspace, .wv2-dialog) input:where(:not(.wv2-shared-pane *)):focus {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) textarea:where(:not(.wv2-shared-pane *)):focus {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:-moz-any(.wv2-workspace, .wv2-dialog) textarea:where(:not(.wv2-shared-pane *)):focus {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

:is(.wv2-workspace, .wv2-dialog) textarea:where(:not(.wv2-shared-pane *)):focus {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

.wv2-list .wv2-primary {
  background: var(--wv2-ink);
  color: var(--wv2-paper);
  border-color: #0000;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) .wv2-primary {
  background: var(--wv2-ink);
  color: var(--wv2-paper);
  border-color: #0000;
}

:-moz-any(.wv2-workspace, .wv2-dialog) .wv2-primary {
  background: var(--wv2-ink);
  color: var(--wv2-paper);
  border-color: #0000;
}

:is(.wv2-workspace, .wv2-dialog) .wv2-primary {
  background: var(--wv2-ink);
  color: var(--wv2-paper);
  border-color: #0000;
}

.wv2-list .wv2-primary:hover:not(:disabled) {
  background: var(--wv2-accent);
  color: var(--wv2-paper);
}

:-webkit-any(.wv2-workspace, .wv2-dialog) .wv2-primary:hover:not(:disabled) {
  background: var(--wv2-accent);
  color: var(--wv2-paper);
}

:-moz-any(.wv2-workspace, .wv2-dialog) .wv2-primary:hover:not(:disabled) {
  background: var(--wv2-accent);
  color: var(--wv2-paper);
}

:is(.wv2-workspace, .wv2-dialog) .wv2-primary:hover:not(:disabled) {
  background: var(--wv2-accent);
  color: var(--wv2-paper);
}

.wv2-list input, .wv2-list select {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) input:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:-moz-any(.wv2-workspace, .wv2-dialog) input:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:is(.wv2-workspace, .wv2-dialog) input:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) select:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:-moz-any(.wv2-workspace, .wv2-dialog) select:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:is(.wv2-workspace, .wv2-dialog) select:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:-webkit-any(.wv2-workspace, .wv2-dialog) textarea:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:-moz-any(.wv2-workspace, .wv2-dialog) textarea:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

:is(.wv2-workspace, .wv2-dialog) textarea:where(:not(.wv2-shared-pane *)) {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  border: 1px solid var(--wv2-line);
  border-radius: 9px;
  min-width: 0;
  padding: 9px 11px;
  font-size: 14px;
}

.wv2-list {
  overflow: auto;
  height: 100%;
  padding: 40px clamp(18px, 4vw, 64px);
}

.wv2-list > header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 20px;
  margin-bottom: 28px;
}

.wv2-list h1 {
  letter-spacing: .04em;
  font-family: Noto Serif SC, Songti SC, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, serif;
  font-size: 36px;
  font-weight: 600;
}

.wv2-list h1 span {
  color: var(--wv2-accent);
  margin-left: 8px;
  font-family: Georgia, serif;
  font-size: 23px;
}

.wv2-eyebrow {
  letter-spacing: .2em;
  color: var(--wv2-accent);
  margin-bottom: 8px;
  font-size: 11px;
}

.wv2-muted {
  color: var(--wv2-muted);
  margin-top: 8px;
  font-size: 14px;
}

.wv2-list-filters {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 12px;
  margin-bottom: 24px;
}

.wv2-list-filters > div {
  display: flex;
  gap: 4px;
}

.wv2-list-filters button[aria-pressed="true"] {
  background: var(--wv2-soft);
  color: var(--wv2-accent);
  border-color: var(--wv2-accent);
}

.wv2-list-filters input {
  min-width: 220px;
  margin-left: auto;
}

.wv2-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.wv2-project-card {
  background: var(--wv2-paper);
  border: 1px solid var(--wv2-line);
  border-radius: 16px;
  min-height: 225px;
  padding: 24px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 20px -16px #51462e;
}

.wv2-project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -20px #51462e;
}

.wv2-card-motif {
  display: flex;
  color: var(--wv2-accent);
  background: linear-gradient(135deg, var(--wv2-soft), transparent);
  border: 1px solid var(--wv2-line);
  border-radius: 3px 9px 9px 3px;
  justify-content: center;
  align-items:  center;
  width: 52px;
  height: 62px;
  margin-bottom: 22px;
}

.wv2-project-card h2 {
  overflow-wrap: anywhere;
  margin: 8px 0 20px;
  font-family: Noto Serif SC, Songti SC, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, serif;
  font-size: 21px;
  font-weight: 600;
}

.wv2-project-card small, .wv2-project-card span {
  color: var(--wv2-muted);
  font-size: 12px;
}

.wv2-workspace {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.wv2-workspace-header {
  border-bottom: 1px solid var(--wv2-line);
  display: flex;
  background: var(--wv2-paper);
  flex-shrink: 0;
  align-items:  center;
  gap: 12px;
  height: 64px;
  padding: 0 18px;
}

.wv2-title {
  flex: 1;
  min-width: 0;
}

.wv2-title h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
}

.wv2-title small {
  color: var(--wv2-accent);
  letter-spacing: .12em;
  font-size: 10px;
}

.wv2-header-actions {
  display: flex;
  align-items:  center;
  gap: 7px;
}

.wv2-workspace-body {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.wv2-work-tree {
  border-right: 1px solid var(--wv2-line);
  overflow: auto;
  background: var(--wv2-paper);
  flex-shrink: 0;
  width: 268px;
  padding: 22px 16px;
}

.wv2-work-tree h2 {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
}

.wv2-work-tree h2 button {
  display: none;
}

.wv2-work-tree > button {
  display: flex;
  text-align: left;
  border: none;
  justify-content: space-between;
  width: 100%;
  margin: 2px 0;
  padding: 10px 8px;
  font-size: 14px;
}

.wv2-work-tree > button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wv2-work-tree > button small {
  color: var(--wv2-muted);
  flex-shrink: 0;
  font-size: 11px;
}

.wv2-work-tree > button[aria-current="page"] {
  background: var(--wv2-soft);
  color: var(--wv2-accent);
}

.wv2-scene-nav {
  border-top: 1px solid var(--wv2-line);
  margin-top: 24px;
  padding-top: 16px;
}

.wv2-scene-nav h3 {
  color: var(--wv2-muted);
  margin-bottom: 10px;
  font-size: 12px;
}

.wv2-scene-nav button {
  display: block;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: none;
  max-width: 100%;
  font-size: 12px;
}

.wv2-center {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.wv2-manuscript-heading {
  display: flex;
  border-bottom: 1px solid var(--wv2-line);
  flex-shrink: 0;
  justify-content: space-between;
  align-items:  center;
  gap: 12px;
  padding: 16px 24px;
}

.wv2-manuscript-heading h2 {
  font-size: 15px;
  font-weight: 600;
}

.wv2-manuscript-heading small {
  color: var(--wv2-muted);
  font-size: 11px;
}

.wv2-manuscript-heading > div:last-child {
  display: flex;
  gap: 5px;
}

.wv2-manuscript-heading button[aria-pressed="true"] {
  background: var(--wv2-paper);
  color: var(--wv2-accent);
}

.wv2-writing-area {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 20px clamp(10px, 3vw, 42px);
}

.wv2-editor {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

.wv2-editor-controls {
  position: sticky;
  z-index: 5;
  display: flex;
  pointer-events: none;
  background: none;
  flex-direction: column;
  align-items:  center;
  height: 0;
  top: 12px;
}

.wv2-node-toolbar {
  position: relative;
  display: flex;
  border: 1px solid var(--wv2-line);
  background: var(--wv2-paper);
  pointer-events: auto;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  flex: none;
  justify-content: flex-start;
  align-items:  center;
  gap: 2px;
  width: 640px;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 4px 12px;
  box-shadow: 0 2px 4px -2px #413e3520, 0 10px 24px -18px #413e3570;
}

.wv2-node-toolbar::-webkit-scrollbar {
  display: none;
}

.wv2-node-toolbar button {
  display: flex;
  color: var(--wv2-muted);
  border: 0;
  border-radius: 12px;
  flex-direction: column;
  flex-shrink: 0;
  gap: 2px;
  min-height: 44px;
  padding: 4px 6px;
  font-size: 11px;
}

.wv2-node-toolbar .wv2-node-type-button {
  position: relative;
  flex: 1 0 44px;
  min-width: 44px;
  padding-bottom: 6px;
  line-height: 1.4;
}

.wv2-node-toolbar svg {
  flex-shrink: 0;
}

.wv2-node-toolbar .wv2-node-type-button[aria-pressed="true"] {
  color: var(--wv2-ink);
  background: none;
  font-weight: 600;
}

.wv2-node-type-button[aria-pressed="true"]:after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  height: 2px;
  bottom: 3px;
  left: calc(50% - 10px);
  right: calc(50% - 10px);
}

.wv2-prose {
  background: var(--wv2-paper);
  border: 1px solid var(--wv2-line);
  outline: none;
  font-size: var(--wv2-font-size, 18px);
  min-height: 70vh;
  padding: 86px clamp(24px, 5vw, 70px) 46px;
  font-family: Noto Serif SC, Songti SC, SimSun, serif;
  line-height: 1.9;
  box-shadow: 0 3px 18px -12px #51462e;
}

.wv2-row {
  position: relative;
  display: flex;
  align-items: baseline;
  margin: 4px 0;
  padding: 3px 0;
}

.wv2-row-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}

.wv2-row-tools {
  position: absolute;
  display: flex;
  opacity: 0;
  color: var(--wv2-muted);
  align-items:  center;
  width: 20px;
  top: 9px;
  left: -40px;
}

.wv2-row:hover .wv2-row-tools, .wv2-row.ProseMirror-selectednode .wv2-row-tools {
  opacity: 1;
}

.wv2-row-tools > span {
  display: inline-flex;
  cursor: grab;
  touch-action: none;
  justify-content: center;
  align-items:  center;
  width: 20px;
  height: 24px;
}

.wv2-row-tools > span:active {
  cursor: grabbing;
}

.wv2-row-tools > span:focus-visible {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 1px;
  border-radius: 4px;
}

.wv2-row:focus-within .wv2-row-tools {
  opacity: 1;
}

.wv2-row-symbol {
  position: absolute;
  color: var(--wv2-muted);
  font-family: sans-serif;
  font-size: 14px;
  left: -18px;
}

.wv2-row-label {
  position: absolute;
  color: var(--wv2-muted);
  opacity: 0;
  font-family: sans-serif;
  font-size: 9px;
  top: 10px;
  right: -48px;
}

.wv2-row:focus-within .wv2-row-label {
  opacity: 1;
}

.wv2-row-speaker {
  margin-top: 16px;
  margin-bottom: 0;
  font-weight: 600;
}

.wv2-row-dialogue {
  margin-top: 0;
  padding-left: 20px;
}

.wv2-row-dialogue .wv2-row-symbol {
  left: 2px;
}

.wv2-row-scene_heading {
  letter-spacing: .025em;
  border-bottom: 1px solid var(--wv2-line);
  margin: 25px 0 14px;
  padding-bottom: 9px;
  font-weight: 600;
}

.wv2-row-parenthetical {
  color: var(--wv2-muted);
  margin: 0;
  padding-left: 20px;
  font-style: italic;
}

.wv2-row-transition {
  text-align: right;
  color: var(--wv2-muted);
}

.wv2-row-note {
  color: var(--wv2-muted);
  background: var(--wv2-bg);
  border-left: 2px solid var(--wv2-accent);
  padding: 8px 14px;
  font-family: sans-serif;
  font-size: 14px;
}

.wv2-row-on_screen_text {
  font-weight: 600;
}

.wv2-row-sound {
  font-style: italic;
}

.wv2-row-timeline_marker {
  border-bottom: 1px dashed var(--wv2-line);
  font-size: 14px;
}

.wv2-entity-ref {
  background: var(--wv2-soft);
  color: var(--wv2-accent);
  border-radius: 3px;
}

.wv2-keyboard-help {
  display: flex;
  color: var(--wv2-muted);
  flex-wrap: wrap;
  justify-content: center;
  align-items:  center;
  gap: 7px;
  padding: 16px 0;
  font-size: 10px;
}

.wv2-keyboard-help kbd {
  border: 1px solid var(--wv2-line);
  background: var(--wv2-paper);
  border-radius: 4px;
  padding: 2px 5px;
  font-family: monospace;
}

.wv2-statusbar {
  display: flex;
  background: var(--wv2-paper);
  border-top: 1px solid var(--wv2-line);
  color: var(--wv2-muted);
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 12px;
  padding: 6px 18px;
  font-size: 10px;
}

.wv2-statusbar span {
  display: flex;
  align-items:  center;
  gap: 4px;
}

.wv2-agent {
  border-left: 1px solid var(--wv2-line);
  display: flex;
  background: var(--wv2-paper);
  flex-direction: column;
  flex-shrink: 0;
  gap: 15px;
  width: 290px;
  padding: 16px;
}

.wv2-agent > header {
  display: flex;
  border-bottom: 1px solid var(--wv2-line);
  align-items:  center;
  gap: 8px;
  padding-bottom: 13px;
}

.wv2-agent h2 {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}

.wv2-agent > header button {
  display: none;
}

.wv2-agent-message {
  border: 1px dashed var(--wv2-line);
  color: var(--wv2-muted);
  border-radius: 12px;
  padding: 15px;
  font-size: 13px;
  line-height: 1.8;
}

.wv2-agent-message strong {
  color: var(--wv2-ink);
  font-family: serif;
  font-size: 17px;
}

.wv2-agent-message p {
  margin-top: 8px;
}

.wv2-agent-message small {
  display: block;
  margin-top: 15px;
  font-size: 11px;
}

.wv2-generation-panel form {
  display: flex;
  border: 1px solid var(--wv2-line);
  border-radius: 12px;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding: 10px;
}

.wv2-generation-panel textarea {
  resize: vertical;
  background: none;
  border: 0;
  width: 100%;
  height: 130px;
  line-height: 1.8;
}

.wv2-generation-panel form > div {
  display: flex;
  justify-content: flex-end;
}

.wv2-import-trigger {
  color: var(--wv2-muted);
}

.wv2-generation {
  display: flex;
  position: relative;
  flex-direction: column;
  height: 100%;
  min-height: 200px;
}

.wv2-generation-caption {
  display: flex;
  color: var(--wv2-muted);
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 12px;
  font-size: 12px;
}

.wv2-generation-caption > span {
  display: flex;
  align-items:  center;
  gap: 7px;
}

.wv2-live-dot {
  background: var(--wv2-accent);
  animation: 1.6s infinite wv2-pulse;
  border-radius: 100%;
  width: 6px;
  height: 6px;
}

.wv2-stream-paper {
  overflow: auto;
  background: var(--wv2-paper);
  border: 1px solid var(--wv2-line);
  font-size: var(--wv2-font-size, 18px);
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: auto;
  padding: 36px clamp(20px, 5vw, 60px);
  font-family: Noto Serif SC, Songti SC, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, serif;
  line-height: 1.9;
}

.wv2-stream-node {
  margin: 8px 0;
}

.wv2-stream-node p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.wv2-stream-node small {
  color: var(--wv2-muted);
  font-family: sans-serif;
  font-size: 10px;
}

.wv2-stream-speaker {
  display: block;
  margin: 14px 0 3px;
}

.wv2-caret {
  display: inline-block;
  background: var(--wv2-accent);
  vertical-align: -.12em;
  animation: 1s steps(2, end) infinite wv2-pulse;
  width: 2px;
  height: 1em;
  margin-left: 3px;
}

.wv2-follow {
  position: absolute;
  background: var(--wv2-paper);
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 3px 16px #0002;
}

.wv2-adopt {
  display: flex;
  justify-content: flex-end;
  align-items:  center;
  gap: 10px;
  padding-top: 12px;
}

.wv2-adopt small {
  color: var(--wv2-muted);
  font-size: 12px;
}

.wv2-empty {
  text-align: center;
  color: #756f62;
  padding: 60px 20px;
  font-size: 14px;
}

.dark .wv2-empty {
  color: #b5b1a7;
}

.wv2-error, .wv2-warning, .wv2-notice {
  overflow-wrap: anywhere;
  padding: 10px 16px;
  font-size: 13px;
}

.wv2-error {
  color: #b8372b;
  background: #fff1ed;
}

.dark .wv2-error {
  color: #ffb1a4;
  background: #3e2928;
}

.wv2-warning {
  color: var(--wv2-accent);
}

.wv2-notice {
  color: var(--wv2-muted);
  padding: 5px 24px;
  font-size: 11px;
}

.wv2-modal-backdrop, .wv2-picker-backdrop {
  position: fixed;
  z-index: 100;
  display: flex;
  backdrop-filter: blur(3px);
  background: #0006;
  justify-content: center;
  align-items:  center;
  padding: 20px;
  inset: 0;
}

.wv2-modal, .wv2-entity-picker {
  background: var(--wv2-paper);
  border: 1px solid var(--wv2-line);
  color: var(--wv2-ink);
  overflow: auto;
  border-radius: 18px;
  width: min(100%, 600px);
  max-height: 90dvh;
  padding: 24px;
  box-shadow: 0 18px 70px #0003;
}

.wv2-modal > header, .wv2-entity-picker > header {
  display: flex;
  border-bottom: 1px solid var(--wv2-line);
  justify-content: space-between;
  align-items:  center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
}

.wv2-modal h2 {
  font-size: 18px;
  font-weight: 600;
}

.wv2-modal label:not(.wv2-checkbox):not(.project-choice-card) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.wv2-modal footer {
  display: flex;
  border-top: 1px solid var(--wv2-line);
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
}

.wv2-modal textarea {
  resize: vertical;
  width: 100%;
  height: 240px;
  line-height: 1.8;
}

.wv2-modal pre {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 350px;
  padding: 15px;
  font-size: 13px;
  line-height: 1.8;
}

.wv2-modal summary {
  cursor: pointer;
  padding: 12px;
}

.wv2-checkbox {
  display: flex;
  align-items:  center;
  gap: 8px;
  font-size: 13px;
}

.wv2-entity-picker {
  max-width: 360px;
}

.wv2-entity-picker > input {
  width: 100%;
  margin: 12px 0;
}

.wv2-picker-tabs {
  display: flex;
  gap: 6px;
}

.wv2-picker-tabs button[aria-pressed="true"] {
  background: var(--wv2-soft);
  color: var(--wv2-accent);
}

.wv2-picker-results {
  overflow: auto;
  max-height: 280px;
  margin-bottom: 10px;
}

.wv2-picker-results button {
  display: flex;
  border: none;
  flex-direction: column;
  align-items:  flex-start;
  width: 100%;
  font-size: 14px;
}

.wv2-picker-results small {
  color: var(--wv2-muted);
  font-size: 11px;
}

@keyframes wv2-pulse {
  50% {
    opacity: .3;
  }
}

@media (width <= 1250px) {
  .wv2-work-tree {
    width: 220px;
  }

  .wv2-agent {
    width: 250px;
  }

  .wv2-node-toolbar button {
    padding: 4px 6px;
  }
}

@media (width <= 1050px) {
  .wv2-agent {
    display: none;
  }

  .wv2-agent.is-open {
    display: flex;
    position: absolute;
    z-index: 20;
    top: 64px;
    bottom: 0;
    right: 0;
    box-shadow: -10px 0 30px #0002;
  }

  .wv2-agent > header button {
    display: inline-flex;
  }

  .wv2-workspace {
    position: relative;
  }
}

@media (width <= 767px) {
  .wv2-list {
    padding: 22px 16px;
  }

  .wv2-list h1 {
    font-size: 28px;
  }

  .wv2-list > header {
    align-items:  flex-start;
  }

  .wv2-list > header > .wv2-primary {
    white-space: nowrap;
  }

  .wv2-list-filters input {
    width: 100%;
    margin-left: 0;
  }

  .wv2-project-grid {
    grid-template-columns: 1fr;
  }

  .wv2-work-tree {
    display: none;
  }

  .wv2-work-tree.is-open {
    display: block;
    position: absolute;
    z-index: 30;
    width: min(84vw, 290px);
    top: 58px;
    bottom: 0;
    left: 0;
    box-shadow: 12px 0 30px #0002;
  }

  .wv2-work-tree h2 button {
    display: inline-flex;
  }

  .wv2-workspace-header {
    gap: 5px;
    height: 58px;
    padding: 0 8px;
  }

  .wv2-title {
    display: none;
  }

  .wv2-workspace-header > button {
    flex-shrink: 0;
    width: 32px;
    min-width: 32px;
    padding: 5px;
  }

  .wv2-header-actions {
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    gap: 3px;
    min-width: 0;
  }

  .wv2-header-actions > * {
    flex-shrink: 0;
  }

  .wv2-header-actions button {
    min-height: 36px;
    padding: 5px;
  }

  .wv2-header-actions select {
    max-width: 48px;
    padding: 6px 2px;
    font-size: 11px;
  }

  .wv2-title h1 {
    font-size: 13px;
  }

  .wv2-title small {
    font-size: 9px;
  }

  .wv2-workspace-header .wv2-primary {
    font-size: 11px;
  }

  .wv2-workspace-header .wv2-primary svg {
    display: none;
  }

  .wv2-agent.is-open {
    width: min(90vw, 320px);
    top: 58px;
  }

  .wv2-manuscript-heading {
    padding: 10px 12px;
  }

  .wv2-manuscript-heading h2 {
    font-size: 13px;
  }

  .wv2-manuscript-heading button {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 11px;
  }

  .wv2-writing-area {
    padding: 10px 8px;
  }

  .wv2-node-toolbar {
    justify-content: flex-start;
  }

  .wv2-node-toolbar button {
    font-size: 11px;
  }

  .wv2-prose {
    min-height: 65dvh;
    padding: 80px 27px 25px;
  }

  .wv2-row-tools {
    max-width: 20px;
    left: -22px;
  }

  .wv2-row-label {
    display: none;
  }

  .wv2-row-symbol {
    font-size: 11px;
    left: -14px;
  }

  .wv2-statusbar {
    gap: 8px;
    padding: 6px 10px;
    font-size: 9px;
  }

  .wv2-modal-backdrop, .wv2-picker-backdrop {
    padding: 12px;
  }

  .wv2-modal, .wv2-entity-picker {
    max-height: calc(100dvh - 24px);
    padding: 18px;
  }

  .wv2-modal h2 {
    font-size: 16px;
  }

  .wv2-scene-fields input {
    width: 110px;
  }

  .wv2-scene-fields {
    font-size: 12px;
  }

  .wv2-stream-paper {
    padding: 25px 22px;
  }

  .wv2-keyboard-help {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wv2-live-dot, .wv2-caret {
    animation: none;
  }

  .wv2-project-card {
    transition: none;
  }

  .wv2-project-card:hover {
    transform: none;
  }
}

.wv2-text-artifact {
  resize: vertical;
  background: var(--wv2-paper);
  width: 100%;
  min-height: 65vh;
  font-family: Noto Serif SC, Songti SC, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, serif;
  font-size: 16px;
  line-height: 1.9;
  padding: 25px !important;
}

.wv2-list-create-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.wv2-row-menu {
  position: absolute;
  z-index: 8;
  background: var(--wv2-paper);
  border: 1px solid var(--wv2-line);
  border-radius: 10px;
  min-width: 170px;
  max-width: 220px;
  padding: 5px;
  font-family: sans-serif;
  top: 32px;
  left: -22px;
  box-shadow: 0 8px 20px #0002;
}

.wv2-row-menu label {
  display: flex;
  color: var(--wv2-muted);
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  font-size: 12px;
  line-height: 1.5;
}

.wv2-row-menu input, .wv2-row-menu select {
  width: 100%;
  min-width: 0;
  font-size: 13px;
}

.wv2-row-menu button {
  display: flex;
  white-space: nowrap;
  border: 0;
  width: 100%;
  font-size: 12px;
}

.wv2-conflict {
  display: flex;
  background: var(--wv2-soft);
  color: var(--wv2-accent);
  justify-content: space-between;
  align-items:  center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 12px;
}

.wv2-agent-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 5px;
}

.wv2-agent-tabs button {
  flex: 1;
  font-size: 12px;
}

.wv2-agent-tabs button[aria-pressed="true"] {
  color: var(--wv2-accent);
  background: var(--wv2-soft);
}

.wv2-agent-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.wv2-agent-chat > div {
  height: 100%;
  min-height: 0;
}

.wv2-agent {
  width: 340px;
}

@media (width <= 1250px) {
  .wv2-agent {
    width: 310px;
  }
}

@media (width <= 1050px) {
  .wv2-agent.is-open {
    width: 340px;
  }
}

@media (width <= 767px) {
  .wv2-agent.is-open {
    width: min(95vw, 380px);
  }
}

.wv2-modify-selection {
  display: flex;
  color: var(--wv2-accent);
  justify-content: space-between;
  align-items:  center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
}

.wv2-modify-selection button {
  padding: 4px 8px;
  font-size: 12px;
}

.wv2-import-preview {
  overflow: auto;
  border: 1px solid var(--wv2-line);
  border-radius: 10px;
  max-height: 220px;
  padding: 10px;
}

.wv2-import-preview > div {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  line-height: 1.6;
}

.wv2-import-preview small {
  color: var(--wv2-muted);
  flex: 0 0 36px;
}

.wv2-import-preview span {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.wv2-import-classification {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 0;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
}

.wv2-import-classification legend {
  color: var(--wv2-muted);
  margin-bottom: 8px;
  font-size: 13px;
}

.wv2-import-classification label {
  display: flex;
  border: 1px solid var(--wv2-line);
  cursor: pointer;
  border-radius: 10px;
  align-items:  center;
  gap: 8px;
  padding: 12px;
  font-size: 13px;
}

.wv2-import-classification label.is-selected {
  color: var(--wv2-accent);
  border-color: var(--wv2-accent);
  background: var(--wv2-soft);
}

.wv2-import-classification input {
  accent-color: var(--wv2-accent);
  width: auto;
  margin: 0;
}

.wv2-work-tree {
  width: 232px;
  padding: 18px 12px;
}

.wv2-work-tree > button {
  padding: 7px 8px;
  font-size: 13px;
}

.wv2-agent {
  width: 300px;
}

.wv2-agent-tabs {
  gap: 4px;
  padding: 8px;
}

.wv2-agent-tabs button {
  white-space: nowrap;
  min-width: 0;
  padding: 7px 6px;
  font-size: 12px;
}

.wv2-writing-info {
  overflow: auto;
  flex: 1;
  padding: 22px 18px;
}

.wv2-writing-info header small {
  color: var(--wv2-muted);
  font-size: 11px;
}

.wv2-writing-info h3 {
  margin: 7px 0 20px;
  font-size: 18px;
}

.wv2-writing-info dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--wv2-line);
  overflow: hidden;
  background: var(--wv2-line);
  border-radius: 12px;
  gap: 1px;
}

.wv2-writing-info dl div {
  background: var(--wv2-paper);
  padding: 14px;
}

.wv2-writing-info dt {
  color: var(--wv2-muted);
  font-size: 11px;
}

.wv2-writing-info dd {
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  line-height: 1.6;
}

.wv2-writing-info h4 {
  color: var(--wv2-muted);
  margin: 20px 0 8px;
  font-size: 12px;
}

.wv2-writing-info ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wv2-writing-info li {
  background: var(--wv2-soft);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
}

.wv2-writing-info > button {
  width: 100%;
  margin-top: 24px;
}

.wv2-board-tabs {
  display: flex;
  gap: 5px;
}

.wv2-manuscript-heading {
  flex-wrap: wrap;
}

.wv2-artifact-board {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 12px;
}

.wv2-artifact-board > header {
  display: flex;
  align-items:  center;
  gap: 12px;
  margin: 10px 0 22px;
}

.wv2-artifact-board > header h2 {
  font-size: 21px;
  font-weight: 600;
}

.wv2-artifact-board > header small {
  color: var(--wv2-muted);
  font-size: 12px;
}

.wv2-artifact-board > header button {
  margin-left: auto;
}

.wv2-artifact-board > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wv2-artifact-board .wv2-board-card {
  display: flex;
  text-align: left;
  background: var(--wv2-paper);
  border-radius: 13px;
  flex-direction: column;
  align-items: stretch;
  min-height: 180px;
  padding: 20px;
}

.wv2-board-card > small {
  color: var(--wv2-accent);
  font-size: 10px;
}

.wv2-board-card h3 {
  margin-top: 7px;
  font-size: 17px;
  font-weight: 600;
}

.wv2-board-card p {
  color: var(--wv2-muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  overflow: hidden;
  -webkit-box-orient: vertical;
  margin: 8px 0 18px;
  font-size: 13px;
  line-height: 1.8;
}

.wv2-board-card footer {
  display: flex;
  color: var(--wv2-muted);
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  font-size: 11px;
}

@media (width <= 767px) {
  .wv2-work-tree {
    width: min(84vw, 290px);
  }

  .wv2-agent {
    width: min(90vw, 320px);
  }

  .wv2-artifact-board {
    padding: 0 4px;
  }

  .wv2-artifact-board > div {
    grid-template-columns: 1fr;
  }

  .wv2-artifact-board > header {
    flex-wrap: wrap;
    gap: 7px;
  }

  .wv2-artifact-board > header h2 {
    font-size: 17px;
  }

  .wv2-board-tabs button {
    font-size: 10px;
  }

  .wv2-row-tools {
    opacity: 1;
    top: 6px;
    left: -24px;
  }

  .wv2-row-menu {
    min-width: 140px;
    left: 0;
  }
}

.wv2-diagnostics {
  background: var(--wv2-soft);
  padding: 8px 16px;
  font-size: 12px;
  line-height: 1.7;
}

.wv2-diagnostics summary {
  cursor: pointer;
  color: var(--wv2-accent);
}

.wv2-work-tree.wv2-shared-pane {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 300px;
  padding: 0;
}

.wv2-work-tree > nav {
  border-right: 0;
  flex: 1;
  width: 100%;
  min-height: 0;
}

.wv2-work-tree .wv2-scene-nav {
  overflow: auto;
  flex-shrink: 0;
  max-height: 140px;
  padding: 8px 12px;
}

.wv2-work-tree .wv2-scene-nav:has(:only-child) {
  display: none;
}

.wv2-agent.wv2-shared-pane {
  gap: 0;
  width: 380px;
  min-height: 0;
  padding: 0;
}

.wv2-mobile-pane-header {
  display: none;
}

.wv2-manuscript-heading {
  flex-wrap: wrap;
}

.wv2-episode-tabs {
  display: flex;
  gap: 4px;
}

.wv2-episode-tabs button[aria-pressed="true"] {
  background: var(--wv2-soft);
  color: var(--wv2-accent);
}

.wv2-generation-panel {
  display: flex;
  color: var(--wv2-ink);
  flex-direction: column;
  gap: 12px;
}

@media (width <= 1250px) {
  .wv2-agent.wv2-shared-pane {
    width: 340px;
  }
}

@media (width <= 1050px) {
  .wv2-agent.wv2-shared-pane {
    display: none;
  }

  .wv2-agent.wv2-shared-pane.is-open {
    display: flex;
    width: min(95vw, 380px);
  }

  .wv2-agent .wv2-mobile-pane-header {
    display: flex;
    border-bottom: 1px solid var(--wv2-line);
    justify-content: space-between;
    align-items:  center;
    padding: 8px 12px;
  }
}

@media (width <= 767px) {
  .wv2-work-tree.wv2-shared-pane {
    display: none;
  }

  .wv2-work-tree.wv2-shared-pane.is-open {
    display: flex;
    width: min(90vw, 300px);
  }

  .wv2-work-tree .wv2-mobile-pane-header {
    display: flex;
    border-bottom: 1px solid var(--wv2-line);
    justify-content: space-between;
    align-items:  center;
    padding: 8px 12px;
  }

  .wv2-header-actions button[aria-label="创作正文"] span {
    display: none;
  }
}

.wv2-project-list {
  background: none;
  font-family: inherit;
}

.wv2-collection-header {
  display: flex;
  flex-shrink: 0;
  align-items:  flex-start;
  gap: 12px;
}

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

.wv2-conversion-link {
  flex-shrink: 0;
  padding: 8px 0;
}

@media (width <= 767px) {
  .wv2-collection-header {
    flex-wrap: wrap;
    gap: 6px;
  }

  .wv2-collection-header > div {
    flex-basis: 100%;
  }

  .wv2-conversion-link {
    margin-left: auto;
    padding: 0;
    font-size: 12px;
  }
}

.wv2-parenthetical-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}

.wv2-parenthetical-content .wv2-row-content {
  display: inline;
}

.wv2-parenthesis {
  user-select: none;
  pointer-events: none;
}

.wv2-speaker-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}

.wv2-speaker-content .wv2-row-content {
  display: inline;
}

.wv2-speaker-colon {
  user-select: none;
  pointer-events: none;
}

.wv2-manuscript-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  background: var(--wv2-paper);
  gap: 12px;
  min-height: 48px;
  padding: 0 18px;
}

.wv2-manuscript-heading h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
}

.wv2-episode-tabs {
  background: var(--wv2-bg);
  border-radius: 10px;
  gap: 0;
  padding: 3px;
}

.wv2-episode-tabs button {
  background: none;
  border: 0;
  min-height: 28px;
  padding: 4px 12px;
  font-size: 12px;
}

.wv2-episode-tabs button[aria-pressed="true"] {
  background: var(--wv2-paper);
  color: var(--wv2-ink);
  box-shadow: 0 1px 3px #0000000a;
}

.wv2-view-actions {
  display: flex;
  justify-self: end;
  align-items:  center;
  gap: 8px;
}

.wv2-manuscript-heading .wv2-output-link {
  white-space: nowrap;
  border: 0;
  padding: 4px;
  font-size: 11px;
}

.wv2-view-menu {
  position: relative;
}

.wv2-view-menu > summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  color: var(--wv2-muted);
  border-radius: 8px;
  justify-content: center;
  align-items:  center;
  width: 32px;
  height: 32px;
}

.wv2-view-menu > summary::-webkit-details-marker {
  display: none;
}

.wv2-view-menu > summary:hover, .wv2-view-menu[open] > summary {
  background: var(--wv2-bg);
  color: var(--wv2-ink);
}

.wv2-view-menu > summary:focus-visible {
  outline: 2px solid var(--wv2-accent);
  outline-offset: 2px;
}

.wv2-view-menu-items {
  position: absolute;
  z-index: 20;
  border: 1px solid var(--wv2-line);
  background: var(--wv2-paper);
  border-radius: 12px;
  width: 160px;
  padding: 5px;
  top: calc(100% + 6px);
  right: 0;
  box-shadow: 0 8px 24px #00000012;
}

.wv2-view-menu-items button {
  display: flex;
  text-align: left;
  border: 0;
  width: 100%;
  padding: 9px 10px;
  font-size: 12px;
}

.wv2-writing-area {
  padding: 38px clamp(14px, 3vw, 44px) 24px;
}

.wv2-editor {
  max-width: 940px;
}

.wv2-editor-controls {
  top: 0;
  transform: translateY(-18px);
}

.wv2-node-toolbar {
  border-color: #0000;
  width: 600px;
}

.wv2-prose {
  border: 0;
  min-height: calc(100dvh - 172px);
  padding: 94px clamp(30px, 5vw, 76px) 48px;
  box-shadow: 0 2px 18px -12px #51462e35;
}

.wv2-row {
  margin: 2px 0;
  padding: 1px 0;
}

.wv2-row-speaker {
  margin-top: 10px;
  margin-bottom: 0;
}

.wv2-row-dialogue, .wv2-row-parenthetical {
  margin-top: 0;
  margin-bottom: 0;
}

.wv2-row-scene_heading {
  border: 0;
  margin: 24px 0 10px;
  padding-bottom: 0;
}

.wv2-statusbar {
  position: relative;
  align-items:  center;
  gap: 10px;
  min-height: 30px;
  padding: 4px 16px;
}

.wv2-draft-state {
  color: var(--wv2-accent);
}

.wv2-statusbar .wv2-status-notice {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 100px;
  min-width: 0;
}

.wv2-status-actions {
  display: flex;
  align-items:  center;
  gap: 10px;
  margin-left: auto;
}

.wv2-statusbar .wv2-status-conflict {
  color: var(--wv2-accent);
  white-space: nowrap;
  border: 0;
  min-height: 22px;
  padding: 3px 0;
  font-size: 11px;
}

.wv2-status-diagnostics > summary {
  cursor: pointer;
  color: var(--wv2-accent);
}

.wv2-status-diagnostics > div {
  position: absolute;
  overflow: auto;
  border: 1px solid var(--wv2-line);
  background: var(--wv2-paper);
  z-index: 20;
  border-radius: 10px;
  width: min(440px, 100% - 24px);
  max-height: 240px;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.8;
  bottom: calc(100% + 8px);
  right: 12px;
  box-shadow: 0 8px 24px #00000012;
}

.wv2-stream-paper {
  border: 0;
  max-width: 940px;
  box-shadow: 0 2px 18px -12px #51462e35;
}

.wv2-stream-speaker {
  margin-top: 10px;
}

.wv2-row-action, .wv2-stream-node.wv2-row-action {
  padding-left: 1.25em;
}

.wv2-row-dialogue, .wv2-stream-node.wv2-row-dialogue {
  padding-left: 2em;
}

.wv2-row-parenthetical, .wv2-stream-node.wv2-row-parenthetical {
  padding-left: 1em;
}

.wv2-row-action .wv2-row-symbol {
  left: 0;
}

.wv2-row-dialogue .wv2-row-symbol {
  left: 1em;
}

.wv2-row-action .wv2-row-symbol, .wv2-row-dialogue .wv2-row-symbol {
  font-size: inherit;
  line-height: inherit;
  width: 1em;
}

.wv2-stream-node {
  position: relative;
}

.wv2-stream-node.wv2-row-action:before, .wv2-stream-node.wv2-row-dialogue:before {
  position: absolute;
  color: var(--wv2-muted);
  font-family: sans-serif;
  line-height: inherit;
  width: 1em;
}

.wv2-stream-node.wv2-row-action:before {
  content: "△";
  left: 0;
}

.wv2-stream-node.wv2-row-dialogue:before {
  content: "└";
  left: 1em;
}

@media (width <= 767px) {
  .wv2-manuscript-heading {
    gap: 6px;
    min-height: 44px;
    padding: 0 10px;
  }

  .wv2-episode-tabs button {
    padding: 4px 8px;
  }

  .wv2-view-actions {
    gap: 3px;
  }

  .wv2-writing-area {
    padding: 30px 8px 12px;
  }

  .wv2-prose {
    min-height: calc(100dvh - 150px);
    padding: 84px 27px 30px;
  }

  .wv2-statusbar {
    gap: 7px;
    padding: 5px 10px;
  }
}

.wv2-node-candidate {
  color: #6b4a12;
  background: #fffaf0;
  border: 1px solid #f0c27a;
  border-radius: 10px;
  max-width: 820px;
  margin: 0 auto 14px;
  padding: 12px 14px;
  font-size: 13px;
}

.wv2-node-candidate > p {
  margin-bottom: 8px;
}

.wv2-node-candidate [role="alert"] {
  color: #b42318;
  margin-top: 8px;
}

.wv2-node-candidate-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.wv2-node-candidate-list li {
  border: 1px solid var(--wv2-line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
}

.wv2-node-candidate-list li.is-outside {
  border-color: #f0a35e;
}

.wv2-node-candidate-list pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  line-height: 1.7;
}

.wv2-node-candidate-list pre.is-before {
  color: #9f1d1d;
  text-decoration: line-through;
  background: #fdecec;
}

.wv2-node-candidate-list pre.is-after {
  color: #14532d;
  background: #e9f8ef;
}

.wv2-node-candidate-tag {
  display: inline-block;
  color: #a14b00;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
}

.wv2-node-candidate-empty {
  color: #78716c;
  font-size: 12px;
}

.wv2-node-candidate-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.dark .wv2-node-candidate {
  color: #f3dfb5;
  background: #2c2416;
  border-color: #7a5a24;
}

.dark .wv2-node-candidate-list li {
  background: var(--wv2-paper);
}

.dark .wv2-node-candidate-list pre.is-before {
  color: #fca5a5;
  background: #3b1f1f;
}

.dark .wv2-node-candidate-list pre.is-after {
  color: #86efac;
  background: #18321f;
}

.dark .wv2-node-candidate-tag {
  color: #fdba74;
}

.wv2-bilingual-content {
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}

.wv2-bilingual-content .wv2-row-content {
  display: inline;
}

.wv2-original-dialogue {
  white-space: pre-wrap;
}

.wv2-original-dialogue textarea {
  display: block;
  font: inherit;
  color: inherit;
  resize: vertical;
  background: #fffef9;
  border: 1px solid #d6d3c8;
  border-radius: 4px;
  width: 100%;
  padding: 6px 8px;
}

.wv2-original-text[role="button"] {
  cursor: text;
}

.wv2-original-text[role="button"]:focus-visible {
  outline: 1px dashed #b8b6ad;
}

.wv2-original-dialogue [role="status"] {
  color: #986332;
  margin-left: 8px;
  font: 12px sans-serif;
}

/* packages/breakdown/src/styles/shortory-screenplay-editor.css */
.shortory-screenplay-editor {
  --wv2-paper: #fffefb;
  --wv2-bg: #f6f4ed;
  --wv2-ink: #292b28;
  --wv2-muted: #827e74;
  --wv2-line: #e9e2d6;
  --wv2-accent: #a66932;
  --wv2-soft: #f6ead8;
  color: var(--wv2-ink);
  width: 100%;
}

.shortory-screenplay-editor .wv2-editor {
  max-width: 900px;
  padding-top: 34px;
}

.shortory-screenplay-editor .wv2-prose {
  border-radius: 3px;
  min-height: 350px;
  padding: 38px clamp(30px, 5vw, 68px) 46px;
  line-height: 1.9;
}

.shortory-screenplay-editor .wv2-editor-controls {
  top: 8px;
}

.shortory-screenplay-editor .wv2-node-toolbar {
  background: #fffefa;
}

html[lang="en-US"] .shortory-screenplay-editor .wv2-node-toolbar .wv2-node-type-button {
  white-space: nowrap;
  flex: none;
  min-width: 65px;
  padding-inline-start: 10px;
  padding-inline-end: 10px;
}

.shortory-screenplay-status {
  display: flex;
  color: #827e74;
  justify-content: space-between;
  align-items:  center;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 10px;
  font-size: 12px;
}

.shortory-screenplay-status > div {
  display: flex;
  gap: 8px;
}

.shortory-screenplay-status button {
  padding: 6px 10px;
  font-size: 11px;
}

.shortory-screenplay-editor .wv2-row {
  min-height: 30px;
}

.shortory-screenplay-editor .wv2-evidence-time {
  position: absolute;
  z-index: 1;
  color: #9b6a35;
  box-shadow: none;
  background: #f8efdf;
  border: 0;
  border-radius: 4px;
  min-width: 42px;
  padding: 4px;
  font: 10px / 1.3 monospace;
  top: 5px;
  left: -56px;
}

.shortory-screenplay-editor .wv2-evidence-time:hover {
  background: #efd7b1;
}

.shortory-screenplay-editor .wv2-row-tools {
  left: -36px;
}

.shortory-screenplay-editor .wv2-row-tools:has(.wv2-row-more) {
  z-index: 5;
  width: 22px;
  top: 3px;
  left: auto;
  right: -26px;
}

.shortory-screenplay-editor .wv2-row-tools:has(.wv2-row-more) > span {
  display: none;
}

.shortory-screenplay-editor .wv2-row-more {
  color: #817d73;
  box-shadow: none;
  background: none;
  border: 0;
  border-radius: 4px;
  width: 22px;
  height: 24px;
  padding: 2px;
}

.shortory-screenplay-editor .wv2-row-more:hover, .shortory-screenplay-editor .wv2-row-more[aria-expanded="true"] {
  color: #8c532c;
  background: #f6ead8;
}

.shortory-screenplay-editor .wv2-row-more:focus-visible {
  outline: 2px solid #a66932;
  outline-offset: 2px;
}

@media (width <= 760px) {
  .shortory-screenplay-editor .wv2-prose {
    padding: 38px 24px 30px;
  }

  .shortory-screenplay-editor .wv2-evidence-time {
    opacity: .75;
    top: -16px;
    left: -24px;
  }

  .shortory-screenplay-editor .wv2-row {
    margin-top: 8px;
  }
}

.shortory-screenplay-editor .wv2-editor-controls {
  visibility: hidden;
  opacity: 0;
}

.shortory-screenplay-editor .wv2-editor:has(.wv2-prose[contenteditable="true"]):focus-within .wv2-editor-controls {
  visibility: visible;
  opacity: 1;
}

/* packages/breakdown/src/styles/shortory-screenplay-typography.css */
.shortory-screenplay-editor {
  --script-action: #4f5a53;
  --script-dialogue: #28342e;
  --script-speaker: #3d5146;
  --script-direction: #8a6a4b;
}

.shortory-screenplay-editor .wv2-prose {
  color: #25312b;
  font-family: var(--font-manuscript);
  letter-spacing: .01em;
  font-kerning: normal;
  font-size: 16px;
  line-height: 1.88;
}

.shortory-screenplay-editor .wv2-row {
  min-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.shortory-screenplay-editor .wv2-row-scene_heading {
  display: block;
  color: #202d27;
  font-family: var(--font-display);
  letter-spacing: .025em;
  margin: 28px 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.shortory-screenplay-editor .wv2-row-scene_heading:first-child {
  margin-top: 0;
}

.shortory-screenplay-editor .wv2-scene-participants {
  display: block;
  color: #758078;
  font-family: var(--font-ui);
  letter-spacing: 0;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.75;
}

.shortory-screenplay-editor .wv2-scene-participants > span {
  color: #68756a;
  font-weight: 600;
}

.shortory-screenplay-editor .wv2-row-action {
  color: var(--script-action);
  margin: 5px 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
}

.shortory-screenplay-editor .wv2-row-action .wv2-row-symbol {
  color: #9ea99f;
}

.shortory-screenplay-editor .wv2-row-speaker {
  color: var(--script-speaker);
  font-family: var(--font-ui);
  letter-spacing: .035em;
  margin: 14px 0 1px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.shortory-screenplay-editor .wv2-row-parenthetical {
  color: var(--script-direction);
  font-family: var(--font-manuscript);
  margin: 0;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.7;
}

.shortory-screenplay-editor .wv2-row-dialogue {
  color: var(--script-dialogue);
  margin: 0 0 3px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.88;
}

.shortory-screenplay-editor .wv2-row-dialogue .wv2-row-symbol {
  color: #a5aea5;
}

.shortory-screenplay-editor .wv2-row-transition {
  color: #9c6338;
  font-family: var(--font-ui);
  letter-spacing: .08em;
  margin: 18px 0 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}

.shortory-screenplay-editor .wv2-row-note {
  color: #685e51;
  font-family: var(--font-ui);
  background: #f8f3ea;
  border-left: 2px solid #c89d70;
  margin: 12px 0;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.75;
}

.shortory-screenplay-editor .wv2-row-on_screen_text {
  color: #786044;
  font-family: var(--font-ui);
  margin: 8px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

.shortory-screenplay-editor .wv2-entity-ref {
  color: #875929;
  background: #f5eadd;
}

.shortory-legacy-screenplay .wv2-editor {
  padding-top: 0;
}

.shortory-legacy-screenplay .wv2-editor-controls {
  display: none;
}

.shortory-legacy-screenplay .wv2-prose {
  min-height: 0;
  padding-top: 8px;
}

html[lang="en-US"] .shortory-screenplay-editor .wv2-row-speaker {
  letter-spacing: .025em;
}

@media (width <= 760px) {
  .shortory-screenplay-editor .wv2-prose {
    font-size: 15px;
  }

  .shortory-screenplay-editor .wv2-row-scene_heading {
    margin: 23px 0 10px;
    font-size: 17px;
  }

  .shortory-screenplay-editor .wv2-scene-participants {
    font-size: 11px;
  }

  .shortory-screenplay-editor .wv2-row-action {
    font-size: 15px;
  }

  .shortory-screenplay-editor .wv2-row-speaker, .shortory-screenplay-editor .wv2-row-parenthetical {
    font-size: 13px;
  }

  .shortory-screenplay-editor .wv2-row-dialogue {
    font-size: 16px;
  }

  .shortory-screenplay-editor .wv2-row {
    margin-top: 7px;
  }

  .shortory-screenplay-editor .wv2-row-speaker, .shortory-screenplay-editor .wv2-row-dialogue, .shortory-screenplay-editor .wv2-row-parenthetical {
    margin-top: 0;
  }
}

.shortory-screenplay-editor .wv2-row {
  background-color: #0000;
  border-radius: 4px;
  transition: background-color .32s, box-shadow .32s;
  box-shadow: inset 3px 0 #0000;
}

.shortory-screenplay-editor .wv2-row .wv2-evidence-time {
  transition: background-color .32s, color .32s;
}

.shortory-screenplay-editor .wv2-row-playing {
  background-color: #b4783620;
  box-shadow: inset 3px 0 #ae6a30;
}

.shortory-screenplay-editor .wv2-row-playing .wv2-evidence-time {
  color: #fff;
  background-color: #a9632d;
}

@media (prefers-reduced-motion: reduce) {
  .shortory-screenplay-editor .wv2-row, .shortory-screenplay-editor .wv2-row .wv2-evidence-time {
    transition: none;
  }
}

.manuscript {
  position: relative;
}

.manuscript .playback-resume {
  position: absolute;
  z-index: 9;
  display: inline-flex;
  color: #8c532c;
  font: 500 12px var(--font-ui);
  animation: .18s ease-out playback-return-in;
  background: #fffaf1;
  border: 1px solid #d9b68c;
  border-radius: 20px;
  align-items:  center;
  gap: 7px;
  padding: 9px 13px;
  bottom: 22px;
  right: 20px;
  box-shadow: 0 4px 18px #553b2020;
}

.manuscript .playback-resume:hover {
  background: #f7e8d3;
}

.manuscript .playback-resume:focus-visible {
  outline: 2px solid #a66932;
  outline-offset: 3px;
}

@keyframes playback-return-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .manuscript .playback-resume {
    animation: none;
  }
}

@media (width <= 760px) {
  .shortory-screenplay-editor .wv2-prose {
    padding: 26px 28px 30px 62px;
  }

  .shortory-screenplay-editor .wv2-evidence-time {
    opacity: 1;
    top: 3px;
    left: -52px;
  }

  .shortory-screenplay-editor .wv2-row {
    min-height: 27px;
  }

  .shortory-screenplay-editor .wv2-row-scene_heading {
    min-height: 30px;
  }

  .shortory-screenplay-status {
    position: sticky;
    z-index: 8;
    background: #fffaf1;
    flex-wrap: wrap;
    padding: 10px;
    top: 0;
  }
}

/* packages/breakdown/src/styles/shortory-character-cards.css */
.role-type-protagonist {
  --role-ink: #a36535;
  --role-wash: #f9f1e7;
  --role-line: #e7c8a7;
}

.role-type-antagonist {
  --role-ink: #8f4b4e;
  --role-wash: #f8eff0;
  --role-line: #e6c8ca;
}

.role-type-supporting {
  --role-ink: #56715f;
  --role-wash: #f1f5f0;
  --role-line: #cad9ce;
}

.role-type-ensemble {
  --role-ink: #536d7a;
  --role-wash: #f0f4f6;
  --role-line: #c8d5db;
}

.role-type-extra {
  --role-ink: #73756e;
  --role-wash: #f4f4f0;
  --role-line: #d6d7d0;
}

.role-type-unclassified {
  --role-ink: #8a8176;
  --role-wash: #f7f5f0;
  --role-line: #ddd8cf;
}

.character-role-filters {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
  align-items:  center;
  gap: 6px;
  margin: -3px 0 14px;
  padding: 2px 1px 5px;
}

.character-role-filters button {
  display: inline-flex;
  color: #6e6d65;
  font: 500 11px / 1.4 var(--font-ui);
  white-space: nowrap;
  background: #fffdf9;
  border: 1px solid #e8e2d8;
  border-radius: 6px;
  flex: none;
  align-items:  center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
}

.character-role-filters button span {
  color: #a09b90;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}

.character-role-filters button[aria-pressed="true"] {
  border-color: var(--role-line, #d1bea5);
  background: var(--role-wash, #f5eee4);
  color: var(--role-ink, #7b542f);
  font-weight: 700;
}

.character-role-filters button:focus-visible {
  outline: 2px solid var(--role-ink, #a36535);
  outline-offset: 2px;
}

.shortory-character-grid {
  align-content:  start;
}

.shortory-character-card {
  position: relative;
  overflow: hidden;
  border-color: var(--role-line);
  background: linear-gradient(180deg, var(--role-wash), #fffdfa 58%);
  min-height: 155px;
  padding: 14px 15px 12px 17px;
}

.shortory-character-card:before {
  content: "";
  position: absolute;
  background: var(--role-ink);
  width: 3px;
  inset: 0 auto 0 0;
}

.shortory-character-card:hover:not(:disabled) {
  border-color: var(--role-ink);
  box-shadow: 0 5px 15px #34312712;
}

.shortory-character-card:focus-visible {
  border-color: var(--role-ink);
  box-shadow: 0 5px 15px #34312712;
}

.shortory-character-card .entity-summary-title {
  justify-content: flex-start;
  min-width: 0;
}

.shortory-character-card .entity-summary-title strong {
  color: #2f3430;
  flex: 1;
  min-width: 0;
}

.shortory-character-card .entity-summary-title svg {
  color: var(--role-ink);
  opacity: .62;
}

.character-role-badge {
  display: inline-flex;
  border: 1px solid var(--role-line);
  background: var(--role-wash);
  color: var(--role-ink);
  font: 700 10px / 1.45 var(--font-ui);
  white-space: nowrap;
  letter-spacing: .025em;
  border-radius: 4px;
  flex: none;
  justify-content: center;
  align-items:  center;
  padding: 2px 6px;
}

.shortory-character-card .entity-summary-excerpt {
  color: #63665f;
  -webkit-line-clamp: 3;
}

.shortory-character-card .entity-summary-footer {
  color: var(--role-ink);
  opacity: .84;
}

.entity-detail-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.entity-detail-name .character-role-badge {
  align-self:  center;
  margin-top: 3px;
}

.entity-editor select {
  color: #303832;
  font: 12px var(--font-ui);
  background: #fffdf8;
  border: 1px solid #e0d8ca;
  border-radius: 5px;
  width: 100%;
  min-height: 35px;
  padding: 7px 9px;
}

.entity-editor select:focus-visible {
  outline: 2px solid #b27642;
  outline-offset: 2px;
}

@media (width <= 760px) {
  .character-role-filters {
    margin-bottom: 10px;
  }

  .shortory-character-card {
    min-height: 150px;
    padding: 11px 10px 10px 13px;
  }

  .shortory-character-card .entity-summary-title {
    gap: 5px;
  }

  .shortory-character-card .entity-summary-title strong {
    font-size: 13px;
  }

  .shortory-character-card .entity-summary-title svg {
    display: none;
  }

  .shortory-character-card .character-role-badge {
    padding: 2px 4px;
    font-size: 9px;
  }

  .shortory-character-card .entity-summary-excerpt {
    -webkit-line-clamp: 3;
  }
}

/* packages/breakdown/src/styles/shortory-responsive.css */
.bd-app {
  --muted: #687168;
}

.bd-app button, .bd-app input, .bd-app textarea, .bd-app select {
  max-width: 100%;
}

.bd-app input, .bd-app textarea, .bd-app select {
  scroll-margin: 24px;
}

.workspace-toolbar-icons {
  display: flex;
  flex: none;
  align-items:  center;
  gap: 6px;
  min-width: 0;
}

.bd-app-studio .workspace-controls {
  flex-wrap: wrap;
  gap: 6px 8px;
  height: auto;
  min-height: 40px;
  padding-block-start: 5px;
  padding-block-end: 5px;
}

.bd-app button.analysis-trigger {
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  background: #ab6935;
  border-color: #ab6935;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
}

.analysis-trigger svg {
  flex: none;
}

.document-heading > div:first-child {
  flex: 1;
  min-width: 0;
}

.document-heading h2 {
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.export-menu {
  display: flex;
  flex: none;
  gap: 4px;
}

.bd-app .export-menu button {
  min-height: 32px;
  font-size: 12px;
}

.entity-summary-excerpt {
  font-size: 12px;
  line-height: 1.75;
}

.entity-summary-footer {
  font-size: 11px;
}

.character-role-filters {
  overflow: visible;
  flex-wrap: wrap;
  gap: 6px;
}

.character-role-filters button {
  min-height: 32px;
  font-size: 12px;
}

.character-role-badge {
  font-size: 11px;
}

.entity-editor label {
  font-size: 13px;
}

.bd-modal {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  max-height: calc(100dvh - 24px);
}

.bd-modal:not(.shortory-commerce) {
  width: min(600px, 100vw - 32px);
  padding: 24px;
}

.bd-modal > header {
  position: sticky;
  z-index: 5;
  background: inherit;
  gap: 12px;
  min-width: 0;
  top: 0;
}

.bd-modal > header:before {
  content: "";
  position: absolute;
  background: inherit;
  z-index: -1;
  pointer-events: none;
  inset: -32px -32px 0;
}

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

.bd-modal > header h2 {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.bd-modal > header > .icon {
  flex: none;
  width: 40px;
  min-height: 40px;
  padding: 8px;
}

.bd-modal footer {
  flex-wrap: wrap;
  gap: 8px;
}

.bd-modal pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
  max-height: 45dvh;
  line-height: 1.75;
}

.bd-modal details > summary {
  cursor: pointer;
  min-height: 36px;
  padding: 7px 0;
  font-size: 13px;
}

.analysis-mode-choice {
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
}

.import-dropzone {
  display: flex;
  border: 1.5px dashed var(--line);
  background: var(--paper);
  color: var(--muted);
  text-align: center;
  border-radius: 12px;
  flex-direction: column;
  align-items:  center;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 32px 20px;
  transition: border-color .15s, background .15s;
}

.import-dropzone.is-dragging {
  border-color: var(--amber);
  background: #fbf3e4;
}

.import-dropzone > p {
  color: var(--ink);
  margin: 0;
  font-size: 15px;
}

.import-dropzone > small {
  font-size: 12px;
  line-height: 1.7;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.import-actions button, .import-more button {
  display: inline-flex;
  align-items:  center;
  gap: 6px;
}

.import-more {
  display: flex;
  color: var(--muted);
  flex-wrap: wrap;
  align-items:  center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
}

.upload-list .upload-file {
  min-width: 0;
}

.upload-list .upload-file-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  line-height: 1.6;
}

.commerce-plan li, .commerce-audience, .commerce-position, .commerce-unit, .commerce-footnote, .commerce-rules {
  font-size: 13px;
  line-height: 1.7;
}

.commerce-orders article > div {
  min-width: 0;
}

.commerce-orders article strong {
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.commerce-orders article small {
  font-size: 12px;
  line-height: 1.6;
}

.commerce-plan, .commerce-pack {
  min-width: 0;
}

.commerce-plan p, .commerce-pack span {
  overflow-wrap: anywhere;
}

@media (width >= 761px) {
  .workspace-toolbar-icons > .icon {
    display: none;
  }

  .bd-app:not(.bd-app-studio) > .site-header {
    gap: 20px;
  }
}

@media (width >= 761px) and (width <= 1100px) {
  .bd-app:not(.bd-app-studio) > .site-header {
    gap: 16px;
    padding-inline-start: 24px;
    padding-inline-end: 24px;
  }

  .bd-app > .site-header .header-note, .bd-app:not(.bd-app-studio) > .site-header .account small, .bd-app:not(.bd-app-studio) > .site-header .commerce-entry span {
    display: none;
  }
}

@media (width <= 760px) {
  .bd-app > .site-header {
    flex-wrap: nowrap;
    gap: 8px;
    height: auto;
    min-height: 58px;
    padding: 8px 10px;
  }

  .bd-app > .site-header .brand {
    gap: 6px;
  }

  .bd-app > .site-header .brand-mark {
    width: 30px;
    height: 30px;
  }

  .bd-app > .site-header .brand-wordmark > img {
    width: 101px;
  }

  .bd-app .locale-switch, .bd-app .site-header .commerce-entry, .bd-app .account > .icon {
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 7px;
  }

  .bd-app .account {
    gap: 4px;
    min-width: 0;
    font-size: 12px;
  }

  .bd-app .account .balance-unit {
    font-size: 11px;
  }

  .bd-app .site-header .commerce-entry svg {
    width: 18px;
    height: 18px;
  }

  .bd-app-studio .studio {
    height: calc(100dvh - 58px);
    min-height: 0;
  }

  .bd-app-studio .studio-toolbar {
    height: auto;
    min-height: 44px;
    padding: 6px 10px;
  }

  .studio-toolbar h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: none;
    line-height: 1.5;
  }

  .bd-app-studio .workspace-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items:  center;
    gap: 6px 8px;
    min-width: 0;
    padding: 7px 10px;
  }

  .workspace-toolbar-icons {
    grid-column: 1 / -1;
    gap: 6px;
    min-width: 0;
  }

  .workspace-toolbar-icons > .icon {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
  }

  .workspace-toolbar-actions {
    overflow: visible;
    white-space: normal;
    gap: 6px;
    min-width: 0;
  }

  .workspace-toolbar-actions button, .workspace-toolbar-actions button:nth-child(n+2):nth-child(-n+4) {
    flex: none;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 8px;
  }

  .workspace-toolbar-actions button svg {
    width: 17px;
    height: 17px;
  }

  .workspace-toolbar-actions button span, .workspace-toolbar-actions .source-toggle {
    display: none;
  }

  .bd-app button.analysis-trigger {
    grid-column: 1;
    gap: 6px;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 44px;
    padding: 8px;
    font-size: 13px;
  }

  .workspace-view-actions {
    grid-column: 2;
    justify-content: flex-end;
    gap: 3px;
    min-width: 0;
    margin-left: 0;
  }

  .workspace-view-actions:only-child {
    grid-column: 1 / -1;
  }

  .workspace-view-actions > .icon {
    width: 40px;
    min-height: 40px;
    padding: 8px;
  }

  .mobile-tabs {
    gap: 2px;
    margin: 0;
  }

  .mobile-tabs button {
    min-width: 40px;
    min-height: 40px;
    padding: 6px;
    font-size: 12px;
  }

  .document-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
    flex: none;
    gap: 4px;
    min-width: 0;
    padding-inline-start: 10px;
    padding-inline-end: 10px;
  }

  .document-tabs button {
    white-space: nowrap;
    flex: none;
    min-height: 40px;
    padding: 8px 5px;
    font-size: 12px;
  }

  .document-heading {
    align-items:  flex-start;
    gap: 8px;
    min-height: 48px;
    padding: 10px;
  }

  .document-heading h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    -webkit-box-orient: vertical;
    font-size: 16px;
  }

  .bd-app .export-menu button {
    min-width: 44px;
    min-height: 40px;
    padding: 6px;
    font-size: 12px;
  }

  .season-selection-summary {
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .season-selection-summary > span {
    white-space: normal;
    min-width: 70px;
    line-height: 1.5;
  }

  .season-selection-summary button {
    min-height: 36px;
    font-size: 12px;
  }

  .episode-nav {
    width: 280px;
    max-width: calc(100vw - 36px);
  }

  .episode-nav .nav-group-link, .episode-item > button {
    min-height: 40px;
    font-size: 13px;
  }

  .episode-name, .episode-number, .episode-search input, .season-status-filter select {
    font-size: 12px;
  }

  .episode-item .season-episode-status {
    max-width: 76px;
    font-size: 11px;
  }

  .episode-nav input[type="checkbox"] {
    flex: none;
    width: 19px;
    height: 19px;
  }

  .season-selection-tools button, .episode-select-toggle {
    min-height: 36px;
    font-size: 12px;
  }

  .entity-grid, .entity-grid.shortory-character-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .entity-summary-card, .shortory-character-card {
    min-height: 124px;
    padding: 15px 16px;
  }

  .shortory-character-card .entity-summary-title {
    align-items:  flex-start;
    gap: 8px;
  }

  .entity-summary-title strong, .shortory-character-card .entity-summary-title strong {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.5;
  }

  .entity-summary-card .entity-summary-excerpt {
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.7;
  }

  .entity-summary-card .entity-summary-footer {
    font-size: 12px;
    line-height: 1.5;
  }

  .shortory-character-card .character-role-badge, .character-role-badge {
    padding: 3px 6px;
    font-size: 11px;
  }

  .character-role-filters button {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .entity-overview-heading {
    flex-wrap: wrap;
    align-items:  center;
    gap: 10px;
    font-size: 13px;
  }

  .entity-search {
    flex: 1;
    min-width: 150px;
    min-height: 40px;
  }

  .entity-search input {
    font-size: 14px;
  }

  .entity-detail-card .entity-description, .entity-detail-card .entity-facts {
    font-size: 14px;
    line-height: 1.8;
  }

  .entity-card-actions, .entity-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .entity-card-actions button, .entity-actions button, .entity-back {
    min-height: 40px;
    font-size: 13px;
  }

  .entity-editor input, .entity-editor textarea, .entity-editor select, .bd-modal input:not([type="checkbox"]), .bd-modal textarea, .bd-modal select, .home-auth-card input {
    min-height: 44px;
    font-size: 16px;
  }

  .bd-modal:not(.shortory-commerce) {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding: 16px;
  }

  .bd-modal.shortory-commerce {
    max-width: 100vw;
    padding: 64px 16px 32px;
  }

  .bd-modal > header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .bd-modal > header h2 {
    font-size: 18px;
  }

  .bd-modal button {
    min-height: 40px;
    font-size: 13px;
  }

  .bd-modal footer button {
    white-space: normal;
    min-height: 44px;
    line-height: 1.5;
  }

  .bd-modal .replace-check {
    min-height: 44px;
    padding-block-start: 8px;
    padding-block-end: 8px;
    line-height: 1.7;
  }

  .bd-modal input[type="checkbox"] {
    flex: none;
    width: 19px;
    height: 19px;
  }

  .upload-list > div {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 40px;
    gap: 6px 8px;
  }

  .upload-list input {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 64px;
  }

  .upload-list .upload-file {
    grid-column: 2;
    grid-row: 1;
  }

  .upload-list > div > span:not(.upload-file) {
    grid-column: 2;
    grid-row: 2;
  }

  .upload-list > div > .icon, .upload-list > div > svg {
    grid-column: 3;
    grid-row: 1 / 3;
    justify-self: center;
  }

  .upload-list > div > .icon {
    width: 40px;
    min-height: 40px;
    padding: 8px;
  }

  .commerce-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 16px;
  }

  .commerce-tabs button {
    white-space: nowrap;
    flex: none;
    min-height: 44px;
    font-size: 13px;
  }

  .commerce-intro h3 {
    font-size: 22px;
    line-height: 1.45;
  }

  .commerce-orders article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding-block-start: 16px;
    padding-block-end: 16px;
  }

  .commerce-orders article > div {
    grid-column: 1;
    min-width: 0;
  }

  .commerce-orders article > b {
    grid-column: 2;
    white-space: nowrap;
    font-size: 16px;
  }

  .commerce-orders article > span {
    grid-column: 1;
    font-size: 13px;
  }

  .commerce-orders article > button {
    grid-column: 2;
    min-height: 40px;
  }

  .commerce-orders article > small {
    grid-column: 1 / -1;
  }

  .commerce-pack .commerce-badge {
    padding: 3px 6px;
    font-size: 11px;
  }

  .commerce-pack-purchase {
    bottom: -16px;
  }

  .shortory-assistant {
    max-width: 100vw;
  }

  .shortory-assistant-context {
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
    max-height: 55%;
  }

  .shortory-assistant-project {
    position: sticky;
    z-index: 2;
    top: 0;
  }

  .shortory-assistant-close {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .shortory-assistant-project strong {
    font-size: 13px;
  }

  .shortory-assistant-project small, .shortory-assistant-conversation small {
    font-size: 12px;
    line-height: 1.5;
  }

  .shortory-assistant-conversation strong {
    font-size: 14px;
    line-height: 1.5;
  }

  .shortory-chat-step small, .shortory-chat-step strong, .shortory-chat-process-head {
    font-size: 12px;
  }

  .shortory-chat-composer {
    flex: none;
    max-height: 44dvh;
  }

  .shortory-chat-input-wrap textarea {
    font-size: 16px;
  }

  .bd-app-studio .focus-script .document-body, .bd-app-studio .focus-script .scene-card {
    padding-inline-start: 8px;
    padding-inline-end: 8px;
  }

  .shortory-screenplay-editor .wv2-prose {
    padding: 44px 24px 30px 52px;
  }

  .shortory-screenplay-editor .wv2-evidence-time {
    font-size: 11px;
    left: -44px;
  }

  .scene-card .scene-actions button[aria-label] {
    width: 40px;
    height: 40px;
  }

  .shortory-screenplay-status {
    gap: 6px;
    font-size: 12px;
  }

  .shortory-screenplay-status > span {
    flex: 1;
    min-width: 80px;
  }

  .shortory-screenplay-status > div {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .shortory-screenplay-status button {
    min-height: 40px;
    font-size: 12px;
  }

  .shortory-screenplay-editor:has( > .shortory-screenplay-status) .wv2-editor-controls {
    top: 104px;
  }

  .shortory-screenplay-editor .wv2-node-toolbar {
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 0;
    max-width: calc(100vw - 24px);
  }

  .shortory-screenplay-editor .wv2-node-type-button {
    min-width: 38px;
    padding: 6px 3px;
    font-size: 11px;
  }

  .library {
    padding: 28px 16px;
  }

  .library-heading {
    flex-direction: column;
    align-items:  flex-start;
    gap: 18px;
  }

  .library-heading .primary {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }

  .library h1 {
    font-size: 28px;
    line-height: 1.4;
  }

  .library-heading p {
    font-size: 13px;
    line-height: 1.7;
  }

  .library-toolbar {
    gap: 14px;
    margin-top: 24px;
  }

  .library-scopes button {
    min-height: 40px;
    font-size: 13px;
  }

  .library-toolbar > .search {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 6px;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding-inline-start: 10px;
    padding-inline-end: 10px;
  }

  .library-toolbar > .search input {
    width: 100%;
    min-height: 40px;
    font-size: 16px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-cover {
    height: 150px;
  }

  .library-project-actions button, .home-auth-card .auth-links button {
    min-height: 40px;
    font-size: 13px;
  }

  .home-auth-card > .primary {
    min-height: 44px;
    font-size: 14px;
  }
}

@media (width <= 360px) {
  .bd-app.is-authenticated > .site-header .brand-wordmark {
    display: none;
  }

  .bd-app.is-authenticated > .site-header .account > span {
    display: inline;
    white-space: nowrap;
  }

  .bd-app > .site-header {
    padding-inline-start: 8px;
    padding-inline-end: 8px;
  }

  .commerce-packs {
    grid-template-columns: 1fr;
  }

  .commerce-pack {
    padding: 16px;
  }

  .workspace-view-actions > .icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-app * {
    scroll-behavior: auto !important;
  }
}

@media (width <= 1100px) and (height <= 650px) {
  .shortory-assistant-context {
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
    max-height: 38%;
  }

  .shortory-assistant-project {
    position: sticky;
    z-index: 2;
    top: 0;
  }
}

@media (width <= 760px) and (height <= 650px) {
  .bd-app-studio:has(.shortory-screenplay-status) .workspace-controls {
    display: flex;
    flex-wrap: nowrap;
  }

  .bd-app-studio:has(.shortory-screenplay-status) .workspace-toolbar-icons {
    flex: 1;
  }

  .bd-app-studio:has(.shortory-screenplay-status) .analysis-trigger {
    display: none;
  }

  .bd-app-studio:has(.shortory-screenplay-status) .document-heading {
    min-height: 44px;
    padding-block-start: 6px;
    padding-block-end: 6px;
  }

  .bd-app-studio:has(.shortory-screenplay-status) .document-heading h2 {
    -webkit-line-clamp: 1;
    font-size: 14px;
  }
}

.bd-modal.shortory-analysis-selector:not(.shortory-commerce) {
  width: min(760px, 100vw - 32px);
  padding: 24px 26px;
}

.bd-modal.shortory-analysis-selector > header:before {
  inset: -24px -26px 0;
}

@media (width <= 760px) {
  .bd-modal.shortory-analysis-selector:not(.shortory-commerce) {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding: 20px 16px;
  }

  .bd-modal.shortory-analysis-selector > header:before {
    inset: -20px -16px 0;
  }
}

.bd-app .export-menu .shortory-export-button {
  color: #5d5044;
  white-space: nowrap;
  background: #fffdf9;
  border: 1px solid #e5d8c8;
  border-radius: 8px;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  transition: background .16s, border-color .16s, color .16s;
  font-size: 12px;
  font-weight: 600;
}

.bd-app .export-menu .shortory-export-button:hover:not(:disabled) {
  color: #925b32;
  background: #fbf3e9;
  border-color: #c99b76;
}

.bd-app .export-menu .shortory-export-button:focus-visible {
  outline: 2px solid #bc8054;
  outline-offset: 2px;
}

.shortory-word-mark {
  display: grid;
  color: #fff;
  letter-spacing: -.03em;
  background: #315f9b;
  border-radius: 4px;
  flex: none;
  place-items:  center;
  width: 19px;
  height: 19px;
  font: 700 11px / 1 Arial, sans-serif;
}

@media (width <= 760px) {
  .bd-app .export-menu .shortory-export-button {
    min-height: 40px;
    padding: 7px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-app .export-menu .shortory-export-button {
    transition: none;
  }
}

/* packages/breakdown/src/styles/shortory-review.css */
.bd-app-studio .studio.review-open .episode-nav {
  display: none;
}

.shortory-review-banner {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 12px;
}

.shortory-review-banner button {
  color: #8c552f;
  background: #fffaf4;
  border-color: #dfcbb1;
  flex: none;
  padding: 4px 9px;
  font-size: 12px;
}

.shortory-review-workspace {
  display: flex;
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.shortory-review-workspace > .document-body {
  flex: 1;
  min-width: 0;
}

.shortory-review {
  display: flex;
  color: #44382d;
  background: #f9f6f0;
  border-left: 1px solid #e6dfd5;
  flex-direction: column;
  flex: none;
  width: clamp(320px, 25vw, 560px);
  min-height: 0;
}

.shortory-review > header {
  display: flex;
  border-bottom: 1px solid #ebe4d9;
  justify-content: space-between;
  align-items:  center;
  padding: 20px 20px 15px;
}

.shortory-review > header div {
  display: grid;
  gap: 4px;
}

.shortory-review > header span {
  color: #9c755a;
  letter-spacing: .1em;
  font-size: 10px;
}

.shortory-review > header strong {
  color: #30352f;
  font-size: 16px;
}

.shortory-review-intro {
  color: #82796e;
  padding: 13px 20px 15px;
  font-size: 12px;
  line-height: 1.7;
}

.shortory-review-list {
  overflow: auto;
  display: grid;
  scrollbar-width: thin;
  scrollbar-color: #c7b9a9 transparent;
  align-content:  start;
  gap: 10px;
  min-height: 0;
  padding: 0 16px 24px;
}

.shortory-review-card {
  background: #fffefa;
  border: 1px solid #e8e0d5;
  border-left: 3px solid #dcc4ab;
  border-radius: 8px;
  padding: 15px 16px 13px;
  transition: border-color .18s, box-shadow .18s;
  box-shadow: 0 3px 12px #5e433009;
}

.shortory-review-card.is-active {
  border-color: #cf9077 #cf9077 #cf9077 #b65d4d;
  box-shadow: 0 4px 18px #72503914, 0 0 0 1px #cf907725;
}

.shortory-review-card-head {
  display: flex;
  letter-spacing: .02em;
  color: #9c5c40;
  justify-content: space-between;
  align-items:  center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.shortory-review-card-head button {
  color: #896344;
  background: #f5eee5;
  border: 0;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
}

.shortory-review-text {
  color: #313b35;
  overflow-wrap: anywhere;
  margin: 12px 0 0;
  font-family: Noto Serif SC, serif;
  font-size: 14px;
  line-height: 1.85;
}

.shortory-review-text small {
  display: block;
  color: #a89b8d;
  margin-bottom: 3px;
  font: 10px sans-serif;
}

.shortory-review-reason {
  color: #746c61;
  overflow-wrap: anywhere;
  margin: 11px 0 0;
  font-size: 12px;
  line-height: 1.75;
}

.shortory-review-reason span {
  display: block;
  color: #a29586;
  margin-bottom: 3px;
  font-size: 11px;
}

.shortory-review-locate {
  color: #a35d3b;
  background: none;
  border: 0;
  margin-top: 12px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
}

.shortory-review-empty {
  display: grid;
  text-align: center;
  color: #9d9182;
  justify-items: center;
  gap: 8px;
  padding: 28px 12px;
  font-size: 12px;
  line-height: 1.6;
}

.shortory-review-mark {
  background: linear-gradient(90deg, #c7755c0d, #0000 55%);
  box-shadow: inset 2px 0 #bf7260;
}

.shortory-review-target {
  outline-offset: 4px;
  border-radius: 4px;
  transition: background .25s, outline-color .25s;
  outline: 2px solid #d6a267 !important;
  background: #f8ebd7 !important;
}

.shortory-review-connector {
  position: fixed;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
  width: 100vw;
  height: 100vh;
  inset: 0;
}

.shortory-review-connector path {
  fill: none;
  stroke: #b85f50;
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: .75;
}

@media (width >= 761px) {
  .bd-app-studio .studio.review-open .workspace {
    background: #f5f3ee;
  }

  .bd-app-studio .studio.review-open .comparison {
    container-type: inline-size;
    width: 100%;
    max-width: 2400px;
    margin-inline-start: auto;
    margin-inline-end: auto;
  }

  .bd-app-studio .studio.review-open.focus-both .viewing-panel {
    width: var(--video-width);
    flex: none;
  }

  .bd-app-studio .studio.review-open .shortory-review {
    width: clamp(300px, 24cqw, 580px);
  }

  .bd-app-studio .studio.review-open .document-body {
    scrollbar-gutter: stable;
    background: #f5f3ee;
    padding: 16px 24px 48px;
  }

  .bd-app-studio .studio.review-open .document-body > .scene-card {
    background: #fffef9;
    border: 1px solid #e8e4da;
    border-radius: 8px;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto 14px;
    padding: 16px 20px;
    box-shadow: 0 8px 28px #3931230a;
  }

  .bd-app-studio .studio.review-open .shortory-screenplay-editor .wv2-prose {
    padding-left: 60px;
    padding-right: 26px;
  }

  .bd-app-studio .studio.review-open .document-heading {
    padding: 16px 24px;
  }

  .bd-app-studio .studio.review-open .document-heading h2 {
    margin-top: 0;
  }

  .bd-app-studio .studio.review-open .video-stage {
    flex: none;
    height: clamp(220px, 100dvh - 285px, 900px);
    min-height: 180px;
    max-height: none;
    margin-inline-start: 16px;
    margin-inline-end: 16px;
  }

  .bd-app-studio .studio.review-open .scene-index {
    min-height: 0;
    padding: 18px;
  }
}

@media (width >= 761px) and (width <= 1439px) {
  .bd-app-studio .studio.review-open .document-body {
    padding: 12px 16px 36px;
  }

  .bd-app-studio .studio.review-open .document-body > .scene-card {
    padding-inline-start: 12px;
    padding-inline-end: 12px;
  }

  .bd-app-studio .studio.review-open .shortory-screenplay-editor .wv2-prose {
    padding-right: 18px;
  }

  .shortory-review > header {
    padding: 16px;
  }

  .shortory-review-intro {
    padding: 10px 16px;
  }

  .shortory-review-list {
    padding-inline-start: 12px;
    padding-inline-end: 12px;
  }

  .shortory-review-card {
    padding: 12px;
  }
}

@media (width <= 760px) {
  .shortory-review {
    position: absolute;
    z-index: 5;
    width: min(92%, 340px);
    inset: 0 0 0 auto;
    box-shadow: -12px 0 30px #3b2c1c20;
  }

  .shortory-review-banner {
    margin-inline-start: 8px;
    margin-inline-end: 8px;
  }

  .shortory-review-banner button {
    min-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shortory-review-target, .shortory-review-card {
    transition: none;
  }
}

.shortory-review-list {
  display: block;
  overscroll-behavior: contain;
  padding: 0 12px 20px;
}

.shortory-review-track {
  position: relative;
  min-height: 100%;
}

.shortory-review-card {
  position: relative;
  box-shadow: none;
  background: none;
  border: 0;
  border-left: 1px solid #d6b9aa;
  border-radius: 0;
  padding: 4px 10px 10px 13px;
}

.shortory-review-card.is-active {
  box-shadow: none;
  background: #fffaf5;
  border-color: #b85f50;
  border-left-width: 2px;
}

.shortory-review-card-head span {
  display: flex;
  color: #a9584a;
  align-items:  center;
  gap: 7px;
  font-size: 12px;
}

.shortory-review-card-head button {
  color: #9a705c;
  background: none;
  padding: 4px;
}

.shortory-review-reason {
  color: #454c45;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.65;
}

.shortory-review-text {
  margin-top: 6px;
  font-size: 13px;
}

.shortory-review-locate {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
}

.shortory-review-connector path {
  stroke: #bc6154;
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: .8;
}

@media (width >= 761px) {
  .shortory-review-card {
    position: absolute;
    left: 0;
    right: 0;
  }
}

@media (width <= 760px) {
  .shortory-review-track {
    display: grid;
    gap: 12px;
  }

  .shortory-review-card {
    position: relative;
  }
}

.shortory-screenplay-editor .wv2-row.shortory-review-mark {
  background: linear-gradient(90deg, #f6ddd5a8, #0000 75%);
  box-shadow: inset 2px 0 #bb6456;
}

.shortory-review-content {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.shortory-review-content > .shortory-review-list {
  flex: 1;
}

.shortory-review-overview {
  position: absolute;
  z-index: 2;
  display: flex;
  background: #f9f6f0;
  flex-direction: column;
  min-height: 0;
  padding: 0 16px 20px;
  inset: 0;
}

.shortory-review-overview > p {
  color: #77766f;
  flex: none;
  margin: 0;
  padding: 3px 2px 14px;
  font-size: 12px;
  line-height: 1.6;
}

.shortory-review-overview > div {
  display: grid;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c7b9a9 transparent;
  align-content:  start;
  gap: 10px;
  min-height: 0;
  padding: 1px 2px 12px;
}

.shortory-review-overview button {
  display: flex;
  text-align: left;
  color: #303b34;
  background: #fffefa;
  border: 1px solid #e8ddd1;
  border-radius: 9px;
  flex-direction: column;
  align-items: stretch;
  gap: 11px;
  width: 100%;
  min-width: 0;
  padding: 15px 16px;
  transition: border-color .16s, box-shadow .16s;
  box-shadow: 0 3px 12px #5e433008;
}

.shortory-review-overview button:not(:disabled):hover {
  border-color: #bf8973;
  box-shadow: 0 4px 16px #5e433015;
}

.shortory-review-overview button:focus-visible {
  outline: 2px solid #b16f52;
  outline-offset: 2px;
}

.shortory-review-overview button:disabled {
  opacity: 1;
  cursor: default;
}

.shortory-review-overview-meta {
  display: flex;
  color: #a35946;
  justify-content: space-between;
  align-items:  center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}

.shortory-review-overview-meta > span {
  display: flex;
  align-items:  center;
  gap: 7px;
}

.shortory-review-overview-meta time {
  color: #8b6a50;
  font-variant-numeric: tabular-nums;
  background: #f7eee5;
  border-radius: 4px;
  flex: none;
  padding: 3px 7px;
  font-size: 11px;
}

.shortory-review-overview button strong {
  font-family: var(--font-display, "Noto Serif SC", serif);
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}

.shortory-review-overview-reason {
  display: block;
  color: #5f665d;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.7;
}

.shortory-review-overview-reason small {
  display: block;
  color: #95897b;
  margin-bottom: 3px;
  font-size: 11px;
}

.shortory-review-overview-action {
  display: flex;
  color: #a7633d;
  align-items:  center;
  gap: 2px;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 600;
}

@media (width <= 1439px) {
  .shortory-review-overview {
    padding-inline-start: 12px;
    padding-inline-end: 12px;
  }

  .shortory-review-overview button {
    padding: 13px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shortory-review-overview button {
    transition: none;
  }
}

.bd-app-studio .document-heading:has(.shortory-review-banner) {
  align-items:  center;
  gap: 12px;
  min-height: 48px;
  padding-block-start: 7px;
  padding-block-end: 7px;
}

.document-heading:has(.shortory-review-banner) > div:first-child {
  flex: 0 auto;
  min-width: 0;
}

.document-heading:has(.shortory-review-banner) h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-heading .shortory-review-banner {
  color: #80552f;
  background: #fbf1e4;
  border: 1px solid #ead7bf;
  border-radius: 8px;
  flex: none;
  gap: 8px;
  max-width: 100%;
  padding: 3px 4px 3px 10px;
  font-size: 12px;
  line-height: 1.4;
}

.document-heading .shortory-review-banner > span {
  white-space: nowrap;
}

.document-heading .shortory-review-banner button {
  color: #925d37;
  white-space: nowrap;
  background: none;
  border: 0;
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
}

.document-heading .shortory-review-banner button:hover {
  background: #f3e3d0;
}

.document-heading .export-menu {
  margin-left: auto;
}

@media (width <= 760px) {
  .bd-app-studio .document-heading:has(.shortory-review-banner) {
    flex-wrap: wrap;
    gap: 7px 10px;
    padding: 8px 12px;
  }

  .document-heading:has(.shortory-review-banner) > div:first-child {
    flex: 100%;
  }

  .document-heading:has(.shortory-review-banner) h2 {
    display: block;
    white-space: normal;
  }

  .document-heading .shortory-review-banner {
    flex: auto;
    min-width: 0;
  }

  .document-heading .shortory-review-banner > span {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
}
