.narrative-workspace-main {
  width: min(var(--site-shell-max), 100% - var(--site-shell-gutter));
}

.narrative-workspace-intro p {
  max-width: 44rem;
}

@media (min-width: 1121px) {
  body.narrative-workspace-page {
    overflow: hidden;
  }

  body.narrative-workspace-page .site-shell {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }

  body.narrative-workspace-page .site-footer {
    display: none;
  }

  body.narrative-workspace-page .site-header {
    flex: 0 0 auto;
  }
}

.narrative-workspace-layout {
  display: grid;
  grid-template-columns: minmax(255px, 300px) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.narrative-workspace-main-column {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  align-content: start;
}

.prototype-map-route-slot {
  min-width: 0;
}

.narrative-sidebar-rail {
  min-width: 0;
  align-self: stretch;
}

.narrative-pane-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.9rem;
  min-height: 0;
  height: 100%;
}

.narrative-pane-header {
  min-width: 0;
}

.narrative-pane-scroll {
  min-height: 0;
}

.narrative-sidebar {
  --narrative-sidebar-offset: calc(84px + 1rem);
  --narrative-sidebar-bottom-buffer: 8rem;
  position: sticky;
  top: var(--narrative-sidebar-offset);
  max-height: calc(100vh - var(--narrative-sidebar-offset) - var(--narrative-sidebar-bottom-buffer));
  max-height: calc(100dvh - var(--narrative-sidebar-offset) - var(--narrative-sidebar-bottom-buffer));
  min-height: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.narrative-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.narrative-sidebar-scroll-inner {
  display: grid;
  gap: 0;
}

.narrative-editor {
  min-height: 720px;
  min-width: 0;
}

.narrative-editor-shell {
  min-height: 0;
}

.narrative-editor-header {
  min-width: 0;
}

.narrative-editor-scroll {
  min-height: 0;
}

.narrative-editor-scroll-inner {
  min-width: 0;
}

.narrative-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.narrative-panel-header-secondary {
  margin-top: 1rem;
}

.narrative-sidebar-meta-secondary {
  margin-bottom: 0;
}

.narrative-panel-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.prototype-presence-chips {
  margin-top: 0.5rem;
}

.prototype-presence-chips[hidden] {
  display: none !important;
}

.prototype-presence-chip-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  overflow: visible;
}

.prototype-presence-chip-shell {
  position: relative;
  display: inline-flex;
}

.prototype-presence-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  width: fit-content;
  border: 1px solid rgba(128, 162, 196, 0.24);
  border-radius: 999px;
  background: rgba(7, 14, 22, 0.82);
  color: #e6f0fb;
  padding: 0.35rem 0.72rem;
  font-size: 0.76rem;
  cursor: default;
}

.prototype-presence-chip:focus-visible {
  outline: 2px solid rgba(122, 195, 255, 0.92);
  outline-offset: 2px;
}

.prototype-presence-chip::before {
  content: "";
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: var(--prototype-presence-accent, #7aa5d8);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.prototype-presence-card {
  position: absolute;
  top: calc(100% + 0.42rem);
  left: 0;
  z-index: 30;
  min-width: 260px;
  max-width: 360px;
  display: grid;
  gap: 0.38rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(128, 162, 196, 0.26);
  border-radius: 16px;
  background: rgba(9, 14, 20, 0.98);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
  color: #eef7ff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.prototype-presence-chip-shell:hover .prototype-presence-card,
.prototype-presence-chip-shell:focus-within .prototype-presence-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.prototype-presence-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.prototype-presence-card-head strong {
  font-size: 0.86rem;
  color: #f5fbff;
}

.prototype-presence-card-kicker {
  color: rgba(187, 206, 228, 0.82);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-presence-card-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.prototype-presence-card-row > span:first-child {
  color: rgba(176, 196, 218, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.64rem;
  padding-top: 0.1rem;
}

.prototype-presence-card-row > span:last-child {
  display: grid;
  gap: 0.12rem;
  color: #d8e6f3;
  font-size: 0.76rem;
}

.prototype-presence-card-row > span:last-child small {
  color: rgba(176, 196, 218, 0.76);
  font-size: 0.66rem;
}

.narrative-badge-stack,
.narrative-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.narrative-toolbar-mode {
  display: flex;
  align-items: center;
}

.narrative-toolbar-menu {
  position: relative;
  display: flex;
  align-items: stretch;
  outline: none;
}

.narrative-toolbar-menu-toggle {
  min-width: 6.4rem;
  justify-content: center;
  cursor: pointer;
}

.narrative-toolbar-menu-panel {
  position: absolute;
  top: calc(100% + 0.38rem);
  right: 0;
  z-index: 40;
  min-width: max(100%, 11rem);
  display: grid;
  gap: 0.35rem;
  padding: 0.42rem;
  border: 1px solid rgba(95, 118, 146, 0.7);
  border-radius: 14px;
  background: rgba(11, 20, 31, 0.98);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.15rem);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.narrative-toolbar-menu.is-open .narrative-toolbar-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.narrative-toolbar-menu-panel .button {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}

.narrative-toolbar-menu.is-disabled {
  pointer-events: none;
}

.narrative-toolbar-menu.is-disabled .narrative-toolbar-menu-toggle {
  opacity: 0.55;
  cursor: not-allowed;
}

.narrative-count-badge {
  border: 1px solid rgba(95, 118, 146, 0.7);
  background: rgba(18, 30, 43, 0.92);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-size: 0.74rem;
  color: #d6e8ff;
}

.narrative-toolbar .button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

#prototype-persistence-notice {
  border-color: rgba(67, 144, 207, 0.62);
  background: rgba(12, 28, 44, 0.72);
  color: #d6e8ff;
}

#prototype-persistence-notice[hidden] {
  display: none !important;
}

#prototype-persistence-notice.is-warn {
  border-color: #7f6733;
  background: #2d2618;
  color: #ffe3a7;
}

#prototype-persistence-notice.is-error {
  border-color: rgba(255, 107, 107, 0.76);
  background: rgba(54, 10, 10, 0.84);
  color: #ffd2d2;
}

.prototype-persistence-status {
  margin: 0.72rem 0 0.82rem;
  padding: 0.7rem 0.82rem;
  border: 1px solid rgba(63, 82, 103, 0.78);
  border-radius: 12px;
  background: rgba(12, 20, 30, 0.86);
  color: #d6e8ff;
  font-size: 0.82rem;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  overflow-wrap: anywhere;
}

.prototype-persistence-status[hidden] {
  display: none !important;
}

.prototype-persistence-status.is-ready {
  border-color: rgba(67, 144, 207, 0.78);
  background: rgba(12, 28, 44, 0.9);
}

.prototype-persistence-status.is-warn {
  border-color: rgba(255, 200, 92, 0.76);
  color: #ffe0a0;
}

.prototype-persistence-status.is-error {
  border-color: rgba(255, 107, 107, 0.78);
  background: rgba(54, 10, 10, 0.76);
  color: #ffd2d2;
}

.prototype-persistence-status-body {
  min-width: 0;
  flex: 1 1 auto;
}

.prototype-persistence-status-segments {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.prototype-persistence-status-segment {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.prototype-persistence-status-label {
  color: rgba(240, 246, 253, 0.9);
}

.prototype-persistence-status-value,
.prototype-persistence-status-message {
  color: inherit;
}

.prototype-persistence-status-separator {
  width: 0.32rem;
  height: 0.32rem;
  margin: 0 0.38rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.58;
}

.prototype-persistence-status-dismiss {
  flex: 0 0 auto;
  min-width: 1.5rem;
  margin: -0.06rem 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.76;
  cursor: pointer;
}

.prototype-persistence-status-dismiss:hover,
.prototype-persistence-status-dismiss:focus-visible {
  opacity: 1;
}

.prototype-draft-banner {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  padding: 0.78rem 0.92rem;
  border: 1px solid rgba(67, 144, 207, 0.7);
  border-radius: 14px;
  background: rgba(11, 24, 37, 0.92);
  color: #dcecff;
}

.prototype-draft-banner[hidden] {
  display: none !important;
}

.prototype-draft-banner.is-warn {
  border-color: rgba(255, 200, 92, 0.72);
  background: rgba(45, 35, 18, 0.92);
  color: #ffe6ae;
}

.prototype-draft-banner-copy {
  display: grid;
  gap: 0.35rem;
}

.prototype-draft-banner-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fc3e7;
}

.prototype-draft-banner.is-warn .prototype-draft-banner-title {
  color: #ffd37c;
}

.prototype-draft-banner-text {
  font-size: 0.88rem;
  line-height: 1.48;
}

.prototype-draft-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.prototype-auth-panel {
  margin: 0 0 0.9rem;
}

.prototype-auth-card {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(63, 82, 103, 0.78);
  border-radius: 18px;
  background: rgba(10, 17, 24, 0.9);
}

.prototype-auth-copy {
  display: grid;
  gap: 0.32rem;
  flex: 1 1 16rem;
}

.prototype-auth-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9cb0c9;
}

.prototype-auth-helper {
  color: #d6e8ff;
  font-size: 0.9rem;
  line-height: 1.5;
}

.prototype-auth-form {
  align-items: stretch;
}

.prototype-auth-field {
  display: grid;
  gap: 0.35rem;
  min-width: 12rem;
  flex: 0 1 14rem;
  color: #d6e8ff;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.prototype-auth-field select,
.prototype-auth-field input {
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 12px;
  background: rgba(15, 25, 37, 0.96);
  color: #fff;
  padding: 0.72rem 0.8rem;
  font: inherit;
}

.prototype-auth-field select:focus,
.prototype-auth-field input:focus {
  outline: none;
  border-color: #8ecbff;
  box-shadow: 0 0 0 2px rgba(56, 130, 196, 0.24);
}

.prototype-history-panel {
  margin: 0.95rem 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(63, 82, 103, 0.78);
  border-radius: 18px;
  background: rgba(10, 17, 24, 0.9);
}

.prototype-history-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.prototype-history-subtitle {
  margin: 0.3rem 0 0;
}

.prototype-history-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.95rem;
}

.prototype-history-compare-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(72, 97, 123, 0.78);
  border-radius: 14px;
  background: rgba(14, 24, 35, 0.82);
}

.prototype-history-compare-copy {
  display: grid;
  gap: 0.28rem;
}

.prototype-history-compare-title {
  color: #f1f6fc;
  font-weight: 700;
}

.prototype-history-compare-actions,
.prototype-history-entry-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.prototype-history-compare-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0.28rem 0.66rem;
  border: 1px solid rgba(110, 149, 190, 0.7);
  border-radius: 999px;
  background: rgba(19, 33, 48, 0.92);
  color: #d6ebff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prototype-history-entry {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(63, 82, 103, 0.78);
  border-radius: 14px;
  background: rgba(14, 24, 35, 0.9);
}

.prototype-history-entry-topline,
.prototype-history-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

.prototype-history-entry-subject {
  color: #f1f6fc;
  font-weight: 700;
}

.prototype-conflict-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  justify-items: center;
  align-content: start;
  overflow: auto;
  padding: 1.2rem;
  background: rgba(4, 9, 15, 0.78);
}

.prototype-conflict-modal.is-centered {
  align-content: center;
}

.prototype-conflict-modal[hidden] {
  display: none !important;
}

.prototype-conflict-backdrop {
  position: absolute;
  inset: 0;
}

.prototype-conflict-card {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 2.4rem));
  max-height: calc(100vh - 2.4rem);
  overflow: auto;
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid rgba(90, 124, 160, 0.72);
  border-radius: 22px;
  background: rgba(9, 17, 26, 0.98);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

.prototype-confirm-card {
  width: min(560px, calc(100vw - 2.4rem));
  gap: 0.9rem;
}

.prototype-confirm-card.is-warn {
  border-color: rgba(195, 153, 72, 0.68);
}

