:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  background: #0b1218;
  color: #182024;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #0b1218;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.app-frame {
  display: grid;
  grid-template-rows: 112px minmax(0, 1fr) 34px;
  height: 100vh;
  background: #f4f6f5;
}

.top-bar,
.bottom-bar {
  display: flex;
  align-items: center;
  background: #0b1218;
  color: #eff4f2;
}

.top-bar {
  display: grid;
  grid-template-rows: 34px 77px;
  gap: 0;
  min-width: 0;
  width: 100%;
  overflow: visible;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-menu-strip,
.command-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-menu-strip {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.command-strip {
  align-content: stretch;
  justify-content: space-between;
  overflow-x: auto;
  scrollbar-width: none;
}

.command-strip::-webkit-scrollbar {
  display: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 152px;
}

.brand-lockup strong {
  font-size: 15px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #78b7a6;
  border-radius: 5px;
  color: #bfe5db;
  font-size: 10px;
  font-weight: 900;
}

.brand-mark.large {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.command-cluster {
  display: inline-flex;
  align-items: stretch;
  gap: 7px;
  flex: 0 0 auto;
  min-width: max-content;
  height: 78px;
  padding: 8px 8px 7px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.command-cluster:last-child {
  border-right: 0;
}

.icon-command,
.mode-command,
.publish-command {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  min-width: 52px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #d9e5e1;
  padding: 0 6px;
  text-align: center;
}

.icon-command:hover,
.mode-command:hover,
.mode-command.active,
.publish-command:hover {
  background: rgba(255, 255, 255, 0.08);
}

.icon-command span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 24px;
  border: 1px solid rgba(193, 215, 209, 0.46);
  border-radius: 4px;
  color: #dff5ef;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}

.icon-command.compact {
  min-width: 45px;
}

.icon-command small,
.mode-command,
.publish-command span {
  color: #d8e4df;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.edit-cluster .icon-command span {
  color: #91a39f;
  border-color: rgba(145, 163, 159, 0.38);
}

.document-switcher {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  flex: 0 1 340px;
  min-width: 280px;
  max-width: 380px;
  height: 68px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.document-switcher strong,
.document-switcher small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}

.top-status span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-switcher strong {
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.document-switcher small {
  color: #9db2ad;
  font-size: 10px;
}

.book-switcher {
  width: 100%;
}

.book-switcher select {
  width: 100%;
  height: 23px;
  border: 1px solid #22323d;
  border-radius: 4px;
  background: #111c24;
  color: #f5fbf9;
  padding: 0 10px;
  font-size: 11px;
}

.workflow-command-strip {
  gap: 12px;
  padding: 5px 0;
}

.project-actions,
.support-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-width: max-content;
}

.project-command,
.support-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  height: 32px;
  border: 1px solid #253744;
  border-radius: 5px;
  background: #111c24;
  color: #dfeae7;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.project-command:hover,
.support-command:hover,
.support-command.active {
  border-color: rgba(46, 198, 155, 0.48);
  background: #183027;
  color: #7de6c5;
}

.project-command.primary {
  border-color: #198369;
  background: #0d6d59;
  color: #ffffff;
}

.flow-steps {
  display: flex;
  align-items: stretch;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 480px;
  overflow-x: auto;
  scrollbar-width: none;
}

.flow-steps::-webkit-scrollbar {
  display: none;
}

.flow-step {
  display: grid;
  grid-template-columns: 22px minmax(68px, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 7px;
  flex: 1 0 112px;
  min-width: 112px;
  height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #111c24;
  color: #c8d6d2;
  padding: 7px 8px;
  text-align: left;
}

.flow-step:hover,
.flow-step.active {
  border-color: rgba(46, 198, 155, 0.6);
  background: linear-gradient(140deg, rgba(18, 117, 93, 0.68), rgba(17, 28, 36, 0.96));
  color: #f3fffb;
}

.flow-step span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #dbede8;
  font-size: 11px;
  font-weight: 900;
}

.flow-step strong,
.flow-step small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-step strong {
  align-self: end;
  color: #f8fffc;
  font-size: 12px;
  font-weight: 900;
}

.flow-step small {
  align-self: start;
  color: #9fb2ae;
  font-size: 10px;
}

.flow-step.active small {
  color: #d6f5ed;
}

.layout-switcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 32px;
  border: 1px solid #253744;
  border-radius: 5px;
  background: #111c24;
  color: #dfeae7;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.view-cluster {
  align-items: center;
}

.mode-command {
  min-width: 68px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #111c24;
}

.mode-command.active {
  border-color: rgba(46, 198, 155, 0.48);
  color: #67e3bd;
}

.publish-cluster {
  padding-right: 12px;
}

.publish-command {
  min-width: 62px;
  color: #f0ca74;
}

.layout-switcher select {
  height: 24px;
  border: 0;
  background: transparent;
  color: #f4fbf8;
  font-size: 12px;
  font-weight: 800;
}

.primary-command {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  border: 1px solid #197a63;
  border-radius: 5px;
  background: #0d6d59;
  color: #ffffff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.file-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  height: 32px;
  border: 1px solid #253744;
  border-radius: 5px;
  background: #111c24;
  color: #dfeae7;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.file-command:hover,
.file-command.button-like:hover {
  background: #182935;
}

.file-command.button-like {
  min-width: max-content;
}

.hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.system-menu,
.menu-row,
.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.system-menu {
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
  overflow: visible;
  scrollbar-width: none;
}

.system-menu::-webkit-scrollbar {
  display: none;
}

.menu-group {
  position: relative;
  flex: 0 0 auto;
}

.menu-group > button {
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #dce7e4;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 750;
}

.menu-group > button:hover,
.menu-group.open > button {
  background: rgba(255, 255, 255, 0.09);
}

.menu-popover {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 40;
  display: none;
  min-width: 210px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #111d25;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.menu-group.open .menu-popover {
  display: grid;
}

.menu-popover button,
.menu-popover label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #edf4f1;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.menu-popover button:hover,
.menu-popover label:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-row {
  flex: 1 1 180px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.menu-row::-webkit-scrollbar {
  display: none;
}

.top-actions {
  flex: 0 0 auto;
}

.menu-row button,
.top-actions button {
  min-width: 32px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  color: #dce7e4;
  background: rgba(255, 255, 255, 0.035);
  padding: 0 9px;
  font-size: 12px;
  white-space: nowrap;
}

.menu-row button:hover,
.top-actions button:hover,
.top-actions button.active {
  background: rgba(255, 255, 255, 0.08);
}

.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 360px;
  min-width: 220px;
  margin-left: 0;
  color: #c7d5d2;
  font-size: 12px;
}

.top-status span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(240, 201, 119, 0.38);
  border-radius: 999px;
  background: rgba(240, 201, 119, 0.1);
  color: #f4d78e;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.license-pill.demo {
  border-color: rgba(255, 112, 95, 0.42);
  background: rgba(255, 112, 95, 0.1);
  color: #ffb1a7;
}

.license-pill.paid {
  border-color: rgba(94, 224, 167, 0.48);
  background: rgba(46, 198, 155, 0.12);
  color: #75e3ba;
}

.ok-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7bd08b;
}

.workspace {
  display: grid;
  grid-template-columns: var(--left-width, 320px) 6px minmax(440px, 1fr) 6px var(--right-width, 660px);
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.workspace.left-collapsed {
  grid-template-columns: 0 0 minmax(440px, 1fr) 6px var(--right-width, 660px);
}

.workspace.right-collapsed {
  grid-template-columns: var(--left-width, 320px) 6px minmax(440px, 1fr) 0 0;
}

.workspace.left-collapsed.right-collapsed {
  grid-template-columns: 0 0 minmax(0, 1fr) 0 0;
}

.workspace.left-collapsed .left-rail,
.workspace.left-collapsed .left-resizer,
.workspace.right-collapsed .publish-pane,
.workspace.right-collapsed .right-resizer {
  display: none;
}

.pane-splitter {
  position: relative;
  z-index: 4;
  min-width: 6px;
  border-inline: 1px solid rgba(0, 0, 0, 0.18);
  background: #d8e0de;
  cursor: col-resize;
}

.pane-splitter::after {
  content: "";
  position: absolute;
  inset: 35% 2px;
  border-radius: 99px;
  background: #8c9a97;
}

.pane-splitter:hover,
.pane-splitter:focus-visible {
  background: #c6d3d0;
}

.layout-focus {
  grid-template-columns: 0 0 minmax(0, 1fr) 0 0;
}

.layout-focus .left-rail,
.layout-focus .publish-pane,
.layout-focus .pane-splitter,
.layout-typewriter .left-rail,
.layout-typewriter .publish-pane,
.layout-typewriter .pane-splitter {
  display: none;
}

.layout-typewriter {
  grid-template-columns: 0 0 minmax(0, 1fr) 0 0;
  background: #f1f2ef;
}

.layout-focus .studio-workbench,
.layout-typewriter .studio-workbench,
.layout-typewriter .document-tabs,
.layout-typewriter .editor-toolbar {
  display: none;
}

.layout-focus .editor-pane {
  grid-template-rows: 32px 46px minmax(0, 1fr) 31px;
}

.layout-typewriter .editor-pane {
  grid-template-rows: minmax(0, 1fr) 34px;
  border-right: 0;
  background: #f7f5ef;
}

.layout-typewriter .editor-scroll {
  padding: 12vh max(24px, calc((100vw - 780px) / 2)) 16vh;
}

.layout-typewriter .editor-book-meta {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.layout-typewriter .chapter-title-input,
.layout-typewriter .writing-area {
  display: block;
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.layout-typewriter .chapter-title-input {
  min-height: 74px;
  margin-bottom: 16px;
  font-size: 36px;
}

.layout-typewriter .writing-area {
  min-height: 60vh;
  font-size: max(var(--editor-size), 19px);
  line-height: 1.82;
}

.layout-proof {
  grid-template-columns: 0 0 minmax(420px, 0.92fr) 6px minmax(520px, var(--right-width, 660px));
}

.layout-proof .left-rail,
.layout-proof .left-resizer {
  display: none;
}

.layout-planning {
  grid-template-columns: var(--left-width, 340px) 6px minmax(360px, 0.76fr) 6px minmax(620px, var(--right-width, 700px));
}

.left-rail {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: #101c24;
  color: #edf4f2;
  border-right: 1px solid rgba(0, 0, 0, 0.35);
}

.library-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  color: #e5eeeb;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-title span:last-child {
  color: #8fa19d;
  font-weight: 700;
  text-transform: none;
}

.book-list {
  display: grid;
  gap: 1px;
}

.book-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: #dbe6e3;
  padding: 10px 12px;
  text-align: left;
}

.book-row:hover,
.book-row.active {
  background: rgba(18, 115, 93, 0.35);
}

.book-row strong,
.book-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-row strong {
  color: #ffffff;
  font-size: 13px;
}

.book-row small {
  color: #b2c2bf;
  font-size: 11px;
  line-height: 1.45;
}

.book-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #84928f;
}

.book-row.active i {
  background: #55d08c;
}

.cover-thumb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background:
    linear-gradient(155deg, rgba(53, 130, 115, 0.95), rgba(21, 48, 60, 0.96)),
    radial-gradient(circle at 50% 24%, #e8f1ef 0 10%, transparent 12%);
  color: #f8fbf9;
  font-family: Georgia, serif;
  font-size: 28px;
}

.cover-thumb.small {
  width: 40px;
  height: 56px;
  font-size: 18px;
}

.cover-thumb.has-image {
  overflow: hidden;
  background: #0c151c;
  color: transparent;
}

.cover-thumb.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-thumb.generated {
  overflow: hidden;
  align-content: stretch;
  justify-items: stretch;
  background:
    radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--cover-accent) 42%, transparent), transparent 33%),
    linear-gradient(155deg, var(--cover-bg), color-mix(in srgb, var(--cover-bg) 78%, #000 22%));
  color: var(--cover-fg);
}

.cover-generated-type {
  display: grid;
  align-content: space-between;
  width: 100%;
  height: 100%;
  padding: 10px 7px;
  border: 1px solid color-mix(in srgb, var(--cover-accent) 70%, transparent);
  text-align: center;
}

.cover-generated-type b,
.cover-generated-type i {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
}

.cover-generated-type b {
  align-self: center;
  font-size: 9px;
  line-height: 1.1;
  text-transform: uppercase;
}

.cover-generated-type i {
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.template-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 12px 12px;
}

.template-actions button,
.rail-actions button {
  min-width: 0;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: #eaf3f0;
  font-size: 11px;
  font-weight: 800;
}

.project-header {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-header h1 {
  margin: 2px 0 5px;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-header p {
  margin: 0 0 4px;
  color: #b6c5c2;
  font-size: 12px;
}

.progress-track {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
}

.progress-track span {
  display: block;
  height: 100%;
  background: #62c99e;
}

.rail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.outline {
  min-height: 0;
  overflow: auto;
  padding: 6px 0 18px;
}

.outline-group-title,
.outline-row {
  display: grid;
  align-items: center;
  width: 100%;
}

.outline-group-title {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px 17px 6px;
  color: #eef7f4;
  font-size: 12px;
  font-weight: 900;
}

.outline-row {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #d5e1de;
  padding: 8px 17px;
  text-align: left;
  font-size: 12px;
}

.outline-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.outline-row.active {
  background: linear-gradient(90deg, rgba(25, 121, 98, 0.88), rgba(25, 121, 98, 0.42));
  color: #ffffff;
}

.doc-icon {
  width: 13px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.8;
}

.doc-icon.front {
  border-radius: 50% 50% 2px 2px;
}

.doc-icon.back {
  border-style: dashed;
}

.chapter-name,
.chapter-words {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-words {
  color: #bdcbc8;
}

.editor-pane {
  display: grid;
  grid-template-rows: 32px 46px minmax(0, 1fr) 31px 214px;
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid #cdd5d4;
}

.document-tabs {
  display: flex;
  align-items: end;
  gap: 3px;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 10px 0;
  border-bottom: 1px solid #22313b;
  background: #0f1920;
}

.document-tabs button {
  flex: 0 0 auto;
  height: 28px;
  max-width: 280px;
  overflow: hidden;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: transparent;
  color: #b9c9c5;
  padding: 0 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 850;
}

.document-tabs button.active {
  border-color: rgba(255, 255, 255, 0.11);
  background: #14222b;
  color: #f4fbf8;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding: 7px 12px;
  border-bottom: 1px solid #dfe4e3;
  background: #f8faf9;
}

.editor-toolbar select,
.editor-toolbar button,
.stage-toolbar select,
.inspector-section select,
.inspector-section input {
  height: 30px;
  border: 1px solid #cbd5d4;
  border-radius: 4px;
  background: #ffffff;
  color: #182024;
  font-size: 12px;
}

.editor-toolbar select {
  padding: 0 24px 0 8px;
}

.editor-toolbar .toolbar-layout-select {
  min-width: 96px;
}

.editor-toolbar button {
  min-width: 30px;
  padding: 0 8px;
  font-weight: 800;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: #d8dfde;
}

.editor-scroll {
  position: relative;
  min-width: 0;
  overflow: auto;
  padding: 34px min(7vw, 82px);
}

.editor-scroll.locked-work .chapter-title-input,
.editor-scroll.locked-work .writing-area {
  background-image: repeating-linear-gradient(
    -28deg,
    transparent 0 74px,
    rgba(13, 119, 98, 0.045) 74px 76px,
    transparent 76px 150px
  );
}

.work-watermark {
  position: sticky;
  top: 10px;
  z-index: 2;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 12px;
  border: 1px solid rgba(18, 119, 99, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #127763;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

.editor-book-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  color: #657170;
  font-size: 12px;
}

.chapter-title-input {
  width: 100%;
  min-height: 88px;
  resize: none;
  overflow: hidden;
  border: 0;
  outline: 0;
  margin: 0 0 22px;
  color: #13110f;
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1.08;
}

.writing-area {
  width: 100%;
  min-height: clamp(260px, 38vh, 520px);
  resize: none;
  border: 0;
  outline: 0;
  overflow-x: hidden;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-word;
  color: #191512;
  background: transparent;
  font-family: var(--editor-font);
  font-size: var(--editor-size);
  line-height: 1.72;
}

.editor-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-top: 1px solid #dfe4e3;
  color: #4f5d5d;
  font-size: 12px;
}

.studio-workbench {
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid #22313b;
  background: #0f1920;
  color: #e8f2ef;
}

.workbench-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.workbench-tabs button {
  height: 31px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #b7c8c3;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 850;
}

.workbench-tabs button.active {
  border-color: #39d0aa;
  color: #5de5c0;
}

.workbench-tabs span {
  margin-left: auto;
  color: #92a7a2;
  font-size: 11px;
}

.workbench-canvas {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(190px, 0.7fr);
  min-height: 0;
  overflow: hidden;
}

.mini-mindmap {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 10px;
  align-content: center;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  padding: 18px 20px;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    #f3f3ee;
  background-size: 24px 24px;
}

.mini-mindmap > strong {
  grid-column: 2 / 4;
  place-self: center;
  min-width: 160px;
  border: 1px solid #0f6672;
  border-radius: 8px;
  background: #103947;
  color: #ffffff;
  padding: 12px 18px;
  text-align: center;
  font-size: 15px;
  box-shadow: 0 14px 28px rgba(20, 42, 48, 0.18);
}

.mini-node {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 42px;
  border: 1px solid #9eb2c8;
  border-radius: 7px;
  background: #f7f9fb;
  color: #27343a;
  padding: 7px 9px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(30, 45, 54, 0.08);
}

.mini-node small {
  color: #6c7680;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-node b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.mini-node.plot {
  border-color: #c2af7b;
  background: #fff9ea;
}

.mini-node.research {
  border-color: #81b7ad;
  background: #effaf7;
}

.workbench-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 0;
  overflow: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #111d25;
}

.workbench-side article {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.workbench-side h3 {
  margin: 0 0 2px;
  color: #5de5c0;
  font-size: 12px;
}

.workbench-side p {
  display: grid;
  gap: 3px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  padding: 7px;
}

.workbench-side p strong {
  color: #a9bbb6;
  font-size: 9px;
  text-transform: uppercase;
}

.workbench-side p span {
  overflow: hidden;
  color: #e8f2ef;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.publish-pane {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) 286px;
  grid-template-rows: 72px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: #101b22;
  color: #ecf3f1;
}

.workflow-header,
.publish-tabs {
  grid-column: 1 / -1;
}

.workflow-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 10px 12px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f1920;
}

.workflow-title {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.workflow-title span {
  color: #7f9691;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-title strong {
  color: #ecf7f4;
  font-size: 14px;
  line-height: 1.25;
}

.workflow-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.workflow-meta small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(46, 198, 155, 0.22);
  border-radius: 999px;
  background: rgba(46, 198, 155, 0.08);
  color: #bfe9dc;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 850;
}

.workflow-rail {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 7px;
  scrollbar-width: thin;
}

.workflow-step {
  display: grid;
  grid-template-columns: 22px minmax(82px, 1fr);
  grid-template-rows: auto auto;
  column-gap: 7px;
  align-content: center;
  flex: 0 0 126px;
  min-width: 0;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  background: #14212a;
  color: #c8d6d2;
  padding: 8px;
  text-align: left;
}

.workflow-step:hover,
.workflow-step.active {
  border-color: rgba(46, 198, 155, 0.65);
  background: linear-gradient(140deg, rgba(18, 117, 93, 0.7), rgba(20, 33, 42, 0.96));
  color: #f3fffb;
}

.workflow-step span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #dbede8;
  font-size: 11px;
  font-weight: 900;
}

.workflow-step strong,
.workflow-step small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step strong {
  align-self: end;
  font-size: 12px;
}

.workflow-step small {
  align-self: start;
  color: #9fb2ae;
  font-size: 10px;
}

.workflow-step.active small {
  color: #cdf4ea;
}

.workflow-tools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: none;
}

.workflow-tools::-webkit-scrollbar {
  display: none;
}

.workflow-tools button {
  flex: 0 0 auto;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: #bdcbc7;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 850;
}

.workflow-tools button:hover,
.workflow-tools button.active {
  border-color: rgba(46, 198, 155, 0.55);
  color: #2ee0b0;
  background: rgba(20, 101, 83, 0.32);
}

.publish-tabs {
  display: flex;
  align-items: end;
  gap: 4px;
  padding: 0 12px;
  overflow-x: auto;
  background: #0f1920;
}

.publish-tabs button {
  flex: 0 0 auto;
  height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #bbc8c5;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.publish-tabs button.active {
  border-color: #2ec69b;
  color: #2ee0b0;
}

.designer-stage {
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #d9dddc;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #c6cdcc;
  background: #edf0ef;
  color: #283235;
}

.stage-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.stage-toolbar select {
  padding: 0 10px;
}

.stage-toolbar span {
  color: #526061;
  font-size: 12px;
}

.book-preview {
  min-width: 0;
  overflow: auto;
  padding: 22px 12px;
}

.book-preview-cover {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(100%, var(--page-width));
  margin: 0 auto 18px;
  border: 1px solid #c3ccca;
  border-radius: 7px;
  background: #eef2f1;
  padding: 10px;
  color: #243134;
}

.book-preview-cover .cover-thumb {
  width: 58px;
  height: 78px;
}

.book-preview-cover strong,
.book-preview-cover span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-preview-cover strong {
  font-size: 12px;
}

.book-preview-cover span {
  margin-top: 4px;
  color: #60706f;
  font-size: 11px;
}

.book-page {
  position: relative;
  width: min(100%, var(--page-width));
  min-height: var(--page-min-height);
  margin: 0 auto;
  padding: var(--page-padding);
  border: 1px solid #ced6d5;
  color: var(--preview-ink);
  background: var(--preview-paper);
  box-shadow: 0 18px 54px rgba(18, 28, 34, 0.23);
  font-family: var(--preview-font);
}

.book-page.watermarked-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -32deg,
      transparent 0 90px,
      rgba(18, 119, 99, 0.055) 90px 92px,
      transparent 92px 180px
    );
}

