.creator-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0 1rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.25rem;
}

.creator-mode-switch__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  padding: 0.55rem 0.8rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.creator-mode-switch__item:hover {
  color: #0f172a;
  text-decoration: none;
}

.creator-mode-switch__item.is-active {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.creator-mode-switch__item--files.is-active {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: none;
}

.creator-mode-switch--compact {
  flex: 0 0 auto;
  margin: 0;
  border-radius: 0.55rem;
}

.creator-mode-switch--compact .creator-mode-switch__item {
  padding: 0.42rem 0.58rem;
  font-size: 0.74rem;
}

.creator-workspace-shell {
  width: 100%;
  max-width: 72rem;
  min-width: 0;
  padding: 1rem 1rem 2rem;
  color: #0f172a;
  font-family: Helvetica, Arial, sans-serif;
}

.creator-files-browser {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.creator-files-browser .creator-workspace-title,
.creator-files-browser__toolbar,
.creator-files-browser__address,
.creator-files-browser__status {
  flex-shrink: 0;
}

.creator-files-browser__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.creator-files-browser__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.creator-files-browser__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #334155;
  padding: 0.42rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.creator-files-browser__btn:hover {
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
}

.creator-files-browser__btn--danger {
  color: #b91c1c;
}

.creator-files-browser__address {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.45rem;
  background: #f8fafc;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: #475569;
  font-family: Menlo, Consolas, monospace;
}

.creator-files-browser__window {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  container-type: inline-size;
}

.creator-files-browser__columns,
.creator-files-browser__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 5.5rem 7.5rem 5.5rem;
  gap: 0.75rem;
  align-items: center;
}

.creator-files-browser__columns {
  flex-shrink: 0;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.creator-files-browser__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.creator-files-browser__folder {
  border-bottom: 1px solid #eef2f7;
}

.creator-files-browser__folder-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  list-style: none;
  background: #fbfcfe;
  font-weight: 700;
  color: #0f172a;
}

.creator-files-browser__folder-head::-webkit-details-marker {
  display: none;
}

.creator-files-browser__folder-icon {
  color: #f59e0b;
  font-size: 1rem;
}

.creator-files-browser__folder-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.creator-files-browser__row {
  width: 100%;
  border: none;
  border-top: 1px solid #f1f5f9;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.9rem 0.55rem 2.2rem;
  color: inherit;
  cursor: pointer;
}

.creator-files-browser__row:hover,
.creator-files-browser__row.is-selected {
  background: #f1f5f9;
}

.creator-files-browser__split {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(14rem, 22rem);
  gap: 0.85rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.creator-files-browser__split:has(.creator-files-browser__preview[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.creator-files-browser__view-toggle {
  display: inline-flex;
  border: 1px solid #d8e0ea;
  border-radius: 0.45rem;
  overflow: hidden;
}

.creator-files-browser__view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #ffffff;
  color: #64748b;
  padding: 0.42rem 0.55rem;
  cursor: pointer;
}

.creator-files-browser__view-btn + .creator-files-browser__view-btn {
  border-left: 1px solid #d8e0ea;
}

.creator-files-browser__view-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.creator-files-browser__view-btn.is-active {
  background: #f1f5f9;
  color: #0f172a;
}

.creator-files-browser__item-shell {
  position: relative;
}

.creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row {
  padding-right: 2.6rem;
}

.creator-files-browser__row-check {
  position: absolute;
  top: 50%;
  left: 0.65rem;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  z-index: 1;
}

.creator-files-browser__item-delete {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  background: transparent;
  color: #94a3b8;
  opacity: 0;
  cursor: pointer;
}

.creator-files-browser__item-shell:hover .creator-files-browser__item-delete,
.creator-files-browser__item-shell:focus-within .creator-files-browser__item-delete,
.creator-files-browser__row.is-selected + .creator-files-browser__item-delete {
  opacity: 1;
}

.creator-files-browser__item-delete:hover {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.creator-files-browser__preview {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  max-height: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.creator-files-browser__preview[hidden] {
  display: none;
}

.creator-files-browser__preview-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.creator-files-browser__preview-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.85rem;
}

.creator-files-browser__preview-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.5;
}

.creator-files-browser__preview-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.creator-files-browser__preview-subtitle {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.creator-files-browser__preview-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.creator-files-browser__preview-media {
  width: 100%;
  border-radius: 0.4rem;
  margin-bottom: 0.75rem;
  background: #0f172a;
}

.creator-files-browser__preview-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: #fbfcfe;
}

@container (max-width: 30rem) {
  .creator-files-browser__columns--list-only span:nth-child(2),
  .creator-files-browser__columns--list-only span:nth-child(4),
  .creator-files-browser__row-size,
  .creator-files-browser__row-kind {
    display: none;
  }

  .creator-files-browser__columns,
  .creator-files-browser__row {
    grid-template-columns: minmax(0, 1fr) 7rem;
  }
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__columns--list-only {
  display: none;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__folder-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  padding: 0.65rem 0.75rem 0.85rem;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__item-shell {
  position: static;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.75rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  border-top: 1px solid #e2e8f0;
  min-height: 6.5rem;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row:hover,
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row.is-selected {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row-name {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row-name i {
  font-size: 1.35rem;
  color: #64748b;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row-size,
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row-date,
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row-kind {
  font-size: 0.68rem;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__item-delete {
  top: 0.45rem;
  right: 0.45rem;
  transform: none;
  opacity: 0;
  background: #ffffff;
}

.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__item-shell:hover .creator-files-browser__item-delete {
  opacity: 1;
}

.creator-files-browser__row-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.creator-files-browser__row-size,
.creator-files-browser__row-date,
.creator-files-browser__row-kind {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-files-browser__empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: #94a3b8;
}

.creator-files-browser__empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.creator-files-browser__status {
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: #64748b;
}

.creator-files-browser__modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.creator-files-browser__modal[hidden] {
  display: none;
}

.creator-files-browser__modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.creator-files-browser__modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  background: #ffffff;
  padding: 1.1rem 1.15rem 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.creator-files-browser__modal-title {
  margin: 0 0 0.55rem;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.creator-files-browser__modal-message {
  margin: 0 0 1rem;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.5;
  word-break: break-word;
}

.creator-files-browser__modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (min-width: 1200px) {
  #main-content:has(.creator-workspace-shell--files-browser) {
    overflow: hidden;
    overscroll-behavior: none;
  }

  #main-content:has(.creator-workspace-shell--files-browser) .main-content-inner {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: 100%;
  }

  #main-content:has(.creator-workspace-shell--files-browser) .ap-adsense-block,
  #main-content:has(.creator-workspace-shell--files-browser) #site-footer {
    display: none;
  }

  .creator-workspace-shell--files-browser {
    padding-bottom: 0.75rem;
  }

  .creator-workspace-shell--files-browser .creator-workspace-title {
    margin-bottom: 0.55rem;
  }
}

@media (max-width: 1199.98px) {
  #main-content:has(.creator-workspace-shell--files-browser) {
    overflow: hidden;
    height: 100dvh;
    min-height: 0;
    padding-bottom: 0;
  }

  #main-content:has(.creator-workspace-shell--files-browser) .main-content-inner {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: 100%;
  }

  #main-content:has(.creator-workspace-shell--files-browser) .ap-adsense-block,
  #main-content:has(.creator-workspace-shell--files-browser) #site-footer {
    display: none;
  }

  .creator-workspace-shell--files-browser {
    padding-bottom: 0.5rem;
  }
}

@media (max-width: 1199.98px) {
  .creator-files-browser__split {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(10rem, 14rem);
  }

  .creator-files-browser__preview {
    max-height: 14rem;
  }

  .creator-files-browser__columns {
    display: none;
  }

  .creator-files-browser__row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding-left: 1.85rem;
  }

  .creator-files-browser__row-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
  }

  .creator-files-browser__row-size,
  .creator-files-browser__row-date,
  .creator-files-browser__row-kind {
    padding-left: 1.45rem;
  }

  .creator-files-browser__toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .creator-mode-switch--compact {
    display: flex;
    width: 100%;
  }

  .creator-mode-switch--compact .creator-mode-switch__item {
    flex: 1 1 0;
    justify-content: center;
  }

  .creator-files-browser__actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }

  .creator-files-browser__actions::-webkit-scrollbar {
    display: none;
  }

  .creator-files-browser__actions > * {
    flex-shrink: 0;
  }

  .creator-files-browser__btn {
    white-space: nowrap;
  }
}

.creator-workspace-head,
.creator-book__head,
.creator-chapter__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.creator-workspace-head {
  min-width: 0;
  margin-bottom: 1.25rem;
}

.creator-workspace-head > div:first-child {
  flex: 1 1 28rem;
  min-width: 0;
}

.creator-workspace-title,
.creator-book__title,
.creator-chapter__title {
  margin: 0;
  color: #0f172a;
  text-align: left;
}

.creator-workspace-title {
  font-size: 2rem;
  font-weight: 850;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.creator-workspace-section-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
}

.creator-workspace-copy {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.creator-workspace-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.creator-workspace-button,
.creator-workspace-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #ffffff;
  padding: 0.55rem 0.75rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.creator-workspace-button:hover,
.creator-workspace-link:hover {
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
}

.creator-workspace-button--primary {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
}

.creator-workspace-button--primary:hover {
  background: #111827;
  color: #ffffff;
}

.creator-workspace-button--danger {
  border-color: #fecaca;
  color: #991b1b;
}

.creator-workspace-button[hidden] {
  display: none;
}

.creator-workspace-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.creator-workspace-button:disabled:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.creator-book {
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.9rem;
  background: #ffffff;
}

.creator-book__head {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.creator-book__title {
  font-size: 1.15rem;
  font-weight: 850;
}

.creator-workspace-kicker {
  margin-bottom: 0.2rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.creator-chapter + .creator-chapter {
  border-top: 1px solid #e2e8f0;
}

.creator-chapter__head {
  padding: 0.85rem 1rem;
  background: #f8fafc;
}

.creator-chapter__title {
  font-size: 0.95rem;
  font-weight: 850;
}

.creator-workspace-link {
  border: 0;
  background: transparent;
  padding-right: 0;
}

.creator-pages {
  padding: 0 1rem;
}

.creator-page {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-top: 1px solid #edf1f5;
}

.creator-page:first-child {
  border-top: 0;
}

.creator-page__number {
  display: flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 850;
}

.creator-page__title {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.87rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-page__meta {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.creator-page.is-unavailable {
  opacity: 0.62;
}

.creator-workspace-empty {
  padding: 1rem;
  color: #64748b;
  font-size: 0.85rem;
}

.creator-workspace-empty--large {
  border: 1px solid #d8e0ea;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 1.25rem;
}

.creator-workspace-empty--large h2 {
  margin: 0 0 0.35rem;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 850;
  text-align: left;
}

.creator-workspace-empty--large p {
  margin: 0 0 1rem;
}

.creator-video-icon {
  display: block;
  margin-bottom: 0.75rem;
  color: #64748b;
  font-size: 1.5rem;
}

.creator-bottom-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
  overflow-x: auto;
}

.creator-bottom-bar__button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.55rem;
  background: #ffffff;
  padding: 0.55rem 0.75rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.creator-bottom-bar__button:hover {
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
}

.creator-video-head {
  margin-top: 0.25rem;
}

.creator-video-local-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 750;
}

.creator-video-project {
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 0.9rem;
  background: #ffffff;
}

.creator-video-project__title-row,
.creator-video-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
}

.creator-video-project__title-row {
  border-bottom: 1px solid #e2e8f0;
}

.creator-video-project__heading,
.creator-video-rail-head h3,
.creator-video-empty h3,
.creator-video-inspector h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 850;
  text-align: left;
}

.creator-video-project__name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}

.creator-video-project__name input,
.creator-video-field input,
.creator-video-field textarea {
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #ffffff;
  padding: 0.58rem 0.65rem;
  color: #0f172a;
  font: inherit;
}

.creator-video-project__name input {
  width: min(20rem, 42vw);
  font-size: 0.82rem;
  font-weight: 750;
}

.creator-video-rail-head {
  align-items: flex-end;
  padding-bottom: 0.65rem;
}

.creator-video-rail-head p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.75rem;
}

.creator-video-rail-head > span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}

.creator-video-rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0 1rem 1rem;
  scroll-snap-type: x proximity;
}

.creator-video-clip {
  position: relative;
  display: block;
  flex: 0 0 14rem;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0;
  color: #0f172a;
  text-align: left;
  scroll-snap-align: start;
}

.creator-video-clip:hover,
.creator-video-clip:focus-visible {
  border-color: #94a3b8;
  outline: none;
}

.creator-video-clip.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.creator-video-clip__preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

.creator-video-clip__preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.creator-video-clip__order {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  display: flex;
  width: 1.45rem;
  height: 1.45rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 850;
}

.creator-video-clip__body {
  display: block;
  padding: 0.65rem 0.7rem;
}

.creator-video-clip__title,
.creator-video-clip__meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-video-clip__title {
  font-size: 0.8rem;
  font-weight: 850;
}

.creator-video-clip__meta {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.creator-video-empty {
  margin: 0 1rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 1rem;
  color: #64748b;
  text-align: left;
}

.creator-video-empty[hidden] {
  display: none;
}

.creator-video-empty > i {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
}

.creator-video-empty p {
  margin: 0.3rem 0 0.85rem;
  font-size: 0.8rem;
}

.creator-video-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.8fr);
  border-top: 1px solid #e2e8f0;
}

.creator-video-editor[hidden] {
  display: none;
}

.creator-video-preview {
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

.creator-video-preview video {
  display: block;
  width: 100%;
  max-height: 34rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.65rem;
  background: #111827;
  object-fit: contain;
}

.creator-video-preview__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.55rem;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

.creator-video-inspector {
  min-width: 0;
  padding: 1rem;
}

.creator-video-inspector__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.creator-video-order-actions {
  display: flex;
  gap: 0.35rem;
}

.creator-video-order-actions button {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #334155;
}

.creator-video-order-actions button:disabled {
  opacity: 0.35;
}

.creator-video-field {
  display: block;
  margin-bottom: 0.85rem;
}

.creator-video-field > span {
  display: block;
  margin-bottom: 0.35rem;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
}

.creator-video-field input,
.creator-video-field textarea {
  display: block;
  width: 100%;
  font-size: 0.82rem;
  line-height: 1.35;
}

.creator-video-field textarea {
  resize: vertical;
}

.creator-video-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.creator-video-inspector__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.creator-video-status {
  min-height: 1.1rem;
  margin: 0.75rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Persistent Video & Reels creator */
.creator-video-library-count {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.65rem;
  background: #ffffff;
  padding: 0.55rem 0.75rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 750;
}

.creator-video-library-count strong {
  color: #0f172a;
  font-size: 1rem;
}

.creator-video-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.creator-video-stage {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  padding: 0.25rem 0.5rem;
  color: #1d4ed8;
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.creator-video-layout {
  display: grid;
  grid-template-columns: minmax(20rem, 25rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.creator-video-uploader,
.creator-video-library {
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 0.9rem;
  background: #ffffff;
}

.creator-video-uploader {
  position: sticky;
  top: 1rem;
}

.creator-video-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.creator-video-panel-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 850;
  text-align: left;
}

.creator-video-panel-head > i {
  color: #64748b;
  font-size: 1.1rem;
}

#creatorVideoForm {
  padding: 1rem;
}

.creator-video-kind {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  border: 0;
  padding: 0;
}

.creator-video-kind legend {
  width: 100%;
  margin-bottom: 0.4rem;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
}

.creator-video-kind label {
  position: relative;
  display: block;
  cursor: pointer;
}

.creator-video-kind input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.creator-video-kind label > span {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.45rem;
  min-height: 4rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.65rem;
  color: #334155;
}

.creator-video-kind label > span i {
  grid-row: 1 / span 2;
  margin-top: 0.05rem;
}

.creator-video-kind label > span strong {
  font-size: 0.78rem;
  font-weight: 850;
}

.creator-video-kind label > span small {
  color: #64748b;
  font-size: 0.66rem;
  line-height: 1.25;
}

.creator-video-kind input:checked + span {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
  color: #1d4ed8;
}

.creator-video-kind input:focus-visible + span {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.creator-video-drop {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  border: 1px dashed #94a3b8;
  border-radius: 0.7rem;
  background: #f8fafc;
  padding: 0.8rem;
  cursor: pointer;
}

.creator-video-drop.is-dragging {
  border-color: #2563eb;
  background: #eff6ff;
}

.creator-video-drop > i {
  flex: 0 0 auto;
  color: #475569;
  font-size: 1.2rem;
}

.creator-video-drop > span:nth-of-type(1) {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.creator-video-drop strong,
.creator-video-drop small {
  display: block;
}

.creator-video-drop strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-video-drop small {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.64rem;
}

.creator-video-drop .creator-workspace-button {
  flex: 0 0 auto;
}

.creator-video-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.creator-video-upload-preview {
  overflow: hidden;
  margin-bottom: 0.9rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.7rem;
  background: #0f172a;
}

.creator-video-upload-preview[hidden] {
  display: none;
}

.creator-video-upload-preview video {
  display: block;
  width: 100%;
  max-height: 18rem;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.creator-video-upload-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid #334155;
  padding: 0.5rem 0.65rem;
  color: #cbd5e1;
  font-size: 0.65rem;
}

.creator-video-upload-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-video-upload-meta span {
  flex: 0 0 auto;
}

.creator-video-field > span small {
  color: #94a3b8;
  font-weight: 700;
}

.creator-video-form-error {
  margin-bottom: 0.75rem;
  border: 1px solid #fecaca;
  border-radius: 0.55rem;
  background: #fef2f2;
  padding: 0.6rem 0.7rem;
  color: #991b1b;
  font-size: 0.72rem;
  font-weight: 700;
}

.creator-video-form-error p {
  margin: 0;
}

.creator-video-form-error p + p {
  margin-top: 0.25rem;
}

.creator-video-status {
  min-height: 1.15rem;
  margin: 0 0 0.65rem;
}

.creator-video-status[data-state="error"] {
  color: #b91c1c;
}

.creator-video-status[data-state="warning"] {
  color: #a16207;
}

.creator-video-status[data-state="ready"],
.creator-video-status[data-state="success"] {
  color: #15803d;
}

.creator-video-progress {
  overflow: hidden;
  height: 0.35rem;
  margin: 0 0 0.75rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.creator-video-progress[hidden] {
  display: none;
}

.creator-video-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #2563eb;
  transition: width 120ms linear;
}

.creator-video-submit {
  width: 100%;
}

.creator-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
}

.creator-video-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid #d8e0ea;
  border-radius: 0.75rem;
  background: #ffffff;
}

.creator-video-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.creator-video-card__media--reel {
  aspect-ratio: 4 / 5;
}

.creator-video-card__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.creator-video-card__badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: #0f172a;
  padding: 0.28rem 0.48rem;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 850;
}

.creator-video-card__body {
  padding: 0.7rem;
}

.creator-video-card__body h4 {
  margin: 0;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 850;
  text-align: left;
}

.creator-video-card__body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.creator-video-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.6rem;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 750;
}

.creator-video-card__from {
  color: #475569;
}

.creator-video-card__share {
  margin-top: 0.6rem;
}

.creator-video-share-toggle {
  font-size: 0.7rem;
}

.creator-video-share-panel {
  margin-top: 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem;
  background: #f8fafc;
}

.creator-video-owner-list {
  margin: 0 0 0.6rem;
  padding: 0;
  list-style: none;
}

.creator-video-owner-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.7rem;
}

