:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --panel: #fffefa;
  --raised: #e9ede5;
  --line: #dedfd6;
  --text: #23342c;
  --muted: #707b74;
  --gold: #947f54;
  --green: #214c3d;
  --danger: #a44538;
  font:
    14px/1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
}
button,
a {
  touch-action: manipulation;
}
button,
.button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 7px;
  padding: 8px 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
}
button:hover,
.button:hover {
  background: var(--raised);
  border-color: #8ba18a;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.primary {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
  font-weight: 650;
}
.primary:hover {
  background: #153c2f;
  color: #ffffff;
}
a {
  color: var(--gold);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
input,
select,
textarea {
  background: #fffefb;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 110px;
}
label {
  display: block;
  color: var(--muted);
  margin: 12px 0;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 6px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0 0 14px;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 17px;
}
h4 {
  font-size: 14px;
}
small,
.muted,
.small {
  color: var(--muted);
}
.eyebrow {
  color: var(--gold);
  font:
    600 11px/1.7 ui-monospace,
    monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fffefa;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 0 22px;
}
.brand {
  font: bold 25px Georgia;
  display: flex;
  gap: 10px;
  align-items: center;
}
.brand > span {
  font: 600 13px sans-serif;
  color: var(--text);
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
}
.crumb {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar nav a {
  font-size: 12px;
}
#app {
  display: flex;
  min-height: calc(100vh - 64px);
}
#app[hidden],
[hidden] {
  display: none !important;
}
.project-panel {
  width: 245px;
  flex-shrink: 0;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: #f7f6f2;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow: auto;
}
.project-panel.collapsed {
  display: none;
}
.project-panel h2 {
  font-size: 14px;
  margin: 0;
}
.row,
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.full {
  width: 100%;
  margin: 14px 0;
}
.project-link {
  display: block;
  text-align: left;
  width: 100%;
  margin: 9px 0;
  padding: 13px;
}
.project-link strong,
.project-link small {
  display: block;
}
.project-link.active {
  background: #e9ede5;
  border-color: #d1dacb;
}
.engine {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 24px;
  font-size: 12px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
}
#rail {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  width: 82px;
  flex-shrink: 0;
  padding: 14px 8px;
  border-right: 1px solid var(--line);
  background: #fffefa;
  overflow: auto;
}
#rail button {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 11px;
  border-color: transparent;
  padding: 10px 4px;
}
#rail button.active {
  color: var(--gold);
  background: #e9ede5;
}
svg.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#context {
  width: 246px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: #fffefa;
  padding: 20px 14px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow: auto;
}
#context:empty {
  display: none;
}
#context button {
  display: block;
  text-align: left;
  width: 100%;
  border-color: transparent;
  margin-bottom: 7px;
  font-size: 13px;
}
#context button.active {
  border-color: #d1dacb;
  background: #e9ede5;
  color: var(--gold);
}
#context small {
  display: block;
  font-size: 11px;
}
#context h3 {
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
}
#workspace {
  flex: 1;
  min-width: 0;
  padding: 30px 32px 80px;
}
#canvas {
  max-width: 1600px;
  margin: auto;
}
.overview-heading {
  margin-bottom: 28px;
}
.overview-heading > p:last-child {
  color: var(--muted);
  margin: 12px 0 0;
}
.overview-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.overview-title h1 {
  margin: 4px 0 12px;
}
.production-flow {
  display: grid;
  grid-template-columns:
    minmax(92px, 0.62fr) 24px minmax(140px, 1fr)
    24px minmax(206px, 1.1fr) 24px minmax(150px, 1fr) 24px minmax(92px, 0.62fr);
  grid-template-rows: auto 26px;
  align-items: center;
  max-width: 1240px;
  margin: 0 0 48px;
}
.flow-stage {
  display: grid;
  gap: 4px;
  padding: 14px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  min-width: 0;
}
.flow-stage:hover {
  border-color: var(--gold);
  background: #f0f2e9;
  text-decoration: none;
}
.flow-stage-head {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.flow-stage-head i {
  font:
    500 12px ui-monospace,
    monospace;
  color: var(--gold);
}
.flow-stage-head b {
  font-size: 16px;
}
.flow-stage-head > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}
.flow-scale {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.flow-end {
  margin: 0;
  padding: 12px;
  text-align: center;
  border: 1px dashed #b6bcaa;
  border-radius: 9px;
  color: var(--muted);
  line-height: 1.5;
  white-space: nowrap;
}
.flow-end span {
  display: block;
  font-size: 12.5px;
}
.flow-convergence {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px dashed #b6bcaa;
  border-radius: 12px;
}
.flow-caption {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.flow-arrow {
  height: 1px;
  width: 18px;
  background: #a5ae9a;
  justify-self: center;
  position: relative;
}
.flow-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-top: 1px solid #a5ae9a;
  border-right: 1px solid #a5ae9a;
  transform: translate(0, -50%) rotate(45deg);
}
.flow-return {
  grid-area: 2 / 5 / 3 / 8;
  align-self: stretch;
  border: 1px dashed #a5ae9a;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  position: relative;
}
.flow-return::after {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  border: 3px solid transparent;
  border-bottom-color: #a5ae9a;
}
.flow-return-caption {
  grid-area: 2 / 5 / 3 / 8;
  place-self: end center;
  background: var(--bg);
  padding: 0 9px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1;
  transform: translateY(50%);
}
.overview-source {
  max-width: 1240px;
}
.table-field {
  display: block;
  min-width: 38px;
  min-height: 24px;
  white-space: pre-wrap;
}
.table-field:hover {
  background: var(--raised);
}
.adaptation-list {
  margin: 22px 0;
}
.adaptation-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  align-items: start;
}
.adaptation-row > div > div:not(:first-child) {
  color: var(--muted);
  font-size: 13px;
}
.adaptation-row .actions {
  gap: 4px;
}
.adaptation-row .actions button {
  padding: 3px 9px;
  min-height: 30px;
}
/* Keep the topology on desktop; fold the same workflow into a vertical path
   when the available workspace cannot fit its nine columns. */