.preview-watermark {
  position: absolute;
  inset: 42% auto auto 50%;
  transform: translate(-50%, -50%) rotate(-22deg);
  pointer-events: none;
  border: 2px solid rgba(18, 119, 99, 0.18);
  color: rgba(18, 119, 99, 0.22);
  padding: 12px 20px;
  font-family: Inter, Arial, sans-serif;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
  white-space: nowrap;
}

.chapter-kicker {
  color: var(--preview-accent);
  text-align: center;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.book-page h2 {
  margin: 14px 0 24px;
  color: var(--preview-ink);
  text-align: center;
  font-family: var(--preview-heading);
  font-size: 23px;
  font-weight: 500;
}

.book-page p {
  margin: 0 0 12px;
  font-size: var(--preview-size);
  line-height: var(--preview-line-height);
}

.preview-break {
  margin: 23px 0;
  color: var(--preview-accent);
  text-align: center;
  font-size: 12px;
}

.preview-visual {
  margin: 22px 0;
  text-align: center;
}

.preview-visual img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
}

.preview-visual figcaption {
  margin-top: 6px;
  color: var(--preview-accent);
  font-size: 10px;
}

.book-page footer {
  margin-top: 30px;
  color: var(--preview-accent);
  text-align: center;
  font-size: 10px;
}