.creator-video-owner-list li:last-child {
  border-bottom: 0;
}

.creator-video-owner-name {
  color: #0f172a;
  font-weight: 800;
}

.creator-video-owner-role {
  margin-right: auto;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 750;
}

.creator-video-owner-action {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.62rem;
  font-weight: 750;
  cursor: pointer;
}

.creator-video-share-form {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}

.creator-video-share-form label {
  flex: 1 1 auto;
  display: block;
}

.creator-video-share-form label span {
  display: block;
  margin-bottom: 0.2rem;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 750;
}

.creator-video-share-form input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
}

.creator-video-share-status {
  margin: 0.45rem 0 0;
  color: #475569;
  font-size: 0.66rem;
}

.creator-video-share-status.is-error {
  color: #b91c1c;
}

.creator-video-share-note {
  margin: 0.3rem 0 0;
  color: #94a3b8;
  font-size: 0.62rem;
}

.creator-video-invites {
  margin: 0 1rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem;
  background: #f8fafc;
}

.creator-video-invites h4 {
  margin: 0 0 0.5rem;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 850;
}

.creator-video-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  color: #334155;
  font-size: 0.72rem;
}

.creator-video-invite__actions {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}

.creator-video-library-empty {
  margin: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 1rem;
  color: #64748b;
  text-align: left;
}

.creator-video-library-empty > i {
  font-size: 1.25rem;
}

.creator-video-library-empty h4 {
  margin: 0.55rem 0 0;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 850;
}

.creator-video-library-empty p {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
}

.creator-video-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 750;
}

.creator-video-pagination a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #334155;
  text-decoration: none;
}

.creator-video-pagination a:hover {
  color: #0f172a;
}

.creator-workspace-shell--book-writer {
  box-sizing: border-box;
  max-width: none;
  overflow-x: clip;
}

@media (min-width: 1200px) {
  #main-content:has(.creator-workspace-shell--book-writer) {
    overflow: hidden;
    overscroll-behavior: none;
  }

  #main-content:has(.creator-workspace-shell--book-writer) .main-content-inner {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: 100%;
  }

  #main-content:has(.creator-workspace-shell--book-writer) .ap-adsense-block,
  #main-content:has(.creator-workspace-shell--book-writer) #site-footer {
    display: none;
  }

  .creator-workspace-shell--book-writer {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0.75rem;
  }

  .creator-workspace-shell--book-writer .book-pages-app {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: 13rem minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  .creator-workspace-shell--book-writer.is-outline-hidden .book-pages-app {
    grid-template-columns: minmax(0, 1fr);
  }

  .creator-workspace-shell--book-writer .book-pages-outline,
  .creator-workspace-shell--book-writer .book-pages-desk {
    min-height: 0;
    overflow: hidden;
  }

  .creator-workspace-shell--book-writer .book-pages-outline__scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }

  .creator-workspace-shell--book-writer .book-pages-desk {
    display: flex;
    flex-direction: column;
  }

  .creator-workspace-shell--book-writer .book-writer-toolbar,
  .creator-workspace-shell--book-writer .book-image-tools {
    flex: 0 0 auto;
  }

  .creator-workspace-shell--book-writer .book-pages-canvas {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

.creator-workspace-shell--book-writer .creator-workspace-title {
  margin-bottom: 0.3rem;
  font-size: 1.7rem;
}

.book-writer-head {
  margin-top: 0.25rem;
}

.book-writer-local-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 750;
}

.book-writer-save-state {
  min-width: 0;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}

.book-writer-save-state:empty {
  display: none;
}

.book-writer-save-state--toolbar {
  margin-left: auto;
  padding-right: 0.2rem;
  text-align: right;
}

.book-writer-save-state[data-state="saving"] {
  color: #92400e;
}

.book-writer-save-state[data-state="saved"] {
  color: #166534;
}

.book-writer-save-state[data-state="error"] {
  color: #991b1b;
}

.book-writer-app {
  display: grid;
  grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr);
  min-height: 36rem;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 0.9rem;
  background: #ffffff;
}

.book-writer-outline {
  min-width: 0;
  border-right: 1px solid #d8e0ea;
  background: #f8fafc;
}

.book-writer-outline__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #d8e0ea;
  background: #ffffff;
}

.book-writer-outline__head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 850;
  text-align: left;
}

.book-writer-outline__head a {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.book-writer-outline__head a:hover {
  color: #0f172a;
  text-decoration: none;
}

.book-writer-outline__scroll {
  max-height: 61vh;
  overflow-y: auto;
  padding: 0.55rem;
}

.book-writer-book + .book-writer-book {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid #d8e0ea;
}

.book-writer-book__head,
.book-writer-chapter__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #0f172a;
  text-align: left;
}

.book-writer-book__head {
  padding: 0.45rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 850;
}

.book-writer-chapter {
  margin-top: 0.25rem;
}

.book-writer-chapter__head {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  padding: 0.45rem 0.5rem 0.45rem 0.7rem;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
}

.book-writer-chapter__head:hover,
.book-writer-chapter__head:focus-visible {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  outline: none;
}

.book-writer-chapter__head.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #0f172a;
}

.book-writer-chapter__label {
  display: block;
  min-width: 0;
}

.book-writer-chapter__label strong,
.book-writer-chapter__label small {
  display: block;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-writer-chapter__label small {
  margin-top: 0.08rem;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 650;
}

.book-writer-chapter__number {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  background: #ffffff;
  font-size: 0.64rem;
}

.book-writer-pages {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.65rem 1rem 0.85rem;
}

.book-writer-page {
  display: grid;
  flex: 0 0 13.5rem;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: flex-start;
  width: 13.5rem;
  min-height: 4.2rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.65rem;
  color: #475569;
  text-align: left;
}

.book-writer-page:hover,
.book-writer-page:focus-visible {
  border-color: #94a3b8;
  background: #f8fafc;
  outline: none;
}

.book-writer-page.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #0f172a;
  box-shadow: 0 0 0 1px #2563eb;
}

.book-writer-page:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.book-writer-page__number {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  background: #ffffff;
  font-size: 0.63rem;
  font-weight: 850;
}

.book-writer-page__label {
  display: block;
  min-width: 0;
}

.book-writer-page__label strong,
.book-writer-page__label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-writer-page__label strong {
  display: -webkit-box;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-writer-page-rail {
  border-bottom: 1px solid #d8e0ea;
  background: #ffffff;
}

.book-writer-is-ready .book-writer-page-group {
  display: none;
}

.book-writer-is-ready .book-writer-page-group.is-active {
  display: block;
}

.book-writer-page-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem 0;
}

.book-writer-page-group__head strong,
.book-writer-page-group__head span {
  display: block;
  text-align: left;
}

.book-writer-page-group__head strong {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 850;
}

.book-writer-page-group__head span {
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 700;
}

.book-writer-page-group__head a {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  background: #ffffff;
  padding: 0.42rem 0.62rem;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
}

.book-writer-page-group__head a:hover {
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
}

.book-writer-pages__empty {
  padding: 0.9rem 1rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.book-writer-page__label small {
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 650;
  white-space: nowrap;
}

.book-writer-outline__empty {
  padding: 0.45rem 0.75rem 0.45rem 2.7rem;
  color: #94a3b8;
  font-size: 0.68rem;
}

.book-writer-outline__empty--large {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  color: #64748b;
}

.book-writer-desk {
  min-width: 0;
  background: #eef1f5;
}

.book-writer-document-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.2rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #d8e0ea;
  background: #ffffff;
}

.book-writer-breadcrumb {
  overflow: hidden;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-writer-document-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.6rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.book-writer-toolbar.ql-toolbar.ql-snow {
  display: flex;
  position: sticky;
  z-index: 30;
  top: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 2.65rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid #d8e0ea;
  background: #ffffff;
  padding: 0.3rem 0.55rem;
  white-space: nowrap;
}

.book-writer-toolbar.ql-toolbar.ql-snow .ql-picker,
.book-writer-toolbar.ql-toolbar.ql-snow .ql-formats {
  position: relative;
  z-index: 31;
}

.book-writer-toolbar.ql-toolbar.ql-snow .ql-picker.ql-expanded,
.book-writer-toolbar.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
  z-index: 80;
}

.book-writer-toolbar.ql-toolbar.ql-snow .ql-formats {
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
}

.book-writer-toolbar__insertions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.book-writer-zoom {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.45rem;
  color: #475569;
  font-size: 0.64rem;
  font-weight: 800;
  text-align: left;
}

.book-writer-zoom input[type="range"] {
  width: 5.5rem;
  margin: 0;
  padding: 0;
  accent-color: #9ca3af;
  cursor: pointer;
}