.prototype-confirm-card.is-danger {
  border-color: rgba(173, 92, 92, 0.72);
}

.prototype-conflict-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.prototype-conflict-head h3 {
  margin: 0;
  font-size: 1rem;
}

.prototype-conflict-copy {
  display: grid;
  gap: 0.45rem;
}

.prototype-conflict-copy .meta {
  margin: 0;
}

.prototype-confirm-copy {
  gap: 0.32rem;
}

.prototype-confirm-message {
  color: #dce9f6;
  line-height: 1.55;
}

.prototype-conflict-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.prototype-conflict-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  background: rgba(15, 25, 37, 0.96);
  color: #d8ebff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prototype-conflict-body {
  display: grid;
  gap: 0.9rem;
}

.prototype-conflict-path {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(82, 106, 129, 0.68);
  border-radius: 16px;
  background: rgba(12, 22, 33, 0.94);
}

.prototype-conflict-path-label {
  color: #f2f7fd;
  font-weight: 700;
}

.prototype-conflict-path-code {
  color: #9cbad7;
  font-size: 0.78rem;
  word-break: break-word;
}

.prototype-conflict-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.prototype-conflict-column {
  display: grid;
  gap: 0.6rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(63, 82, 103, 0.78);
  border-radius: 16px;
  background: rgba(12, 21, 31, 0.94);
}

.prototype-conflict-column h4 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a7c6e4;
}

.prototype-conflict-preview {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #eef6ff;
  line-height: 1.5;
  font-size: 0.88rem;
}

.prototype-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.prototype-conflict-choice-row,
.prototype-conflict-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.prototype-confirm-actions {
  padding-top: 0.1rem;
}

.prototype-confirm-actions .prototype-conflict-footer-actions {
  justify-content: flex-end;
}

.prototype-conflict-confirm-button.is-warn {
  border-color: rgba(195, 153, 72, 0.84);
  background: rgba(76, 53, 10, 0.86);
  color: #ffe7b8;
}

.prototype-conflict-confirm-button.is-danger {
  border-color: rgba(173, 92, 92, 0.84);
  background: rgba(66, 24, 24, 0.88);
  color: #ffd3d3;
}

.prototype-export-card {
  gap: 0.85rem;
}

.prototype-export-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.prototype-export-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #dce8f4;
  font-size: 0.84rem;
}

.prototype-export-toggle input {
  margin: 0;
}

.prototype-export-status {
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(90, 124, 160, 0.58);
  border-radius: 12px;
  background: rgba(14, 24, 35, 0.86);
  color: #dbe8f7;
  font-size: 0.82rem;
}

.prototype-export-status.is-success {
  border-color: rgba(104, 188, 126, 0.62);
  color: #d7f3de;
}

.prototype-export-status.is-warn {
  border-color: rgba(220, 171, 78, 0.66);
  color: #ffe2aa;
}

.prototype-export-status.is-error {
  border-color: rgba(220, 94, 94, 0.62);
  color: #ffc1c1;
}

.prototype-export-preview {
  width: 100%;
  min-height: 26rem;
  resize: vertical;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(92, 118, 145, 0.72);
  border-radius: 16px;
  background: rgba(5, 10, 16, 0.96);
  color: #f4f8fc;
  font-family: "Courier New", monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre;
}

.prototype-export-preview:focus {
  outline: 1px solid rgba(142, 181, 225, 0.78);
  outline-offset: 1px;
}

.prototype-compare-card {
  width: min(1180px, calc(100vw - 2.4rem));
}

.prototype-compare-summary {
  color: #a8bfd7;
  font-size: 0.82rem;
}

.prototype-compare-version-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.prototype-compare-version-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0.3rem 0.68rem;
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  background: rgba(15, 25, 37, 0.96);
  color: #d8ebff;
  font-size: 0.78rem;
}

.prototype-compare-path {
  gap: 0.7rem;
}

.prototype-compare-path-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.prototype-compare-kind {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(91, 115, 140, 0.72);
}

.prototype-compare-kind-added {
  background: rgba(23, 56, 38, 0.88);
  border-color: rgba(89, 164, 112, 0.72);
  color: #bbf1ca;
}

.prototype-compare-kind-removed {
  background: rgba(68, 27, 27, 0.88);
  border-color: rgba(188, 92, 92, 0.72);
  color: #ffd2d2;
}

.prototype-compare-kind-changed {
  background: rgba(38, 45, 69, 0.88);
  border-color: rgba(112, 136, 192, 0.72);
  color: #d7e3ff;
}

.prototype-compare-column:first-child {
  border-color: rgba(170, 98, 98, 0.48);
  background: rgba(29, 16, 19, 0.82);
}

.prototype-compare-column:last-child {
  border-color: rgba(88, 155, 108, 0.48);
  background: rgba(16, 27, 21, 0.82);
}

.prototype-inline-compare-section {
  display: grid;
  gap: 0.8rem;
}

.prototype-compare-mode-panel {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(91, 115, 140, 0.5);
  border-radius: 18px;
  background: rgba(13, 22, 32, 0.9);
}

.prototype-compare-mode-kicker {
  color: #8ecbff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-compare-mode-heading {
  color: #f2f8ff;
  font-size: 1rem;
  font-weight: 700;
}

.prototype-compare-mode-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.prototype-compare-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.32rem 0.68rem;
  border: 1px solid rgba(91, 115, 140, 0.65);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.92);
  color: #d7e8ff;
  font-size: 0.78rem;
}

.prototype-inline-compare-section-title {
  color: #d9ebff;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-inline-compare-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.prototype-inline-compare-script {
  display: grid;
  gap: 0.9rem;
}

.prototype-inline-compare-block {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
  margin-left: calc(var(--compare-depth, 0) * 1rem);
  border: 1px solid rgba(87, 111, 136, 0.42);
  border-radius: 1rem;
  background: rgba(10, 16, 24, 0.9);
}

.prototype-inline-compare-block.is-added {
  border-color: rgba(118, 187, 137, 0.44);
  background: rgba(17, 31, 22, 0.52);
}

.prototype-inline-compare-block.is-removed {
  border-color: rgba(198, 114, 114, 0.42);
  background: rgba(39, 20, 24, 0.48);
}

.prototype-inline-compare-block.is-moved {
  border-color: rgba(213, 183, 96, 0.68);
  background: rgba(38, 31, 14, 0.42);
  box-shadow: 0 0 0 1px rgba(213, 183, 96, 0.18);
}

.prototype-inline-compare-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.prototype-inline-compare-kicker {
  color: #d9ebff;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-inline-compare-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prototype-inline-compare-badge.is-added {
  background: rgba(38, 86, 55, 0.58);
  color: #d2f6dc;
}

.prototype-inline-compare-badge.is-removed {
  background: rgba(106, 48, 48, 0.56);
  color: #ffdcdc;
}

.prototype-inline-compare-badge.is-moved {
  background: rgba(112, 89, 28, 0.62);
  color: #ffe9a8;
}

.prototype-inline-compare-badge.is-changed {
  background: rgba(56, 102, 141, 0.52);
  color: #d7efff;
}

.prototype-inline-compare-block-body {
  display: grid;
  gap: 0.5rem;
}