#canvas:has(.production-flow) {
  container-type: inline-size;
}
@container (max-width: 900px) {
  .overview-title {
    flex-wrap: wrap;
    gap: 0;
  }
  .production-flow {
    grid-template-columns: minmax(0, 1fr) 24px;
    grid-template-rows: auto;
    max-width: 520px;
  }
  .production-flow > .flow-stage,
  .flow-end,
  .flow-convergence {
    grid-column: 1;
  }
  .flow-arrow {
    grid-column: 1;
    height: 24px;
    width: 1px;
  }
  .flow-arrow::after {
    top: auto;
    bottom: 1px;
    right: 50%;
    transform: translateX(50%) rotate(135deg);
  }
  .flow-convergence {
    grid-row: 5;
  }
  .flow-return {
    grid-column: 2;
    grid-row: 5 / 8;
    border: 1px dashed #a5ae9a;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    margin: 14px 0;
  }
  .flow-return::after {
    left: -4px;
    top: -4px;
    border-bottom-color: transparent;
    border-right-color: #a5ae9a;
  }
  .flow-return-caption {
    grid-column: 1 / 3;
    grid-row: 10;
    transform: none;
    margin: 18px 0 0;
    text-align: center;
    line-height: 1.6;
  }
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 25px;
}
.page-heading p {
  color: var(--muted);
  max-width: 720px;
}
.page-heading h1 {
  margin: 5px 0 10px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 18px;
}
.grid > .panel {
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 18px;
}
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
}
.card-body {
  padding: 18px;
}
.card h3 {
  margin: 0;
}
.card .synopsis {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0;
}
.poster {
  aspect-ratio: 3/2;
  width: 100%;
  display: block;
  background: #e9ede5;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.poster img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.poster.placeholder {
  color: #707b74;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font:
    12px ui-monospace,
    monospace;
}
.poster.placeholder svg {
  width: 36px;
  height: 36px;
}
.card-toolbar {
  padding: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: #fffefa;
}
.card-toolbar button {
  font-size: 11px;
  min-height: 34px;
  padding: 6px 9px;
}
.tag,
.badge {
  display: inline-block;
  border-radius: 4px;
  background: #eeeee8;
  color: var(--muted);
  font-size: 11px;
  padding: 3px 8px;
  margin: 2px 3px 2px 0;
}
.tag.gold {
  color: var(--gold);
  background: #f5f0df;
}
.tag.green {
  color: var(--green);
  background: #e0e9dc;
}
.tag.red {
  color: var(--danger);
  background: #faece8;
}
.filters {
  display: flex;
  gap: 9px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.filters .active {
  border-color: var(--gold);
  color: var(--gold);
  background: #e9ede5;
}
.field {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.field:last-child {
  border-bottom: 0;
}
.field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.field-head span {
  font-size: 11px;
  color: var(--muted);
}
.field-head button {
  font-size: 11px;
  padding: 3px 8px;
  min-height: 28px;
}
.field-value {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
}
.field-value.compact {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.field-value button {
  display: block;
  text-align: left;
  width: 100%;
}
.field details {
  padding: 8px 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.stat strong {
  display: block;
  font:
    500 28px ui-monospace,
    monospace;
  color: var(--gold);
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
  margin: 20px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
td,
th {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 11px;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 500;
}
tr:hover td {
  background: #fffefa;
}
.script-scene {
  margin: 25px 0;
}
.scene-title {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.beat {
  display: grid;
  grid-template-columns: 30px 85px 1fr 65px;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #e8e9e1;
  align-items: start;
}
.beat:hover {
  background: #edf0e8;
}
.beat .line-edit {
  border: 0;
  background: transparent;
  text-align: left;
  justify-content: flex-start;
  padding: 0;
  min-height: 24px;
  line-height: 1.8;
}
.beat .speaker {
  color: var(--gold);
  font-size: 12px;
}
.beat .number,
.beat .seconds {
  font:
    12px/2 ui-monospace,
    monospace;
  color: var(--muted);
}
.beat em {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.timeline {
  display: flex;
  gap: 3px;
  min-height: 35px;
  margin: 20px 0;
  overflow: hidden;
}
.timeline button {
  flex: 1;
  min-width: 0;
  font: 11px ui-monospace;
  border-color: #8ba18a;
  background: #e0e9dc;
  padding: 7px 3px;
}
.timeline .uncovered {
  background: #faece8;
  border-color: #dca79a;
}
.references {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.reference {
  max-width: 140px;
}
.reference img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}
.reference button {
  font-size: 10px;
}
.progress {
  background: #e9ede5;
  height: 4px;
  border-radius: 4px;
  overflow: hidden;
  margin: 9px 0;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--gold);
  max-width: 100%;
}
.empty {
  padding: 70px 25px;
  text-align: center;
  border: 1px dashed #c4cec0;
  border-radius: 10px;
  color: var(--muted);
}
.empty h2 {
  color: var(--text);
}
.hero {
  padding: 80px 20px 30px;
  max-width: 860px;
  margin: auto;
  text-align: center;
}
.hero h1 {
  font:
    500 46px/1.4 Georgia,
    "Songti SC",
    serif;
}
.hero h1 span {
  color: var(--gold);
}
.hero p {
  color: var(--muted);
}
.hero .actions {
  justify-content: center;
}
.quality {
  padding: 12px 18px;
  background: #edf3e9;
  border: 1px solid #cadcc2;
  border-radius: 7px;
  margin-bottom: 18px;
  font-size: 12px;
}
.quality.bad,
.warning {
  background: #f5f0df;
  border-color: #e4d8b3;
  color: #776743;
}
.quality ul {
  max-height: 200px;
  overflow: auto;
}
.warning {
  padding: 12px 16px;
  border: 1px solid #e4d8b3;
  border-radius: 6px;
  margin: 14px 0;
}
.job-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.job-row pre {
  font: 12px/1.8 inherit;
  white-space: pre-wrap;
  color: var(--muted);
}
.job-row .status {
  float: right;
}
.login-layout {
  max-width: 1100px;
  margin: 10vh auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  padding: 30px;
}
.login-layout h1 {
  font:
    500 48px/1.5 Georgia,
    "Songti SC",
    serif;
}
.login-layout h1 span {
  color: var(--gold);
}
.login-layout p {
  color: var(--muted);
}
dialog {
  color: var(--text);
  background: var(--panel);
  border: 1px solid #c4cec0;
  border-radius: 12px;
  padding: 28px;
  width: min(860px, 94vw);
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #18241b70;
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.field-note {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
#source-text {
  min-height: 200px;
}
.source-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: -28px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 16px 0;
  margin-top: 20px;
}
.editor-error {
  color: var(--danger);
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: var(--green);
  color: #ffffff;
  padding: 13px 22px;
  border-radius: 7px;
  z-index: 100;
  box-shadow: 0 5px 25px #0001;
}
summary {
  cursor: pointer;
}
.list-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
  margin: 10px 0;
}
.list-item > .row {
  justify-content: space-between;
}
.version img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}
.video {
  width: 100%;
  max-height: 460px;
  background: #f7f6f2;
  border-radius: 8px;
}
.search {
  max-width: 400px;
}
.mono {
  font-family: ui-monospace, monospace;
}
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.thumb-grid label {
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
}
.thumb-grid img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.thumb-grid input {
  width: auto;
  display: inline-block;
}
.subtle {
  color: var(--muted);
}
.panel pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.error {
  color: var(--danger);
}
@media (min-width: 1500px) {
  #workspace {
    padding: 36px 40px;
  }
}
@media (max-width: 1200px) {
  .project-panel {
    position: fixed;
    z-index: 9;
    box-shadow: 10px 0 30px #0001;
  }
  #context {
    width: 205px;
  }
  #workspace {
    padding: 25px 22px;
  }
  .page-heading {
    flex-direction: column;
  }
}
@media (max-width: 760px) {
  .topbar {
    padding: 0 12px;
    gap: 10px;
  }
  .topbar nav {
    gap: 8px;
  }
  .topbar nav a,
  .brand span,
  .crumb {
    display: none;
  }
  #rail {
    width: 65px;
    padding: 10px 4px;
  }
  #rail button {
    font-size: 10px;
    min-height: 54px;
  }
  #context {
    width: 160px;
    font-size: 12px;
  }
  #workspace {
    padding: 20px 15px;
  }
  #app:has(#context:not(:empty)) {
    flex-wrap: wrap;
  }
  #context:not(:empty) {
    position: static;
    width: calc(100% - 65px);
    height: auto;
    max-height: 160px;
    overflow: auto;
    padding: 10px;
    flex: 1;
  }
  #context:not(:empty) ~ #workspace {
    width: 100%;
    flex-basis: 100%;
    margin-left: 65px;
    margin-top: -1px;
  }
  #rail {
    position: fixed;
    z-index: 3;
  }
  #context,
  #workspace {
    margin-left: 65px;
  }
  #context:not(:empty) {
    margin-left: 65px;
  }
  #context:empty ~ #workspace {
    margin-left: 65px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .beat {
    grid-template-columns: 20px 60px 1fr;
    gap: 5px;
    padding: 12px;
  }
  .beat .seconds {
    grid-column: 3;
    text-align: right;
  }
  .form-grid,
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-layout {
    gap: 20px;
    margin: 20px auto;
    padding: 20px;
  }
  .login-layout h1,
  .hero h1 {
    font-size: 34px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  button {
    min-height: 44px;
  }
  .card-toolbar button,
  .field-head button {
    min-height: 36px;
  }
  .topbar nav button {
    font-size: 12px;
  }
  .hero {
    padding-top: 35px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
  }
}