.preview-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px auto 0;
  color: #394647;
  font-size: 12px;
}

.preview-controls button {
  height: 27px;
  border: 1px solid #bec7c5;
  border-radius: 4px;
  background: #eef1f0;
  color: #324143;
  padding: 0 8px;
  font-size: 11px;
}

.preview-controls button.active {
  border-color: #167763;
  color: #0d6857;
}

.side-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: #101b22;
}

.inspector-tabs {
  display: flex;
  align-items: end;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e181f;
  scrollbar-width: none;
}

.inspector-tabs::-webkit-scrollbar {
  display: none;
}

.inspector-tabs button {
  flex: 0 0 auto;
  height: 35px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #aebfba;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 850;
}

.inspector-tabs button.active {
  border-color: #2ec69b;
  color: #5ce1bd;
}

.panel-scroll {
  height: 100%;
  overflow: auto;
}

.inspector-section {
  display: grid;
  gap: 9px;
  padding: 15px 14px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inspector-section h2 {
  margin: 0;
  color: #eef6f3;
  font-size: 13px;
}

.inspector-section p,
.inspector-section small,
.plain-list {
  margin: 0;
  color: #aebfba;
  font-size: 12px;
  line-height: 1.45;
}

.inspector-section label {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #c4d2ce;
  font-size: 12px;
}

.inspector-section select,
.inspector-section input,
.inspector-section textarea,
.asset-card input,
.asset-card select,
.asset-card textarea,
.board-card input,
.board-card select,
.board-card textarea {
  width: 100%;
  border-color: #2b3a43;
  background: #17242d;
  color: #ecf4f1;
  padding: 0 8px;
}

.inspector-section textarea,
.asset-card textarea,
.board-card textarea {
  min-height: 96px;
  resize: vertical;
  border: 1px solid #2b3a43;
  border-radius: 4px;
  padding: 8px;
  line-height: 1.45;
}

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

.theme-card {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.theme-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.theme-card span {
  font-size: 22px;
  line-height: 1;
}

.theme-card i {
  display: block;
  width: 34px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  opacity: 0.25;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.theme-card small {
  color: inherit;
  font-family: Inter, Arial, sans-serif;
  font-size: 10px;
  opacity: 0.75;
}

.cover-design-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.cover-design-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: var(--cover-bg);
  color: var(--cover-fg);
  padding: 8px;
  text-align: left;
}

.cover-design-card.active {
  border-color: var(--cover-accent);
  box-shadow: inset 0 0 0 1px var(--cover-accent);
}

.cover-design-card span {
  display: block;
  width: 100%;
  aspect-ratio: 0.72;
  border: 1px solid var(--cover-accent);
  background:
    linear-gradient(90deg, transparent 42%, var(--cover-accent) 42% 44%, transparent 44%),
    linear-gradient(180deg, transparent 18%, rgba(255,255,255,.13) 18% 19%, transparent 19% 72%, rgba(255,255,255,.12) 72% 73%, transparent 73%);
}

.cover-design-card strong {
  display: block;
  color: inherit;
  font-size: 10px;
  line-height: 1.2;
}

.export-summary {
  background: linear-gradient(180deg, rgba(19, 121, 96, 0.22), rgba(16, 27, 34, 0));
}

.readiness-meter {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.readiness-meter span {
  display: block;
  height: 100%;
  background: #47d28d;
}

.validation-summary {
  background: linear-gradient(180deg, rgba(52, 113, 145, 0.22), rgba(16, 27, 34, 0));
}

.validation-score {
  position: relative;
  height: 28px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.validation-score span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #23b37d, #65d8a0);
}

.validation-score strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 12px;
}

.validation-list {
  display: grid;
  gap: 1px;
  padding: 0 10px 14px;
}

.validation-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 4px;
}

.validation-row > span {
  display: grid;
  place-items: center;
  height: 22px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 900;
}

.validation-row.pass > span {
  background: rgba(54, 197, 129, 0.2);
  color: #78e2a9;
}

.validation-row.warning > span {
  background: rgba(212, 164, 65, 0.2);
  color: #ffd27a;
}

.validation-row.error > span {
  background: rgba(220, 88, 75, 0.22);
  color: #ffaaa0;
}

.validation-row strong,
.validation-row small {
  display: block;
}

.validation-row strong {
  color: #edf5f2;
  font-size: 12px;
}

.validation-row small {
  margin-top: 2px;
  color: #aebfba;
  font-size: 11px;
  line-height: 1.35;
}

.export-actions {
  display: grid;
  gap: 0;
  padding: 0 10px 14px;
}

.license-export-lock,
.license-inline-lock,
.license-state-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(240, 201, 119, 0.34);
  border-radius: 6px;
  background: rgba(240, 201, 119, 0.1);
  color: #f4d78e;
  padding: 10px;
}