.prototype-inline-compare-line {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.prototype-inline-compare-line-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.prototype-inline-compare-line.is-speaker .prototype-inline-compare-text {
  color: #f1f7ff;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prototype-inline-compare-line.is-meta .prototype-inline-compare-text,
.prototype-inline-compare-field-label {
  color: #8eaed0;
  font-size: 0.78rem;
}

.prototype-inline-compare-line.is-subsection .prototype-inline-compare-text {
  color: #f1f7ff;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-inline-compare-prefix {
  min-width: 3.75rem;
  color: #8fb6da;
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  line-height: 1.55;
}

.prototype-inline-compare-text {
  flex: 1;
  min-width: 0;
  color: #dcecff;
  font-family: "Courier New", monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.prototype-inline-compare-field {
  display: grid;
  gap: 0.32rem;
}

.prototype-inline-diff-same {
  color: inherit;
}

.prototype-inline-diff-added {
  color: #c7f5d2;
  background: rgba(49, 110, 67, 0.2);
}

.prototype-inline-diff-removed {
  color: #ffd3d3;
  background: rgba(145, 47, 47, 0.18);
}

.prototype-inline-diff-gap {
  display: inline-block;
  min-width: 0.5em;
}

.prototype-script-compare-preview {
  display: grid;
  gap: 0.15rem;
}

.prototype-script-node-compare-preview {
  margin: 0.3rem 0;
  padding: 0.4rem 0.55rem 0.5rem;
  border: 1px solid rgba(87, 111, 136, 0.32);
  border-radius: 1rem;
  background: rgba(8, 14, 21, 0.36);
}

.prototype-script-node-compare-preview.is-added {
  border-color: rgba(118, 187, 137, 0.44);
  background: rgba(17, 31, 22, 0.26);
}

.prototype-script-node-compare-preview.is-removed {
  border-color: rgba(198, 114, 114, 0.42);
  background: rgba(39, 20, 24, 0.24);
}

.prototype-script-node-compare-preview.is-moved {
  border-color: rgba(213, 183, 96, 0.68);
  background: rgba(38, 31, 14, 0.2);
  box-shadow: 0 0 0 1px rgba(213, 183, 96, 0.14);
}

.prototype-script-node-compare-preview.is-changed {
  border-color: rgba(92, 146, 194, 0.46);
  background: rgba(13, 27, 42, 0.24);
}

.prototype-script-compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 0.3rem;
}

.prototype-script-compare-label {
  color: rgba(184, 216, 247, 0.82);
  font-family: "Courier New", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-compare-dialogue-line {
  display: grid;
  gap: 0.08rem;
  padding: 0.08rem 0;
}

.prototype-compare-dialogue-line.is-added,
.prototype-compare-dialogue-line.is-removed,
.prototype-compare-dialogue-line.is-moved,
.prototype-compare-dialogue-line.is-changed {
  padding: 0.18rem 0.28rem;
  border-radius: 0.6rem;
}

.prototype-compare-dialogue-line.is-added {
  background: rgba(49, 110, 67, 0.16);
}

.prototype-compare-dialogue-line.is-removed {
  background: rgba(145, 47, 47, 0.16);
}

.prototype-compare-dialogue-line.is-moved {
  background: rgba(112, 89, 28, 0.16);
}

.prototype-compare-dialogue-line.is-changed {
  background: rgba(56, 102, 141, 0.14);
}

.prototype-compare-dialogue-line-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.prototype-compare-dialogue-line .twine-dialogue-text {
  flex: 1;
  min-width: 0;
}

@media (max-width: 820px) {
  .prototype-conflict-columns {
    grid-template-columns: 1fr;
  }

  .prototype-inline-compare-block {
    margin-left: calc(var(--compare-depth, 0) * 0.5rem);
    padding: 0.8rem 0.85rem;
  }

  .prototype-inline-compare-line {
    gap: 0.45rem;
  }

  .prototype-inline-compare-prefix {
    min-width: 3.15rem;
  }
}

.prototype-history-entry-meta {
  color: #a8bfd7;
  font-size: 0.8rem;
  line-height: 1.45;
}

.prototype-history-entry-hash {
  display: inline-flex;
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  padding: 0.22rem 0.54rem;
  background: rgba(17, 28, 40, 0.9);
  color: #bfeaff;
  font-family: "Courier New", monospace;
  font-size: 0.74rem;
}

.prototype-story-nav {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.prototype-nav-group {
  border: 1px solid rgba(58, 80, 103, 0.82);
  border-radius: 14px;
  background: rgba(13, 22, 32, 0.92);
  overflow: hidden;
}

.prototype-nav-group.is-dirty {
  border-color: #ffc85c;
}

.prototype-nav-group summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.82rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e2efff;
  background: rgba(18, 29, 41, 0.95);
}

.prototype-nav-count {
  flex: 0 0 auto;
  min-width: 1.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #b9cfe5;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.16rem 0.48rem;
  text-align: center;
}

.prototype-nav-list {
  display: grid;
  gap: 0.6rem;
  padding: 0.8rem;
}

.prototype-nav-add-button {
  width: 100%;
  border: 1px dashed rgba(116, 146, 180, 0.72);
  border-radius: 12px;
  background: rgba(17, 28, 40, 0.58);
  color: #b8d8f7;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.72rem 0.8rem;
  text-align: left;
  cursor: pointer;
}

.prototype-nav-add-button:hover,
.prototype-nav-add-button:focus-visible {
  border-color: #8ecbff;
  background: rgba(22, 34, 49, 0.86);
  outline: none;
}

.prototype-nav-button {
  width: 100%;
  border: 1px solid rgba(63, 82, 103, 0.78);
  border-radius: 12px;
  background: rgba(16, 25, 35, 0.94);
  color: inherit;
  padding: 0.8rem;
  text-align: left;
  cursor: pointer;
}

.prototype-nav-button:hover,
.prototype-nav-button:focus-visible {
  border-color: #8ecbff;
  outline: none;
}

.prototype-nav-button.is-active {
  border-color: #8ecbff;
  background: rgba(20, 31, 45, 0.98);
}

.prototype-nav-button.is-dirty {
  border-color: #ffc85c;
}

.prototype-nav-title {
  display: block;
  margin-top: 0.35rem;
  color: #d7e7fb;
  font-size: 0.84rem;
  line-height: 1.35;
}

.prototype-nav-subtitle {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.38;
}

.prototype-nav-placeholder {
  padding: 0.85rem 0.9rem;
  color: #95abc3;
  font-size: 0.8rem;
  line-height: 1.45;
}

.prototype-map-view-shell {
  display: grid;
  gap: 0.8rem;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}

.prototype-map-panel {
  display: grid;
  gap: 0.95rem;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(63, 82, 103, 0.78);
  border-radius: 18px;
  background: rgba(10, 17, 24, 0.9);
  min-height: 0;
  height: 100%;
}

.prototype-map-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.prototype-map-panel-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.prototype-map-view-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.prototype-map-view-copy {
  color: #afc5de;
  font-size: 0.85rem;
  line-height: 1.45;
}

.prototype-map-view-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.prototype-map-zoom-label {
  min-width: 3.8rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #d9ecff;
}

.prototype-map-viewport {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: 18px;
  border: 1px solid rgba(74, 95, 119, 0.7);
  background:
    linear-gradient(180deg, rgba(10, 17, 24, 0.92), rgba(10, 17, 24, 0.98)),
    radial-gradient(420px 260px at 82% 12%, rgba(89, 172, 235, 0.18), transparent 70%);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.prototype-map-viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 155, 190, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 155, 190, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.prototype-map-viewport:active {
  cursor: grabbing;
}

.prototype-map-canvas {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.prototype-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.prototype-map-column-label {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 176px;
  max-width: 220px;
  border: 1px solid rgba(80, 107, 133, 0.78);
  border-radius: 999px;
  background: rgba(11, 20, 30, 0.92);
  color: #d7ebff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.44rem 0.8rem;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.prototype-map-column-label.is-misc {
  border-color: rgba(129, 164, 202, 0.78);
  color: #c7e3ff;
}

.prototype-map-column-label.is-unassigned {
  border-color: rgba(255, 200, 92, 0.74);
  color: #ffe1a3;
}

.prototype-map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 176px;
  border: 1px solid rgba(84, 113, 142, 0.82);
  border-radius: 14px;
  background: rgba(18, 28, 39, 0.96);
  padding: 0.48rem 0.62rem;
  text-align: left;
  color: var(--ink);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.prototype-map-node:hover,
.prototype-map-node:focus-visible {
  border-color: #8ecbff;
  outline: none;
}

.prototype-map-node.is-active {
  border-color: #8ecbff;
  box-shadow: 0 0 0 1px rgba(142, 203, 255, 0.34), 0 18px 28px rgba(0, 0, 0, 0.35);
}

.prototype-map-node.is-dirty {
  border-color: #ffc85c;
}

.prototype-map-node.is-misc {
  border-color: rgba(133, 165, 201, 0.88);
  background: rgba(19, 32, 49, 0.96);
}

.prototype-map-node-code {
  display: block;
  font-size: 0.74rem;
  color: #d7e8ff;
}

.prototype-map-node-title {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.9rem;
  line-height: 1.2;
}

.prototype-scene-list-topline,
.prototype-scene-list-bottomline {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

.prototype-scene-list-topline-right {
  justify-content: flex-end;
}

.prototype-scene-list-title {
  margin: 0.25rem 0 0;
  color: #d7e7fb;
  font-size: 0.82rem;
  line-height: 1.35;
}

.prototype-scene-list-summary {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.prototype-chip-row,
.prototype-mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.prototype-chip {
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  padding: 0.22rem 0.54rem;
  background: rgba(17, 28, 40, 0.9);
  color: #d7e8ff;
  font-size: 0.74rem;
}

.prototype-chip-ghost {
  background: rgba(12, 20, 30, 0.72);
  color: #9ab1ca;
}

.prototype-chip-warn {
  border-color: rgba(255, 200, 92, 0.8);
  color: #ffd785;
}

.prototype-chip-accent {
  border-color: rgba(146, 219, 255, 0.75);
  color: #bfeaff;
}

.prototype-scene-view {
  margin-top: 1rem;
}

@media (min-width: 1121px) {
  .narrative-workspace-main {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .narrative-workspace-layout {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    align-items: stretch;
  }

  .narrative-sidebar-rail,
  .narrative-workspace-main-column {
    min-height: 0;
  }

  .narrative-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    height: 100%;
  }

  .narrative-workspace-main-column {
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
  }

  .narrative-workspace-main-column.has-map-view {
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }

  .prototype-map-route-slot {
    min-height: 0;
    overflow: hidden;
  }

  .narrative-editor {
    min-height: 100%;
    height: 100%;
    margin-bottom: 0;
    overflow: hidden;
  }
}

.prototype-toolbar-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.prototype-toolbar-history-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.prototype-compare-toolbar {
  margin-top: 0.6rem;
}

.prototype-compare-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
}

.prototype-session-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.prototype-session-button-row-mode {
  gap: 0;
}

.prototype-session-button-row-mode .prototype-session-button {
  position: relative;
  border-radius: 0;
  margin-left: -1px;
  z-index: 0;
}

.prototype-session-button-row-mode .prototype-session-button:first-child {
  margin-left: 0;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.prototype-session-button-row-mode .prototype-session-button:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.prototype-compare-target-label {
  color: #c9d8ea;
  font-size: 0.9rem;
  line-height: 1.25;
}

.prototype-session-button-row-compare-filter {
  gap: 0;
}

.prototype-compare-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.prototype-compare-filter-label {
  color: #8ea6c2;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.prototype-compare-target-prefix {
  color: #8ea6c2;
}

.prototype-compare-target-value {
  color: #f2f7ff;
  font-weight: 600;
}

.prototype-session-button {
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.9);
  color: #d7e8ff;
  padding: 0.3rem 0.72rem;
  font: inherit;
  cursor: pointer;
}

.prototype-session-button-compact {
  padding: 0.28rem 0.58rem;
}

.prototype-session-button.is-active {
  border-color: #8ecbff;
  background: rgba(25, 47, 68, 0.95);
  color: #fff;
}

.prototype-session-button-row-mode .prototype-session-button:hover,
.prototype-session-button-row-mode .prototype-session-button:focus-visible,
.prototype-session-button-row-mode .prototype-session-button.is-active {
  z-index: 1;
}

.prototype-session-button.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prototype-session-pill {
  border: 1px solid rgba(67, 144, 207, 0.78);
  border-radius: 999px;
  background: rgba(14, 38, 57, 0.94);
  color: #fff;
  padding: 0.3rem 0.72rem;
  font-size: 0.86rem;
}

.prototype-editable {
  transition: box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
  border-radius: 4px;
  white-space: pre-wrap;
}

.prototype-editable[contenteditable="true"] {
  cursor: text;
}

.prototype-editable[contenteditable="true"]:hover {
  background: rgba(255, 255, 255, 0.06);
}

.prototype-editable[contenteditable="true"]:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(142, 203, 255, 0.48);
}

.twine-stage-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.55rem;
}

.twine-stage-header p {
  margin: 0.2rem 0 0;
}

.prototype-scene-code-editor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.prototype-scene-code-prefix {
  color: #f3f8fe;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.prototype-scene-code-act,
.prototype-scene-code-number,
.prototype-scene-code-suffix {
  width: auto;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.prototype-scene-code-act {
  min-width: 12rem;
  text-transform: uppercase;
}

.prototype-scene-code-number {
  width: 5.2rem;
}

.prototype-scene-identity {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
  justify-items: center;
  text-align: center;
}

.prototype-scene-identity-line {
  color: #9fc3e7;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.prototype-scene-identity-line-edit {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.prototype-scene-identity-line-edit > * {
  flex: 0 0 auto;
}

.prototype-scene-identity-line-edit .prototype-scene-code-act {
  width: 12rem;
  min-width: 12rem;
  max-width: 12rem;
  min-height: 2rem;
  height: 2rem;
  padding-top: 0;
  padding-bottom: 0;
}

.prototype-scene-identity-line-edit .prototype-scene-code-number {
  width: 5.2rem;
  min-width: 5.2rem;
  max-width: 5.2rem;
  min-height: 2rem;
  height: 2rem;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 2rem;
  text-align: center;
}

.prototype-scene-display-title {
  display: block;
  margin: 0;
  color: #fff;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.8rem, 1.4rem + 1.3vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.08;
  text-align: center;
}

.prototype-scene-tag-row {
  margin-top: 0.1rem;
  justify-content: center;
}

.twine-stage-surface {
  border: 1px solid rgba(50, 74, 100, 0.78);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(520px 220px at 82% 12%, rgba(80, 134, 188, 0.12), transparent 60%),
    #000;
}

.twine-story-surface {
  padding: clamp(1.2rem, 2.3vw, 2.2rem);
  color: #fff;
  font-family: Georgia, serif;
  font-size: clamp(0.98rem, 0.42vw + 0.9rem, 1.15rem);
  line-height: 1.5em;
}

.twine-stage-meta {
  margin-bottom: 0.7rem;
}

.prototype-scene-transport {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.prototype-scene-transport-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.prototype-scene-transport-group.is-next {
  justify-content: flex-end;
}

.prototype-scene-transport-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2.2rem;
  border: 1px solid rgba(106, 141, 179, 0.78);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.84);
  color: #d5ebff;
  font: inherit;
  padding: 0.38rem 0.84rem;
  cursor: pointer;
}

.prototype-scene-transport-button:hover,
.prototype-scene-transport-button:focus-visible {
  border-color: #8ecbff;
  outline: none;
  background: rgba(25, 47, 68, 0.95);
}

.prototype-scene-transport-button.is-disabled {
  border-style: dashed;
  color: #99b1cb;
  cursor: default;
}

.prototype-scene-meta-row {
  justify-content: flex-end;
}

.prototype-scene-structure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-left: auto;
}

.prototype-scene-delete-button {
  border-color: rgba(198, 98, 98, 0.75);
  color: #ffd0d0;
}

.prototype-scene-delete-button:hover,
.prototype-scene-delete-button:focus-visible {
  background: rgba(100, 33, 33, 0.72);
}

.twine-act-block {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 1.45em;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  margin-top: 0.4em;
}

.twine-scene-block {
  display: block;
  font-family: Arial, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  text-align: left;
  margin: 1em 0 0.7em;
  background-color: rgba(70, 40, 40, 1);
  padding: 5px 10px;
}

.twine-scene-title {
  font-size: 1.08em;
  line-height: 1.24;
}

.nb-overview {
  margin: 0.26em 0 0.48em;
}

@media (min-width: 576px) {
  .nb-story-script {
    margin-left: -18%;
    margin-right: -18%;
  }

  .nb-overview {
    margin-left: 0;
    margin-right: 0;
  }
}

.nb-overview details,
.nb-story-script {
  margin: 0 0 0.38em;
  padding: 0.2em 0.62em 0.26em;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.nb-overview details {
  overflow: hidden;
}

.nb-overview details:last-child {
  margin-bottom: 0.34em;
}

.nb-overview summary,
.nb-story-script > summary {
  cursor: pointer;
  list-style-position: inside;
  font-family: Arial, sans-serif;
  font-size: 0.98em;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.16;
  margin: 0;
}

.nb-overview details[open] summary,
.nb-story-script[open] > summary {
  margin-bottom: 0.06em;
}

.nb-overview .nb-detail-body {
  color: #fff;
  text-align: left;
  line-height: 1.24;
}

.nb-overview .nb-detail-body p {
  margin: 0.12em 0;
}

.nb-overview .nb-detail-body p + p {
  margin-top: 0.34em;
}

.nb-overview .nb-detailed-section {
  margin: 0 0 0.22em;
  padding: 0 0 0.16em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nb-overview .nb-detailed-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.prototype-detailed-rows {
  display: grid;
  gap: 0.42rem;
}

.prototype-structured-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
}

.prototype-detailed-row,
.prototype-misc-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
}

.prototype-detailed-row-bullet {
  color: rgba(189, 215, 239, 0.72);
  line-height: 1.5;
  padding-top: 0.08rem;
}

.prototype-setting-row {
  grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) minmax(0, 9.25rem) auto;
}

.prototype-detailed-value,
.prototype-detailed-description-value {
  min-width: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.prototype-detailed-description {
  display: grid;
}

.prototype-structured-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.prototype-structured-add,
.prototype-structured-remove {
  border: 1px solid rgba(88, 112, 138, 0.72);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.78);
  color: #d7e8ff;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.24rem 0.68rem;
  cursor: pointer;
}

.prototype-structured-remove {
  border-color: rgba(145, 104, 104, 0.72);
  background: rgba(40, 18, 18, 0.78);
  color: #ffd8d8;
}

.prototype-structured-add:hover,
.prototype-structured-remove:hover,
.prototype-structured-add:focus-visible,
.prototype-structured-remove:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.nb-overview .nb-section-title {
  margin: 0 0 0.06em;
  font-family: Arial, sans-serif;
  font-size: 0.9em;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.nb-overview ul {
  margin: 0.12em 0 0.18em 1.04em;
  padding: 0;
}

.prototype-registry-editor {
  display: grid;
  gap: 0.5rem;
  margin: 0.12em 0 0.18em;
}

.prototype-registry-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.prototype-registry-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  padding: 0.22rem 0.3rem 0.22rem 0.56rem;
  background: rgba(17, 28, 40, 0.88);
  color: #d7e8ff;
  font-size: 0.82em;
}

.prototype-registry-chip.is-unregistered {
  border-color: rgba(255, 147, 147, 0.7);
  background: rgba(60, 15, 15, 0.82);
  color: #ffd1d1;
}

.prototype-registry-remove {
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  width: 1.4rem;
  height: 1.4rem;
  cursor: pointer;
}

.prototype-registry-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.prototype-registry-input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  padding: 0.2rem 0.55rem;
}

.prototype-registry-add {
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.9);
  color: #d7e8ff;
  font: inherit;
  padding: 0.3rem 0.72rem;
  cursor: pointer;
}

.prototype-registry-input:hover,
.prototype-registry-add:hover,
.prototype-registry-remove:hover {
  background: rgba(255, 255, 255, 0.1);
}

.prototype-registry-input:focus {
  outline: none;
  border-color: rgba(142, 203, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(142, 203, 255, 0.22);
}

.nb-overview li {
  margin: 0.04em 0;
  line-height: 1.14;
}

.nb-overview .prototype-reference-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.prototype-reference-blocks {
  display: grid;
  gap: 0.8rem;
}

.prototype-animatic-body {
  gap: 0.8rem;
}

.prototype-animatic-player-shell:empty {
  display: none;
}

.prototype-animatic-stage {
  display: grid;
  gap: 0.8rem;
}

.prototype-animatic-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
}

.prototype-animatic-play-toggle {
  display: grid;
  place-items: center;
  width: 2.85rem;
  min-width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.prototype-animatic-controls-main {
  display: grid;
  gap: 0.18rem;
}

.prototype-animatic-video {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.58);
}

.prototype-animatic-active-cue {
  font-family: "Courier New", monospace;
  font-size: 0.73rem;
  line-height: 1.45;
  color: rgba(203, 224, 244, 0.84);
  min-height: 1.2rem;
  text-align: center;
}

.prototype-animatic-active-cue:empty {
  display: none;
}

.prototype-animatic-scrubber-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.prototype-animatic-scrubber-time {
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  color: rgba(209, 225, 240, 0.82);
}

.prototype-animatic-scrubber-wrap {
  position: relative;
  padding: 0.24rem 0 0.05rem;
}

.prototype-animatic-scrubber {
  width: 100%;
  margin: 0;
}

.prototype-animatic-marker-row {
  position: relative;
  height: 1.8rem;
  margin-top: 0.1rem;
}

.prototype-animatic-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.14rem;
  border: none;
  background: transparent;
  color: rgba(225, 236, 247, 0.9);
  cursor: pointer;
  padding: 0;
}