.poster.placeholder {
  align-items: center;
  justify-content: center;
}
.form-property > details > summary {
  color: var(--gold);
  margin-top: 16px;
}
.form-node[data-type="object"] > .form-property {
  min-width: 0;
}
/* Fields behave like the production reference while retaining Gatsby's light palette. */
[data-inline] {
  cursor: text;
  border-radius: 6px;
}
[data-inline]:hover {
  outline: 1px dashed var(--line);
  outline-offset: 5px;
}
.inline-active {
  overflow: visible !important;
  max-height: none !important;
}
.inline-input {
  white-space: pre-wrap;
  min-height: 38px;
  outline: 2px solid var(--green);
  border-radius: 5px;
  padding: 10px;
  background: white;
  color: var(--text);
}
.inline-reason {
  margin-top: 10px;
}
.inline-status {
  display: block;
  margin: 8px 0;
}
.dependent-list {
  max-height: 260px;
  overflow: auto;
  margin: 12px 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.check input {
  width: auto;
}
.media-progress {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.thumb-grid label:has(input:checked) {
  outline: 2px solid var(--green);
  background: #eef4ee;
}

#queue-summary {
  position: fixed;
  right: 22px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 3px 12px #203b2914;
}

.video-refs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-height: 320px;
  overflow: auto;
  margin-bottom: 16px;
}
.video-ref {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  border: 1px solid var(--border, #dcded5);
  border-radius: 8px;
  padding: 10px;
  align-items: start;
}
.video-ref input,
.video-check input {
  width: auto;
}
.video-ref img {
  width: 100%;
  height: 90px;
  object-fit: contain;
}
.video-ref span {
  grid-column: 1/-1;
  font-size: 12px;
}
.video-ref:has(input:checked) {
  border-color: #214c3d;
  background: #eef3ed;
}
.video-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Task telemetry: ordinary DOM, bounded history, no animation or canvas. */
.job-progress {
  margin: 18px 0 22px;
}
.job-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.job-phases span {
  font-size: 12px;
  padding: 7px 12px;
  background: #f5f5f1;
  color: #748178;
  border-radius: 5px;
}
.job-phases .current {
  background: #e8efdf;
  color: #3c592f;
  font-weight: 600;
}
.job-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #e6e8e0;
  border-bottom: 1px solid #e6e8e0;
  margin-bottom: 20px;
}
.job-metrics small,
.job-metrics strong {
  display: block;
}
.job-metrics small {
  color: #7a847d;
  font-size: 12px;
  margin-bottom: 6px;
}
.job-metrics strong {
  font-size: 19px;
  font-weight: 500;
}
.job-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
}
.job-columns h4 {
  margin: 0 0 14px;
  font-size: 14px;
}
.job-columns > div {
  min-width: 0;
}
.job-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  max-height: 180px;
  overflow: auto;
  background: #f7f8f3;
  padding: 14px;
  border-left: 3px solid #9aa983;
  margin: 0 0 15px;
}
.job-reads {
  list-style: none;
  margin: 0;
  padding: 0;
}
.job-reads li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 0;
  font-size: 13px;
}
.job-reads small {
  color: #778177;
}
.job-reads progress {
  width: 100%;
  height: 5px;
  accent-color: #8b9d70;
  border: 0;
}
.job-events {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 310px;
  overflow: auto;
}
.job-events li {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0e8;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.job-events time {
  color: #859084;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.job-events small {
  color: #829075;
}
.job-hint {
  font-size: 12px;
  color: #7b867c;
  line-height: 1.65;
  margin: 15px 0 0;
}
.job-checks,
.job-history {
  margin-top: 15px;
  font-size: 13px;
}
.job-checks summary,
.job-history summary {
  cursor: pointer;
  color: #526744;
}
.job-checks ul {
  padding-left: 20px;
  line-height: 1.8;
  max-height: 220px;
  overflow: auto;
}
#progress-sync {
  font-size: 12px;
}
@media (max-width: 760px) {
  .job-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .job-metrics {
    gap: 8px;
  }
  .job-metrics strong {
    font-size: 15px;
  }
  .job-phases {
    gap: 4px;
  }
  .job-phases span {
    font-size: 11px;
    padding: 6px 8px;
  }
}
.job-reads progress::-webkit-progress-bar {
  background: #e9edde;
  border-radius: 3px;
}
.job-reads progress::-webkit-progress-value {
  background: #8b9d70;
  border-radius: 3px;
}
.job-reads progress::-moz-progress-bar {
  background: #8b9d70;
  border-radius: 3px;
}