.license-export-lock strong,
.license-state-card strong {
  color: #fff3c4;
  font-size: 12px;
}

.license-export-lock span,
.license-state-card span,
.license-inline-lock {
  color: #dbc993;
  font-size: 11px;
  line-height: 1.42;
}

.export-actions button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #ecf4f1;
  padding: 8px 4px;
  text-align: left;
}

.export-actions button:hover {
  background: rgba(255, 255, 255, 0.04);
}

.export-actions button.locked-export,
.handoff-actions button.locked-export {
  opacity: 0.72;
}

.export-actions button.locked-export em {
  color: #f0c977;
}

.export-actions strong,
.export-actions small {
  display: block;
}

.export-actions strong {
  font-size: 13px;
}

.export-actions small {
  color: #9fb1ac;
  font-size: 11px;
}

.export-actions em {
  color: #70d98d;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.export-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 26px;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: #72d88b;
}

.export-icon.pdf {
  color: #ff705f;
}

.export-icon.html {
  color: #6ab8ff;
}

.export-icon.markdown {
  color: #dfe7e5;
}

.export-icon.source {
  color: #7ccfc8;
}

.export-icon.docx,
.export-icon.rtf,
.export-icon.text {
  color: #b5d6ff;
}

.export-icon.mobi {
  color: #d4bdff;
}

.export-icon.outline,
.export-icon.layout,
.export-icon.xml {
  color: #f0c977;
}

.export-icon.package {
  color: #75e3a4;
}