.prototype-animatic-marker-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  border: 2px solid rgba(155, 211, 255, 0.8);
  background: rgba(12, 24, 38, 0.95);
  box-shadow: 0 0 0 3px rgba(155, 211, 255, 0.14);
}

.prototype-animatic-marker-label {
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
}

.prototype-animatic-marker:hover .prototype-animatic-marker-dot,
.prototype-animatic-marker:focus-visible .prototype-animatic-marker-dot,
.prototype-animatic-marker.is-active .prototype-animatic-marker-dot {
  background: rgba(155, 211, 255, 0.84);
}

.prototype-animatic-cue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}

.prototype-animatic-cue-list.is-single {
  grid-template-columns: 1fr;
}

.prototype-animatic-cue-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem 0.72rem;
  border: 1px solid rgba(107, 137, 167, 0.3);
  border-radius: 10px;
  background: rgba(20, 33, 47, 0.72);
}

.prototype-animatic-cue-card.is-active {
  border-color: rgba(155, 211, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(155, 211, 255, 0.2);
}

.prototype-animatic-cue-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.prototype-animatic-cue-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: rgba(242, 247, 252, 0.96);
}

.prototype-animatic-cue-card-time,
.prototype-animatic-cue-card-kind {
  font-family: "Courier New", monospace;
  font-size: 0.69rem;
  color: rgba(188, 211, 233, 0.8);
}

.prototype-animatic-cue-token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.prototype-animatic-cue-token {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(116, 149, 181, 0.45);
  border-radius: 999px;
  background: rgba(12, 24, 38, 0.88);
  color: rgba(229, 239, 249, 0.88);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.45rem;
}

.prototype-animatic-jump-button {
  justify-self: start;
  padding: 0.3rem 0.55rem;
}

.prototype-animatic-editor {
  display: grid;
  gap: 0.75rem;
}

.prototype-animatic-editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.prototype-animatic-editor-toolbar-actions,
.prototype-animatic-editor-response-tools,
.prototype-animatic-editor-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.prototype-animatic-editor-field {
  display: grid;
  gap: 0.28rem;
}

.prototype-animatic-editor-field.is-wide {
  min-width: 0;
}

.prototype-animatic-editor-field-label,
.prototype-animatic-editor-section-label,
.prototype-animatic-editor-option-title {
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(194, 216, 237, 0.76);
}

.prototype-animatic-editor-input,
.prototype-animatic-editor-select,
.prototype-animatic-time-input {
  width: 100%;
  min-width: 0;
}

.prototype-animatic-editor-field-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.prototype-animatic-editor-list,
.prototype-animatic-editor-option-list {
  display: grid;
  gap: 0.7rem;
}

.prototype-animatic-editor-card,
.prototype-animatic-editor-empty,
.prototype-animatic-editor-option {
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(104, 140, 174, 0.24);
  border-radius: 12px;
  background: rgba(20, 33, 47, 0.62);
}

.prototype-animatic-editor-empty {
  justify-items: start;
}

.prototype-animatic-editor-empty.is-secondary {
  color: rgba(215, 229, 244, 0.78);
  font-size: 0.84rem;
}

.prototype-animatic-editor-card-header,
.prototype-animatic-editor-option-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.prototype-animatic-editor-card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: rgba(242, 247, 252, 0.96);
}

.prototype-animatic-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
}

.prototype-animatic-editor-grid.is-compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.prototype-animatic-editor-section {
  display: grid;
  gap: 0.6rem;
}

.prototype-animatic-interaction {
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(130, 176, 218, 0.34);
  border-radius: 12px;
  background: rgba(18, 31, 44, 0.72);
}

.prototype-animatic-interaction.is-active {
  border-color: rgba(155, 211, 255, 0.4);
}

.prototype-animatic-interaction-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.prototype-animatic-interaction-kind {
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  color: rgba(203, 224, 244, 0.82);
  border: 1px solid rgba(116, 149, 181, 0.45);
  border-radius: 999px;
  background: rgba(12, 24, 38, 0.88);
  padding: 0.22rem 0.5rem;
  white-space: nowrap;
}

.prototype-animatic-interaction-kind:empty {
  display: none;
}

.prototype-animatic-prompt {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(245, 249, 253, 0.97);
}

.prototype-animatic-prompt:empty {
  display: none;
}

.prototype-animatic-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.prototype-animatic-options:empty {
  display: none;
}

.prototype-animatic-option {
  border: 1px solid rgba(115, 146, 177, 0.68);
  border-radius: 999px;
  background: rgba(20, 33, 47, 0.92);
  color: #eef6ff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.34rem 0.72rem;
  cursor: pointer;
}

.prototype-animatic-option:hover,
.prototype-animatic-option:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.prototype-animatic-option.is-yes {
  border-color: rgba(93, 170, 116, 0.72);
}

.prototype-animatic-option.is-no {
  border-color: rgba(190, 104, 104, 0.72);
}

.prototype-animatic-option.is-continue {
  border-color: rgba(155, 211, 255, 0.72);
}

.prototype-concept-art-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.prototype-concept-art-card {
  margin: 0;
  display: block;
}

.prototype-concept-art-link {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  min-height: 0;
  padding: 0.12rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(12, 21, 32, 0.9);
  overflow: hidden;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.prototype-concept-art-link:hover,
.prototype-concept-art-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(143, 191, 244, 0.72);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.prototype-concept-art-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: transparent;
}

.prototype-concept-art-lightbox {
  z-index: 520;
  align-content: center;
}

.prototype-concept-art-lightbox-card {
  position: relative;
  z-index: 1;
  width: min(1380px, calc(100vw - 2.4rem));
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  padding: 1rem;
  border: 1px solid rgba(102, 138, 176, 0.72);
  border-radius: 22px;
  background: rgba(7, 13, 22, 0.98);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.52);
}

.prototype-concept-art-lightbox-meta h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #f6f9fd;
}

.prototype-concept-art-lightbox-counter {
  margin: 0 0 0.45rem;
  color: rgba(196, 217, 239, 0.78);
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prototype-concept-art-lightbox-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(0.7rem, 1.8vw, 1.2rem);
  align-items: center;
  width: min(1480px, 100%);
  max-width: 100%;
  justify-self: center;
}

.prototype-concept-art-lightbox-stage.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.prototype-concept-art-lightbox-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-decoration: none;
  cursor: zoom-in;
}

.prototype-concept-art-lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(76dvh, calc(100dvh - 10rem));
  margin: 0 auto;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(145, 180, 211, 0.24);
  background: #05080d;
}