.book-writer-zoom output {
  min-width: 2.25rem;
  color: #334155;
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.book-writer-toolbar__insert {
  width: auto !important;
  min-width: auto !important;
  height: auto !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.3rem;
  background: #ffffff !important;
  padding: 0.36rem 0.48rem !important;
  color: #0f172a;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: left;
}

.book-writer-toolbar__insert:hover,
.book-writer-toolbar__insert:focus-visible {
  background: #eef2f7 !important;
  outline: none;
}

.book-writer-toolbar__insert[data-insert-chapter]:disabled {
  color: #c0c0c0;
  cursor: not-allowed;
}

.book-writer-toolbar__insert[data-insert-chapter]:disabled:hover {
  background: #ffffff !important;
}

.book-writer-canvas-wrap {
  padding: 1rem;
}

.book-writer-editor.ql-container.ql-snow {
  width: min(100%, 52rem);
  min-height: 27rem;
  margin: 0 auto;
  border: 1px solid #d8e0ea;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  font-family: Georgia, "Times New Roman", serif;
}

.book-writer-editor .ql-editor {
  min-height: 27rem;
  padding: 2.75rem 3.25rem;
  color: #111827;
  font-size: 1.02rem;
  line-height: 1.78;
  text-align: left;
}

.book-writer-editor .ql-editor h1,
.book-writer-editor .ql-editor h2 {
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.book-writer-fallback {
  display: block;
  width: min(100%, 52rem);
  min-height: 27rem;
  margin: 0 auto;
  border: 1px solid #d8e0ea;
  background: #ffffff;
  padding: 2.75rem 3.25rem;
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  line-height: 1.78;
  text-align: left;
}

.book-writer-fallback[hidden] {
  display: none;
}

.book-writer-focus-mode .creator-workspace-title,
.book-writer-focus-mode > .creator-mode-switch,
.book-writer-focus-mode .book-writer-head > div:first-child,
.book-writer-focus-mode .book-writer-head .book-writer-save-state,
.book-writer-focus-mode .book-writer-head #bookWriterPrint,
.book-writer-focus-mode .book-writer-head #bookWriterExport,
.book-writer-focus-mode .book-writer-outline,
.book-writer-focus-mode > .creator-bottom-bar {
  display: none;
}

.book-writer-focus-mode .book-writer-head {
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.book-writer-focus-mode .book-writer-app {
  grid-template-columns: 1fr;
  min-height: calc(100vh - 2rem);
}

.book-writer-fallback-mode .book-writer-toolbar {
  display: none;
}

@media (max-width: 1199.98px) {
  .creator-workspace-head {
    flex-wrap: wrap;
  }

  .creator-video-layout {
    grid-template-columns: 1fr;
  }

  .creator-video-uploader {
    position: static;
  }

  .creator-workspace-actions {
    justify-content: flex-start;
  }

  .book-writer-app {
    grid-template-columns: 1fr;
  }

  .book-writer-outline {
    border-right: 0;
    border-bottom: 1px solid #d8e0ea;
  }

  .book-writer-outline__scroll {
    display: flex;
    gap: 0.75rem;
    max-height: none;
    overflow-x: auto;
  }

  .book-writer-book {
    flex: 0 0 17rem;
  }

  .book-writer-book + .book-writer-book {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}

@media print {
  .creator-workspace-shell--book-writer > :not(.book-writer-app),
  .book-writer-outline,
  .book-writer-document-head,
  .book-writer-toolbar {
    display: none !important;
  }

  .book-writer-app,
  .book-writer-desk,
  .book-writer-canvas-wrap,
  .book-writer-editor.ql-container.ql-snow {
    display: block;
    min-height: 0;
    border: 0;
    background: #ffffff;
    padding: 0;
    box-shadow: none;
  }

  .book-writer-editor .ql-editor {
    min-height: 0;
    padding: 0;
  }

  .creator-workspace-shell--book-writer > :not(.book-pages-app),
  .creator-workspace-shell--book-writer .book-pages-outline,
  .creator-workspace-shell--book-writer .book-writer-toolbar,
  .creator-workspace-shell--book-writer .book-image-tools,
  .creator-workspace-shell--book-writer .book-page-locator,
  .creator-workspace-shell--book-writer .book-page-guides {
    display: none !important;
  }

  .creator-workspace-shell--book-writer .book-pages-app,
  .creator-workspace-shell--book-writer .book-pages-desk,
  .creator-workspace-shell--book-writer .book-pages-canvas,
  .creator-workspace-shell--book-writer .book-pages-manuscript,
  .creator-workspace-shell--book-writer .book-pages-editor.ql-container.ql-snow {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 0;
    overflow: visible;
    border: 0;
    background: #ffffff;
    padding: 0;
    box-shadow: none;
  }
}

@media (max-width: 1199.98px) {
  .creator-mode-switch {
    display: flex;
    width: 100%;
  }

  .creator-mode-switch__item {
    flex: 1 1 0;
    justify-content: center;
  }

  .creator-workspace-head,
  .creator-book__head,
  .creator-chapter__head {
    flex-direction: column;
  }

  .creator-workspace-actions {
    flex-wrap: wrap;
  }

  .creator-video-project__title-row,
  .creator-video-rail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .creator-video-project__name {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .creator-video-project__name input {
    width: 100%;
  }

  .creator-video-editor {
    grid-template-columns: 1fr;
  }

  .creator-video-preview {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .creator-video-time-fields {
    grid-template-columns: 1fr;
  }

  .creator-video-layout {
    grid-template-columns: 1fr;
  }

  .creator-video-uploader {
    position: static;
  }

  .creator-video-grid {
    grid-template-columns: 1fr;
  }

  .creator-video-kind {
    grid-template-columns: 1fr;
  }

  .creator-video-drop {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .creator-video-drop > span:nth-of-type(1) {
    flex-basis: calc(100% - 2rem);
  }

  .creator-bottom-bar {
    align-items: flex-start;
  }

  .book-writer-app {
    grid-template-columns: 1fr;
  }

  .book-writer-outline {
    border-right: 0;
    border-bottom: 1px solid #d8e0ea;
  }

  .book-writer-outline__scroll {
    display: flex;
    gap: 0.75rem;
    max-height: none;
    overflow-x: auto;
  }

  .book-writer-book {
    flex: 0 0 17rem;
  }

  .book-writer-book + .book-writer-book {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .book-writer-document-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .book-writer-document-meta {
    flex-wrap: wrap;
  }

  .book-writer-canvas-wrap {
    padding: 0.75rem;
  }

  .book-writer-editor .ql-editor,
  .book-writer-fallback {
    min-height: 30rem;
    padding: 2rem 1.25rem;
  }
}

.book-pages-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 100%;
  margin-bottom: 0.5rem;
}

.book-pages-head > div:first-child {
  min-width: 0;
}

.book-pages-head .creator-workspace-actions {
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.book-pages-price {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 850;
}

.book-pages-format {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 850;
}

.book-pages-format select {
  min-height: 2.45rem;
  border: 1px solid #94a3b8;
  border-radius: 0.55rem;
  background: #ffffff;
  padding: 0.45rem 1.8rem 0.45rem 0.6rem;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
}

.book-pages-price__field {
  display: inline-flex;
  align-items: center;
  border: 1px solid #94a3b8;
  border-radius: 0.55rem;
  background: #ffffff;
  padding: 0.43rem 0.55rem;
  color: #0f172a;
  font-size: 1rem;
}

.book-pages-price__field input {
  width: 5.8rem;
  border: 0;
  background: transparent;
  padding: 0 0 0 0.2rem;
  color: #0f172a;
  font: inherit;
  font-weight: 850;
  outline: none;
}

.book-pages-picker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.book-pages-picker select {
  max-width: 14rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.5rem 0.65rem;
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 750;
}

.book-create-menu {
  position: relative;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.45rem;
  border: 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0.15rem 0.2rem;
  color: #0f172a;
}

.book-create-menu details {
  position: relative;
}

.book-create-menu summary,
.book-create-menu__direct {
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  padding: 0.38rem 0.55rem;
  color: #334155;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  list-style: none;
  text-align: left;
}

.book-create-menu summary::-webkit-details-marker {
  display: none;
}

.book-create-menu summary:hover,
.book-create-menu details[open] > summary,
.book-create-menu__direct:hover,
.book-create-menu__direct:focus-visible {
  background: #eef2f7;
  color: #0f172a;
  outline: none;
}

.book-create-menu__direct--add {
  color: #0f172a;
  font-weight: 900;
}

.book-create-menu__panel {
  position: absolute;
  z-index: 90;
  top: calc(100% + 0.2rem);
  left: 0;
  display: grid;
  min-width: 11rem;
  border: 1px solid #94a3b8;
  background: #ffffff;
  padding: 0.35rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.book-create-menu details:last-child .book-create-menu__panel {
  right: 0;
  left: auto;
}

.book-create-menu__modes {
  position: static;
  display: flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  margin-left: 0;
  overflow-x: auto;
  transform: none;
}

.book-create-menu__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.book-create-menu__title,
.book-create-menu__cover,
.book-create-menu__save,
.book-create-menu__publish {
  min-height: 2rem;
  border: 1px solid #0f172a;
  border-radius: 0.38rem;
  padding: 0.38rem 0.65rem;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.book-create-menu__title,
.book-create-menu__cover,
.book-create-menu__save {
  background: #ffffff;
  color: #0f172a;
}

.book-create-menu__publish {
  background: #0f172a;
  color: #ffffff;
}

.book-create-menu__title:hover,
.book-create-menu__title:focus-visible,
.book-create-menu__cover:hover,
.book-create-menu__cover:focus-visible,
.book-create-menu__save:hover,
.book-create-menu__save:focus-visible {
  background: #eef2f7;
  outline: none;
}

.book-create-menu__publish:hover,
.book-create-menu__publish:focus-visible {
  background: #1e293b;
  outline: none;
}

.book-create-menu__title:disabled,
.book-create-menu__cover:disabled,
.book-create-menu__save:disabled,
.book-create-menu__publish:disabled {
  cursor: wait;
  opacity: 0.55;
}

.book-create-menu__modes .creator-mode-switch {
  margin: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  padding: 0;
}

.book-create-menu__modes .creator-mode-switch__item {
  border-radius: 0.3rem;
  padding: 0.34rem 0.5rem;
  font-size: 0.68rem;
}

.book-create-menu__modes .creator-mode-switch__item.is-active {
  background: #eef2f7;
  box-shadow: none;
}

@media (max-width: 1199.98px) {
  .book-create-menu__modes {
    position: static;
    order: 3;
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.15rem;
    transform: none;
  }
}

.book-create-menu__panel button,
.book-create-menu__panel a {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0.25rem;
  background: #ffffff;
  padding: 0.5rem 0.55rem;
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
}

.book-create-menu__panel button:hover,
.book-create-menu__panel a:hover {
  background: #eef2f7;
  text-decoration: none;
}

.book-create-menu__panel [data-menu-spellcheck][aria-pressed="true"]::before {
  content: "✓ ";
}

.book-create-menu__panel--publish {
  right: 0;
  left: auto;
  box-sizing: border-box;
  width: 15rem;
  max-width: calc(100vw - 1.5rem);
}

.book-create-menu__price {
  display: grid;
  gap: 0.3rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0.15rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.5rem 0.55rem;
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 750;
}

.book-create-menu__price > span:first-child {
  white-space: nowrap;
}

.book-create-menu__price small {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.25;
}

.book-create-menu__price .book-pages-price__field {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.book-create-menu__price input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.book-author-dialog {
  box-sizing: border-box;
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border: 1px solid #64748b;
  border-radius: 0.6rem;
  background: #ffffff;
  padding: 0;
  color: #0f172a;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  text-align: left;
}

.book-author-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.book-settings-dialog {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border: 1px solid #64748b;
  border-radius: 0.6rem;
  background: #ffffff;
  padding: 0;
  color: #0f172a;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  text-align: left;
}

.book-settings-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.book-settings-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #cbd5e1;
  padding: 1rem 1.2rem;
}

.book-settings-dialog__head span {
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-settings-dialog__head h2 {
  margin: 0.2rem 0 0;
  text-align: left;
}

.book-settings-dialog__head button {
  border: 0;
  background: transparent;
  padding: 0.15rem 0.35rem;
  color: #334155;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.book-settings-dialog__body {
  display: grid;
  gap: 0.55rem;
  padding: 1.2rem;
  text-align: left;
}


.book-settings-dialog__body label {
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 850;
}

.book-settings-dialog__body textarea,
.book-settings-dialog__body input,
.book-settings-dialog__body select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #94a3b8;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
  color: #0f172a;
  font: inherit;
  font-size: 0.76rem;
  text-align: left;
}

.book-settings-dialog__body p,
.book-settings-dialog__empty {
  margin: 0;
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: left;
}

.book-country-picker__label {
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 850;
}

.book-targeting-options,
.book-kind-options {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.book-targeting-options legend,
.book-kind-options legend {
  margin-bottom: 0.45rem;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 850;
}

.book-targeting-options__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.65rem;
}

.book-targeting-options__grid label,
.book-kind-options__row label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.68rem;
  line-height: 1.25;
}

.book-kind-options__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.book-settings-dialog__body .book-targeting-options input[type="checkbox"],
.book-settings-dialog__body .book-kind-options input[type="radio"] {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: #0f172a;
}

.book-country-picker {
  display: grid;
  gap: 0.35rem;
  max-height: 23rem;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 0.45rem;
}

.book-country-group {
  border: 1px solid #d8e0ea;
  background: #ffffff;
}

.book-country-group summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  text-align: left;
}

.book-country-group summary::-webkit-details-marker {
  display: none;
}

.book-country-group summary::after {
  grid-column: 4;
  grid-row: 1;
  margin-left: 0;
  content: "+";
  color: #64748b;
  font-weight: 900;
}

.book-country-group[open] summary::after {
  content: "−";
}

.book-country-group summary small {
  grid-column: 3;
  grid-row: 1;
  margin-right: 0;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 750;
  text-align: right;
}

.book-settings-dialog__body .book-country-group input[type="checkbox"] {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: #0f172a;
}

.book-country-group__countries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 0.65rem;
  border-top: 1px solid #e2e8f0;
  padding: 0.55rem 0.6rem 0.65rem;
}

.book-country-group__countries label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.4rem;
  padding: 0.28rem 0;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.book-country-group__countries span {
  text-align: left;
}

@media (max-width: 560px) {
  .book-targeting-options__grid {
    grid-template-columns: 1fr;
  }

  .book-country-group__countries {
    grid-template-columns: 1fr;
  }

  .book-writer-toolbar__insertions {
    width: 100%;
    margin-left: 0;
  }
}

.book-share-invites {
  display: grid;
  gap: 0.4rem;
  margin: 0.6rem 0;
}

.book-share-invites__row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #0f172a;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.5rem 0.7rem;
  font-size: 0.74rem;
  color: #0f172a;
}

.book-share-invites__row p {
  margin: 0;
  flex: 1;
}

.book-share-invites__row button {
  border: 1px solid #0f172a;
  border-radius: 0.35rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.35rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 850;
}

.book-share-invites__row button[data-invite-decline] {
  background: #ffffff;
  color: #0f172a;
}

.book-share-owners {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.book-share-owners li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.35rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.72rem;
  color: #0f172a;
}

.book-share-owners li button {
  border: 1px solid #991b1b;
  border-radius: 0.35rem;
  background: #ffffff;
  color: #991b1b;
  padding: 0.25rem 0.5rem;
  font-size: 0.66rem;
  font-weight: 850;
}

.book-settings-dialog__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.book-settings-dialog__actions button {
  border: 1px solid #0f172a;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.5rem 0.7rem;
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 850;
  text-align: left;
}

.book-settings-dialog__actions button:first-child:not(.is-danger) {
  background: #0f172a;
  color: #ffffff;
}

.book-settings-dialog__actions button.is-danger {
  border-color: #991b1b;
  background: #991b1b;
  color: #ffffff;
}

.book-settings-dialog__actions output {
  min-height: 1em;
  color: #475569;
  font-size: 0.65rem;
  font-weight: 750;
}

.book-saved-list {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
}

.book-saved-list__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid #d8e0ea;
  border-radius: 0.4rem;
  background: #ffffff;
  padding: 0.7rem;
  color: #0f172a;
  text-align: left;
  text-decoration: none;
}

.book-saved-list__item:hover,
.book-saved-list__item:focus-visible,
.book-saved-list__item.is-current {
  border-color: #94a3b8;
  background: #f1f5f9;
  outline: none;
  text-decoration: none;
}

.book-saved-list__item span,
.book-saved-list__item strong,
.book-saved-list__item small {
  display: block;
  min-width: 0;
  text-align: left;
}

.book-saved-list__item strong {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-saved-list__item small {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.63rem;
}

.book-saved-list__item em {
  flex: 0 0 auto;
  color: #166534;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 850;
}

.book-settings-dialog__empty {
  padding: 0.7rem;
}

.book-settings-dialog--library {
  width: min(72rem, calc(100% - 2rem));
  height: min(48rem, calc(100vh - 2rem));
  overflow: hidden;
}

.book-library {
  display: grid;
  grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr);
  height: calc(100% - 4.4rem);
  min-height: 0;
}

.book-library .book-saved-list {
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid #cbd5e1;
  background: #f8fafc;
}

.book-library .book-saved-list__item {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.55rem;
}

.book-library .book-saved-list__item.is-previewing {
  border-color: #2563eb;
  background: #eff6ff;
}

.book-saved-list__cover {
  display: block;
  width: 4.2rem;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid #64748b;
  border-radius: 0.2rem;
  background: #0f172a;
  padding: 0;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
}

.book-saved-list__cover img,
.book-saved-list__cover > span {
  display: block;
  width: 100%;
  height: 100%;
}

.book-saved-list__cover img {
  object-fit: cover;
}

.book-saved-list__cover > span {
  box-sizing: border-box;
  overflow: hidden;
  border-top: 0.35rem solid #f97316;
  padding: 0.45rem 0.35rem;
  font-size: 0.55rem;
  font-weight: 900;
  line-height: 1.1;
}

.book-saved-list__cover > span[data-cover-style="paper"] {
  border-top-color: #292524;
  background: #f1ece2;
  color: #292524;
}

.book-saved-list__cover > span[data-cover-style="signal"] {
  border-top-color: #111827;
  background: #ef4444;
  color: #111827;
}

.book-saved-list__cover > span[data-cover-style="night"] {
  border-top-color: #60a5fa;
  background: #172554;
  color: #f8fafc;
}

.book-saved-list__copy {
  min-width: 0;
}

.book-saved-list__state {
  margin-bottom: 0.2rem;
  color: #166534;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.book-saved-list__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.book-saved-list__actions button,
.book-saved-list__actions a {
  border: 1px solid #94a3b8;
  border-radius: 0.3rem;
  background: #ffffff;
  padding: 0.32rem 0.42rem;
  color: #0f172a;
  font-size: 0.58rem;
  font-weight: 850;
  text-align: left;
  text-decoration: none;
}

.book-saved-list__actions button:hover,
.book-saved-list__actions a:hover {
  background: #eef2f7;
  text-decoration: none;
}

.book-library-preview {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: #eef1f5;
}

.book-library-preview [hidden] {
  display: none;
}

.book-library-preview__empty {
  margin: 1rem;
  border: 1px dashed #94a3b8;
  background: #ffffff;
  padding: 1rem;
  text-align: left;
}

.book-library-preview__empty strong,
.book-library-preview__empty p {
  display: block;
  margin: 0;
  text-align: left;
}

.book-library-preview__empty p {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.7rem;
}

.book-library-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0.65rem 0.8rem;
}

.book-library-preview__head span {
  color: #166534;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.book-library-preview__head h3 {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  text-align: left;
}

.book-library-preview__head a {
  border: 1px solid #0f172a;
  border-radius: 0.35rem;
  background: #0f172a;
  padding: 0.42rem 0.55rem;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 850;
  text-align: left;
  text-decoration: none;
}

.book-library-preview__page {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  min-height: 32rem;
  margin: 1rem auto;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 3.4rem 4rem;
  color: #111827;
  font-family: "Times New Roman", Times, serif;
  font-size: 11pt;
  line-height: 1.55;
  text-align: left;
}

.book-library-preview__page.is-cover {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
}

.book-library-preview__page > header small,
.book-library-preview__page > header h4 {
  display: block;
  margin: 0 0 0.7rem;
  text-align: left;
}

.book-library-preview__page > header small {
  color: #64748b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
}

.book-library-preview__cover {
  display: flex;
  width: min(21rem, 100%);
  aspect-ratio: 2 / 3;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid #0f172a;
  background: #111827;
  color: #ffffff;
}

.book-library-preview__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-library-preview__cover h4 {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border-top: 0.55rem solid #f97316;
  padding: 1.4rem;
  color: inherit;
  font-size: 1.8rem;
  line-height: 1;
  text-align: left;
}

.book-library-preview__cover[data-cover-style="paper"] {
  border-color: #78716c;
  background: #f1ece2;
  color: #292524;
}

.book-library-preview__cover[data-cover-style="signal"] {
  border-color: #991b1b;
  background: #ef4444;
  color: #111827;
}

.book-library-preview__cover[data-cover-style="night"] {
  border-color: #1e3a8a;
  background: #172554;
  color: #f8fafc;
}

.book-library-preview__content,
.book-library-preview__content * {
  max-width: 100%;
  text-align: left;
}

.book-library-preview__content img {
  height: auto;
}

.book-library-preview__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  border-top: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0.6rem 0.8rem;
}

.book-library-preview__controls button {
  border: 1px solid #94a3b8;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.4rem 0.55rem;
  color: #0f172a;
  font-size: 0.65rem;
  font-weight: 850;
}

.book-library-preview__controls button:disabled {
  opacity: 0.45;
}

.book-library-preview__controls output {
  color: #475569;
  font-size: 0.65rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1199.98px) {
  .book-settings-dialog--library {
    height: calc(100vh - 1rem);
  }

  .book-library {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .book-library .book-saved-list {
    max-height: 16rem;
    border-right: 0;
    border-bottom: 1px solid #cbd5e1;
  }

  .book-library-preview {
    min-height: 32rem;
  }

  .book-library-preview__page {
    min-height: 26rem;
    padding: 2rem;
  }
}

.book-author-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #cbd5e1;
  padding: 1rem 1.2rem;
}

.book-author-dialog__head span,
.book-author-template__copy > span {
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-author-dialog__head h2,
.book-author-template__copy h3 {
  margin: 0.2rem 0 0;
  text-align: left;
}

.book-author-dialog__head button {
  border: 0;
  background: transparent;
  padding: 0.15rem 0.35rem;
  color: #334155;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.book-author-dialog__preview-label {
  margin: 1.2rem 1.2rem 0;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-author-template {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.2rem;
  margin: 0.5rem 1.2rem 1.2rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 1.2rem;
}

.book-author-template__photo {
  display: flex;
  width: 7rem;
  aspect-ratio: 4 / 5;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  border: 1px solid #94a3b8;
  border-radius: 0;
  background: #e2e8f0;
  color: #334155;
  font-size: 2.5rem;
  font-weight: 900;
}

.book-author-template__photo span {
  width: 100%;
  text-align: center;
}

.book-author-template__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-author-template__copy small {
  display: block;
  margin-top: 0.25rem;
  color: #64748b;
}

.book-author-template__copy p {
  margin: 0.8rem 0;
  color: #334155;
  line-height: 1.55;
}

.book-author-template__copy a {
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
}

.book-author-dialog__editor {
  display: grid;
  gap: 0.45rem;
  padding: 0 1.2rem 1.2rem;
}

.book-author-dialog__editor label {
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
}

.book-author-dialog__editor textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 7rem;
  resize: vertical;
  border: 1px solid #94a3b8;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.5rem;
  color: #0f172a;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: left;
}

.book-author-dialog__photo-control {
  display: grid;
  gap: 0.35rem;
}

.book-author-dialog__photo-control input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #94a3b8;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.45rem;
  color: #0f172a;
  font-size: 0.72rem;
}

.book-author-dialog__photo-control small {
  color: #64748b;
  font-size: 0.65rem;
}

.book-author-dialog__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.book-author-dialog__actions button {
  border: 1px solid #0f172a;
  border-radius: 0.35rem;
  background: #0f172a;
  padding: 0.55rem 0.75rem;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: left;
}

.book-author-dialog__actions output {
  min-height: 1em;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 700;
}

@media (max-width: 560px) {
  .book-author-template {
    grid-template-columns: 1fr;
  }

  .book-author-template__photo {
    width: 6rem;
  }
}

.book-find-replace {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.4rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: -0.15rem 0 0.45rem;
  border-bottom: 1px solid #d8e0ea;
  background: #ffffff;
  padding: 0.4rem 0.55rem 0.55rem;
  color: #334155;
  text-align: left;
}

.book-find-replace[hidden] {
  display: none;
}

.book-find-replace label {
  align-self: center;
  font-size: 0.66rem;
  font-weight: 850;
}

.book-find-replace input {
  box-sizing: border-box;
  width: min(14rem, 100%);
  min-width: 8rem;
  border: 1px solid #94a3b8;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.42rem 0.5rem;
  color: #0f172a;
  font-size: 0.72rem;
}

.book-find-replace__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.book-find-replace button {
  border: 1px solid #cbd5e1;
  border-radius: 0.3rem;
  background: #ffffff;
  padding: 0.4rem 0.55rem;
  color: #0f172a;
  font-size: 0.67rem;
  font-weight: 800;
}

.book-find-replace button:hover {
  background: #eef2f7;
}

.book-find-replace output {
  align-self: center;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 750;
}

.book-create-menu__panel--format {
  gap: 0.35rem;
}

.book-create-menu__panel--format label {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 850;
  text-align: left;
}

.book-create-menu__format-label {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 850;
  text-align: left;
}

.book-create-menu__panel--format strong {
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: left;
}

.book-create-menu__panel--format select {
  width: 100%;
  border: 1px solid #94a3b8;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.5rem;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
}

.book-format-visibility {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.book-create-menu__panel--format .book-format-visibility label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 750;
}

.book-create-menu__panel--format .book-format-visibility input {
  width: auto;
  margin: 0;
  accent-color: #0f172a;
}

[data-book-writer-app].is-show-paragraphs .book-pages-editor .ql-editor p::after,
[data-book-writer-app].is-show-paragraphs .book-pages-editor .ql-editor li::after {
  content: "\00b6";
  margin-left: 0.15rem;
  color: #94a3b8;
  font-size: 0.75em;
  font-weight: 700;
  pointer-events: none;
}

[data-book-writer-app].is-show-headings .book-pages-editor .ql-editor h1::after,
[data-book-writer-app].is-show-headings .book-pages-editor .ql-editor h2::after {
  margin-left: 0.35rem;
  color: #94a3b8;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

[data-book-writer-app].is-show-headings .book-pages-editor .ql-editor h1::after {
  content: var(--book-mark-title, "Title");
}

[data-book-writer-app].is-show-headings .book-pages-editor .ql-editor h2::after {
  content: var(--book-mark-heading, "Heading");
}

[data-book-writer-app].is-show-page-breaks .book-pages-editor .ql-editor .book-explicit-page-break {
  position: relative;
  min-height: 1.35rem;
  margin: 0.35rem 0;
  border-top: 1px dashed #64748b;
}

[data-book-writer-app].is-show-page-breaks .book-pages-editor .ql-editor .book-explicit-page-break::after {
  content: var(--book-mark-page-break, "Page break");
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  padding: 0 0.35rem;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  pointer-events: none;
  white-space: nowrap;
}

@media print {
  [data-book-writer-app].is-show-paragraphs .book-pages-editor .ql-editor p::after,
  [data-book-writer-app].is-show-paragraphs .book-pages-editor .ql-editor li::after,
  [data-book-writer-app].is-show-headings .book-pages-editor .ql-editor h1::after,
  [data-book-writer-app].is-show-headings .book-pages-editor .ql-editor h2::after,
  [data-book-writer-app].is-show-page-breaks .book-pages-editor .ql-editor .book-explicit-page-break::after {
    content: none !important;
  }
}

.book-pages-app {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42rem;
  overflow: visible;
  border: 1px solid #d8e0ea;
  border-radius: 0.45rem;
  background: #ffffff;
}

.book-pages-outline {
  display: flex;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid #d8e0ea;
  background: #ffffff;
}

.book-pages-outline[hidden] {
  display: none;
}

.book-pages-outline__book {
  padding: 0.7rem;
  border-bottom: 1px solid #d8e0ea;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
}

.book-pages-outline__book-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.book-pages-outline__book strong {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-pages-outline__book > span {
  display: block;
  margin-top: 0.3rem;
  padding-left: 1.5rem;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 750;
  white-space: nowrap;
}

.book-pages-outline__book .book-pages-picker {
  flex: 1 1 auto;
  min-width: 0;
}

.book-pages-outline__book .book-pages-picker select {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
}

.book-pages-outline__book [data-edit-book] {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: transparent;
  padding: 0.2rem;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 850;
}

.book-pages-outline__book input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #93c5fd;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.35rem 0.45rem;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
}

.book-pages-outline__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid #d8e0ea;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.78rem;
  text-align: left;
}

.book-pages-outline__head span {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 750;
}

.book-pages-outline__head a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #334155;
  font-size: 0.66rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.book-pages-outline__scroll {
  flex: 1 1 auto;
  max-height: 72vh;
  overflow-y: auto;
  padding: 0.35rem 0.45rem 0.5rem;
}

.book-insert-slider {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 1.9rem;
  margin: 0.35rem 0;
  border-top: 1px solid #64748b;
  padding-top: 0.2rem;
  cursor: grab;
}

.book-insert-slider.is-dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.book-insert-slider__handle {
  color: #94a3b8;
  font-size: 0.72rem;
}

.book-insert-slider button {
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  padding: 0.3rem 0.4rem;
  color: #334155;
  font-size: 0.64rem;
  font-weight: 850;
  white-space: nowrap;
}

.book-insert-slider button:hover {
  background: #eef2f7;
  color: #0f172a;
}

.book-insert-slider button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.book-insert-slider [data-add-chapter]:disabled {
  color: #c0c0c0;
  cursor: not-allowed;
  opacity: 1;
}

.creator-workspace-shell--book-writer.is-outline-hidden .book-pages-app {
  grid-template-columns: minmax(0, 1fr);
}

.creator-workspace-shell--book-writer.is-outline-hidden .book-pages-outline {
  display: none;
}

.book-pages-group + .book-pages-group {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #cbd5e1;
}

.book-pages-chapter {
  display: grid;
  grid-template-columns: 0.7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 850;
  text-align: left;
}

.book-pages-chapter__drag {
  color: #94a3b8;
  cursor: grab;
  font-size: 0.75rem;
}

.book-pages-group.is-dragging {
  opacity: 0.48;
}

.book-pages-chapter > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-pages-chapter__name small,
.book-pages-chapter__name strong {
  display: block;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-pages-chapter__name small {
  margin-bottom: 0.12rem;
  color: #94a3b8;
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-pages-chapter__name strong {
  color: #0f172a;
  font-size: 0.71rem;
  font-weight: 900;
}

.book-pages-chapter > button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: transparent;
  padding: 0.1rem 0.2rem;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 850;
}

.book-pages-chapter input {
  width: 100%;
  min-width: 0;
  border: 1px solid #93c5fd;
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0.3rem 0.4rem;
  color: #0f172a;
  font: inherit;
}

.book-pages-group__pages {
  min-height: 0.5rem;
}

.book-pages-group__empty {
  margin: 0.2rem 0.35rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.4rem;
  padding: 0.45rem 0.55rem;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: left;
}

.book-pages-page {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: flex-start;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  background: transparent;
  padding: 0.42rem 0.48rem;
  color: #334155;
  cursor: grab;
  text-align: left;
}

.book-pages-page > .ap-bi-svg,
.book-pages-page > i {
  margin-top: 0.12rem;
  color: #94a3b8;
}

.book-pages-page + .book-pages-page {
  margin-top: 0.15rem;
}

.book-pages-page:hover,
.book-pages-page:focus-visible {
  border-color: #cbd5e1;
  background: #ffffff;
  outline: none;
}

.book-pages-page.is-active {
  border-color: transparent;
  border-left: 3px solid #2563eb;
  background: #f1f5f9;
  color: #0f172a;
}

.book-pages-page.is-dragging {
  cursor: grabbing;
  opacity: 0.45;
}

.book-pages-page.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.book-pages-page__copy {
  display: block;
  min-width: 0;
}

.book-pages-page__copy > strong,
.book-pages-page__copy > span {
  display: block;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}

.book-pages-page__copy > strong {
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.book-pages-page__copy > span {
  display: -webkit-box;
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.book-pages-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  border-top: 1px solid #d8e0ea;
  background: #ffffff;
}

.book-pages-pagination a {
  color: #334155;
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
}

.book-pages-pagination > span {
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 750;
}

.book-pages-empty {
  padding: 0.9rem;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: left;
}

.book-pages-desk {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #eef1f5;
}

.book-pages-canvas {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 0.3rem;
}

.book-pages-editor.ql-container.ql-snow {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: "Times New Roman", Times, serif;
}

.book-pages-editor .ql-editor {
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: transparent;
  padding: 0;
  color: #111827;
  font-size: 11pt;
  line-height: 1.55;
  text-align: left;
}

.book-writer-editor .ql-editor > p:not(.ql-align-left):not(.ql-align-center):not(.ql-align-right),
.book-pages-editor .ql-editor > p:not(.ql-align-left):not(.ql-align-center):not(.ql-align-right),
.book-physical-page__preview .ql-editor > p:not(.ql-align-left):not(.ql-align-center):not(.ql-align-right),
.book-page-measure .ql-editor > p:not(.ql-align-left):not(.ql-align-center):not(.ql-align-right) {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.book-pages-editor .ql-editor.is-image-dragging {
  cursor: move;
}

.book-pages-editor .ql-editor img.is-dragging-picture {
  opacity: 0.55;
}

.book-pages-editor .ql-editor h1,
.book-pages-editor .ql-editor h2 {
  color: #0f172a;
  font-family: inherit;
  text-align: left;
}

.book-pages-fallback {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: #111827;
  font-family: "Times New Roman", Times, serif;
  font-size: 11pt;
  line-height: 1.55;
  text-align: left;
}

.book-pages-fallback[hidden] {
  display: none;
}

.book-pages-cover-nav {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 2px solid #94a3b8;
  background: #ffffff;
  padding: 0.65rem 0.75rem;
  color: #0f172a;
  text-align: left;
}

.book-pages-cover-nav:hover,
.book-pages-cover-nav:focus-visible {
  background: #eff6ff;
  outline: none;
}

.book-pages-cover-nav__thumb {
  display: block;
  width: 2rem;
  height: 2.65rem;
  border: 1px solid #334155;
  background: #0f172a;
  box-shadow: inset 0.32rem 0 #f97316;
}

.book-pages-cover-nav > span:nth-child(2),
.book-pages-cover-nav strong,
.book-pages-cover-nav small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-pages-cover-nav strong {
  font-size: 0.72rem;
  font-weight: 900;
}

.book-pages-cover-nav small,
.book-pages-cover-nav__number {
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 750;
}

.book-cover-page {
  display: grid;
  grid-template-columns: minmax(15rem, 26rem) minmax(14rem, 22rem);
  gap: 1rem;
  align-items: start;
  max-width: 64rem;
  box-sizing: border-box;
  margin: 0 auto 1rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 1rem;
  scroll-margin-top: 1rem;
}

.book-cover-page > * {
  min-width: 0;
}

.book-cover-page[hidden],
.book-pages-manuscript[hidden] {
  display: none;
}

.book-cover-page:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.book-cover-preview {
  position: relative;
  display: flex;
  min-height: 35rem;
  aspect-ratio: 2 / 3;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid #0f172a;
  background: #111827;
  color: #ffffff;
}

.book-cover-preview[data-cover-style="paper"] {
  border-color: #78716c;
  background: #f1ece2;
  color: #292524;
}

.book-cover-preview[data-cover-style="signal"] {
  border-color: #991b1b;
  background: #ef4444;
  color: #111827;
}

.book-cover-preview[data-cover-style="night"] {
  border-color: #1e3a8a;
  background: #172554;
  color: #f8fafc;
}

.book-cover-preview__image {
  position: absolute;
  inset: 0;
}

.book-cover-preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-preview__image img[hidden] {
  display: none;
}

.book-cover-preview__copy {
  position: relative;
  z-index: 1;
  width: 100%;
  border-top: 0.55rem solid #f97316;
  background: #111827;
  padding: 1.4rem;
  color: #ffffff;
  text-align: left;
}

.book-cover-preview.has-uploaded-image:not([data-cover-style="standard"]) .book-cover-preview__copy {
  display: none;
}

.book-cover-preview__author {
  display: none;
}

.book-cover-preview[data-cover-style="standard"] {
  display: grid;
  grid-template-rows: auto minmax(12rem, 1fr) auto;
  align-items: stretch;
  border-color: #111111;
  background: #ffffff;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
}

.book-cover-preview[data-cover-style="standard"] .book-cover-preview__copy {
  width: auto;
  border: 0;
  background: #ffffff;
  padding: 2rem 2rem 1rem;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
}

.book-cover-preview[data-cover-style="standard"] .book-cover-preview__copy small {
  color: #111111;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.book-cover-preview[data-cover-style="standard"] .book-cover-preview__copy h2 {
  margin-top: 1.4rem;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.02;
  text-transform: none;
}

.book-cover-preview[data-cover-style="standard"] .book-cover-preview__copy p {
  min-height: 1.2em;
  margin-top: 0.75rem;
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.book-cover-preview[data-cover-style="standard"] .book-cover-preview__image {
  position: relative;
  inset: auto;
  min-height: 12rem;
  margin: 0 2rem;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.book-cover-preview[data-cover-style="standard"] .book-cover-preview__image::before {
  position: absolute;
  z-index: 1;
  top: 0.75rem;
  left: 0.75rem;
  content: "Cover image";
  color: #64748b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
}

.book-cover-preview.has-uploaded-image[data-cover-style="standard"] .book-cover-preview__image::before {
  display: none;
}

.book-cover-preview[data-cover-style="standard"] .book-cover-preview__image img {
  position: relative;
  z-index: 2;
  object-fit: contain;
}

.book-cover-preview[data-cover-style="standard"] .book-cover-preview__author {
  display: block;
  margin: 0;
  padding: 1.25rem 2rem 2rem;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}

.book-cover-preview[data-cover-style="paper"] .book-cover-preview__copy {
  border-top-color: #292524;
  background: #f1ece2;
  color: #292524;
}

.book-cover-preview[data-cover-style="signal"] .book-cover-preview__copy {
  border-top-color: #111827;
  background: #ef4444;
  color: #111827;
}

.book-cover-preview[data-cover-style="night"] .book-cover-preview__copy {
  border-top-color: #60a5fa;
  background: #172554;
  color: #f8fafc;
}

.book-cover-preview__copy small,
.book-cover-preview__copy h2,
.book-cover-preview__copy p {
  margin: 0;
  text-align: left;
}

.book-cover-preview__copy small {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-cover-preview__copy h2 {
  margin-top: 0.8rem;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
  font-weight: 900;
  line-height: 0.98;
}

.book-cover-preview__copy p {
  margin-top: 1.25rem;
  font-size: 0.68rem;
  font-weight: 800;
}

.book-cover-controls {
  position: sticky;
  top: 0.75rem;
  color: #0f172a;
  text-align: left;
}

.book-cover-controls > strong,
.book-cover-controls > p,
.book-cover-controls > label,
.book-cover-controls__label {
  display: block;
  text-align: left;
}

.book-cover-controls > strong {
  font-size: 0.9rem;
  font-weight: 900;
}

.book-cover-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
  border: 1px solid #94a3b8;
  border-radius: 0.4rem;
  background: #ffffff;
  padding: 0.45rem 0.55rem;
  color: #0f172a;
  font-size: 0.65rem;
  font-weight: 900;
}

.book-cover-controls > p {
  margin: 0.35rem 0 0.8rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
}

.book-cover-controls > label,
.book-cover-controls__label {
  margin: 0.75rem 0 0.3rem;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.book-cover-controls > input[type="text"] {
  width: 100%;
  border: 1px solid #94a3b8;
  border-radius: 0.45rem;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 800;
}

.book-cover-title-options,
.book-cover-style-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.book-cover-title-options button,
.book-cover-style-options button,
.book-cover-upload {
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #ffffff;
  padding: 0.42rem 0.5rem;
  color: #334155;
  font-size: 0.62rem;
  font-weight: 850;
  text-align: left;
}

.book-cover-style-options button[aria-pressed="true"] {
  border-color: #2563eb;
  background: #eff6ff;
  color: #0f172a;
}

.book-cover-upload {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.8rem !important;
  cursor: pointer;
  text-transform: none !important;
}

.book-cover-image-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.book-cover-remove {
  margin-top: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #ffffff;
  padding: 0.42rem 0.5rem;
  color: #334155;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 850;
  text-align: left;
}

.book-cover-remove[hidden] {
  display: none !important;
}

.book-cover-remove:hover,
.book-cover-remove:focus-visible {
  background: #eef2f7;
  outline: none;
}

.book-cover-recommendation {
  margin-top: 1rem;
  border-top: 1px solid #d8e0ea;
  padding-top: 0.85rem;
  color: #334155;
  text-align: left;
}

.book-cover-recommendation strong {
  display: block;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: left;
}

.book-cover-recommendation p {
  margin: 0.4rem 0 0;
  color: #475569;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.55;
  text-align: left;
}

.book-pages-manuscript {
  --book-page-height: 48rem;
  --book-page-gap: 1.25rem;
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  background: transparent;
  transform-origin: top center;
}

.book-pages-zoom-stage {
  position: relative;
  min-width: 100%;
  min-height: 0;
}

.book-pages-zoom-stage[hidden] {
  display: none;
}

.book-writer-toolbar[hidden],
.book-insert-slider[hidden],
.book-page-locator[hidden],
.book-illustration-loading[hidden] {
  display: none !important;
}

.book-editor-source {
  position: fixed;
  top: 0;
  left: -100000px;
  width: 34.5rem;
  visibility: hidden;
  pointer-events: none;
}

.book-pages-canvas[data-page-format="a4"] .book-pages-manuscript {
  max-width: 49.625rem;
}

.book-pages-canvas[data-page-format="six-nine"] .book-pages-manuscript {
  width: 46rem;
  max-width: none;
  margin: 0 auto;
}

.book-page-list {
  display: grid;
  gap: var(--book-page-gap, 1.25rem);
  width: 100%;
  outline: 0;
}

.book-physical-page {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: var(--book-page-height, 69rem);
  overflow: hidden;
  border: 1px solid #d8e0ea;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.book-physical-page__content {
  position: absolute;
  inset: var(--book-page-margin, 5.75rem);
  overflow: hidden;
  color: #000000;
  text-align: left;
}

.book-physical-page__content,
.book-physical-page__content * {
  color: #000000 !important;
}

.book-physical-page__preview,
.book-physical-page__preview .ql-editor {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: #111827;
  font-family: inherit;
  font-size: 11pt;
  line-height: 1.55;
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
}

.book-physical-page__preview .ql-editor {
  padding: 0;
}

.book-physical-page__number {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0.25rem 0.42rem;
  color: #334155;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
}

.book-page-measure {
  position: fixed;
  top: 0;
  left: -100000px;
  box-sizing: border-box;
  width: var(--book-measure-width, 34.5rem);
  height: var(--book-measure-height, 57.5rem);
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.book-page-measure .ql-container,
.book-page-measure .ql-editor {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 11pt;
  line-height: 1.55;
}

.book-physical-page .book-explicit-page-break,
.book-page-measure .book-explicit-page-break {
  display: none;
}

.book-physical-page img,
.book-page-measure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.book-image-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border-bottom: 1px solid #d8e0ea;
  background: #ffffff;
  padding: 0.35rem 0.55rem;
  color: #475569;
  text-align: left;
}

.book-image-tools[hidden] {
  display: none;
}

.book-image-tools span,
.book-image-tools label {
  font-size: 0.63rem;
  font-weight: 850;
}

.book-image-tools button {
  border: 1px solid #cbd5e1;
  border-radius: 0.3rem;
  background: #ffffff;
  padding: 0.35rem 0.45rem;
  color: #0f172a;
  font-size: 0.64rem;
  font-weight: 800;
}

.book-image-tools button:hover,
.book-image-tools button[aria-pressed="true"] {
  background: #eef2f7;
}

.book-image-tools input {
  flex: 1 1 9rem;
  min-width: 7rem;
  max-width: 18rem;
  border: 1px solid #94a3b8;
  border-radius: 0.3rem;
  background: #ffffff;
  padding: 0.35rem 0.45rem;
  color: #0f172a;
  font-size: 0.67rem;
}

.book-image-tools input[type="range"] {
  flex: 0 1 7rem;
  min-width: 5rem;
  max-width: 7rem;
  border: 0;
  padding: 0;
}

.book-pages-editor .ql-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 0.65rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.book-pages-editor .ql-editor img[width="35%"] {
  width: 35%;
}

.book-pages-editor .ql-editor img[width="60%"] {
  width: 60%;
}

.book-pages-editor .ql-editor img[width="100%"] {
  width: 100%;
}

.book-pages-editor .ql-editor img.is-selected-picture {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.book-manuscript-outline[hidden] {
  display: none;
}

.book-manuscript-outline__chapter + .book-manuscript-outline__chapter {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
}

.book-manuscript-outline__chapter-head {
  margin: 0.2rem 0.35rem 0.45rem;
  color: #1e293b;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: left;
  text-transform: none;
  cursor: grab;
}

summary.book-manuscript-outline__chapter-head {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

summary.book-manuscript-outline__chapter-head::marker {
  color: #94a3b8;
}

summary.book-manuscript-outline__chapter-head small {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.book-manuscript-outline__chapter.is-dragging .book-manuscript-outline__chapter-head {
  cursor: grabbing;
  opacity: 0.55;
}

.book-manuscript-outline__pages {
  display: block;
}

.book-manuscript-outline__page {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  background: transparent;
  padding: 0.42rem 0.48rem;
  color: #334155;
  cursor: grab;
  text-align: left;
}

.book-manuscript-outline__page.is-dragging {
  cursor: grabbing;
  opacity: 0.45;
}

.book-manuscript-outline__page + .book-manuscript-outline__page {
  margin-top: 0.12rem;
}

.book-manuscript-outline__page:hover,
.book-manuscript-outline__page:focus-visible {
  border-color: #cbd5e1;
  background: #ffffff;
  outline: none;
}

.book-manuscript-outline__page.is-active {
  border-color: transparent;
  border-left: 3px solid #2563eb;
  background: #f1f5f9;
  color: #0f172a;
}

.book-manuscript-outline__page.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.book-manuscript-outline__page--cover {
  margin-bottom: 0.35rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.55rem;
}

.book-manuscript-outline__page-copy {
  display: block;
  min-width: 0;
}

.book-manuscript-outline__page-copy > strong,
.book-manuscript-outline__page-copy > span {
  display: block;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}

.book-manuscript-outline__page-copy > strong {
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.book-manuscript-outline__page-copy > span {
  display: -webkit-box;
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.3;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-pages-editor .ql-editor .book-explicit-page-break {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--book-page-margin, 3rem);
  margin: 0;
  border: 0;
  border-top: 1px solid #94a3b8;
  background: transparent;
}

.book-page-locator {
  position: sticky;
  z-index: 5;
  top: 0.75rem;
  display: block;
  width: max-content;
  margin: 0.75rem 0.75rem -2.6rem auto;
  border: 1px solid #94a3b8;
  border-radius: 0.4rem;
  background: #ffffff;
  padding: 0.35rem 0.5rem;
  color: #0f172a;
  font-size: 0.65rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.book-illustration-loading {
  position: sticky;
  z-index: 5;
  top: 3.45rem;
  display: block;
  width: max-content;
  margin: 0.25rem 0.75rem -2.35rem auto;
  border: 1px solid #94a3b8;
  border-radius: 0.4rem;
  background: #ffffff;
  padding: 0.3rem 0.45rem;
  color: #334155;
  font-size: 0.61rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.book-pages-manuscript .book-pages-editor,
.book-pages-manuscript .book-pages-fallback {
  position: relative;
  z-index: 1;
}

@media (max-width: 1050px) {
  .book-pages-head {
    align-items: flex-start;
  }

  .book-pages-head .creator-workspace-actions {
    flex-wrap: wrap;
  }

  .book-pages-app {
    grid-template-columns: 11.75rem minmax(0, 1fr);
  }

  .book-pages-outline__book,
  .book-pages-outline__head {
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  }

  .book-cover-page {
    grid-template-columns: minmax(14rem, 1fr) minmax(12rem, 17rem);
  }
}

@media (max-width: 1199.98px) {
  .book-pages-head {
    flex-direction: column;
  }

  .book-pages-head .creator-workspace-actions {
    justify-content: flex-start;
  }

  .book-pages-app {
    grid-template-columns: 1fr;
  }

  .book-pages-outline {
    border-right: 0;
    border-bottom: 1px solid #d8e0ea;
  }

  .creator-workspace-shell--book-writer .book-pages-desk {
    display: flex;
    flex-direction: column;
  }

  .creator-workspace-shell--book-writer .book-writer-toolbar,
  .creator-workspace-shell--book-writer .book-image-tools {
    flex: 0 0 auto;
  }

  .creator-workspace-shell--book-writer .book-pages-canvas {
    min-height: 50vh;
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .book-pages-outline__scroll {
    max-height: 18rem;
  }

  .book-cover-page {
    grid-template-columns: 1fr;
  }

  .book-cover-preview {
    width: min(100%, 27rem);
  }

  .book-cover-controls {
    position: static;
  }

  .book-pages-editor .ql-editor,
  .book-pages-fallback {
    min-height: 0;
    padding: 0;
  }
}

@media (max-width: 560px) {
  .creator-workspace-shell--book-writer {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .book-pages-head .creator-workspace-actions {
    width: 100%;
  }

  .book-pages-price,
  .book-pages-format {
    width: 100%;
    justify-content: space-between;
  }

  .book-pages-price__field,
  .book-pages-format select {
    flex: 1 1 auto;
  }

  .book-cover-page {
    padding: 0.65rem;
  }

  .book-cover-preview {
    min-height: 27rem;
  }

  .book-pages-canvas {
    padding: 0.25rem;
  }
}
.creator-files-browser__sfx{
  display:grid;
  gap:10px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #cbd5e1;
}
.creator-files-browser__sfx h3,.creator-files-browser__sfx p{margin:0;}
.creator-files-browser__sfx p{color:#475569;font-size:.88rem;}
.creator-files-browser__sfx label{display:grid;gap:4px;color:#334155;font-size:.82rem;font-weight:700;}
.creator-files-browser__sfx select,.creator-files-browser__sfx input[type="number"]{width:100%;border:1px solid #94a3b8;border-radius:5px;background:#fff;padding:7px;color:#0f172a;}
.creator-files-browser__sfx label:has(input[type="checkbox"]){display:flex;align-items:center;gap:7px;}
.creator-files-browser__folder-actions{display:inline-flex;gap:5px;margin-left:auto;}
.creator-files-browser__folder-action{border:0;background:transparent;color:#475569;font-size:.75rem;font-weight:700;padding:3px 5px;}
.creator-files-browser__folder-action--danger{color:#b91c1c;}

/* Create workspaces: dark-mode surfaces. Keep manuscript paper and media pixels intact. */
body.dark-mode .creator-workspace-shell {
  color: #f5f5f5;
}

body.dark-mode .creator-workspace-title,
body.dark-mode .creator-workspace-section-title,
body.dark-mode .creator-workspace-shell h2,
body.dark-mode .creator-workspace-shell h3,
body.dark-mode .creator-workspace-shell h4,
body.dark-mode .creator-workspace-shell strong {
  color: #f5f5f5;
}

body.dark-mode .creator-workspace-copy,
body.dark-mode .creator-workspace-kicker,
body.dark-mode .creator-workspace-shell small,
body.dark-mode .creator-workspace-shell .creator-video-card__meta,
body.dark-mode .creator-workspace-shell .creator-files-browser__status,
body.dark-mode .creator-workspace-shell .creator-files-browser__row-size,
body.dark-mode .creator-workspace-shell .creator-files-browser__row-date,
body.dark-mode .creator-workspace-shell .creator-files-browser__row-kind {
  color: #aeb8c7;
}

body.dark-mode .creator-mode-switch,
body.dark-mode .creator-files-browser__address,
body.dark-mode .creator-files-browser__window,
body.dark-mode .creator-files-browser__columns,
body.dark-mode .creator-files-browser__preview,
body.dark-mode .creator-files-browser__modal-card,
body.dark-mode .creator-video-uploader,
body.dark-mode .creator-video-library,
body.dark-mode .creator-video-card,
body.dark-mode .creator-video-share-panel,
body.dark-mode .creator-video-invites,
body.dark-mode .creator-video-library-empty,
body.dark-mode .book-writer-app,
body.dark-mode .book-pages-app,
body.dark-mode .book-pages-outline,
body.dark-mode .book-pages-outline__head,
body.dark-mode .book-pages-outline__book,
body.dark-mode .book-create-menu,
body.dark-mode .book-create-menu__panel,
body.dark-mode .book-pages-desk,
body.dark-mode .book-writer-outline,
body.dark-mode .book-writer-outline__head,
body.dark-mode .book-writer-document-head,
body.dark-mode .book-writer-toolbar.ql-toolbar.ql-snow,
body.dark-mode .book-writer-desk,
body.dark-mode .book-pages-canvas,
body.dark-mode .book-page-locator,
body.dark-mode .book-illustration-loading,
body.dark-mode .book-image-tools,
body.dark-mode .book-find-replace,
body.dark-mode .book-settings-dialog,
body.dark-mode .book-author-dialog {
  border-color: #3d4654 !important;
  background: #1d222b !important;
  color: #f5f5f5 !important;
  box-shadow: none;
}

body.dark-mode .creator-mode-switch__item,
body.dark-mode .creator-mode-switch__item:link,
body.dark-mode .creator-mode-switch__item:visited,
body.dark-mode .creator-files-browser__btn,
body.dark-mode .creator-files-browser__view-btn,
body.dark-mode .creator-files-browser__row,
body.dark-mode .creator-files-browser__folder-head,
body.dark-mode .creator-workspace-button,
body.dark-mode .creator-workspace-link,
body.dark-mode .creator-video-kind label > span,
body.dark-mode .creator-video-drop,
body.dark-mode .creator-video-owner-list li,
body.dark-mode .creator-video-pagination a,
body.dark-mode .book-create-menu details > summary,
body.dark-mode .book-create-menu button,
body.dark-mode .book-pages-chapter,
body.dark-mode .book-pages-page,
body.dark-mode .book-manuscript-outline__page,
body.dark-mode .book-writer-chapter__head,
body.dark-mode .book-writer-page,
body.dark-mode .book-writer-toolbar__insert,
body.dark-mode .book-cover-controls button,
body.dark-mode .book-image-tools button {
  border-color: #3d4654 !important;
  background: #252b35 !important;
  color: #edf2f7 !important;
  box-shadow: none !important;
}

body.dark-mode .creator-mode-switch__item:hover,
body.dark-mode .creator-mode-switch__item:focus,
body.dark-mode .creator-mode-switch__item.is-active,
body.dark-mode .creator-mode-switch__item--files.is-active,
body.dark-mode .creator-files-browser__btn:hover,
body.dark-mode .creator-files-browser__view-btn:hover,
body.dark-mode .creator-files-browser__view-btn.is-active,
body.dark-mode .creator-files-browser__row:hover,
body.dark-mode .creator-files-browser__row.is-selected,
body.dark-mode .creator-workspace-button:hover,
body.dark-mode .creator-workspace-link:hover,
body.dark-mode .creator-video-kind input:checked + span,
body.dark-mode .book-pages-chapter:hover,
body.dark-mode .book-pages-page:hover,
body.dark-mode .book-pages-page.is-active,
body.dark-mode .book-manuscript-outline__page:hover,
body.dark-mode .book-manuscript-outline__page.is-active,
body.dark-mode .book-writer-chapter__head:hover,
body.dark-mode .book-writer-chapter__head.is-active,
body.dark-mode .book-writer-page:hover,
body.dark-mode .book-writer-page.is-active,
body.dark-mode .book-writer-toolbar__insert:hover,
body.dark-mode .book-image-tools button:hover,
body.dark-mode .book-image-tools button[aria-pressed="true"] {
  border-color: #718096 !important;
  background: #313947 !important;
  color: #ffffff !important;
}

body.dark-mode .creator-workspace-button--primary,
body.dark-mode .creator-video-submit,
body.dark-mode .book-create-menu__publish {
  border-color: #718096 !important;
  background: #313947 !important;
  color: #ffffff !important;
}

body.dark-mode .creator-video-field input,
body.dark-mode .creator-video-field textarea,
body.dark-mode .creator-video-share-form input,
body.dark-mode .creator-files-browser__sfx select,
body.dark-mode .creator-files-browser__sfx input[type="number"],
body.dark-mode .book-create-menu input,
body.dark-mode .book-create-menu select,
body.dark-mode .book-find-replace input,
body.dark-mode .book-cover-controls input,
body.dark-mode .book-author-dialog input,
body.dark-mode .book-author-dialog textarea,
body.dark-mode .book-settings-dialog input,
body.dark-mode .book-settings-dialog textarea {
  border-color: #596579 !important;
  background: #151a21 !important;
  color: #f5f5f5 !important;
}

body.dark-mode .creator-video-field input::placeholder,
body.dark-mode .creator-video-field textarea::placeholder,
body.dark-mode .creator-video-share-form input::placeholder,
body.dark-mode .book-author-dialog textarea::placeholder {
  color: #97a3b5;
}

body.dark-mode .creator-files-browser__folder,
body.dark-mode .creator-files-browser__item-shell,
body.dark-mode .creator-files-browser__row,
body.dark-mode .creator-files-browser__preview-head,
body.dark-mode .creator-video-panel-head,
body.dark-mode .creator-video-card__body,
body.dark-mode .creator-video-owner-list li,
body.dark-mode .book-pages-chapter,
body.dark-mode .book-pages-page,
body.dark-mode .book-manuscript-outline__page,
body.dark-mode .book-writer-chapter__head,
body.dark-mode .book-writer-page {
  border-color: #3d4654 !important;
}

body.dark-mode .creator-files-browser__folder-head,
body.dark-mode .creator-files-browser__row-name,
body.dark-mode .creator-files-browser__preview-title,
body.dark-mode .creator-video-card__body p,
body.dark-mode .creator-video-owner-role,
body.dark-mode .creator-video-share-note,
body.dark-mode .book-pages-page__copy > span,
body.dark-mode .book-manuscript-outline__page-copy > span,
body.dark-mode .book-writer-page__label small,
body.dark-mode .book-writer-save-state,
body.dark-mode .book-writer-local-note,
body.dark-mode .book-writer-document-meta,
body.dark-mode .book-writer-breadcrumb,
body.dark-mode .book-writer-zoom,
body.dark-mode .book-writer-zoom output {
  color: #c2cad6 !important;
}

body.dark-mode .creator-files-browser__modal-backdrop,
body.dark-mode .book-settings-dialog::backdrop,
body.dark-mode .book-author-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7) !important;
}

/* The manuscript itself remains paper-white by design; only the surrounding desk changes. */
body.dark-mode .book-pages-editor.ql-container.ql-snow,
body.dark-mode .book-pages-editor .ql-editor,
body.dark-mode .book-pages-fallback,
body.dark-mode .book-physical-page,
body.dark-mode .book-physical-page__content,
body.dark-mode .book-writer-editor.ql-container.ql-snow,
body.dark-mode .book-writer-editor .ql-editor,
body.dark-mode .book-writer-fallback {
  background: #ffffff !important;
  color: #111827 !important;
}

body.dark-mode .book-pages-editor .ql-editor h1,
body.dark-mode .book-pages-editor .ql-editor h2,
body.dark-mode .book-writer-editor .ql-editor h1,
body.dark-mode .book-writer-editor .ql-editor h2 {
  color: #0f172a !important;
}

body.dark-mode .book-library .book-saved-list,
body.dark-mode .book-library-preview,
body.dark-mode .book-library-preview__head,
body.dark-mode .book-library-preview__controls,
body.dark-mode .book-library-preview__empty,
body.dark-mode .book-saved-list__item,
body.dark-mode .book-saved-list__actions button,
body.dark-mode .book-saved-list__actions a,
body.dark-mode .book-share-invites,
body.dark-mode .book-share-invites__row,
body.dark-mode .book-author-template,
body.dark-mode .book-pages-pagination {
  border-color: #3d4654 !important;
  background: #1d222b !important;
  color: #f5f5f5 !important;
}

body.dark-mode .book-saved-list__item:hover,
body.dark-mode .book-saved-list__item.is-current,
body.dark-mode .book-saved-list__item.is-previewing,
body.dark-mode .book-saved-list__actions button:hover,
body.dark-mode .book-saved-list__actions a:hover {
  border-color: #718096 !important;
  background: #313947 !important;
  color: #ffffff !important;
}

body.dark-mode .book-library-preview__page {
  border-color: #596579 !important;
  background: #ffffff !important;
  color: #111827 !important;
}

body.dark-mode .book-library-preview__page > header small {
  color: #64748b !important;
}

body.dark-mode .creator-bottom-bar {
  border-color: #3d4654 !important;
}

body.dark-mode .creator-bottom-bar__button {
  border-color: #3d4654 !important;
  background: #252b35 !important;
  color: #edf2f7 !important;
}

body.dark-mode .creator-bottom-bar__button:hover,
body.dark-mode .creator-bottom-bar__button:focus-visible {
  border-color: #718096 !important;
  background: #313947 !important;
  color: #ffffff !important;
}

/* Cover editor: bounded page previews and a compact, readable control column. */
.creator-workspace-shell--book-writer .book-cover-page {
  width: 100%;
  max-width: 58rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 19rem);
  gap: 1.5rem;
  padding: 1.25rem;
}

.creator-workspace-shell--book-writer .book-cover-preview {
  width: 100%;
  max-width: 25rem;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 2 / 3;
  align-self: start;
  overflow-wrap: anywhere;
}

.creator-workspace-shell--book-writer .book-cover-preview[data-cover-style="standard"] {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.creator-workspace-shell--book-writer .book-cover-preview[data-cover-style="standard"] .book-cover-preview__copy {
  padding: 1.25rem 1.25rem 0.75rem;
}

.creator-workspace-shell--book-writer .book-cover-preview[data-cover-style="standard"] .book-cover-preview__copy h2 {
  font-size: clamp(1.25rem, 2.5vw, 2.25rem);
  line-height: 1.15;
  margin-top: 0.75rem;
}

.creator-workspace-shell--book-writer .book-cover-preview[data-cover-style="standard"] .book-cover-preview__image {
  min-height: 0;
  margin: 0 1.25rem;
}

.creator-workspace-shell--book-writer .book-cover-preview[data-cover-style="standard"] .book-cover-preview__image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.creator-workspace-shell--book-writer .book-cover-preview[data-cover-style="standard"] .book-cover-preview__image img[hidden] {
  display: none;
}

.creator-workspace-shell--book-writer .book-cover-controls {
  position: static;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.book-back-cover-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #cbd5e1;
  min-width: 0;
}

.book-back-cover-section > strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
}

.book-back-cover-section > p {
  margin: 0.4rem 0 0.75rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #64748b;
}

.book-back-cover-preview {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 12rem);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  margin-bottom: 0.75rem;
}

.book-back-cover-preview img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.book-back-cover-preview img[hidden] { display: none; }

.creator-workspace-shell--book-writer .book-cover-image-actions {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.creator-workspace-shell--book-writer .book-cover-controls button,
.creator-workspace-shell--book-writer .book-cover-upload {
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

@media (max-width: 767.98px) {
  .creator-workspace-shell--book-writer .book-cover-page {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.75rem;
    gap: 1rem;
  }
}

/* A complete uploaded cover already contains its typography and author credit. */
.creator-workspace-shell--book-writer .book-cover-preview.has-uploaded-image[data-cover-style="standard"] {
  display: block;
}

.creator-workspace-shell--book-writer .book-cover-preview.has-uploaded-image[data-cover-style="standard"] .book-cover-preview__copy,
.creator-workspace-shell--book-writer .book-cover-preview.has-uploaded-image[data-cover-style="standard"] .book-cover-preview__author {
  display: none;
}

.creator-workspace-shell--book-writer .book-cover-preview.has-uploaded-image[data-cover-style="standard"] .book-cover-preview__image {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  background: #ffffff;
}

/* Both cover faces are visible together, with controls directly beneath each. */
.creator-workspace-shell--book-writer .book-cover-page {
  display: block;
  max-width: 52rem;
  margin: 0 0 1rem;
}
.creator-workspace-shell--book-writer .book-cover-page[hidden] { display: none; }
.book-cover-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.book-cover-editor-head .book-cover-back { margin: 0; }
.book-cover-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 42rem;
}
.book-cover-pair > section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.book-cover-pair > section > strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
}
.creator-workspace-shell--book-writer .book-cover-pair .book-cover-preview,
.book-cover-pair .book-back-cover-preview {
  width: 100%;
  max-width: none;
  min-height: 0;
  aspect-ratio: 2 / 3;
  margin: 0 0 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
}
.book-cover-pair .book-cover-image-actions { align-items: start; }
.creator-workspace-shell--book-writer .book-cover-controls {
  max-width: 42rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #cbd5e1;
}
@media (max-width: 479.98px) {
  .book-cover-pair { gap: 0.65rem; }
  .book-cover-pair .book-cover-upload,
  .book-cover-pair .book-cover-remove { padding: 0.4rem; font-size: 0.7rem; }
}

/* Minimal cover workspace: two images, direct upload, optional text fields. */
.creator-workspace-shell--book-writer .book-cover-page {
  border: 0;
  background: transparent;
  padding: 1rem;
}
.book-cover-pair { max-width: 38rem; gap: 1.5rem; }
.book-cover-pair [data-cover-picker] { cursor: pointer; }
.book-cover-pair [data-cover-picker]:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}
.book-cover-pair .book-cover-upload,
.book-cover-pair .book-cover-remove {
  font-size: 0.75rem;
  font-weight: 600;
  border: 0;
  padding: 0.25rem 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.book-cover-pair .book-cover-image-actions { gap: 1rem; }
.book-cover-controls > summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}
.creator-workspace-shell--book-writer .book-cover-controls {
  max-width: 38rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
}
@media (max-width: 479.98px) { .book-cover-pair { gap: 0.75rem; } }

/* Library controls have their own fixed rows; only the book/list can scroll. */
.book-settings-dialog--library[open] {
  position: fixed;
  inset: 1rem;
  margin: auto;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(72rem, calc(100% - 2rem));
  height: calc(100vh - 2rem);
  height: calc(100dvh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}
.book-settings-dialog--library > .book-settings-dialog__head { min-width: 0; align-items: center; }
.book-settings-dialog--library > .book-settings-dialog__head > div:first-child { min-width: 0; }
.book-settings-dialog--library .book-settings-dialog__head h2 { margin: 0; font-size: 1.4rem; }
.book-library-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: .5rem; }
.book-library-actions button {
  display: inline-flex !important;
  visibility: visible !important;
  padding: .6rem .9rem;
  border: 1px solid #64748b;
  border-radius: .35rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}
.book-settings-dialog--library > .book-library { height: auto; min-height: 0; overflow: hidden; }
.book-settings-dialog--library .book-library-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}
.book-settings-dialog--library .book-library-preview__head { grid-row: 1; }
.book-settings-dialog--library .book-library-preview__empty,
.book-settings-dialog--library .book-library-preview__page { grid-row: 2; min-height: 0; overflow: auto; }
.book-settings-dialog--library .book-library-preview__controls {
  grid-row: 3;
  flex-wrap: wrap;
  margin: 0;
  min-width: 0;
}
.book-settings-dialog--library [data-saved-book-preview-controls] {
  display: flex !important;
  visibility: visible !important;
}
.book-settings-dialog--library .book-library-preview__controls button { flex: 0 0 auto; white-space: nowrap; }
body.dark-mode .book-library-actions button { background: #1d232d; color: #f8fafc; border-color: #64748b; }
@media (max-width: 1199.98px) {
  .book-settings-dialog--library > .book-library { grid-template-rows: minmax(5rem, 30%) minmax(0, 1fr); }
  .book-settings-dialog--library .book-library-preview__page { padding: 1rem; }
}


/* Design PDFs use the existing reading area and standard book actions. */
[data-design-pdf-active="1"] .book-pages-app { grid-template-columns: minmax(0, 1fr); }
[data-design-pdf-active="1"] .book-pages-outline,
[data-design-pdf-active="1"] .book-create-menu__center > details:not(:first-child):not([data-book-setup]),
[data-design-pdf-active="1"] [data-cover-nav],
[data-design-pdf-active="1"] [data-upload-book],
[data-design-pdf-active="1"] [data-menu-import],
[data-design-pdf-active="1"] [data-menu-versions],
[data-design-pdf-active="1"] [data-menu-share],
[data-design-pdf-active="1"] [data-menu-clear-book],
[data-design-pdf-active="1"] [data-menu-export],
[data-design-pdf-active="1"] #bookWriterToolbar > :not(#bookWriterSaveState),
[data-design-pdf-active="1"] .book-pages-canvas > :not([data-design-pdf-reader]):not(#bookCoverPage) { display: none !important; }
[data-design-pdf-reader] { width: 100%; height: 100%; min-height: 70vh; }
[data-design-pdf-reader] iframe { display: block; width: 100%; height: 100%; min-height: 70vh; border: 0; }
.book-settings-dialog--library .book-library-preview__page.is-design-pdf { width: 100%; margin: 0; padding: 0; border: 0; }
.book-library-preview__page.is-design-pdf iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Book tools form the second bar directly beneath the site navigation. */
.creator-workspace-shell--book-writer .book-create-menu {
  flex-shrink: 0;
  align-items: center;
  position: sticky;
  top: 0;
}
.book-import-prompt { margin: 0 0 .65rem; font-size: .85rem; }
@media (min-width: 1280px) {
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--book-writer {
    padding-top: 4rem;
  }
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--book-writer .book-create-menu {
    position: fixed;
    top: var(--ap-top-chrome-height, 3.5rem);
    left: 0;
    right: 0;
    z-index: 40;
    width: 100%;
    min-height: 3rem;
    margin: 0;
    padding: .35rem 1rem;
  }
}

/* Keep book planning visible; secondary tools live in the menus. */
.book-preview-dialog [data-book-preview-text] { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.7; max-height: 55vh; overflow-y: auto; }
.ap-create-file-menu { position: relative; }
.ap-create-file-menu > summary { cursor: pointer; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: .875rem; font-weight: 600; }
.ap-create-file-menu > div { position: absolute; top: 100%; left: 0; z-index: 50; display: grid; gap: 8px; min-width: 190px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: var(--background, #fff); box-shadow: 0 4px 12px #0002; }
.ap-create-file-menu > div > a, .ap-create-file-menu > div > button { justify-content: flex-start; }
body.dark-mode .ap-create-file-menu > div { background: #252b35; border-color: #475569; }

/* Media workspaces use the same two-row navigation pattern as Book. */
.creator-media-modes { padding: 8px 0; }
.creator-media-modes .creator-mode-switch { flex-wrap: wrap; }
.creator-media-menu { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; margin-bottom: 16px; border-bottom: 1px solid #cbd5e1; }
.creator-media-menu details { position: relative; }
.creator-media-menu summary { cursor: pointer; padding: 8px 12px; font-size: .875rem; font-weight: 600; }
.creator-media-menu__panel { position: absolute; z-index: 60; top: 100%; left: 0; display: grid; gap: 6px; min-width: 210px; max-width: calc(100vw - 32px); max-height: 65vh; overflow-y: auto; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; box-shadow: 0 4px 12px #0002; }
.creator-media-menu__panel > a, .creator-media-menu__panel > button { display: flex; align-items: center; justify-content: flex-start; padding: 8px; text-align: left; color: inherit; }
.creator-media-menu__title { margin-left: 8px; font-size: .875rem; }
body.dark-mode .creator-media-menu { border-color: #475569; }
body.dark-mode .creator-media-menu__panel { background: #252b35; border-color: #475569; color: #f5f5f5; }
.book-manuscript-outline__page-copy > strong { white-space: normal; overflow-wrap: anywhere; }

/* Use Book's actual second chrome row across the other Create workspaces. */
.creator-media-second-row { flex-shrink: 0; align-items: center; position: sticky; top: 0; }
.creator-media-second-row .creator-media-menu__panel { left: auto; right: 0; }
@media (min-width: 1280px) {
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--files-browser,
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--media { padding-top: 4rem; }
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-media-second-row {
    position: fixed; top: var(--ap-top-chrome-height, 3.5rem); left: 0; right: 0;
    z-index: 40; width: 100%; min-height: 3rem; margin: 0; padding: .35rem 1rem;
  }
  body.ap-display-topbar[data-display-mode][data-route="create"]:not(.ap-topbar-nav-open) .ap-create-toolbar-shell {
    top: var(--ap-top-chrome-height, 3.5rem); left: 0; right: 0; width: 100%; max-width: none;
    min-height: 3rem; height: auto; transform: none; margin: 0; padding: .35rem 1rem;
  }
  body.ap-display-topbar[data-display-mode][data-route="create"]:not(.ap-topbar-nav-open) .ap-create-top-search { display: none; }
  body.ap-display-topbar[data-display-mode][data-route="create"]:not(.ap-topbar-nav-open) .ap-top-chrome__search { visibility: visible; pointer-events: auto; }
  body.ap-display-topbar[data-display-mode][data-route="create"]:not(.ap-topbar-nav-open) #createForm { padding-top: 4rem; }
}

/* A single editor line: left-aligned menus and right-aligned save actions. */
.creator-workspace-shell--book-writer .book-create-menu { display: flex; justify-content: flex-start; flex-wrap: nowrap; }
.book-create-menu__center { grid-column: 2; display: flex; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.creator-workspace-shell--book-writer .book-create-menu__actions { margin-left: auto; white-space: nowrap; }
.creator-media-second-row { justify-content: center; }
.creator-media-second-row .book-create-menu__actions { margin-left: auto; }
@media (max-width: 767px) {
  .creator-workspace-shell--book-writer .book-create-menu { display: flex; justify-content: space-between; gap: .35rem; }
  .book-create-menu__center { min-width: 0; }
  .book-create-menu__center > details > summary { padding-inline: .3rem; }
}

/* Editor toolbars stay below the site chrome and its dropdowns. */
.book-create-menu { z-index: 40; }

/* Keep editor disclosures inside the viewport, anchored to their own labels. */
.book-create-menu__center details .book-create-menu__panel { position: fixed; right: auto; min-width: 0; max-width: calc(100vw - 24px); box-sizing: border-box; overflow-y: auto; overflow-x: hidden; text-align: left; justify-items: stretch; }
.book-create-menu__panel label, .book-create-menu__panel .book-create-menu__format-label { display: block; text-align: left; }
.book-create-menu__panel .book-format-visibility { display: grid; justify-items: start; gap: .5rem; padding: .5rem; }
.book-create-menu__panel .book-format-visibility label { display: flex; align-items: center; justify-content: flex-start; gap: .5rem; margin: 0; }
.book-writer-zoom [data-book-zoom-step] { background: #e5e7eb !important; color: #475569 !important; border: 1px solid #cbd5e1 !important; border-radius: 4px; width: 28px !important; height: 28px !important; font-size: 18px; padding: 0 !important; }
.book-editor-third-row { flex-shrink: 0; position: relative; z-index: 30; }
@media (min-width: 1280px) {
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--book-writer { padding-top: 7rem; }
  body.ap-display-topbar:not(.ap-topbar-nav-open) .book-editor-third-row.ql-toolbar.ql-snow { position: fixed; top: calc(var(--ap-top-chrome-height, 3.5rem) + 3rem); left: 0; right: 0; width: 100%; min-height: 3rem; margin: 0; box-sizing: border-box; padding: .35rem 1rem; z-index: 30; }
}
.book-create-menu__center .book-create-menu__panel button, .book-create-menu__center .book-create-menu__panel a { font-size: .85rem; }
.book-create-menu__center .book-create-menu__panel label { font-size: .8rem; }
.book-create-menu__panel select, .book-create-menu__panel input[type="number"] { box-sizing: border-box; max-width: 100%; min-width: 0; }

/* Let Book use the space beneath its chrome while retaining page proportions. */
.book-writer-zoom [data-book-zoom-step] { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
@media (min-width: 1200px) {
  body.ap-display-topbar:not(.ap-topbar-nav-open) #main-content:has(.creator-workspace-shell--book-writer) { padding-left: 0; padding-right: 0; padding-bottom: 0; }
  body.ap-display-topbar:not(.ap-topbar-nav-open) #main-content:has(.creator-workspace-shell--book-writer) .main-content-inner { width: 100%; max-width: none; margin: 0; align-items: stretch; }
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--book-writer { width: 100%; margin: 0; padding-left: 0; padding-right: 0; padding-bottom: 0; }
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--book-writer .book-pages-app { border-radius: 0; }
}
@media (min-width: 1280px) {
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--book-writer { padding-top: 6rem; }
}

[data-design-pdf-preview] { display:block; width:100%; height:60vh; border:0; }

.book-full-preview[open] {
  display:flex;
  flex-direction:column;
  width:calc(100vw - 2rem);
  max-width:100rem;
  height:calc(100dvh - 2rem);
  max-height:calc(100dvh - 2rem);
  padding:0;
}
.book-full-preview > header { flex-shrink:0; }
.book-full-preview__pages { min-height:0; flex:1; overflow:auto; padding:20px; }
.book-full-preview__pages > iframe { display:block; width:100%; height:100%; min-height:70vh; border:0; }
.book-full-preview__artwork { display:block; max-width:100%; max-height:85vh; margin:0 0 20px; }
.book-full-preview__pages .book-full-preview__page {
  box-sizing:border-box;
  width:100%;
  max-width:54rem;
  height:auto;
  min-height:0;
  max-height:none;
  overflow:visible;
  margin:0 0 20px;
  padding:24px;
}

.book-publishing-settings { display:grid; gap:12px; padding:0 0 12px; border-bottom:1px solid #d3d3d3; }
.book-publishing-settings > label { display:grid; gap:8px; margin:0; font-size:14px; font-weight:600; }
.book-publishing-settings input { box-sizing:border-box; width:100px; min-height:40px; padding:8px; font-size:16px; }
.book-publishing-settings > span { font-size:13px; }

.book-manuscript-settings { display:contents; }
[data-design-pdf-active="1"] .book-manuscript-settings,
[data-design-pdf-active="1"] [data-publish-author-bio],
[data-design-pdf-active="1"] [data-publish-targeting] { display:none; }

.book-create-menu .ap-product-header { display:flex; flex:0 0 auto; align-items:center; gap:8px; margin-left:12px; }
.ap-product-header .book-create-menu__save { box-sizing:border-box; display:inline-flex; align-items:center; height:32px; min-height:32px; padding:0 10px; border-color:#cbd5e1; border-radius:6px; font-weight:600; }
.ap-product-header .book-create-menu__save img { width:15px; height:20px; object-fit:cover; margin-right:6px; vertical-align:middle; }
.ap-product-header .book-create-menu__save img[hidden] { display:none; }
.ap-product-identity { display:flex; flex:0 1 auto; align-items:center; gap:8px; min-width:0; margin-left:8px; }
.ap-product-identity .ap-book-title-area { box-sizing:border-box; display:flex; align-items:center; flex:0 1 180px; width:180px; min-width:72px; height:32px; padding:5px 8px; border:1px solid #d1d5db; border-radius:6px; text-align:left; }
.ap-product-identity .ap-product-header__name { display:block; min-width:0; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:20px; font-weight:600; }
.ap-book-title-area .ap-product-header__name:empty::before { content:'Book title'; color:#6b7280; font-weight:400; }
.ap-product-header__price { box-sizing:border-box; display:flex; flex:0 0 78px; align-items:center; gap:4px; height:32px; margin:0; padding:0 6px; border:1px solid #d1d5db; border-radius:6px; font-size:13px; }
.ap-product-header__price input { box-sizing:border-box; width:100%; min-width:0; height:30px; min-height:0; padding:0; border:0; border-radius:0; background:transparent; color:inherit; font:inherit; line-height:20px; }
@media (min-width:1200px) {
  body.ap-display-topbar .ap-top-chrome:has(.ap-product-identity) { grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:16px; }
  .ap-top-chrome:has(.ap-product-identity) .ap-top-chrome__brand { min-width:0; overflow:hidden; }
  .ap-top-chrome:has(.ap-product-identity) .ap-top-chrome__wordmark { flex-shrink:0; }
  .ap-top-chrome:has(.ap-product-identity) > .ap-top-chrome__search-play { justify-self:center; width:auto; min-width:0; }
  .ap-top-chrome:has(.ap-product-identity) > .ap-top-chrome__search-play > .ap-top-chrome__reading-context { display:none; }
  .ap-top-chrome:has(.ap-product-identity) .ap-top-chrome__tools { min-width:max-content; }
}

.ap-book-title-area input.ap-product-header__name { box-sizing:border-box; height:20px; padding:0; border:0; outline-offset:2px; background:transparent; color:inherit; font:inherit; font-size:13px; }

.ap-product-save { visibility:hidden; flex:0 0 18px; padding:0; border:0; background:transparent; color:inherit; font-size:14px; cursor:pointer; }
/* Reveal the confirmation on field or button focus, including before entry. */
.ap-product-identity :is(.ap-book-title-area, .ap-product-header__price):focus-within > .ap-product-save {
  visibility:visible;
}
.ap-product-save[data-saved="true"] { color:#18743a; }
.ap-product-identity input[readonly] { cursor:text; }
.ap-product-header__price { flex-basis:84px; }

.ap-product-identity .ap-book-title-area[data-saved="true"],
.ap-product-identity .ap-product-header__price[data-saved="true"] { border-color:transparent; background:transparent; }
.ap-product-identity .ap-book-title-area[data-saved="true"] input,
.ap-product-identity .ap-product-header__price[data-saved="true"] { font-size:.92rem; font-weight:750; color:var(--primary, #334155); }
.ap-product-identity input[readonly] { cursor:pointer; outline:none; box-shadow:none; }
.ap-product-identity input[type="number"][readonly] { appearance:textfield; -moz-appearance:textfield; }
.ap-product-identity input[readonly]::-webkit-inner-spin-button,
.ap-product-identity input[readonly]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }

.book-chapter-outline-row { display:flex; align-items:center; gap:8px; margin:10px 0; }
.book-chapter-outline-row input:first-child { flex:1; min-width:0; }
.book-chapter-outline-row input[type="number"] { width:76px; }

/* Consistent action controls across the book toolbar and chapter sidebar. */
.creator-workspace-shell--book-writer :is(.book-create-menu__save, .book-create-menu__publish, .book-writer-toolbar__insert, .book-insert-slider button) {
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  height:32px !important;
  min-height:32px;
  padding:0 10px !important;
  border-radius:6px;
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
}

.book-pages-outline__covers {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:12px 14px 0;
}

.creator-workspace-shell--book-writer .book-writer-toolbar__insert[data-insert-page],
.creator-workspace-shell--book-writer .book-insert-slider [data-add-page] {
  display:none !important;
}
.creator-workspace-shell--book-writer :is(.book-create-menu__save, .book-writer-toolbar__insert, .book-insert-slider button) {
  border:0 !important;
  box-shadow:none;
  background:transparent !important;
}
.creator-workspace-shell--book-writer :is(.book-create-menu__save, .book-writer-toolbar__insert, .book-insert-slider button):hover {
  background:#eef2f7 !important;
}
body.dark-mode .creator-workspace-shell--book-writer :is(.book-create-menu__save, .book-writer-toolbar__insert, .book-insert-slider button):hover {
  background:#313947 !important;
}

.book-pages-outline__covers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.book-pages-outline__covers .book-create-menu__save { min-width:0; flex-direction:column; align-items:flex-start; gap:6px; height:auto !important; padding:6px !important; }
.book-pages-outline__covers .book-create-menu__save img { width:100%; height:96px; object-fit:contain; object-position:left bottom; margin:0; }
.book-pages-outline__summary { flex-direction:column; align-items:flex-start; gap:2px; }
.book-pages-outline__summary [data-book-outline-totals] { padding-inline:10px; }

.creator-workspace-shell--book-writer .book-pages-outline__covers {
  flex:0 0 auto;
  align-items:start;
}
.creator-workspace-shell--book-writer .book-pages-outline__covers > .book-cover-tile {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  width:100%;
  min-width:0;
  height:auto;
  max-height:none;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-size:12px;
  font-weight:600;
  text-align:left;
  cursor:pointer;
  overflow:visible;
}
.creator-workspace-shell--book-writer .book-cover-tile > img {
  display:block;
  flex:none;
  width:100%;
  height:auto;
  max-height:none;
  object-fit:contain;
  margin:0;
}
.creator-workspace-shell--book-writer .book-cover-tile > img[hidden] { display:none; }

.creator-workspace-shell--book-writer #bookWriterSaveNow[hidden] { display:none !important; }
.book-writer-save-state--toolbar { display:inline-flex; align-items:center; gap:6px; }
.book-writer-save-state--toolbar[data-state="error"] { color:#b91c1c; }

/* Keep insertion actions with the left formatting controls. */
.creator-workspace-shell--book-writer .book-writer-toolbar__insertions { margin-left:8px; }
/* Keep Book Setup fields inside the same plain menu used by File and Edit. */
.book-create-menu__panel .book-manuscript-settings { display:grid; gap:6px; min-width:0; }
.book-create-menu__panel .book-manuscript-settings label:has(input) { display:grid; grid-template-columns:minmax(0,1fr) 96px; align-items:center; gap:8px; }
.book-create-menu__panel .book-manuscript-settings :is(input[type="number"],select) { box-sizing:border-box; width:100%; min-width:0; }
.book-create-menu__actions .book-writer-save-state { margin-left:0; margin-right:6px; }

/* Menu icons retain the existing menu typography and layout. */
.creator-workspace-shell--book-writer .book-create-menu__panel button::before,
.creator-workspace-shell--book-writer .book-create-menu__center > details > summary::before {
  content:''; display:inline-block; width:15px; height:15px; margin-right:8px;
  vertical-align:-2px; background:currentColor;
  mask:var(--book-menu-icon) center / contain no-repeat;
  -webkit-mask:var(--book-menu-icon) center / contain no-repeat;
}

.creator-workspace-shell--book-writer [data-menu-saved-books] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%204h5v16H3z%20M10%204h5v16h-5z%20M17%205l3-1%203%2015-3%201z%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-versions] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2010a9%209%200%201%201%201%208%20M3%204v6h6%20M12%207v5l3%202%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-new-book] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204v16%20M4%2012h16%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-close-book] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%206%2012%2012%20M18%206%206%2018%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-share] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%2016L20%204m-8%200h8v8M4%208v12h12%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-clear-book] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%206%2012%2012%20M18%206%206%2018%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-import] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2016V3%20m-4%204%204-4%204%204%20M5%2012v8h14v-8%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-import-design-pdf] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2016V3%20m-4%204%204-4%204%204%20M5%2012v8h14v-8%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-export] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v13%20m-4-4%204%204%204-4%20M4%2017v4h16v-4%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-undo] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%205%203%2011l6%206%20M3%2011h11a6%206%200%200%201%206%206%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-redo] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m15%205%206%206-6%206%20M21%2011H10a6%206%200%200%200-6%206%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-find] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%2020l-5-5%20M17%2010a7%207%200%201%201-14%200%207%207%200%200%201%2014%200%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-spellcheck] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m4%2012%205%205L20%206%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-menu-select-all] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h8l4%204v14H6z%20M14%203v5h4%20M9%2012h6%20M9%2016h6%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-insert-page] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h8l4%204v14H6z%20M14%203v5h4%20M9%2012h6%20M9%2016h6%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-toggle-outline] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%205h13%20M8%2012h13%20M8%2019h13%20M3%205h1%20M3%2012h1%20M3%2019h1%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-open-book-preview] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2%2012s4-7%2010-7%2010%207%2010%207-4%207-10%207S2%2012%202%2012%20M15%2012a3%203%200%201%201-6%200%203%203%200%200%201%206%200%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-cover-nav] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%204h5v16H3z%20M10%204h5v16h-5z%20M17%205l3-1%203%2015-3%201z%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-apply-layout] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m4%2012%205%205L20%206%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-publish-author-bio] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%207a4%204%200%201%201-8%200%204%204%200%200%201%208%200%20M4%2021v-2a8%208%200%200%201%2016%200v2%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-publish-targeting] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%20M3%2012h18%20M12%203c-5%205-5%2013%200%2018%205-5%205-13%200-18%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-publish-print] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%209V3h12v6%20M6%2017H3V9h18v8h-3%20M6%2014h12v7H6z%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer .book-create-menu__center > details:nth-child(1) > summary { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h8l4%204v14H6z%20M14%203v5h4%20M9%2012h6%20M9%2016h6%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer .book-create-menu__center > details:nth-child(2) > summary { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m4%2016%2011-11%204%204L8%2020H4z%20M13%207l4%204%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-book-setup] > summary { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h16%20M4%2017h16%20M9%204v6%20M15%2014v6%22%2F%3E%3C%2Fsvg%3E"); }

/* Use the approved Edit-menu typography throughout all three menus. */
.creator-workspace-shell--book-writer .book-create-menu__panel,
.creator-workspace-shell--book-writer .book-create-menu__panel :is(button,a,label,span,strong,select,input) {
  font-family:Helvetica,Arial,sans-serif !important;
  font-size:.85rem !important;
  font-weight:750 !important;
  line-height:1.4;
}
.creator-workspace-shell--book-writer .book-menu-divider {
  display:block; width:100%; height:0; margin:6px 0; padding:0;
  border:0; border-top:1px solid #d8e0ea; opacity:1;
}
body.dark-mode .creator-workspace-shell--book-writer .book-menu-divider { border-top-color:#3d4654; }
.creator-workspace-shell--book-writer .book-writer-zoom input[type="range"] {
  width:88px; height:20px; min-height:0; border:0; padding:0; background:transparent;
}

.creator-workspace-shell--book-writer [data-menu-front-cover], .creator-workspace-shell--book-writer [data-menu-back-cover] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%204h5v16H3z%20M10%204h5v16h-5z%20M17%205l3-1%203%2015-3%201z%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-insert-chapter] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204v16%20M4%2012h16%22%2F%3E%3C%2Fsvg%3E"); }
.creator-workspace-shell--book-writer [data-insert-image] { --book-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v13%20m-4-4%204%204%204-4%20M4%2017v4h16v-4%22%2F%3E%3C%2Fsvg%3E"); }

.book-landing-link-icon { flex:none; margin-left:6px; }
.creator-workspace-shell--book-writer .book-writer-zoom #bookWriterZoom {
  appearance:none; -webkit-appearance:none; background:#fff; accent-color:#e5e7eb;
}
.creator-workspace-shell--book-writer #bookWriterZoom::-webkit-slider-runnable-track {
  height:4px; background:#e5e7eb; border:0; border-radius:4px;
}
.creator-workspace-shell--book-writer #bookWriterZoom::-webkit-slider-thumb {
  appearance:none; -webkit-appearance:none; width:14px; height:14px;
  margin-top:-5px; background:#9ca3af; border:2px solid #d1d5db; border-radius:50%; box-shadow:none;
}
.creator-workspace-shell--book-writer #bookWriterZoom::-moz-range-track {
  height:4px; background:#e5e7eb; border:0; border-radius:4px;
}
.creator-workspace-shell--book-writer #bookWriterZoom::-moz-range-progress { background:#e5e7eb; height:4px; }
.creator-workspace-shell--book-writer #bookWriterZoom::-moz-range-thumb {
  width:10px; height:10px; background:#9ca3af; border:2px solid #d1d5db; border-radius:50%; box-shadow:none;
}
.book-create-menu__panel input[readonly] { border-color:transparent; background:transparent; cursor:default; appearance:textfield; -moz-appearance:textfield; }
.book-create-menu__panel input[readonly]::-webkit-inner-spin-button,
.book-create-menu__panel input[readonly]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }

.book-outline-summary-row { display:flex; align-items:center; gap:6px; width:100%; white-space:nowrap; }
.creator-workspace-shell--book-writer .book-outline-summary-row [data-book-chapter-outline] { padding-inline:0 !important; }
.book-pages-outline__summary .book-outline-summary-row [data-book-outline-totals] { padding:0; }
.creator-workspace-shell--book-writer .book-pages-outline__summary { padding-inline:14px; }
.creator-workspace-shell--book-writer .book-pages-outline__summary [data-publish-landing-page] { padding-inline:0 !important; }

.creator-workspace-shell--book-writer .book-sidebar-landing {
  appearance:none; display:flex; align-items:center; justify-content:flex-start;
  align-self:flex-start; box-sizing:border-box; width:auto; height:32px; min-height:0;
  margin:0; padding:0 !important; border:0 !important; border-radius:0;
  background:transparent !important; box-shadow:none; color:inherit;
  font-family:inherit; font-size:12px; font-weight:600; line-height:1.2;
  text-align:left; cursor:pointer;
}

/* Media libraries follow the Book workspace's left-aligned control row. */
.creator-workspace-shell--files-browser, .creator-workspace-shell--media {
  width:100%; max-width:none; margin:0; padding-inline:14px;
}
.creator-media-second-row { justify-content:flex-start; gap:4px; }
.creator-media-second-row .book-create-menu__actions { margin-left:0; }
.creator-media-second-row .creator-media-menu__panel {
  left:0; right:auto; gap:0; padding:6px; border:1px solid #94a3b8;
  border-radius:0; box-shadow:0 8px 20px #0f172a29;
}
.creator-media-second-row :is(summary,button,a) { font-family:Helvetica,Arial,sans-serif; font-size:.85rem; font-weight:750; }
.creator-media-second-row .creator-media-menu__panel > :is(button,a) {
  display:flex; align-items:center; gap:8px; width:100%; min-height:32px;
  padding:7px 9px; margin:0; border:0; border-radius:4px; background:transparent;
}
.creator-media-second-row .creator-media-menu__panel > :is(button,a):hover { background:#eef2f7; }
.creator-media-second-row > .creator-files-browser__btn { border:0; background:transparent; min-height:32px; padding:6px 10px; }

/* Stack playlist actions inside the shared menu panel. */
.creator-files-browser__playlist-controls > select {
  box-sizing: border-box;
  width: 12rem;
  min-width: 0;
  height: 32px;
  min-height: 0;
  margin: 4px 8px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: 400 .85rem Helvetica, Arial, sans-serif;
}
.creator-files-browser__playlist-controls > select:focus-visible {
  outline: 2px solid #51749d;
  outline-offset: 2px;
}
.creator-media-second-row .book-menu-divider { width:100%; margin:6px 0; border:0; border-top:1px solid #d8e0ea; }
.creator-workspace-shell--media .creator-video-layout { grid-template-columns:minmax(0,1fr); }
.creator-workspace-shell--media .creator-video-head { margin:0; padding:12px 0; }
.creator-workspace-shell--media .creator-video-uploader { padding:12px; border-radius:4px; }
.creator-video-upload-summary { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:.85rem; font-weight:750; }
.creator-video-upload-summary::-webkit-details-marker { display:none; }
.creator-workspace-shell--media .creator-video-library { border-radius:4px; }
@media(min-width:1280px){
  body.ap-display-topbar:not(.ap-topbar-nav-open) :is(.creator-workspace-shell--files-browser,.creator-workspace-shell--media) { padding-top:3rem; }
}

/* Content libraries fill the working area below the shared toolbar. */
body #main-content:has(:is(.creator-workspace-shell--files-browser, .creator-workspace-shell--media)) {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
  align-items: stretch;
}
body #main-content:has(:is(.creator-workspace-shell--files-browser, .creator-workspace-shell--media)) .main-content-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}
.creator-workspace-shell--files-browser,
.creator-workspace-shell--media {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.creator-media-heading,
.creator-workspace-shell--media .creator-video-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  min-height: 44px;
  margin: 0;
  padding: 8px 16px;
}
.creator-media-heading h1,
.creator-workspace-shell--media .creator-video-head h2 {
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.creator-media-heading .creator-files-browser__status {
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  font-size: 12px;
}
.creator-workspace-shell--files-browser .creator-files-browser__split { gap: 0; }
.creator-workspace-shell--files-browser .creator-files-browser__window,
.creator-workspace-shell--files-browser .creator-files-browser__preview {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.creator-workspace-shell--files-browser .creator-files-browser__folder-name { font-size: 15px; font-weight: 650; }
.creator-workspace-shell--files-browser .creator-files-browser__folder-head { padding: 10px 16px; }
.creator-workspace-shell--media .creator-video-layout { display: block; margin: 0; }
.creator-workspace-shell--media .creator-video-library {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.creator-workspace-shell--media .creator-video-grid { gap: 0; padding: 0; }
.creator-workspace-shell--media .creator-video-card { border: 0; border-radius: 0; box-shadow: none; }
.creator-workspace-shell--media .creator-video-card__body { padding: 12px 16px 20px; }
.creator-workspace-shell--media .creator-video-head .creator-workspace-copy { margin: 2px 0 0; font-size: 12px; }
.creator-workspace-shell--media .creator-video-library-count { display: flex; align-items: baseline; gap: 5px; padding: 0; border: 0; background: transparent; border-radius: 0; font-size: 12px; }
.creator-workspace-shell--media .creator-video-library-count strong { font-size: 14px; }
.creator-workspace-shell--media .creator-media-second-row .creator-video-uploader {
  position: relative;
  top: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.creator-media-second-row .creator-video-upload-popover {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--ap-top-chrome-height, 3.5rem) - 64px);
  overflow-y: auto;
  padding: 16px;
}
@media (min-width: 1280px) {
  body.ap-display-topbar:not(.ap-topbar-nav-open) :is(.creator-workspace-shell--files-browser, .creator-workspace-shell--media) { padding: 3rem 0 0; }
}
@media (max-width: 640px) {
  .creator-media-heading,
  .creator-workspace-shell--media .creator-video-head { padding: 8px 12px; }
  .creator-workspace-shell--media .creator-video-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Compact creator media libraries and visible photo previews. */
.creator-workspace-shell--media .creator-video-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 360px));
  align-items: start;
  gap: 20px;
  padding: 16px;
}
.creator-workspace-shell--media .creator-video-card { border: 1px solid #d8e0ea; }
.creator-workspace-shell--media .creator-video-card__media { height: 240px; aspect-ratio: auto; }
.creator-workspace-shell--media .creator-video-card__media--reel { height: 400px; }
.creator-files-browser__thumbnail { display: block; width: 64px; height: 64px; object-fit: contain; background: #f1f5f9; }
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__folder-items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 240px)); gap: 16px; padding: 16px; }
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__item-shell { position: relative; min-width: 0; }
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row { width: 100%; min-width: 0; height: 100%; }
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__thumbnail { width: 100%; height: 180px; }
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row-name { max-width: 100%; overflow-wrap: anywhere; }
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row-check { top: 16px; left: 16px; transform: none; }
.creator-files-browser:has(.creator-files-browser__body[data-view-mode="grid"]) .creator-files-browser__columns--list-only { display: none; }
.creator-files-browser__preview-media { max-width: 100%; object-fit: contain; }
.creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row:has(.creator-files-browser__thumbnail) { position: relative; min-height: 80px; }
.creator-files-browser__body[data-view-mode="list"] .creator-files-browser__thumbnail { position: absolute; left: 36px; top: 8px; }
.creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row:has(.creator-files-browser__thumbnail) .creator-files-browser__row-name { padding-left: 76px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.creator-files-browser__folder:not([open]) > .creator-files-browser__folder-items { display: none; }

.creator-files-browser__row-label { min-width:0; overflow-wrap:anywhere; }
.creator-files-browser__music-meta { display:block; font-size:12px; font-weight:400; white-space:normal; color:#64748b; }
.creator-files-browser__row-label { display:block; overflow:hidden; text-overflow:ellipsis; }
.creator-files-browser__body[data-view-mode="grid"] .creator-files-browser__row-name:has(.creator-files-browser__music-meta) { display:flex; align-items:flex-start; -webkit-line-clamp:unset; }

.creator-files-browser__offline-save { margin:0 0 10px 36px; font-size:12px; }
.creator-files-browser__item-shell:has(.creator-files-browser__offline-save) .creator-files-browser__row { height:auto; }

/* Music puts Artist directly after Song title in both header and rows. */
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns,
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row {
  grid-template-columns:minmax(0,2fr) minmax(0,1fr) 5.5rem 7.5rem 5.5rem;
}
.creator-files-browser__row-artist { min-width:0; overflow-wrap:anywhere; font-size:13px; }
@container (max-width:30rem) {
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row { grid-template-columns:minmax(0,2fr) minmax(0,1fr); }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span { display:none; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:first-child,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > .creator-files-browser__artist-heading { display:block; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__row-date { display:none; }
}
@media (max-width:640px) {
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns { display:grid; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row { grid-template-columns:minmax(0,2fr) minmax(0,1fr); }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns { grid-template-columns:minmax(0,2fr) minmax(0,1fr); }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span { display:none; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:first-child,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > .creator-files-browser__artist-heading { display:block; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__row-size,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__row-date,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__row-kind { display:none; }
}
/* Music actions share one row; selection is revealed only on request. */
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-shell {
  display:grid; grid-template-columns:minmax(0,1fr) 9rem 2rem; gap:8px; align-items:center;
}
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row { grid-column:1; padding-right:8px; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__offline-save { grid-column:2; grid-row:1; margin:0; justify-self:start; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-delete { grid-column:3; grid-row:1; position:static; transform:none; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns { padding-left:2.2rem; padding-right:calc(11rem + 24px); }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__row-check[hidden] { display:none; }
.creator-files-browser__song-grip { position:absolute; left:7px; top:50%; transform:translateY(-50%); width:24px; height:30px; padding:0; border:0; background:transparent; color:#64748b; cursor:grab; touch-action:none; font-size:20px; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__row { touch-action:pan-y; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
.creator-files-browser__body.is-selecting-songs .creator-files-browser__song-grip { display:none; }
.creator-files-browser__item-shell.is-song-dragging { opacity:.55; }
@container (max-width:30rem) {
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-shell { grid-template-columns:minmax(0,1fr) 3.8rem 1.5rem; gap:4px; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__offline-save { font-size:11px; padding:6px; white-space:normal; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns { padding-right:calc(5.3rem + 16px); }
}
@media (max-width:640px) {
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-shell { grid-template-columns:minmax(0,1fr) 3.8rem 1.5rem; gap:4px; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__offline-save { font-size:11px; padding:6px; white-space:normal; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns { padding-right:calc(5.3rem + 16px); }
}
/* Music's album and device-save status are compact, aligned columns. */
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns,
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-shell {
  --music-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,6rem) 5.5rem 7.5rem 4.5rem 5.5rem 2rem;
  display:grid; grid-template-columns:var(--music-columns); gap:8px;
}
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns { padding:.55rem 0; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span { display:block; min-width:0; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:first-child { padding-left:2.2rem; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row { grid-column:1 / 7; grid-row:1; grid-template-columns:subgrid; gap:8px; padding-left:2.2rem; padding-right:0; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__offline-save,
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__offline-value { grid-column:7; grid-row:1; margin:0; justify-self:start; }
.creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-delete { grid-column:8; }
.creator-files-browser__row-album { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.creator-files-browser__offline-value { font-size:12px; }
@container (max-width:30rem) {
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-shell { --music-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,3.5rem) 3.3rem 1.5rem; gap:4px; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row { grid-column:1 / 4; gap:4px; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__offline-save,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__offline-value { grid-column:4; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-delete { grid-column:5; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:nth-child(4),
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:nth-child(5),
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:nth-child(6) { display:none; }
}
@media (max-width:640px) {
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-shell { --music-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,3.5rem) 3.3rem 1.5rem; gap:4px; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__row { grid-column:1 / 4; gap:4px; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__offline-save,
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__offline-value { grid-column:4; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__body[data-view-mode="list"] .creator-files-browser__item-delete { grid-column:5; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:nth-child(4),
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:nth-child(5),
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__columns > span:nth-child(6) { display:none; }
}
/* Compact View menu: native checkbox followed by its label on one line. */
.creator-files-browser .creator-files-view-menu .creator-media-menu__panel { width:210px; min-width:180px; gap:4px; padding:8px; font-size:13px; line-height:1.35; text-align:left; }
.creator-files-browser .creator-files-view-menu .creator-files-view-option { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:10px; width:auto; min-height:34px; margin:0; padding:6px 8px; font-size:13px; font-weight:400; text-align:left; cursor:pointer; }
.creator-files-browser .creator-files-view-menu .creator-files-view-option input[type="checkbox"] { display:block; flex:0 0 16px; width:16px; height:16px; min-width:16px; margin:0; padding:0; }
.creator-files-browser .creator-files-view-menu .creator-files-browser__view-toggle { display:flex; width:max-content; max-width:100%; gap:4px; padding:4px 0 0; border:0; border-radius:0; background:transparent; }
.creator-files-browser .creator-files-view-menu .creator-files-browser__view-btn { display:inline-flex; flex:0 0 auto; align-items:center; justify-content:flex-start; gap:6px; width:auto; min-width:0; padding:7px 10px; border:1px solid #cbd5e1; border-radius:4px; font-size:13px; line-height:1.2; text-align:left; }

/* Folder totals follow the same Size column as music rows. */
@media (min-width:641px) {
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__folder-head {
    display:grid;
    grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,6rem) 5.5rem 7.5rem 4.5rem 5.5rem 2rem;
    gap:8px; padding-inline:0;
  }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__folder-icon { grid-column:1; grid-row:1; margin-left:16px; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__folder-name { grid-column:1 / 4; grid-row:1; padding-left:2.6rem; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__folder-meta { grid-column:4; grid-row:1; justify-self:start; margin:0; white-space:nowrap; }
  .creator-files-browser[data-library-mode="audio"] .creator-files-browser__folder-actions { grid-column:5 / -1; grid-row:1; }
}

/* Mobile toolbar opens a bounded outline above the editor. Collapse after page
   selection; preserve the desktop sidebar and existing visibility menu. */
.book-mobile-outline-toggle { display: none; }
@media (max-width: 1199.98px) {
  .creator-workspace-shell--book-writer .book-pages-app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    align-content: start;
  }
  .creator-workspace-shell--book-writer .book-pages-desk { order: 1; }
  .creator-workspace-shell--book-writer .book-pages-outline { order: 0; }
  .book-mobile-outline-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 6px 8px;
    border: 1px solid #d8e0ea;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .creator-workspace-shell--book-writer .book-pages-outline { display: none; }
  .creator-workspace-shell--book-writer.is-mobile-outline-open:not(.is-outline-hidden) .book-pages-outline {
    display: flex;
    max-height: 35vh;
    min-height: 0;
    overflow-y: auto;
  }
  .creator-workspace-shell--book-writer .book-pages-outline__scroll {
    flex: 0 0 auto;
    max-height: none;
    overflow-y: visible;
  }
}

[data-design-pdf-active="1"] .book-mobile-outline-toggle { display: none; }

/* Outline stays beside insertion controls, with live totals, on every screen. */
.creator-workspace-shell--book-writer .book-outline-toggle {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  height: auto !important;
  min-height: 32px;
  text-align: left;
  white-space: normal;
}
[data-design-pdf-active="1"] .book-outline-toggle { display: none !important; }
.book-create-menu__panel [data-book-product-cover-image],
.book-create-menu__panel [data-book-product-back-cover-image] { width: 20px; height: 28px; object-fit: contain; }

/* Keep the cover exit visible while its editor canvas scrolls on mobile. */
@media (max-width: 1199.98px) {
  .creator-workspace-shell--book-writer .book-cover-editor-head {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 8px 0;
    background: #eef1f5;
  }
  .creator-workspace-shell--book-writer .book-cover-back {
    flex-shrink: 0;
    min-height: 44px;
  }
  body.dark-mode .creator-workspace-shell--book-writer .book-cover-editor-head { background: #1d232d; }
}

/* Planning notes remain readable and resizable on small screens. */
.book-settings-dialog__body textarea { resize: vertical; min-height: 6rem; }

/* Category tabs keep planning compact; panels remain visible without JavaScript. */
.book-notes-dialog { width: min(760px, calc(100vw - 32px)); }
.book-notes-tabs { display: flex; gap: 6px; border-bottom: 1px solid #94a3b8; padding-bottom: 8px; }
.book-notes-tabs button { flex: 1; padding: 12px; border: 0; border-radius: 5px; background: transparent; color: inherit; text-align: left; font: inherit; font-weight: 700; cursor: pointer; }
.book-notes-tabs button[aria-selected="true"] { background: #e8edf5; color: #172554; }
.book-notes-tabs button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.book-notes-panel { display: grid; gap: 10px; padding-top: 12px; }
.book-notes-panel[hidden] { display: none; }
.book-notes-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.book-notes-heading h3 { margin: 0; font-size: 1rem; }
.book-character-notes { display: grid; gap: 18px; }
.book-character-note { display: grid; gap: 12px; border-bottom: 1px solid #94a3b8; padding-bottom: 18px; }
.book-character-note label { display: grid; gap: 6px; }
.book-notes-panel > textarea { min-height: 220px; line-height: 1.65; }
body.dark-mode .book-notes-tabs button[aria-selected="true"] { background: #334155; color: #f1f5f9; }

.book-notes-tabs { flex-wrap: wrap; }
.book-notes-tabs button { min-width: 100px; }

/* PDF tools occupy the third editor row and stay above the scrollable reader. */
[data-design-pdf-active="1"] #bookWriterToolbar { display: none !important; }
.book-pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  padding: .35rem 1rem;
  min-height: 3rem;
  background: var(--background, #fff);
  border-bottom: 1px solid #d8e0ea;
  font-size: .85rem;
}
.book-pdf-toolbar label { display: inline-flex; align-items: center; gap: .35rem; }
.book-pdf-toolbar [hidden],
[data-design-pdf-active="1"]:has([data-design-pdf-reader][hidden]) .book-pdf-toolbar { display: none; }
.book-pdf-toolbar :is(button, input, select) {
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: .15rem .45rem;
  background: transparent;
  color: inherit;
  font: inherit;
}
.book-pdf-toolbar button { min-width: 32px; cursor: pointer; }
.book-pdf-toolbar button:disabled { opacity: .45; cursor: default; }
.book-pdf-toolbar input { width: 4rem; }
.book-pdf-toolbar select { max-width: 12rem; }
.book-pdf-toolbar a { margin-inline-start: auto; }
[data-design-pdf-active="1"] .book-pages-canvas { padding: 0; }
[data-design-pdf-active="1"] [data-book-publication-status]:empty { display: none; }
@media (min-width: 1200px) {
  [data-design-pdf-active="1"] :is(.book-pages-app, [data-design-pdf-reader], [data-design-pdf-reader] iframe) { min-height: 0; }
}
@media (min-width: 1280px) {
  body.ap-display-topbar:not(.ap-topbar-nav-open) .creator-workspace-shell--book-writer[data-design-pdf-active="1"] { padding-top: 3rem; }
}

/* Keep Book Maker errors readable in one compact inline notice. */
[data-book-writer-app] [data-book-load-error]:not([hidden]) {
  box-sizing: border-box;
  align-self: flex-start;
  max-width: calc(100% - 2rem);
  margin: .5rem 1rem;
  padding: .45rem .75rem;
  border: 1px solid #94a3b8;
  border-inline-start: 3px solid #a76c32;
  border-radius: 6px;
  background: var(--background, #fff);
  color: inherit;
  font-size: .875rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Publication updates share the third toolbar row; keep the document area clear. */
.book-editor-third-row .book-publication-inline {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(36rem, 100%);
  margin-inline-start: .5rem;
  padding: .2rem .45rem;
  border-inline-start: 2px solid #94a3b8;
  color: inherit;
  font-size: .8rem;
  line-height: 1.35;
}
.book-editor-third-row .book-publication-inline:empty { display: none; }