.export-icon::after {
  content: "";
  width: 9px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.export-actions .export-all {
  display: block;
  height: 42px;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid #218667;
  border-radius: 5px;
  background: #156d55;
  color: #ffffff;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.export-actions .export-project {
  display: block;
  height: 38px;
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid #355163;
  border-radius: 5px;
  background: #172734;
  color: #e9f5f1;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.export-receipt {
  margin-top: 10px;
  border: 1px solid rgba(75, 210, 140, 0.45);
  border-radius: 5px;
  background: rgba(42, 137, 93, 0.17);
  color: #cdeedc;
  padding: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.panel-header-actions button {
  height: 32px;
  border: 1px solid #218667;
  border-radius: 5px;
  background: #156d55;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.character-grid {
  display: grid;
  gap: 10px;
  padding: 12px 10px 16px;
}

.character-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.character-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(122, 214, 179, 0.45);
  border-radius: 50%;
  background: #173b34;
  color: #d9fff0;
  font-weight: 900;
}

.character-card input,
.character-card textarea {
  width: 100%;
  border: 1px solid #2b3a43;
  border-radius: 4px;
  background: #17242d;
  color: #ecf4f1;
  padding: 0 8px;
}

.character-card input {
  height: 30px;
}

.character-card textarea {
  grid-column: 1 / -1;
  min-height: 132px;
  resize: vertical;
  padding: 8px;
  line-height: 1.45;
}

.language-summary {
  background: linear-gradient(180deg, rgba(94, 77, 132, 0.35), rgba(16, 27, 34, 0));
}

.language-score {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 9px;
}

.language-score strong {
  color: #fff1ba;
  font-size: 18px;
}

.language-tools {
  display: grid;
  gap: 10px;
  padding: 12px 10px 16px;
}

.language-tools article {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.language-tools h3 {
  margin: 0;
  color: #edf6f3;
  font-size: 12px;
  text-transform: uppercase;
}

.language-tools input,
.language-tools select {
  height: 30px;
  border: 1px solid #2b3a43;
  border-radius: 4px;
  background: #17242d;
  color: #ecf4f1;
  padding: 0 8px;
}

.language-tools p,
.language-tools small {
  margin: 0;
  color: #b4c4c0;
  font-size: 12px;
  line-height: 1.45;
}

.language-issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
  gap: 8px;
  align-items: center;
  border-left: 3px solid #e0c264;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  padding: 9px;
}

.language-issue.spelling {
  border-left-color: #e96d5e;
}

.language-issue.grammar {
  border-left-color: #67b7ff;
}

.language-issue.style {
  border-left-color: #e0c264;
}

.language-issue strong,
.language-issue small {
  display: block;
}

.language-issue strong {
  color: #ffffff;
  font-size: 12px;
}

.language-issue span {
  justify-self: end;
  color: #9fe8c6;
  font-size: 11px;
  font-weight: 800;
}

.language-issue button,
.thesaurus-chips button,
.assistant-actions button,
.language-tools > article > button {
  min-height: 28px;
  border: 1px solid #315b52;
  border-radius: 5px;
  background: #18352f;
  color: #dcfff2;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
}

.language-issue button {
  grid-column: span 1;
}

.compact-label {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: #c4d2ce;
  font-size: 12px;
}

.translation-preview {
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  padding: 9px;
  white-space: pre-wrap;
}

.thesaurus-chips,
.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.settings-grid div,
.store-grid div,
.integration-grid a,
.integration-grid button {
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: #edf6f3;
  padding: 10px;
  text-decoration: none;
}

.settings-grid strong,
.settings-grid span,
.store-grid strong,
.store-grid span {
  display: block;
}

.settings-grid span,
.store-grid span {
  margin-top: 4px;
  color: #aebfba;
  font-size: 11px;
  line-height: 1.35;
}

.integration-grid a,
.integration-grid button {
  display: grid;
  place-items: center;
  min-height: 44px;
  color: #d9fff0;
  font-size: 12px;
  font-weight: 900;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}

.suite-notice {
  border: 1px solid rgba(46, 198, 155, 0.24);
  border-radius: 5px;
  background: rgba(46, 198, 155, 0.08);
  padding: 8px 9px;
  color: #d9fff0;
}

.asset-list {
  display: grid;
  gap: 10px;
  padding: 12px 10px 16px;
}

.asset-card,
.board-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.asset-card input,
.asset-card select,
.board-card input,
.board-card select {
  height: 30px;
  border: 1px solid #2b3a43;
  border-radius: 4px;
}

.asset-card label {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #c4d2ce;
  font-size: 11px;
}

.asset-card small,
.board-card small {
  color: #9fb1ac;
  font-size: 11px;
}

.visual-card img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  background: #eef2f0;
}

.asset-file-placeholder {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.asset-file-placeholder strong,
.asset-file-placeholder small {
  display: block;
}

.board-lanes {
  display: grid;
  gap: 10px;
  padding: 12px 10px 16px;
}

.board-lane {
  display: grid;
  gap: 8px;
}

.board-lane h3 {
  margin: 0;
  color: #eff7f3;
  font-size: 12px;
  text-transform: uppercase;
}

.history-list {
  padding-top: 10px;
}

.history-list.compact {
  gap: 6px;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.history-card strong,
.history-card small {
  display: block;
}

.history-card strong {
  color: #eef6f3;
  font-size: 12px;
}

.history-card small {
  margin-top: 3px;
  color: #9fb1ac;
  font-size: 11px;
}

.history-card button,
.handoff-actions button {
  min-height: 32px;
  border: 1px solid #2b6f61;
  border-radius: 5px;
  background: #183d35;
  color: #d9fff0;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.mindmap-canvas {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 520px;
  margin: 14px;
  padding: 28px 22px 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    #0d171e;
  background-size: 28px 28px;
}

.mindmap-center {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px solid #d6a84f;
  border-radius: 50%;
  background: #f5efe1;
  color: #1d2328;
  text-align: center;
  padding: 14px;
}

.mindmap-center strong,
.mindmap-center small {
  display: block;
}

.mindmap-node {
  display: grid;
  gap: 4px;
  min-height: 68px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 6px;
  background: #16232c;
  padding: 9px;
}

.mindmap-node span {
  color: #8fb9ff;
  font-size: 10px;
  text-transform: uppercase;
}

.mindmap-node strong {
  color: #edf5f2;
  font-size: 12px;
  line-height: 1.25;
}

.mindmap-node.plot span {
  color: #f0c977;
}

.mindmap-node.research span {
  color: #79ddb7;
}

.publishing-summary {
  background: linear-gradient(180deg, rgba(58, 76, 117, 0.38), rgba(16, 27, 34, 0));
}

.service-grid,
.isbn-grid,
.handoff-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-card,
.isbn-grid div {
  min-height: 74px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  background: rgba(255,255,255,.045);
  color: #eef6f3;
  padding: 10px;
  text-decoration: none;
}

.service-card strong,
.service-card small,
.isbn-grid strong,
.isbn-grid span {
  display: block;
}

.service-card small,
.isbn-grid span {
  margin-top: 4px;
  color: #9fb1ac;
  font-size: 11px;
  line-height: 1.3;
}

.toggle-row input {
  justify-self: start;
  width: 18px;
  height: 18px;
}

.readiness {
  gap: 8px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d1b6ad;
  font-size: 12px;
}

.checkline span:first-child {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(199, 90, 59, 0.2);
  color: #ffb5a6;
  font-size: 9px;
  font-weight: 900;
}

.checkline.ok {
  color: #c6e6dc;
}

.checkline.ok span:first-child {
  background: rgba(48, 185, 125, 0.22);
  color: #6be09f;
}

.help-panel {
  background: #101b22;
}

.guide-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.guide-step strong,
.guide-step i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #d7e3df;
  font-size: 11px;
  font-style: normal;
}

.guide-step.done strong,
.guide-step.done i {
  background: rgba(54, 197, 129, 0.22);
  color: #6ee0a3;
}

.guide-step b,
.guide-step small {
  display: block;
}

.guide-step b {
  color: #eaf3f0;
  font-size: 12px;
}

.guide-step small {
  margin-top: 2px;
}

.plain-list {
  padding-left: 18px;
}

.plain-list li + li {
  margin-top: 7px;
}

.about-card {
  place-items: start;
}

.about-card dl {
  display: grid;
  gap: 9px;
  width: 100%;
  margin: 6px 0 0;
}

.about-card div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
}

.about-card dt {
  color: #8fa39d;
  font-size: 11px;
}

.about-card dd {
  margin: 0;
  color: #edf4f1;
  font-size: 12px;
}

.setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(5, 11, 15, 0.68);
  padding: 22px;
}

.setup-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1480px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #f5f7f6;
  color: #182326;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.setup-modal-header,
.setup-modal-footer,
.setup-tabs {
  display: flex;
  align-items: center;
}

.setup-modal-header {
  justify-content: space-between;
  min-height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid #d7dddc;
}

.setup-modal-header strong,
.setup-modal-header span {
  display: block;
}

.setup-modal-header strong {
  font-size: 17px;
  font-weight: 900;
}

.setup-modal-header span {
  margin-top: 3px;
  color: #63706f;
  font-size: 12px;
}

.setup-close {
  width: 32px;
  height: 32px;
  border: 1px solid #c9d2d0;
  border-radius: 5px;
  background: #ffffff;
  color: #243234;
  font-size: 12px;
  font-weight: 900;
}

.setup-tabs {
  height: 52px;
  border-bottom: 1px solid #dce2e1;
  background: #ffffff;
}

.setup-tabs span {
  display: grid;
  place-items: center;
  flex: 1;
  height: 100%;
  border-right: 1px solid #e1e6e5;
  color: #5b6868;
  font-size: 12px;
  font-weight: 850;
}

.setup-tabs span.active {
  color: #0f7260;
  box-shadow: inset 0 -2px 0 #0f866f;
}