.prototype-concept-art-lightbox-meta {
  width: min(1120px, 100%);
  justify-self: center;
  border: 1px solid rgba(145, 180, 211, 0.24);
  border-radius: 18px;
  background: rgba(9, 16, 23, 0.92);
  padding: 1rem;
}

.prototype-concept-art-lightbox-nav {
  border: 1px solid rgba(122, 153, 189, 0.55);
  background: rgba(10, 19, 31, 0.92);
  color: #eef5fd;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.prototype-concept-art-lightbox-nav {
  width: 3.2rem;
  height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
}

.prototype-concept-art-lightbox-nav:hover,
.prototype-concept-art-lightbox-nav:focus-visible {
  border-color: rgba(156, 201, 250, 0.82);
  background: rgba(23, 41, 63, 0.96);
}

.prototype-reference-image {
  display: block;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.prototype-reference-image.fitHalf {
  width: min(100%, 34rem);
}

.prototype-reference-note {
  font-family: "Courier New", monospace;
  font-size: 0.78em;
  line-height: 1.45;
  color: rgba(220, 232, 244, 0.8);
}

.prototype-reference-legacy-note {
  font-family: "Courier New", monospace;
  font-size: 0.76em;
  line-height: 1.45;
  color: #ffb7b7;
  border: 1px solid rgba(255, 116, 116, 0.35);
  background: rgba(91, 20, 20, 0.3);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
}

.nb-story-script {
  margin-top: 0;
  margin-bottom: 0;
}

.nb-vo-toggles {
  margin: 0.08em 0 0.26em;
  padding: 0.22em 0.42em 0.2em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.nb-vo-toggles-title {
  font-family: Arial, sans-serif;
  font-size: 0.72em;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.82;
  margin: 0 0 0.08em;
}

.nb-vo-toggle-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65em;
  align-items: center;
  margin-top: 0.12em;
}

.vod-hidden-toggle {
  transform: scale(1);
  margin: 0 0.2em 0 0;
  vertical-align: middle;
}

.vod-hidden-label {
  display: inline;
  font-family: "Courier New", monospace;
  font-weight: 300;
  font-size: 0.72em;
  opacity: 0.84;
  letter-spacing: 0.04em;
  margin: 0 0.65em 0 0;
  vertical-align: middle;
  white-space: nowrap;
}

@keyframes prototype-script-node-moved-up {
  0% {
    transform: translateY(14px);
    box-shadow: 0 0 0 rgba(142, 203, 255, 0);
  }
  45% {
    box-shadow: 0 0 0 1px rgba(142, 203, 255, 0.42);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(142, 203, 255, 0);
  }
}

@keyframes prototype-script-node-moved-down {
  0% {
    transform: translateY(-14px);
    box-shadow: 0 0 0 rgba(142, 203, 255, 0);
  }
  45% {
    box-shadow: 0 0 0 1px rgba(142, 203, 255, 0.42);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(142, 203, 255, 0);
  }
}

@keyframes prototype-script-node-moved-drag {
  0% {
    transform: scale(0.985);
    box-shadow: 0 0 0 rgba(142, 203, 255, 0);
  }
  45% {
    box-shadow: 0 0 0 1px rgba(142, 203, 255, 0.42);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(142, 203, 255, 0);
  }
}

.prototype-script-surface .vod-hidden-data,
.prototype-script-surface .vod-line-code,
.prototype-script-surface .story-comment {
  display: none;
}

.prototype-script-surface.show-vo-meta .vod-hidden-data {
  display: block;
}

.prototype-script-surface.show-line-codes .vod-line-code {
  display: block;
}

.prototype-script-surface.show-notes .story-comment {
  display: block;
}

.prototype-script-surface.is-compare-mode .story-comment,
.prototype-script-surface.is-compare-mode .vod-hidden-data.is-compare-visible,
.prototype-script-surface.is-compare-mode .vod-line-code.is-compare-visible {
  display: block;
}

.prototype-script-surface.is-compare-mode .prototype-script-node {
  border-top: 0;
  border-bottom: 0;
  padding: 0;
}

.prototype-script-surface.is-edit-mode .prototype-script-node {
  border-top: 1px solid rgba(120, 192, 255, 0.18);
  border-bottom: 1px solid rgba(120, 192, 255, 0.18);
  padding: 0.42rem 0;
}

.twine-action {
  display: block;
  text-align: justify;
  margin-left: 3%;
  margin-right: 3%;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.34em;
  white-space: pre-wrap;
}

.twine-checkpoint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.94rem;
  width: 100%;
  max-width: none;
  margin: 1.7rem 0 1.34rem;
  padding: 0.2rem 0;
  color: rgba(220, 244, 255, 0.96);
  font-family: "Courier New", monospace;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.twine-checkpoint::before,
.twine-checkpoint::after {
  content: "";
  display: block;
  flex: 1 1 0;
  max-width: 7.6rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(112, 206, 255, 0), rgba(112, 206, 255, 0.62), rgba(112, 206, 255, 0));
}

.twine-name {
  display: block;
  font-size: 1.12em;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  margin-left: 26%;
  margin-right: 26%;
  margin-top: 0.74em;
  margin-bottom: 0.18em;
  line-height: 1.08;
}

.twine-speaker-preview {
  position: relative;
}

.twine-name-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.twine-name-button:hover,
.twine-name-button:focus-visible {
  color: #f5f8fd;
}

