.page-nts .page-title {
  margin-bottom: 8px;
}
.page-nts .page-desc a {
  color: var(--link, #2563eb);
}
.nts-shell {
  max-width: 1200px;
  margin: 0 auto 48px;
}
.nts-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
  position: relative;
}
.nts-drawer-backdrop {
  display: none;
}
.nts-mobile-bar {
  display: none;
}
.nts-aside-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nts-aside-close {
  display: none;
  min-width: 40px;
  min-height: 40px;
  font-size: 20px;
  line-height: 1;
  padding: 0 8px;
}
.nts-aside {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #c8d0dd);
  border-radius: 12px;
  padding: 10px 12px;
  max-height: 70vh;
  overflow: auto;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.nts-aside-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  gap: 8px;
}
.nts-project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.nts-pj-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 4px 6px 6px;
  border-radius: 8px;
  margin-bottom: 4px;
}
.nts-pj-open {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  color: inherit;
  background: none;
  border: none;
  padding: 4px 2px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: inherit;
}
.nts-pj-item.is-active .nts-pj-open {
  font-weight: 600;
}
.nts-pj-open:hover,
.nts-pj-item:hover {
  background: rgba(37, 99, 235, 0.08);
}
.nts-pj-item.is-active {
  background: rgba(37, 99, 235, 0.15);
}
.nts-llm-badge {
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted, #64748b);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}
.nts-pj-del {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.nts-pj-del:hover {
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}
.nts-pj-del:focus-visible {
  outline: 2px solid var(--link, #2563eb);
  outline-offset: 1px;
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) and (pointer: fine) {
  .nts-pj-del {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .nts-pj-item:hover .nts-pj-del,
  .nts-pj-item:focus-within .nts-pj-del {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
.nts-main {
  min-width: 0;
  background: var(--surface, #fff);
  color: var(--text, inherit);
  border: 1px solid var(--border, #c8d0dd);
  border-radius: 12px;
  padding: 16px 18px 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.nts-main-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 16px;
  row-gap: 12px;
}
.nts-outline-section {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.nts-main-rest {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}
.nts-bible-intro {
  font-size: 12px;
  margin: 0 0 14px;
  line-height: 1.45;
  color: var(--muted, #64748b);
}
.nts-bible-rail {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 4px 0 4px 12px;
  margin: 0;
  border-left: 1px solid var(--border, #c8d0dd);
  position: sticky;
  top: 4px;
  align-self: start;
  max-height: min(70vh, 32rem);
  overflow-y: auto;
}
.nts-bible-rail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #64748b);
  text-align: center;
  padding: 2px 0 4px;
  letter-spacing: 0.02em;
}
.nts-bible-rail-btn {
  display: block;
  width: 100%;
  min-width: 3.5rem;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--border, #c8d0dd);
  background: var(--surface-2, #f1f5f9);
  color: var(--text, inherit);
}
.nts-bible-rail-btn:hover:not(:disabled) {
  background: var(--surface, #fff);
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
}
.nts-bible-rail-btn.is-active {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
  font-weight: 600;
}
.nts-bible-rail-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nts-bible-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 248;
  display: block;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
:root[data-theme="gray"] .nts-bible-drawer-backdrop {
  background: rgba(10, 10, 12, 0.5);
}
.nts-bible-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nts-bible-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 440px);
  max-width: 100vw;
  z-index: 250;
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border-left: 1px solid var(--border, #c8d0dd);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s ease;
}
.nts-bible-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}
.nts-bible-drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #c8d0dd);
  background: var(--surface-2, #f8fafc);
}
.nts-bible-drawer-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text, inherit);
}
.nts-bible-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 20px;
  -webkit-overflow-scrolling: touch;
}
.nts-bible-panel[hidden] {
  display: none !important;
}
.nts-bible-panel-hint {
  font-size: 12px;
  margin: 0 0 10px;
  line-height: 1.45;
  color: var(--muted, #64748b);
}
.nts-bible-panel-bar {
  margin-bottom: 8px;
}

/* 侧滑设定表 · 章节列表：分页与跳转 */
.nts-chapters-pager {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #c8d0dd);
  background: var(--surface-2, #f8fafc);
}
.nts-chapters-pager[hidden] {
  display: none !important;
}
.nts-chapters-pager-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.nts-chapters-pager-label {
  font-size: 12px;
  flex: 1;
  text-align: center;
  min-width: 0;
}
.nts-chapters-page-btn {
  min-width: 2.25rem;
  font-size: 1.1rem;
  line-height: 1;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.nts-chapters-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.nts-chapters-jump-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13px;
}
.nts-chapters-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.nts-chapters-jump-inp {
  width: 4.5rem !important;
  max-width: 28vw;
  padding: 6px 8px !important;
  font-size: 14px !important;
}
.nts-chapters-jump-page-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-left: auto;
}
.nts-chapters-jump-page-wrap[hidden] {
  display: none !important;
}
@media (max-width: 380px) {
  .nts-chapters-jump-page-wrap {
    margin-left: 0;
    width: 100%;
  }
}
.nts-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 16px;
}
.nts-title-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, #c8d0dd);
  font-size: 15px;
}
.nts-h2,
.nts-h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}
.nts-h3 {
  font-size: 15px;
  margin-top: 12px;
}
.nts-section {
  margin-bottom: 16px;
}
.nts-outline-count.nts-outline-count--warn {
  color: #b45309;
}
.nts-textarea,
.nts-input,
.nts-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--border, #c8d0dd);
  padding: 8px 10px;
  background: var(--bg, #fff);
  color: var(--text, #0f172a);
}
.nts-textarea {
  line-height: 1.5;
  resize: vertical;
}
.nts-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 20px;
}
.nts-details {
  border: 1px solid var(--border, #d8e0ed);
  border-radius: 10px;
  padding: 0 10px 10px;
  background: var(--surface-2, #f8fafc);
  color: var(--text, inherit);
}
.nts-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 2px 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text, inherit);
}
.nts-details > summary::-webkit-details-marker {
  display: none;
}
.nts-entity {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #c8d0dd);
  border-radius: 10px;
  padding: 10px 12px 12px;
  margin-top: 10px;
  color: var(--text, inherit);
}
.nts-entity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
}
.nts-id {
  font-size: 11px;
  color: var(--muted, #64748b);
}
.nts-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12px;
}
.nts-field > span {
  color: var(--muted, #64748b);
}
.nts-chapter {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #94a3b8);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  color: var(--text, inherit);
}
.nts-multi {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2, #f1f5f9);
  font-size: 12px;
  color: var(--text, inherit);
}
.nts-multi-label {
  font-weight: 600;
  margin: 0 0 6px;
}
.nts-check {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  margin-bottom: 4px;
}
.nts-generate {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #c8d0dd);
}
.nts-generate-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.nts-generate-heading .nts-h2 {
  margin-bottom: 0;
  flex: 0 1 auto;
}
.nts-generate-heading .nts-llm-badge {
  flex: 1 1 auto;
  margin-left: auto;
  max-width: min(280px, 100%);
  text-align: right;
}
.nts-gen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.nts-chapter-gen-wrap {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
}
.nts-chapter-gen-trigger {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #c8d0dd);
  background: var(--bg, #fff);
  color: var(--text, #0f172a);
  cursor: pointer;
}
.nts-chapter-gen-trigger:hover:not(:disabled) {
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
}
.nts-chapter-gen-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.nts-chapter-gen-trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.nts-chapter-gen-chevron {
  flex-shrink: 0;
  font-size: 10px;
  opacity: 0.7;
}
/* 生成区 · 当前章节：全屏模态 + 底栏抽屉 / 宽屏居中 */
.nts-chapter-gen-backdrop {
  position: fixed;
  inset: 0;
  z-index: 280;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.nts-chapter-gen-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  /* 仅作暗角；触控命中由下层全屏 panel 承接，避免 WebKit「穿透」点到遮罩导致误关闭 */
  pointer-events: none;
}
.nts-chapter-gen-panel {
  position: fixed;
  z-index: 281;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  max-height: min(72vh, 28rem);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.nts-chapter-gen-panel.is-open {
  top: 0;
  max-height: none;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.nts-chapter-gen-surface {
  width: 100%;
  max-width: 28rem;
  max-height: min(72vh, 28rem);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #c8d0dd);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nts-chapter-gen-panel.is-open .nts-chapter-gen-surface {
  transform: translateY(0);
}
.nts-chapter-gen-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px 16px;
  border-bottom: 1px solid var(--border, #c8d0dd);
}
.nts-chapter-gen-h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.nts-chapter-gen-close {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  border: none;
  background: transparent;
  color: var(--muted, #64748b);
  cursor: pointer;
  border-radius: 8px;
}
.nts-chapter-gen-close:hover {
  color: var(--text, #0f172a);
  background: rgba(0, 0, 0, 0.05);
}
.nts-chapter-gen-pager {
  flex: 0 0 auto;
  padding: 8px 12px 6px;
  border-bottom: 1px solid var(--border, #c8d0dd);
  background: var(--surface-2, #f8fafc);
}
.nts-chapter-gen-pager-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.nts-chapter-gen-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.nts-chapter-gen-pager-label {
  font-size: 12px;
  flex: 1;
  text-align: center;
  min-width: 0;
}
.nts-chapter-gen-jump-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 12px;
}
.nts-chapter-gen-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.nts-chapter-gen-jump-inp {
  width: 4.25rem !important;
  max-width: 28vw;
  padding: 6px 8px !important;
  font-size: 14px !important;
}
.nts-chapter-gen-jump-page-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-left: auto;
}
.nts-chapter-gen-jump-page-wrap[hidden] {
  display: none !important;
}
.nts-chapter-gen-list {
  list-style: none;
  margin: 0;
  padding: 8px 8px 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: none;
}
.nts-chapter-gen-li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding-right: 4px;
}
.nts-chapter-gen-pick {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text, #0f172a);
  cursor: pointer;
  font-weight: 500;
}
.nts-chapter-gen-generated {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted, #64748b);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.nts-chapter-gen-pick:hover {
  background: rgba(0, 0, 0, 0.05);
}
.nts-chapter-gen-pick.is-current {
  font-weight: 600;
  color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.08);
}
.nts-chapter-gen-empty {
  margin: 0;
  padding: 12px;
  font-size: 13px;
}
body.nts-chapter-gen-modal-open {
  overflow: hidden;
}
@media (min-width: 640px) {
  .nts-chapter-gen-panel {
    top: 0;
    bottom: 0;
    max-height: none;
    align-items: center;
    padding: 20px 16px;
  }
  .nts-chapter-gen-surface {
    border-radius: 16px;
    border: 1px solid var(--border, #c8d0dd);
    max-height: min(75vh, 32rem);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nts-chapter-gen-panel.is-open .nts-chapter-gen-surface {
    transform: translateY(0) scale(1);
  }
}
.nts-label {
  min-width: 90px;
  font-size: 13px;
  color: var(--muted, #475569);
}
.nts-select {
  max-width: 100%;
  flex: 1 1 200px;
}
.nts-estimate-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.nts-estimate-line input[type="range"] {
  flex: 1 1 180px;
  min-width: 120px;
}
.nts-out-pre {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border, #c8d0dd);
  border-radius: 10px;
  max-height: 50vh;
  overflow: auto;
  background: #0f172a0a;
}
.nts-out-count {
  font-size: 12px;
  line-height: 1.4;
  margin: 6px 0 0;
  text-align: right;
}
.nts-out-count[hidden] {
  display: none;
}
.nts-shell.is-disabled {
  pointer-events: none;
  opacity: 0.75;
}
.nts-table-wrap {
  margin-top: 6px;
}

/* 设定表侧滑内：纯文字列表，无卡片边框；左名右删（细指针悬停再显） */
.nts-name-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
.nts-name-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 6px 0;
  min-height: 0;
  box-sizing: border-box;
  position: relative;
  border: none;
  background: transparent;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.nts-name-btn {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text, inherit);
  background: transparent;
  border: none;
  padding: 2px 0;
  margin: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
}
.nts-name-btn:hover {
  color: var(--accent, #2563eb);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(37, 99, 235, 0.45);
}
.nts-name-btn:focus-visible {
  color: var(--accent, #2563eb);
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}
.nts-name-item-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
  flex-shrink: 0;
  gap: 2px;
}
.nts-chapter-download,
.nts-name-del {
  flex: 0 0 auto;
  flex-shrink: 0;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
/* 支持悬停的设备：默认隐藏操作按钮，悬停本行或键盘聚焦本行时显示 */
@media (hover: hover) and (pointer: fine) {
  .nts-chapter-download,
  .nts-name-del {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .nts-name-item:hover .nts-chapter-download,
  .nts-name-item:focus-within .nts-chapter-download,
  .nts-name-item:hover .nts-name-del,
  .nts-name-item:focus-within .nts-name-del {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
.nts-name-empty {
  font-size: 13px;
  margin: 8px 0 0;
  padding: 0 2px;
}

/* 删除作品确认（在侧栏/抽屉与实体弹层之上） */
.nts-new-project-modal.modal-backdrop,
.nts-delete-project-modal.modal-backdrop,
.nts-reset-chat-modal.modal-backdrop,
.nts-generate-confirm-modal.modal-backdrop,
.nts-chapter-table-modal.modal-backdrop {
  z-index: 320;
}
.nts-new-llm-group {
  border: 0;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nts-new-llm-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
}
.nts-new-llm-none-msg {
  color: var(--muted, #64748b);
  margin: 0 0 8px;
}
#nts-new-llm-group .nts-new-llm-opt[hidden] {
  display: none !important;
}
.nts-chapter-table-modal .modal-dialog {
  max-width: min(28rem, 100%);
}
.nts-delete-project-modal .modal-dialog {
  max-width: 400px;
}
.nts-reset-chat-modal .modal-dialog {
  max-width: min(28rem, 100%);
}
.nts-reset-chat-modal .modal-body-text {
  line-height: 1.55;
}
.nts-generate-confirm-body {
  line-height: 1.55;
  white-space: pre-line;
}
.nts-generate-confirm-modal .modal-dialog {
  max-width: min(26rem, 100%);
}
.nts-delete-project-h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

/* 全屏大弹层（设定编辑） */
.nts-entity-modal.modal-backdrop {
  z-index: 300;
  padding: 12px;
}
.nts-entity-dialog.modal-dialog {
  max-width: min(720px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}
.nts-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border, #c8d0dd);
  flex: 0 0 auto;
}
.nts-modal-h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  flex: 1 1 auto;
  min-width: 0;
}
.nts-modal-x {
  line-height: 1;
  font-size: 22px;
  padding: 2px 8px !important;
}
.nts-modal-body {
  padding: 14px 18px 16px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.nts-modal-id {
  font-size: 12px;
  margin: 0 0 10px;
}
/* 人物设定弹窗：紧凑；宽屏两列，多行框占满一行 */
.nts-modal-fields--char {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 10px;
  align-content: start;
}
.nts-modal-fields--char .nts-field-modal--char {
  margin-bottom: 0;
  min-width: 0;
  gap: 2px;
  font-size: 12px;
}
.nts-modal-fields--char .nts-field-modal--char > span {
  margin-bottom: 0;
  line-height: 1.25;
}
.nts-modal-fields--char .nts-input,
.nts-modal-fields--char .nts-textarea {
  min-height: 0;
  padding: 5px 8px;
  font-size: 13px;
}
.nts-modal-fields--char .nts-textarea {
  min-height: 4.5em;
  resize: vertical;
}
@media (min-width: 640px) {
  .nts-modal-fields--char {
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
  }
  .nts-modal-fields--char .nts-field-modal--char-full {
    grid-column: 1 / -1;
  }
}
.nts-field-modal {
  font-size: 13px;
}
.nts-field-modal > span {
  color: var(--muted, #64748b);
  margin-bottom: 2px;
}
.nts-modal-foot {
  padding: 10px 18px 16px;
  border-top: 1px solid var(--border, #c8d0dd);
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  background: var(--surface-2, #f8fafc);
}
.nts-multi-modal {
  background: var(--surface-2, #f1f5f9);
  margin: 0 0 12px;
  color: var(--text, inherit);
}
.nts-details > summary {
  user-select: none;
}
.nts-details > summary .nts-add {
  margin-left: 6px;
}

/* —— 移动端：「我的作品」为左侧侧滑层 —— */
@media (max-width: 900px) {
  .nts-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  :root[data-theme="gray"] .nts-drawer-backdrop {
    background: rgba(10, 10, 12, 0.55);
  }
  .nts-shell.is-drawer-open .nts-drawer-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nts-layout {
    display: block;
  }
  .nts-mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -4px 0 12px;
    padding: 4px 0 10px;
    border-bottom: 1px solid var(--border, #c8d0dd);
  }
  .nts-drawer-toggle {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    touch-action: manipulation;
  }
  .nts-aside {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(88vw, 300px);
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border-right: 1px solid var(--border, #c8d0dd);
    border-top: none;
    border-left: none;
    border-bottom: none;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.12);
    z-index: 101;
    background: var(--bg, #fff);
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    pointer-events: none;
    padding-top: calc(10px + env(safe-area-inset-top, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: calc(10px + env(safe-area-inset-left, 0));
    padding-right: 10px;
    isolation: isolate;
  }
  :root[data-theme="gray"] .nts-aside {
    background: var(--surface, #f4f4f5);
  }
  .nts-shell.is-drawer-open .nts-aside {
    transform: translateX(0);
    pointer-events: auto;
  }
  .nts-aside-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nts-main {
    min-width: 0;
  }
  .nts-main-work {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .nts-outline-section,
  .nts-main-rest {
    grid-column: unset;
    grid-row: unset;
  }
  .nts-bible-rail {
    grid-column: unset;
    grid-row: unset;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    max-height: none;
    border-left: none;
    border-top: 1px solid var(--border, #c8d0dd);
    padding: 10px 0 0 0;
    position: static;
    align-self: stretch;
    justify-content: flex-start;
  }
  .nts-bible-rail-label {
    width: 100%;
    text-align: left;
    padding: 0 0 4px 2px;
  }
  .nts-bible-rail-btn {
    min-width: auto;
    width: auto;
  }
  .nts-bible-drawer {
    width: 100%;
    max-width: 100vw;
  }
}

body.nts-drawer-body-lock,
body.nts-bible-drawer-body-lock {
  overflow: hidden;
}