.setup-body {
  display: grid;
  grid-template-columns: minmax(290px, 0.9fr) minmax(470px, 1.35fr) minmax(330px, 0.95fr);
  min-height: 0;
  overflow: hidden;
}

.setup-column {
  min-width: 0;
  overflow: auto;
  padding: 18px;
}

.setup-column + .setup-column {
  border-left: 1px solid #dde4e2;
}

.setup-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.setup-section-title h2,
.setup-choice-block h3,
.generated-pages h3,
.publishing-account-list h3,
.format-artifacts-card h3 {
  margin: 0;
  color: #152126;
  font-size: 13px;
  font-weight: 900;
}

.setup-section-title button {
  height: 28px;
  border: 1px solid #b9c8c5;
  border-radius: 5px;
  background: #ffffff;
  color: #176f5e;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 850;
}

.setup-section-title span {
  color: #667472;
  font-size: 12px;
  font-weight: 750;
}

.author-setup label,
.setup-title-grid label {
  display: grid;
  gap: 6px;
  margin-bottom: 11px;
  color: #3b4a4c;
  font-size: 12px;
  font-weight: 800;
}

.author-setup input,
.author-setup select,
.author-setup textarea,
.setup-title-grid input {
  width: 100%;
  border: 1px solid #c7d0ce;
  border-radius: 5px;
  background: #ffffff;
  color: #1b282b;
  padding: 0 10px;
}

.author-setup input,
.author-setup select,
.setup-title-grid input {
  height: 34px;
}

.author-setup textarea {
  min-height: 74px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.45;
}

.license-scope-card,
.generated-pages,
.publishing-account-list,
.format-artifacts-card {
  display: grid;
  gap: 8px;
  border: 1px solid #d4dcda;
  border-radius: 7px;
  background: #ffffff;
  padding: 12px;
}

.license-scope-card strong {
  color: #173d35;
  font-size: 12px;
}

.license-scope-card p,
.license-scope-card small {
  margin: 0;
  color: #5f6f6d;
  font-size: 11px;
  line-height: 1.4;
}

.setup-title-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.setup-choice-block {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.setup-mode-grid,
.setup-template-grid,
.setup-theme-grid,
.setup-cover-grid {
  display: grid;
  gap: 8px;
}

.setup-mode-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.setup-template-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setup-theme-grid,
.setup-cover-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.setup-mode-card,
.setup-template-card,
.setup-theme-card,
.setup-cover-card {
  min-width: 0;
  border: 1px solid #ccd6d4;
  border-radius: 7px;
  background: #ffffff;
  color: #1c292c;
  padding: 10px;
  text-align: left;
}

.setup-mode-card.active,
.setup-template-card.active,
.setup-theme-card.active,
.setup-cover-card.active {
  border-color: #0f866f;
  box-shadow: inset 0 0 0 1px #0f866f;
}

.setup-mode-card strong,
.setup-mode-card small,
.setup-template-card strong,
.setup-template-card small,
.setup-cover-card strong {
  display: block;
}

.setup-mode-card strong,
.setup-template-card strong,
.setup-cover-card strong {
  font-size: 12px;
}

.setup-mode-card small,
.setup-template-card small {
  margin-top: 5px;
  color: #657573;
  font-size: 10px;
  line-height: 1.35;
}

.setup-template-card span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 5px;
  background: #edf3f1;
  color: #127964;
  font-size: 10px;
  font-weight: 950;
}