.prototype-speaker-art-card {
  position: absolute;
  left: 26%;
  top: calc(100% + 0.4rem);
  z-index: 4;
  width: 16rem;
  max-width: min(40vw, calc(100vw - 4rem));
  padding: 0.7rem;
  border: 1px solid rgba(110, 156, 221, 0.5);
  border-radius: 16px;
  background: rgba(10, 18, 30, 0.96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.prototype-speaker-art-image,
.prototype-speaker-art-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

.prototype-speaker-art-image {
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.prototype-speaker-art-placeholder {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 243, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prototype-speaker-art-meta {
  margin-top: 0.6rem;
}

.prototype-speaker-art-title {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #f7f9fd;
}

.prototype-speaker-art-caption,
.prototype-speaker-art-package {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(223, 229, 238, 0.78);
}

.prototype-speaker-input {
  display: block;
  box-sizing: border-box;
  width: 48%;
  margin: 0.74em 26% 0.18em;
  font-weight: bold;
  text-align: left;
  text-transform: uppercase;
}

.prototype-speaker-input.is-unregistered {
  border-color: rgba(255, 147, 147, 0.7);
  background: rgba(60, 15, 15, 0.82);
  color: #ffd1d1;
}

.twine-dialogue {
  display: block;
  text-align: justify;
  margin-left: 20%;
  margin-right: 20%;
  margin-top: 0.26em;
}

.prototype-dialogue-format-bar {
  display: flex;
  gap: 0.35rem;
  margin: 0.2rem 0 0.38rem;
}

.prototype-dialogue-format-button {
  min-width: 2rem;
  height: 2rem;
  border: 1px solid rgba(88, 112, 138, 0.72);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.72);
  color: #d7e8ff;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.prototype-dialogue-format-button:hover,
.prototype-dialogue-format-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.prototype-dialogue-format-button.is-active {
  border-color: rgba(151, 208, 255, 0.92);
  background: rgba(37, 77, 112, 0.82);
}

.prototype-dialogue-format-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.twine-name + .twine-dialogue {
  margin-top: 0;
}

.twine-dialogue-line {
  margin-top: 0.1em;
}

.twine-dialogue-line:first-child {
  margin-top: 0;
}

.twine-dialogue[data-dialogue-lines-path] .twine-dialogue-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.prototype-dialogue-line-body {
  min-width: 0;
}

.prototype-dialogue-line-drag-handle {
  margin: 0.18rem 0 0;
  padding: 0.2rem 0.24rem;
  border: 1px solid rgba(88, 112, 138, 0.58);
  border-radius: 0.75rem;
  background: rgba(17, 28, 40, 0.62);
  color: rgba(193, 219, 245, 0.76);
  cursor: grab;
}

.prototype-dialogue-line-drag-handle:hover,
.prototype-dialogue-line-drag-handle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(229, 241, 255, 0.92);
}

.prototype-dialogue-line-drag-handle:active,
.twine-dialogue.is-line-dragging .prototype-dialogue-line-drag-handle {
  cursor: grabbing;
}

.prototype-dialogue-line-drag-grip {
  position: relative;
  display: block;
  width: 0.78rem;
  height: 1rem;
}

.prototype-dialogue-line-drag-grip::before,
.prototype-dialogue-line-drag-grip::after {
  content: "";
  position: absolute;
  top: 0.12rem;
  width: 0.12rem;
  height: 0.12rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0.26rem 0 currentColor, 0 0.52rem 0 currentColor;
}

.prototype-dialogue-line-drag-grip::before {
  left: 0.18rem;
}

.prototype-dialogue-line-drag-grip::after {
  right: 0.18rem;
}

.prototype-dialogue-line-drop-lane {
  height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, height 120ms ease, margin 120ms ease;
}

.prototype-dialogue-line-drop-lane::before {
  content: "";
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgba(103, 166, 219, 0.2);
}

.twine-dialogue.is-line-dragging .prototype-dialogue-line-drop-lane {
  height: 0.9rem;
  margin: 0.08rem 0;
  opacity: 1;
  pointer-events: auto;
}

.prototype-dialogue-line-drop-lane.is-drop-target::before {
  background: rgba(120, 205, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(120, 205, 255, 0.18), 0 0 12px rgba(120, 205, 255, 0.24);
}

.twine-dialogue-line.is-dragging {
  opacity: 0.42;
}

.prototype-dialogue-line-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5001;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(103, 166, 219, 0.42);
  border-radius: 0.9rem;
  background: rgba(8, 14, 22, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  opacity: 0.96;
  overflow: hidden;
  transform: translate(-9999px, -9999px);
}

.twine-dialogue-text {
  display: block;
  white-space: pre-wrap;
}

.twine-dialogue-text strong {
  font-weight: 700;
}

.twine-dialogue-text em {
  font-style: italic;
}

.twine-dialogue-text u {
  text-decoration: underline;
}

.vod-line-code {
  display: block;
  font-family: "Courier New", monospace;
  font-weight: 200;
  font-size: 0.78em;
  opacity: 0.68;
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin: 0 0 0.08em;
}

.vod-hidden-data {
  font-family: "Courier New", monospace;
  font-weight: 200;
  font-size: 0.72em;
  opacity: 0.62;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0 0 0.08em;
}

.vod-unity-files {
  margin-top: 0.22em;
}

.prototype-audio-preview-row {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  margin: 0.28rem 0 0.38rem;
}

.prototype-audio-preview-row-inline {
  margin-top: 0.4rem;
}

.prototype-audio-preview-label,
.prototype-audio-preview-filename {
  font-family: "Courier New", monospace;
  font-weight: 200;
  font-size: 0.68em;
  letter-spacing: 0.05em;
  line-height: 1.1;
  opacity: 0.72;
}

.prototype-audio-preview-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.prototype-audio-preview-player {
  width: min(100%, 26rem);
  height: 2rem;
}

.prototype-unity-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32em;
  margin-top: 0.14em;
}

.vod-unity-files-head {
  display: inline;
}

.prototype-unity-file-empty {
  display: inline-block;
  margin-top: 0.12em;
  color: rgba(215, 231, 248, 0.78);
  font-style: italic;
}

.prototype-meta-input,
.prototype-meta-select,
.prototype-summary-input,
.prototype-branch-select,
.prototype-comment-author-select,
.prototype-speaker-input,
.prototype-scene-code-act,
.prototype-scene-code-number,
.prototype-scene-code-suffix {
  color: inherit;
  font: inherit;
}

.prototype-meta-input,
.prototype-meta-select,
.prototype-branch-select,
.prototype-comment-author-select,
.prototype-speaker-input,
.prototype-scene-code-act,
.prototype-scene-code-number,
.prototype-scene-code-suffix {
  box-sizing: border-box;
  min-height: 1.9em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.32em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.12em 0.44em;
}

.prototype-meta-input {
  width: min(100%, 26rem);
}

.prototype-meta-select,
.prototype-branch-select,
.prototype-comment-author-select {
  cursor: pointer;
  color-scheme: dark;
  padding-right: 1.75em;
}

.prototype-meta-input:hover,
.prototype-meta-select:hover,
.prototype-summary-input:hover,
.prototype-branch-select:hover,
.prototype-comment-author-select:hover,
.prototype-speaker-input:hover,
.prototype-scene-code-act:hover,
.prototype-scene-code-number:hover,
.prototype-scene-code-suffix:hover {
  background: rgba(255, 255, 255, 0.1);
}

.prototype-meta-input:focus,
.prototype-meta-select:focus,
.prototype-summary-input:focus,
.prototype-branch-select:focus,
.prototype-comment-author-select:focus,
.prototype-speaker-input:focus,
.prototype-scene-code-act:focus,
.prototype-scene-code-number:focus,
.prototype-scene-code-suffix:focus {
  outline: none;
  border-color: rgba(142, 203, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(142, 203, 255, 0.22);
}

.prototype-meta-select.vod-status-good {
  background: rgba(42, 168, 68, 0.2);
}

.prototype-meta-select.vod-status-maybe {
  background: rgba(255, 196, 35, 0.24);
}

.prototype-meta-select.vod-status-redo {
  background: rgba(220, 53, 69, 0.22);
}

.prototype-meta-select option,
.prototype-branch-select option,
.prototype-comment-author-select option {
  background: #101924;
  color: #f4fbff;
}

.vod-meta-label {
  display: inline-block;
  text-decoration: underline;
  background: rgba(130, 130, 130, 0.24);
  border-radius: 0.2em;
  padding: 0 0.25em;
}

.vod-meta-value {
  opacity: 0.95;
}

.vod-status {
  display: inline-block;
  border-radius: 0.22em;
  padding: 0 0.3em;
  font-weight: 600;
}

.vod-status:empty {
  display: none;
}

.vod-status-good {
  background: rgba(42, 168, 68, 0.28);
}

.vod-status-maybe {
  background: rgba(255, 196, 35, 0.36);
}

.vod-status-redo {
  background: rgba(220, 53, 69, 0.32);
}

.story-subsection {
  margin: 2.8em 0 2.3em;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 0.84em;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 244, 244, 0.9);
}

.story-subsection::before,
.story-subsection::after {
  content: "";
  display: block;
  width: 100%;
  max-width: 18em;
  height: 1px;
  margin: 0.74em auto;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
}

.story-comment {
  margin: 0.18em 0 0.26em;
  padding: 0.28em 0.44em;
  font-family: "Courier New", monospace;
  font-size: 0.74em;
  line-height: 1.18;
  border-left: 3px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.28em;
  background: rgba(255, 255, 255, 0.05);
}

.story-comment-author {
  display: inline-block;
  margin: 0 0.42em 0 0;
  padding: 0 0.26em;
  font-size: 0.92em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0.18em;
}

.story-comment-body {
  display: block;
  min-height: 1.25em;
  white-space: pre-wrap;
}

.story-comment-body:empty::before {
  content: "\00a0";
}

.story-comment-asim {
  border-left-color: rgba(255, 92, 92, 0.9);
  background: rgba(120, 18, 18, 0.22);
  color: rgba(255, 136, 136, 0.98);
}

.story-comment-asim .story-comment-author {
  background: rgba(255, 92, 92, 0.26);
  color: rgba(255, 228, 228, 0.98);
}

.story-comment-omar {
  border-left-color: rgba(88, 166, 255, 0.9);
  background: rgba(24, 52, 104, 0.24);
  color: rgba(226, 240, 255, 0.98);
}

.story-comment-omar .story-comment-author {
  background: rgba(88, 166, 255, 0.24);
  color: rgba(226, 240, 255, 0.98);
}

.story-comment-ali {
  border-left-color: rgba(242, 184, 75, 0.9);
  background: rgba(118, 78, 14, 0.24);
  color: rgba(255, 236, 198, 0.98);
}

.story-comment-ali .story-comment-author {
  background: rgba(242, 184, 75, 0.24);
  color: rgba(255, 245, 222, 0.98);
}

.story-comment-haku {
  border-left-color: rgba(83, 214, 161, 0.9);
  background: rgba(16, 92, 66, 0.24);
  color: rgba(223, 255, 244, 0.98);
}

.story-comment-haku .story-comment-author {
  background: rgba(83, 214, 161, 0.22);
  color: rgba(230, 255, 248, 0.98);
}

.story-comment-codex {
  border-left-color: rgba(162, 170, 182, 0.9);
  background: rgba(72, 78, 88, 0.3);
  color: rgba(232, 235, 240, 0.98);
}

.story-comment-codex .story-comment-author {
  background: rgba(162, 170, 182, 0.22);
  color: rgba(243, 245, 248, 0.98);
}

.prototype-attached-notes {
  margin: 0 0 1rem;
  border: 1px solid rgba(106, 152, 199, 0.28);
  border-radius: 16px;
  background: rgba(8, 13, 20, 0.82);
  padding: 0.9rem;
}

.prototype-attached-notes-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.prototype-attached-notes-head h3 {
  margin: 0;
}

.prototype-attached-notes-head p {
  margin: 0.35rem 0 0;
  color: #c7d7e9;
  font-size: 0.82rem;
}

.prototype-attached-notes-body {
  margin-top: 0.75rem;
}

.prototype-attached-notes-list {
  display: grid;
  gap: 0.7rem;
}

.prototype-attached-note-card {
  border: 1px solid rgba(113, 156, 199, 0.22);
  border-left: 4px solid var(--attached-note-accent, #7aa5d8);
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(4, 8, 14, 0.8);
}

.prototype-attached-note-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.prototype-attached-note-author {
  display: inline-block;
  margin-right: 0.5rem;
  color: #f2f6fc;
  font-weight: 700;
}

.prototype-attached-note-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(103, 140, 178, 0.18);
  color: #d6e7f8;
}

.prototype-attached-note-status.is-open {
  background: rgba(87, 190, 255, 0.16);
  color: #d6efff;
}

.prototype-attached-note-status.is-resolved {
  background: rgba(122, 214, 163, 0.16);
  color: #d7f7e2;
}

.prototype-attached-note-status.is-completed_by_codex {
  background: rgba(182, 186, 198, 0.18);
  color: #f1f4f9;
}

.prototype-attached-note-status.is-archived {
  background: rgba(138, 146, 157, 0.16);
  color: #d1d7de;
}

.prototype-attached-note-date {
  color: #a8bfd8;
  font-size: 0.76rem;
}

.prototype-attached-note-body {
  margin-top: 0.65rem;
  color: #deebf8;
  white-space: pre-wrap;
}

.prototype-attached-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.7rem;
}

.prototype-attached-note-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.prototype-attached-note-form textarea {
  width: 100%;
  min-height: 110px;
  border-radius: 12px;
  border: 1px solid rgba(113, 156, 199, 0.28);
  background: rgba(9, 14, 20, 0.92);
  color: #edf5ff;
  padding: 0.8rem 0.9rem;
  font: inherit;
  resize: vertical;
}

.prototype-attached-note-message {
  margin: 0;
  min-height: 1.2rem;
  color: #f0b6b6;
  font-size: 0.82rem;
}

.twine-branch {
  background-color: #222;
  color: #fff;
  border: 5px solid #666;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
}

.twine-branch-answer-pass,
.twine-branch-wait {
  border-color: #ffff00;
}

.twine-branch-loop {
  border-color: #ffb84d;
}

.twine-branch-answer-yes,
.twine-branch-yes {
  border-color: #00ff00;
}

.twine-branch-answer-no,
.twine-branch-no {
  border-color: #ff0000;
}

.twine-branch-general-conditional,
.twine-branch-if {
  border-color: #00ffff;
}

.twine-branch-prior-state-conditional {
  border-color: #6bbcff;
}

.twine-branch-ambience {
  border-color: #b38cff;
}

.twine-branch-a,
.twine-branch-path1,
.twine-branch-path1-if {
  border-color: #6bbcff;
}

.twine-branch-b,
.twine-branch-path2 {
  border-color: #9a8bff;
}

.twine-branch-c,
.twine-branch-path3 {
  border-color: #ffa94d;
}

.twine-branch-d,
.twine-branch-path4 {
  border-color: #7ee787;
}

.twine-branch-e,
.twine-branch-path5 {
  border-color: #ff7ba5;
}

.twine-branch-f,
.twine-branch-path6 {
  border-color: #58d5c9;
}

.twine-branch-g,
.twine-branch-path7 {
  border-color: #d6b66b;
}

.twine-branch-h,
.twine-branch-path8 {
  border-color: #f58fff;
}

.twine-branch-i,
.twine-branch-path9 {
  border-color: #8fd7ff;
}

.twine-branch-j,
.twine-branch-path10 {
  border-color: #ff9368;
}

.twine-branch summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-family: "Courier New", monospace;
  font-size: 0.76em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  list-style: none;
}

.twine-branch summary::-webkit-details-marker {
  display: none;
}

.twine-branch-summary-chevron {
  width: 0.58rem;
  height: 0.58rem;
  border-right: 2px solid rgba(255, 255, 255, 0.82);
  border-bottom: 2px solid rgba(255, 255, 255, 0.82);
  transform: rotate(-45deg);
  transform-origin: 62% 62%;
  transition: transform 120ms ease;
  flex: 0 0 auto;
}

.twine-branch[open] .twine-branch-summary-chevron {
  transform: rotate(45deg);
}

.prototype-summary-input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.28em;
  padding: 0.08em 0.22em;
  text-transform: none;
}

.prototype-summary-text {
  flex: 1 1 auto;
  min-width: 0;
  text-transform: none;
}

.prototype-branch-select {
  flex: 0 0 auto;
  width: min(100%, 16rem);
  max-width: none;
}

.twine-branch-body {
  margin-top: 0.55em;
}

.prototype-script-node {
  margin: 0;
  position: relative;
}

.prototype-script-node.is-dragging {
  opacity: 0.48;
}

.prototype-script-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5000;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(103, 166, 219, 0.42);
  border-radius: 1rem;
  background: rgba(8, 14, 22, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  opacity: 0.96;
  overflow: hidden;
  transform: translate(-9999px, -9999px);
}

.prototype-script-node-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 0.42rem;
  padding: 0.22rem 0.42rem;
  border-radius: 0.8rem;
  cursor: grab;
  user-select: none;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.prototype-script-node-tools:hover,
.prototype-script-node-tools:focus-within {
  background: rgba(74, 127, 182, 0.12);
}

.prototype-script-node.is-dragging .prototype-script-node-tools {
  background: rgba(74, 127, 182, 0.16);
  box-shadow: inset 0 0 0 1px rgba(103, 166, 219, 0.22);
}

.prototype-script-node-head {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.prototype-script-node-label {
  color: rgba(184, 216, 247, 0.86);
  font-family: "Courier New", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-script-node.is-moved-up {
  animation: prototype-script-node-moved-up 360ms ease;
}

.prototype-script-node.is-moved-down {
  animation: prototype-script-node-moved-down 360ms ease;
}

.prototype-script-node.is-moved-drag {
  animation: prototype-script-node-moved-drag 360ms ease;
}

.prototype-script-node-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.32rem;
  cursor: default;
}

.prototype-script-tool-button {
  border: 1px solid rgba(88, 112, 138, 0.72);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.72);
  color: #d7e8ff;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}

.prototype-script-tool-button:hover,
.prototype-script-tool-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.prototype-script-tool-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.prototype-script-tool-button-danger {
  border-color: rgba(115, 77, 77, 0.78);
  background: rgba(44, 18, 18, 0.72);
  color: #ffd0d0;
}

.prototype-script-insert-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin: 0.14rem 0 0.28rem;
  border-radius: 1rem;
  padding: 0.14rem 0.22rem;
  min-height: 1.74rem;
  align-items: center;
  position: relative;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.prototype-script-surface.is-script-dragging .prototype-script-insert-controls {
  min-height: 1.74rem;
}

.prototype-script-surface.is-script-dragging .prototype-script-insert-button {
  opacity: 0;
  pointer-events: none;
}

.prototype-script-surface.is-script-dragging .prototype-script-insert-controls::before {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: rgba(103, 166, 219, 0.18);
}

.prototype-script-surface.is-script-dragging .prototype-script-insert-controls::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  right: 0.28rem;
  bottom: 0.24rem;
  height: 2px;
  border-radius: 999px;
  background: rgba(103, 166, 219, 0.14);
}

.prototype-script-insert-controls.is-drop-target {
  background: rgba(20, 59, 90, 0.34);
  box-shadow: inset 0 0 0 1px rgba(103, 166, 219, 0.44);
}

.prototype-script-insert-controls.is-drop-target::before {
  background: rgba(142, 203, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(142, 203, 255, 0.34);
}

.prototype-script-insert-controls.is-drop-target::after {
  background: rgba(142, 203, 255, 0.76);
  box-shadow: 0 0 10px rgba(142, 203, 255, 0.3);
}

.prototype-script-insert-button {
  border: 1px dashed rgba(116, 146, 180, 0.72);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.58);
  color: #b8d8f7;
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 0.24rem 0.62rem;
  cursor: pointer;
}

.prototype-script-insert-button:hover,
.prototype-script-insert-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.prototype-script-insert-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.prototype-script-image-shell {
  display: grid;
  gap: 0.6rem;
}

.prototype-script-image-row {
  --prototype-script-image-gap: 0.65rem;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--prototype-script-image-gap);
  justify-content: center;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  padding-block: 0.14rem;
}

.prototype-script-image-card {
  margin: 0;
  flex: 0 0 calc((100% - (2 * var(--prototype-script-image-gap))) / 3);
  max-width: calc((100% - (2 * var(--prototype-script-image-gap))) / 3);
  min-width: 0;
}

.prototype-script-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 5 / 4;
  min-width: 0;
  padding: 0.18rem;
  border: 1px solid rgba(104, 139, 173, 0.4);
  border-radius: 0.95rem;
  background: rgba(10, 16, 24, 0.9);
  overflow: hidden;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.prototype-script-image-link.is-static {
  cursor: default;
}

.prototype-script-image-link:hover,
.prototype-script-image-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(143, 191, 244, 0.72);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.24);
}

.prototype-script-image-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.prototype-script-image-placeholder,
.prototype-script-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8rem;
  border: 1px dashed rgba(117, 146, 177, 0.44);
  border-radius: 0.95rem;
  background: rgba(8, 13, 20, 0.88);
  color: rgba(188, 210, 232, 0.82);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.85rem;
  overflow-wrap: anywhere;
}

.prototype-script-image-empty {
  min-height: 6.8rem;
}

.prototype-script-image-tools {
  display: grid;
  gap: 0.55rem;
}

.prototype-script-image-actions,
.prototype-script-image-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.prototype-script-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.9);
  color: #d7e8ff;
  font: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.72rem;
  cursor: pointer;
}

.prototype-script-image-button:hover,
.prototype-script-image-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.prototype-script-image-button.is-active {
  border-color: rgba(155, 211, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(155, 211, 255, 0.24);
}

.prototype-script-image-button-secondary {
  border-color: rgba(141, 148, 170, 0.68);
  color: #d9e0f0;
}

.prototype-script-image-picker {
  display: grid;
  gap: 0.55rem;
  padding: 0.72rem;
  border: 1px solid rgba(95, 126, 158, 0.46);
  border-radius: 0.78rem;
  background: rgba(7, 11, 17, 0.82);
}

.prototype-script-image-query {
  flex: 1 1 14rem;
  min-width: 0;
  border: 1px solid rgba(109, 137, 166, 0.66);
  border-radius: 999px;
  background: rgba(3, 6, 10, 0.96);
  color: #eef6ff;
  font: inherit;
  padding: 0.42rem 0.82rem;
}

.prototype-script-image-status {
  color: rgba(174, 196, 220, 0.86);
  font-size: 0.76rem;
  line-height: 1.45;
}

.prototype-script-image-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr));
  gap: 0.45rem;
  max-height: 16rem;
  overflow-y: auto;
}

.prototype-script-image-result {
  display: grid;
  gap: 0.34rem;
  align-content: start;
  width: 100%;
  border: 1px solid rgba(89, 115, 143, 0.52);
  border-radius: 0.75rem;
  background: rgba(16, 24, 34, 0.88);
  color: #eef6ff;
  font: inherit;
  text-align: left;
  padding: 0.38rem;
  cursor: pointer;
}

.prototype-script-image-result:hover,
.prototype-script-image-result:focus-visible {
  background: rgba(27, 39, 54, 0.96);
}

.prototype-script-image-result-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0.55rem;
  object-fit: cover;
}

.prototype-script-image-result-title {
  color: #eef6ff;
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.prototype-comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-bottom: 0.16rem;
}

.prototype-comment-author-select {
  min-width: 7rem;
}

.prototype-misc-surface {
  min-height: 520px;
}

.prototype-misc-body {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
}

.prototype-misc-structured {
  gap: 1.15rem;
}

.prototype-misc-image {
  display: block;
  max-width: min(100%, 34rem);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.prototype-misc-section {
  display: grid;
  gap: 0.72rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(83, 107, 134, 0.54);
  border-radius: 0.95rem;
  background: rgba(15, 20, 27, 0.62);
}

.prototype-misc-section-title {
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0f7ff;
}

.prototype-misc-paragraph {
  margin: 0;
  color: rgba(245, 247, 250, 0.92);
  white-space: pre-wrap;
  line-height: 1.58;
}

.prototype-misc-editable {
  border: 1px solid transparent;
  border-radius: 0.45rem;
  padding: 0.16rem 0.24rem;
}

.prototype-misc-editable:hover {
  background: rgba(255, 255, 255, 0.04);
}

.prototype-misc-editable:focus {
  outline: none;
  border-color: rgba(142, 203, 255, 0.52);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(142, 203, 255, 0.18);
}

.prototype-misc-list {
  margin: 0;
  display: grid;
  gap: 0.42rem;
}

.prototype-misc-list-item {
  color: rgba(245, 247, 250, 0.94);
}

.prototype-misc-list-value {
  line-height: 1.5;
}

.prototype-misc-groups,
.prototype-misc-group-children {
  display: grid;
  gap: 0.8rem;
}

.prototype-misc-group {
  display: grid;
  gap: 0.42rem;
}

.prototype-misc-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.prototype-misc-group-title {
  margin: 0;
  color: #dfeefe;
  font-family: "Courier New", monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prototype-misc-group-level-0 {
  font-size: 0.84rem;
}

.prototype-misc-group-level-1,
.prototype-misc-group-level-2 {
  font-size: 0.78rem;
  opacity: 0.94;
}

.prototype-misc-pairs {
  display: grid;
  gap: 0.7rem;
}

.prototype-misc-pair-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.prototype-misc-pair-cell {
  display: grid;
  gap: 0.28rem;
}

.prototype-misc-pair-label {
  color: #adc4dd;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prototype-misc-pair-value {
  min-height: 2.2rem;
  line-height: 1.45;
  color: rgba(245, 247, 250, 0.94);
}

.prototype-misc-pair-arrow {
  padding-top: 1.4rem;
  color: #87b8ea;
  font-size: 1.15rem;
}

.prototype-misc-readonly {
  min-height: 1.9em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.32em;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.18em 0.44em;
  line-height: 1.4;
}

.prototype-character-section,
.prototype-character-group,
.prototype-character-bucket,
.prototype-character-list,
.prototype-character-groups,
.prototype-character-buckets-grid {
  display: grid;
}

.prototype-character-groups {
  gap: 1rem;
}

.prototype-character-group {
  gap: 0.72rem;
}

.prototype-character-group-title {
  margin: 0;
  color: #f2f7ff;
  font-family: "Courier New", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-character-buckets-grid {
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0.8rem;
  align-items: start;
}

.prototype-character-bucket {
  gap: 0.7rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(88, 112, 138, 0.58);
  border-radius: 0.85rem;
  background: rgba(10, 14, 19, 0.72);
  align-content: start;
  align-self: start;
}

.prototype-character-bucket-title {
  margin: 0;
  color: #d9ebff;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.prototype-character-list {
  gap: 0.65rem;
}

.prototype-character-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
}

.prototype-character-card-main {
  display: grid;
  grid-template-columns: minmax(5.25rem, 5.25rem) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.prototype-character-card-copy {
  display: grid;
  gap: 0.5rem;
}

.prototype-character-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.55rem;
}

.prototype-character-art-preview {
  display: grid;
  grid-template-rows: 5.25rem auto;
  border: 1px solid rgba(102, 138, 170, 0.52);
  border-radius: 0.78rem;
  background: linear-gradient(180deg, rgba(12, 18, 26, 0.95), rgba(6, 10, 15, 0.95));
  overflow: hidden;
}

.prototype-character-art-image,
.prototype-character-art-placeholder {
  width: 100%;
  height: 5.25rem;
}

.prototype-character-art-image {
  display: block;
  object-fit: cover;
}

.prototype-character-art-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(183, 202, 222, 0.8);
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(124, 169, 214, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(8, 12, 18, 0.98);
}

.prototype-character-art-meta {
  display: grid;
  gap: 0.18rem;
  padding: 0.46rem 0.52rem 0.54rem;
}

.prototype-character-art-title,
.prototype-character-art-package {
  min-width: 0;
  overflow-wrap: anywhere;
}

.prototype-character-art-title {
  color: #eef6ff;
  font-size: 0.7rem;
  line-height: 1.35;
}

.prototype-character-art-package {
  color: rgba(170, 194, 219, 0.78);
  font-size: 0.64rem;
  line-height: 1.35;
}

.prototype-character-name-input {
  flex: 1 1 12rem;
  min-width: 0;
}

.prototype-character-field-row {
  display: grid;
  gap: 0.24rem;
}

.prototype-character-field-label {
  font-family: Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(194, 214, 236, 0.78);
}

.prototype-character-voice-actor-input {
  width: min(100%, 20rem);
}

.prototype-character-note {
  min-height: 2.3rem;
  line-height: 1.5;
  color: rgba(245, 247, 250, 0.94);
  white-space: pre-wrap;
}

.prototype-character-art-tools {
  display: grid;
  gap: 0.55rem;
}

.prototype-character-art-actions,
.prototype-character-art-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.prototype-character-art-button,
.prototype-character-add,
.prototype-character-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  border: 1px solid rgba(91, 115, 140, 0.72);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.9);
  color: #d7e8ff;
  font: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.72rem;
  cursor: pointer;
}

.prototype-character-art-button-secondary {
  border-color: rgba(141, 148, 170, 0.68);
  color: #d9e0f0;
}

.prototype-character-delete {
  border-color: rgba(175, 122, 122, 0.72);
  background: rgba(44, 16, 16, 0.9);
  color: #ffd7d7;
}

.prototype-character-art-button:hover,
.prototype-character-add:hover,
.prototype-character-delete:hover {
  background: rgba(255, 255, 255, 0.1);
}

.prototype-character-art-picker {
  display: grid;
  gap: 0.55rem;
  padding: 0.72rem;
  border: 1px solid rgba(95, 126, 158, 0.46);
  border-radius: 0.78rem;
  background: rgba(7, 11, 17, 0.82);
}