.setup-theme-card {
  display: grid;
  place-items: center;
  min-height: 70px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.setup-theme-card span {
  font-size: 22px;
  line-height: 1;
}

.setup-theme-card small {
  color: inherit;
  font-size: 10px;
  opacity: 0.78;
}

.setup-cover-card {
  display: grid;
  gap: 7px;
  min-height: 106px;
  background: #fbfcfc;
}

.cover-mini {
  display: block;
  width: 100%;
  aspect-ratio: 0.72;
  border: 1px solid var(--cover-accent);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--cover-accent) 48%, transparent), transparent 35%),
    linear-gradient(145deg, var(--cover-bg), color-mix(in srgb, var(--cover-bg) 76%, #000 24%));
}

.preview-setup {
  background: #eef2f1;
}

.setup-cover-preview {
  display: grid;
  align-items: end;
  width: min(280px, 100%);
  aspect-ratio: 0.68;
  margin: 0 auto 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cover-accent) 72%, #111 28%);
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--cover-accent) 40%, transparent), transparent 28%),
    linear-gradient(155deg, var(--cover-bg), color-mix(in srgb, var(--cover-bg) 72%, #000 28%));
  color: var(--cover-fg);
  box-shadow: 0 22px 48px rgba(21, 31, 35, 0.24);
}

.setup-cover-preview div {
  display: grid;
  gap: 14px;
  height: 100%;
  padding: 34px 24px 26px;
  border: 1px solid color-mix(in srgb, var(--cover-accent) 75%, transparent);
  text-align: center;
}

.setup-cover-preview strong,
.setup-cover-preview span,
.setup-cover-preview em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.setup-cover-preview strong {
  align-self: center;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.04;
  text-transform: uppercase;
}

.setup-cover-preview span {
  color: color-mix(in srgb, var(--cover-fg) 78%, var(--cover-accent) 22%);
  font-size: 12px;
}

.setup-cover-preview em {
  align-self: end;
  color: color-mix(in srgb, var(--cover-fg) 72%, var(--cover-accent) 28%);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.generated-pages .checkline,
.publishing-account-list p {
  margin: 0;
}

.publishing-account-list p {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #263335;
  font-size: 12px;
}

.publishing-account-list p span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18866f;
}

.format-artifacts-card img,
.design-library img,
.asset-board-gallery img {
  display: block;
  width: 100%;
  border: 1px solid #d3dcda;
  border-radius: 7px;
  background: #ffffff;
  object-fit: contain;
}

.setup-modal-footer {
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 18px;
  border-top: 1px solid #d8dfde;
  background: #ffffff;
}

.setup-modal-footer span {
  min-width: 0;
  overflow: hidden;
  color: #60706e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-modal-footer div {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.setup-secondary,
.setup-primary {
  height: 34px;
  border-radius: 5px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 900;
}

.setup-secondary {
  border: 1px solid #c7d0ce;
  background: #ffffff;
  color: #263235;
}

.setup-primary {
  border: 1px solid #0d7c67;
  background: #0d7762;
  color: #ffffff;
}

.design-library {
  background: linear-gradient(180deg, rgba(236, 244, 241, 0.08), rgba(16, 27, 34, 0));
}

.builtin-asset-library {
  background: linear-gradient(180deg, rgba(11, 25, 31, 0.15), rgba(255, 255, 255, 0.02));
}

.design-library-boards {
  display: grid;
  gap: 10px;
}

.design-library-boards figure,
.asset-board-gallery figure {
  display: grid;
  gap: 6px;
  margin: 0;
}

.design-library-boards figcaption,
.asset-board-gallery figcaption {
  color: #c7d5d2;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}

.asset-board-gallery {
  display: grid;
  gap: 11px;
}

.asset-board-gallery figure {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  padding: 9px;
}

.asset-board-gallery figcaption {
  display: grid;
  gap: 2px;
}

.asset-board-gallery figcaption strong {
  color: #f1fbf7;
  font-size: 12px;
}

.asset-board-gallery figcaption span {
  color: #9fb1ac;
  font-size: 11px;
  line-height: 1.35;
}

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

.asset-category-grid button {
  display: grid;
  gap: 4px;
  min-height: 72px;
  border: 1px solid rgba(46, 198, 155, 0.2);
  border-radius: 7px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    #101b23;
  color: #eff8f5;
  padding: 10px;
  font: inherit;
  text-align: left;
  cursor: grab;
}

.asset-category-grid button:hover {
  border-color: rgba(46, 198, 155, 0.56);
  background: linear-gradient(140deg, rgba(25, 126, 101, 0.3), rgba(16, 27, 35, 0.98));
}

.asset-category-grid button:active {
  cursor: grabbing;
}

.asset-category-grid strong {
  font-size: 12px;
  font-weight: 900;
}

.asset-category-grid span {
  color: #aebfba;
  font-size: 11px;
  line-height: 1.35;
}

.design-composer {
  overflow: hidden;
  border-color: rgba(46, 198, 155, 0.2);
  background:
    linear-gradient(180deg, rgba(46, 198, 155, 0.08), rgba(255, 255, 255, 0.02)),
    #0b151c;
}

.composer-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.composer-header p {
  max-width: 660px;
}

.composer-actions,
.layer-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.composer-actions button,
.layer-order-actions button,
.nudge-grid button {
  min-height: 32px;
  border: 1px solid rgba(46, 198, 155, 0.26);
  border-radius: 6px;
  background: rgba(46, 198, 155, 0.1);
  color: #eef8f5;
  padding: 7px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.composer-actions button:hover,
.layer-order-actions button:hover,
.nudge-grid button:hover {
  border-color: rgba(46, 198, 155, 0.62);
  background: rgba(46, 198, 155, 0.18);
}

.asset-object-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 308px;
  overflow: auto;
  padding-right: 2px;
}

.asset-object-card {
  display: grid;
  grid-template-rows: 38px auto auto 1fr;
  gap: 5px;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  background:
    radial-gradient(circle at 22% 10%, rgba(245, 215, 119, 0.16), transparent 32%),
    rgba(255, 255, 255, 0.045);
  color: #eff8f5;
  padding: 9px;
  font: inherit;
  text-align: left;
  cursor: grab;
}

.asset-object-card:hover {
  border-color: rgba(245, 215, 119, 0.48);
  background:
    radial-gradient(circle at 22% 10%, rgba(245, 215, 119, 0.24), transparent 34%),
    rgba(46, 198, 155, 0.09);
}

.asset-object-card:active {
  cursor: grabbing;
}

.asset-object-card > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: linear-gradient(145deg, #f8df8d, #87652f);
  color: #15211c;
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.asset-object-card strong {
  color: #f7fbf8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.16;
}

.asset-object-card small,
.asset-object-card em {
  color: #aebfba;
  font-size: 10px;
  font-style: normal;
  line-height: 1.28;
}

.asset-object-card em {
  color: #d3dfdb;
}

.composer-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.cover-canvas {
  position: relative;
  width: min(100%, 320px);
  min-height: 0;
  aspect-ratio: 2 / 3;
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(245, 215, 119, 0.36);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 215, 119, 0.28), transparent 24%),
    radial-gradient(circle at 76% 78%, rgba(46, 198, 155, 0.22), transparent 30%),
    linear-gradient(145deg, #12231f 0%, #24473f 54%, #ead6a0 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.cover-safe-area {
  position: absolute;
  inset: 8%;
  z-index: 2;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  pointer-events: none;
}

.canvas-layer {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #fff8e2;
  padding: 0;
  font: inherit;
  line-height: 1.05;
  overflow: hidden;
  transform-origin: center;
  cursor: pointer;
  transition: outline-color 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.canvas-layer:hover,
.canvas-layer.selected {
  outline: 2px solid rgba(46, 198, 155, 0.92);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(46, 198, 155, 0.12);
  filter: saturate(1.06);
}

.canvas-layer span {
  display: block;
  max-width: 100%;
  padding: 4px;
  overflow-wrap: anywhere;
  text-align: center;
}

.canvas-layer.asset-foil-title,
.canvas-layer.asset-embossed-serif {
  color: #f5d777;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 2.1vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(48, 32, 4, 0.42), 0 14px 28px rgba(0, 0, 0, 0.38);
}

.canvas-layer.asset-chrome-title {
  color: #dfe8e9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 2vw, 29px);
  font-weight: 900;
  text-shadow: 0 1px 0 #ffffff, 0 14px 28px rgba(0, 0, 0, 0.4);
}

.canvas-layer.asset-neon-script {
  color: #83f2cc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 2vw, 29px);
  font-style: italic;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(131, 242, 204, 0.72);
}

.canvas-layer.asset-author-lockup {
  color: #f7ead0;
  font-size: clamp(11px, 1.4vw, 18px);
  font-weight: 850;
  text-transform: uppercase;
}

.canvas-layer.asset-foil-frame {
  border: 2px solid #f2d68c;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(83, 62, 20, 0.42), 0 22px 42px rgba(0, 0, 0, 0.28);
}

.canvas-layer.asset-vellum-panel,
.canvas-layer.asset-quote-card {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: rgba(255, 250, 240, 0.72);
  color: #183029;
  font-weight: 800;
}

.canvas-layer.asset-workid-seal,
.canvas-layer.asset-series-badge {
  border: 2px solid #17231f;
  border-radius: 999px;
  background: #fffaf0;
  color: #17231f;
  font-size: 12px;
  font-weight: 950;
}

.canvas-layer.asset-barcode-box,
.canvas-layer.asset-qr-mark {
  border: 2px solid #17231f;
  background:
    repeating-linear-gradient(90deg, #17231f 0 3px, transparent 3px 7px),
    #fffaf0;
  color: #17231f;
  font-size: 10px;
  font-weight: 950;
}

.canvas-layer.asset-qr-mark {
  background:
    linear-gradient(90deg, #17231f 16%, transparent 16% 34%, #17231f 34% 48%, transparent 48% 70%, #17231f 70%),
    #fffaf0;
}

.canvas-layer.asset-portrait-frame,
.canvas-layer.asset-silhouette,
.canvas-layer.asset-narrator-avatar,
.canvas-layer.asset-researcher-avatar {
  border: 2px solid rgba(247, 232, 183, 0.82);
  border-radius: 22%;
  background:
    radial-gradient(circle at 50% 32%, #f8e5bd 0 18%, transparent 19%),
    radial-gradient(ellipse at 50% 78%, #f8e5bd 0 34%, transparent 35%),
    linear-gradient(145deg, #365c55, #122821);
  color: transparent;
}

.canvas-layer.asset-book-stack,
.canvas-layer.asset-typewriter,
.canvas-layer.asset-quill-pen,
.canvas-layer.asset-glass-globe,
.canvas-layer.asset-microphone,
.canvas-layer.asset-headphones,
.canvas-layer.asset-waveform,
.canvas-layer.asset-spine-label,
.canvas-layer.asset-dust-jacket,
.canvas-layer.asset-flap-bio {
  border: 1px solid rgba(247, 232, 183, 0.56);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(245, 215, 119, 0.3), rgba(23, 42, 37, 0.82));
  color: #fff8e2;
  font-size: clamp(10px, 1.2vw, 18px);
  font-weight: 950;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.canvas-layer.asset-watercolor-wash,
.canvas-layer.asset-marble-shape,
.canvas-layer.asset-smoke-overlay,
.canvas-layer.asset-map-pin {
  border-radius: 45% 55% 48% 52%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(135deg, rgba(121, 183, 168, 0.88), rgba(232, 213, 165, 0.62));
  color: transparent;
  filter: blur(0.2px);
}

.canvas-layer.asset-smoke-overlay {
  background: radial-gradient(circle, rgba(73, 89, 90, 0.7), rgba(17, 26, 30, 0.04) 70%);
}

.canvas-layer.asset-map-pin {
  border-radius: 50% 50% 50% 12%;
  background: #f5d777;
}

.layer-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.layer-panel h3,
.layer-controls h3 {
  margin: 0;
  color: #eef8f5;
  font-size: 12px;
  font-weight: 900;
}

.layer-list,
.layer-controls {
  display: grid;
  gap: 8px;
}

.layer-list {
  max-height: 220px;
  overflow: auto;
}

.layer-list button {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: #eff8f5;
  padding: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.layer-list button.active,
.layer-list button:hover {
  border-color: rgba(46, 198, 155, 0.52);
  background: rgba(46, 198, 155, 0.11);
}

.layer-list strong {
  font-size: 11px;
  font-weight: 900;
}

.layer-list span {
  color: #aebfba;
  font-size: 10px;
}

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

.layer-controls label {
  display: grid;
  gap: 5px;
}

.layer-controls label span {
  color: #cbdad6;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.layer-controls input[type="range"] {
  width: 100%;
  accent-color: #2ec69b;
}

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

.pricing-grid div,
.store-readiness-grid div,
.store-policy-callout {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  padding: 9px;
}

.pricing-grid strong,
.store-readiness-grid strong,
.store-policy-callout strong {
  color: #eff7f4;
  font-size: 12px;
  font-weight: 900;
}

.pricing-grid span,
.store-readiness-grid span,
.store-policy-callout span,
.channel-note {
  color: #aebfba;
  font-size: 11px;
  line-height: 1.4;
}

.pricing-grid span,
.store-readiness-grid span {
  overflow-wrap: anywhere;
}

.store-policy-callout {
  margin-top: 10px;
  border-color: rgba(46, 198, 155, 0.25);
  background: rgba(46, 198, 155, 0.08);
}

.channel-note {
  margin: 10px 0 0;
}

.artifact-grid,
.author-profile-list {
  display: grid;
  gap: 8px;
}

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

.artifact-grid div,
.author-profile-list article {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  padding: 9px;
}

.artifact-grid strong,
.author-profile-list strong {
  color: #eff7f4;
  font-size: 12px;
}

.artifact-grid span,
.author-profile-list span,
.author-profile-list small {
  color: #aebfba;
  font-size: 11px;
  line-height: 1.35;
}

.install-steps {
  display: grid;
  gap: 9px;
}

.install-steps div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.install-steps strong {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(46, 198, 155, 0.2);
  color: #61e0b5;
  font-size: 11px;
}

.install-steps span {
  color: #c8d6d2;
  font-size: 12px;
  line-height: 1.4;
}

.help-panel code {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: #081017;
  color: #cfeee6;
  padding: 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.bottom-bar {
  gap: 18px;
  min-width: 0;
  padding: 0 14px;
  color: #cbdad6;
  font-size: 12px;
}

.bottom-bar span {
  white-space: nowrap;
}

.bottom-bar strong {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: #e5f5ed;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1320px) {
  body {
    overflow: auto;
  }

  .app-frame {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto;
  }

  .top-bar {
    grid-template-rows: auto auto;
    min-height: 82px;
    padding: 8px 12px;
  }

  .app-menu-strip,
  .command-strip {
    min-height: 34px;
  }

  .workflow-command-strip {
    flex-wrap: wrap;
    align-items: start;
    gap: 8px;
  }

  .project-actions {
    flex: 0 0 auto;
  }

  .document-switcher {
    flex: 1 1 260px;
    max-width: 360px;
  }

  .flow-steps {
    order: 4;
    flex: 0 0 100%;
    min-width: 0;
  }

  .support-actions {
    flex: 1 1 360px;
    justify-content: flex-end;
    min-width: 0;
  }

  .top-status {
    margin-left: 0;
  }

  .workspace {
    grid-template-columns: 300px 6px minmax(0, 1fr);
  }

  .right-resizer {
    display: none;
  }

  .workspace.layout-focus {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace.layout-proof,
  .workspace.layout-planning {
    grid-template-columns: minmax(0, 1fr);
  }

  .publish-pane {
    grid-column: 1 / -1;
    min-height: 720px;
  }

  .setup-body {
    grid-template-columns: minmax(260px, 0.85fr) minmax(420px, 1.15fr);
  }

  .preview-setup {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .preview-setup .setup-section-title,
  .preview-setup .setup-cover-preview {
    grid-column: 1;
  }

  .preview-setup .generated-pages,
  .preview-setup .publishing-account-list,
  .preview-setup .format-artifacts-card {
    grid-column: 2;
  }
}

@media (max-width: 780px) {
  html,
  body,
  .app-frame {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .book-switcher,
  .book-switcher select,
  .system-menu,
  .command-strip {
    width: 100%;
  }

  .app-menu-strip {
    align-items: start;
    flex-wrap: wrap;
    gap: 7px;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    padding-bottom: 7px;
  }

  .brand-lockup {
    width: 100%;
  }

  .top-status {
    order: 4;
    width: 100%;
    flex-basis: 100%;
  }

  .system-menu,
  .command-strip {
    flex: 0 0 100%;
    max-width: calc(100vw - 24px);
    flex-wrap: wrap;
    overflow: hidden;
    gap: 6px;
    padding-bottom: 2px;
  }

  .workflow-command-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .project-actions,
  .support-actions {
    flex-wrap: nowrap;
  }

  .flow-steps {
    flex: 0 0 680px;
    min-width: 680px;
  }

  .editor-toolbar {
    max-width: 100vw;
    flex-wrap: wrap;
    overflow: hidden;
  }

  .editor-pane {
    grid-template-rows: auto minmax(0, 1fr) 36px;
  }

  .layout-switcher {
    flex: 0 0 auto;
    justify-content: space-between;
    min-width: 0;
  }

  .system-menu .menu-group {
    flex: 0 1 auto;
  }

  .editor-toolbar select,
  .editor-toolbar button {
    flex: 1 1 auto;
    min-width: 0;
  }

  .menu-group > button,
  .menu-row button {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.06);
  }

  .menu-popover {
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
  }

  .workspace,
  .publish-pane {
    grid-template-columns: minmax(0, 1fr);
  }

  .pane-splitter {
    display: none;
  }

  .left-rail,
  .editor-pane,
  .publish-pane {
    grid-column: 1;
  }

  .left-rail {
    min-height: 560px;
  }

  .publish-pane {
    grid-template-rows: auto minmax(0, auto) auto;
  }

  .workflow-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 8px;
    padding-bottom: 8px;
  }

  .workflow-title {
    min-height: 48px;
  }

  .workflow-rail {
    padding-bottom: 4px;
  }

  .workflow-step {
    flex-basis: 136px;
  }

  .designer-stage {
    min-height: 620px;
  }

  .side-panel {
    min-height: 520px;
  }

  .settings-grid,
  .integration-grid,
  .store-grid,
  .service-grid,
  .isbn-grid,
  .handoff-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .language-issue {
    grid-template-columns: minmax(0, 1fr);
  }

  .language-issue span {
    justify-self: start;
  }

  .mindmap-canvas {
    grid-template-columns: minmax(0, 1fr);
    margin: 10px;
    padding: 22px 16px;
  }

  .editor-scroll {
    padding: 28px 20px;
  }

  .chapter-title-input {
    font-size: 34px;
  }

  .writing-area {
    min-height: 520px;
    font-size: 17px;
  }

  .book-preview {
    overflow-x: hidden;
    padding: 16px 8px;
  }

  .book-page {
    width: min(calc(100vw - 32px), var(--page-width));
    padding: 34px 26px 30px;
  }

  .setup-overlay {
    align-items: stretch;
    padding: 10px;
  }

  .setup-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .setup-tabs {
    height: auto;
    flex-wrap: wrap;
  }

  .setup-tabs span {
    flex: 1 1 50%;
    min-height: 38px;
  }

  .setup-body,
  .preview-setup {
    display: block;
  }

  .setup-column + .setup-column {
    border-left: 0;
    border-top: 1px solid #dde4e2;
  }

  .setup-title-grid,
  .setup-mode-grid,
  .setup-template-grid,
  .setup-theme-grid,
  .setup-cover-grid,
  .artifact-grid,
  .asset-category-grid,
  .asset-object-catalog,
  .pricing-grid,
  .store-readiness-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .composer-header {
    display: grid;
  }

  .composer-actions {
    width: 100%;
  }

  .composer-actions button {
    flex: 1;
  }

  .composer-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-canvas {
    width: min(100%, 300px);
  }

  .setup-cover-preview {
    max-width: 260px;
  }

  .setup-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-modal-footer div {
    width: 100%;
  }

  .setup-secondary,
  .setup-primary {
    flex: 1;
  }

  .bottom-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 9px 12px;
  }

  .bottom-bar strong {
    width: 100%;
    margin-left: 0;
  }
}