.prototype-character-art-query {
  flex: 1 1 14rem;
  min-width: 0;
  border: 1px solid rgba(109, 137, 166, 0.66);
  border-radius: 999px;
  background: rgba(3, 6, 10, 0.96);
  color: #eef6ff;
  font: inherit;
  padding: 0.42rem 0.82rem;
}

.prototype-character-art-status {
  color: rgba(174, 196, 220, 0.86);
  font-size: 0.76rem;
  line-height: 1.45;
}

.prototype-character-art-results {
  display: grid;
  gap: 0.45rem;
  max-height: 22rem;
  overflow-y: auto;
}

.prototype-character-art-result {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(89, 115, 143, 0.52);
  border-radius: 0.75rem;
  background: rgba(16, 24, 34, 0.88);
  color: #eef6ff;
  font: inherit;
  text-align: left;
  padding: 0.4rem;
  cursor: pointer;
}

.prototype-character-art-result:hover {
  background: rgba(27, 39, 54, 0.96);
}

.prototype-character-art-result-image {
  width: 100%;
  height: 3.6rem;
  border-radius: 0.55rem;
  object-fit: cover;
  display: block;
}

.prototype-character-art-result-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.prototype-character-art-result-title,
.prototype-character-art-result-package {
  overflow-wrap: anywhere;
}

.prototype-character-art-result-title {
  color: #eef6ff;
  font-size: 0.76rem;
  line-height: 1.4;
}

.prototype-character-art-result-package {
  color: rgba(176, 197, 220, 0.8);
  font-size: 0.66rem;
  line-height: 1.4;
}

.prototype-callout-catalog {
  display: grid;
  gap: 1rem;
}

.prototype-callout-intent {
  border: 1px solid rgba(83, 107, 134, 0.56);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, rgba(8, 10, 13, 0.98), rgba(2, 3, 5, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.prototype-callout-intent summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 0.9rem;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.prototype-callout-intent summary::-webkit-details-marker {
  display: none;
}

.prototype-callout-intent[open] .twine-branch-summary-chevron {
  transform: rotate(45deg);
}

.prototype-callout-intent-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #f3f8fe;
  font-family: "Courier New", monospace;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-callout-lines {
  display: grid;
  gap: 0.8rem;
  padding: 0.8rem 0.85rem 0.9rem;
  background: rgba(0, 0, 0, 0.62);
}

.prototype-callout-intent-actions,
.prototype-callout-line-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.prototype-callout-line {
  display: grid;
  gap: 0.62rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.62rem;
  background: rgba(0, 0, 0, 0.92);
}

.prototype-callout-line:first-child {
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.prototype-callout-dialogue {
  margin-left: 16%;
  margin-right: 16%;
  font-size: 1.08rem;
  line-height: 1.55;
  color: rgba(246, 247, 248, 0.96);
  white-space: pre-wrap;
  text-align: justify;
}

.prototype-callout-meta {
  display: grid;
  gap: 0.62rem;
  padding: 0.7rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.04);
}

.prototype-callout-meta-field {
  display: grid;
  gap: 0.25rem;
}

.prototype-callout-meta-label {
  color: #adc4dd;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prototype-callout-file-row {
  display: grid;
  gap: 0.28rem;
}

.prototype-callout-file-label {
  color: #dbe8f5;
  font-size: 0.79rem;
  font-weight: 600;
}

.prototype-callout-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.prototype-callout-file {
  display: inline-flex;
  border: 1px solid rgba(100, 124, 153, 0.58);
  border-radius: 999px;
  background: rgba(18, 30, 43, 0.82);
  color: #f4d99a;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 0.26rem 0.54rem;
}

.prototype-system-note-section {
  border-color: rgba(255, 82, 82, 0.55);
  background: rgba(74, 8, 8, 0.2);
}

.prototype-system-note-title {
  color: #ff8d8d;
}

.prototype-system-note-text {
  border-left: 3px solid rgba(255, 82, 82, 0.82);
  padding: 0.45rem 0.7rem;
  background: rgba(32, 0, 0, 0.35);
  color: #ff6e6e;
  font-family: "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.prototype-unity-file {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(100, 124, 153, 0.58);
  border-radius: 999px;
  background: rgba(18, 30, 43, 0.82);
  color: #d7e8ff;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 0.26rem 0.54rem;
}

.prototype-unity-file-button {
  cursor: pointer;
}

.prototype-unity-file-button.is-active,
.prototype-unity-file-button:hover,
.prototype-unity-file-button:focus-visible {
  border-color: rgba(149, 201, 255, 0.88);
  background: rgba(31, 56, 82, 0.96);
}

.prototype-callout-pattern-input,
.prototype-callout-id-input {
  width: min(100%, 34rem);
}

.prototype-misc-heading {
  margin: 0.15rem 0 0;
  color: #f5f8fc;
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prototype-misc-heading-act {
  font-size: 1rem;
  text-decoration: underline;
}

.prototype-misc-heading-scene {
  font-size: 0.92rem;
}

.prototype-misc-macro {
  color: rgba(238, 242, 248, 0.94);
  font-family: "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.prototype-misc-action {
  color: rgba(208, 220, 235, 0.86);
}

.prototype-misc-dialogue code {
  color: #f6d896;
  font-family: inherit;
}

.prototype-misc-name {
  font-weight: 700;
}

.prototype-inline-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid rgba(106, 141, 179, 0.78);
  border-radius: 999px;
  background: rgba(17, 28, 40, 0.84);
  color: #d5ebff;
  font: inherit;
  padding: 0.38rem 0.78rem;
  cursor: pointer;
}

.prototype-inline-nav-disabled {
  border-style: dashed;
  color: #99b1cb;
  cursor: default;
}

.prototype-inline-nav:not(.prototype-inline-nav-disabled):hover,
.prototype-inline-nav:not(.prototype-inline-nav-disabled):focus-visible {
  border-color: #8ecbff;
  outline: none;
  background: rgba(25, 47, 68, 0.95);
}

.prototype-inline-nav-compact {
  padding: 0.24rem 0.6rem;
  font-size: 0.74rem;
}

.prototype-misc-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 0.35rem 0;
}

.prototype-misc-pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #dcecff;
}

@media (max-width: 880px) {
  .prototype-misc-pair-row {
    grid-template-columns: 1fr;
  }

  .prototype-misc-pair-arrow {
    display: none;
  }
}

.button-small {
  min-height: auto;
  padding: 0.34rem 0.7rem;
}

.prototype-session-button:hover,
.prototype-script-delete-button:hover,
.prototype-script-insert-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1120px) {
  .narrative-workspace-layout {
    grid-template-columns: 1fr;
  }

  .narrative-sidebar-rail {
    align-self: auto;
  }

  .narrative-sidebar {
    position: static;
    max-height: none;
    min-height: auto;
    margin-bottom: 0.95rem;
    display: block;
    overflow: visible;
  }

  .narrative-sidebar-scroll {
    padding-right: 0;
    margin-right: 0;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .narrative-editor-shell {
    height: auto;
  }

  .narrative-editor-scroll {
    overflow: visible;
  }
}

@media (max-width: 980px) {
  .narrative-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .narrative-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
  }

  .narrative-toolbar-mode {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
  }

  .narrative-toolbar .button,
  .narrative-toolbar-mode .button,
  .narrative-toolbar-menu,
  .narrative-toolbar-menu-panel .button {
    width: 100%;
    justify-content: center;
  }

  .narrative-toolbar-menu-toggle {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .narrative-workspace-main {
    width: min(var(--site-shell-max), calc(100% - var(--site-shell-gutter)));
  }

  .narrative-panel-header,
  .prototype-scene-transport,
  .twine-stage-header,
  .prototype-map-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .narrative-toolbar,
  .narrative-badge-stack,
  .prototype-scene-transport-group,
  .prototype-scene-transport-group.is-next,
  .prototype-scene-meta-row,
  .prototype-scene-structure-actions {
    justify-content: flex-start;
  }

  .prototype-map-viewport {
    min-height: 560px;
  }

  .narrative-toolbar-mode,
  .prototype-toolbar-mode-row {
    width: 100%;
    justify-content: flex-start;
  }

  .prototype-compare-toolbar-row {
    justify-content: flex-start;
  }

  .narrative-toolbar-menu {
    width: 100%;
  }

  .narrative-toolbar-menu-panel {
    position: static;
    min-width: 0;
    margin-top: 0.4rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .narrative-toolbar-menu:hover .narrative-toolbar-menu-panel,
  .narrative-toolbar-menu:focus-within .narrative-toolbar-menu-panel {
    display: grid;
  }

  .prototype-map-node {
    width: 152px;
    padding: 0.65rem;
  }

  .prototype-scene-code-act {
    min-width: 100%;
  }

  .prototype-scene-identity-line-edit {
    display: flex;
    flex-wrap: wrap;
    white-space: normal;
  }

  .twine-story-surface {
    padding: 1rem;
    font-size: 1rem;
  }

  .nb-overview .prototype-reference-image-grid {
    grid-template-columns: 1fr;
  }

  .prototype-concept-art-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prototype-concept-art-link {
    aspect-ratio: 1 / 1;
  }

  .prototype-concept-art-image {
    max-height: none;
  }

  .prototype-concept-art-lightbox-card {
    width: min(100%, calc(100vw - 1.4rem));
    padding: 0.8rem;
  }

  .prototype-concept-art-lightbox-stage {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .prototype-concept-art-lightbox-image {
    max-height: min(64vh, 32rem);
  }

  .prototype-concept-art-lightbox-nav {
    width: 100%;
    height: 2.8rem;
    font-size: 1.25rem;
  }

  .prototype-animatic-controls,
  .prototype-animatic-options,
  .prototype-animatic-interaction-row,
  .prototype-animatic-editor-field-row,
  .prototype-animatic-editor-toolbar-actions,
  .prototype-animatic-editor-response-tools,
  .prototype-animatic-editor-card-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .prototype-animatic-cue-card-top,
  .prototype-animatic-editor-card-header,
  .prototype-animatic-editor-option-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .prototype-animatic-cue-list,
  .prototype-animatic-editor-toolbar,
  .prototype-animatic-editor-grid,
  .prototype-animatic-editor-grid.is-compact {
    grid-template-columns: 1fr;
  }

  .twine-dialogue,
  .twine-name {
    margin-left: 10%;
    margin-right: 10%;
  }

  .prototype-speaker-input {
    width: 80%;
    margin-left: 10%;
    margin-right: 10%;
  }

  .prototype-callout-dialogue {
    margin-left: 8%;
    margin-right: 8%;
  }
}

@media (max-width: 560px) {
  .narrative-workspace-main {
    width: min(var(--site-shell-max), calc(100% - var(--site-shell-gutter)));
  }

  .narrative-panel-header {
    gap: 0.7rem;
  }

  .narrative-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
  }

  .narrative-toolbar-mode {
    grid-column: 1 / -1;
  }

  .narrative-toolbar .button,
  .narrative-toolbar-mode .button,
  .narrative-toolbar-menu,
  .narrative-toolbar-menu-panel .button {
    width: 100%;
    justify-content: center;
  }

  .prototype-persistence-status,
  .prototype-draft-banner {
    padding: 0.68rem 0.78rem;
    font-size: 0.78rem;
  }

  .twine-story-surface {
    padding: 0.85rem;
    font-size: 0.96rem;
  }

  .twine-name {
    font-size: 1.18em;
  }

  .twine-branch summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    row-gap: 0.4rem;
  }

  .twine-branch-summary-chevron {
    margin-top: 0.34rem;
  }

  .prototype-branch-select {
    grid-column: 2;
    width: 100%;
    min-width: 0;
  }

  .prototype-summary-input {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .prototype-scene-transport,
  .prototype-scene-structure-actions {
    gap: 0.55rem;
  }

  .prototype-scene-transport-group,
  .prototype-scene-transport-group.is-next,
  .prototype-scene-structure-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .prototype-scene-transport-button,
  .prototype-scene-structure-actions .button {
    width: 100%;
  }
}
