body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f7f8fa;
    margin: 0;
}

.bookcreate-auth-container,
.bookcreate-app {
    max-width: 1200px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
}

.bookcreate-form p {
    margin-bottom: 16px;
}

.bookcreate-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.bookcreate-form input,
.bookcreate-form textarea,
.bookcreate-app select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.bookcreate-button,
.bookcreate-button-secondary {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.bookcreate-button {
    background: #2563eb;
    color: #fff;
}

.bookcreate-button:hover {
    background: #1d4ed8;
}

.bookcreate-button-secondary {
    background: #e2e8f0;
    color: #1e293b;
}

.bookcreate-alert {
    background: #fee2e2;
    border: 1px solid #fecaca;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.bc-app-alert-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, calc(100% - 32px));
    z-index: 50;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.bc-app-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 600;
    box-shadow: 0 15px 60px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
}

.bc-app-alert__body {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.bc-app-alert__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.bc-app-alert__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

.bc-app-alert__action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid currentColor;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.bc-app-alert__action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.bc-app-alert__action--primary {
    color: #0f172a;
    background: #a7f3d0;
    border-color: #34d399;
}

.bc-app-alert__action--link {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
    color: inherit;
}

.bc-app-alert__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: 0.5rem;
    border-radius: 9999px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.bc-app-alert__close:hover,
.bc-app-alert__close:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    outline: none;
}

.bc-app-alert strong {
    font-weight: 700;
}

.bc-app-alert--error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fca5a5;
    color: #7f1d1d;
}

.bc-app-alert--success {
    background: linear-gradient(135deg, #ecfdf3, #dcfce7);
    border-color: #86efac;
    color: #065f46;
}

.bc-library-book__cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 12rem;
    overflow: hidden;
    background: #f8fafc;
}

.bc-library-book__cover-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid #e2e8f0;
}

.bc-library-book__cover-placeholder {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 1rem;
    color: #ffffff;
}

.bookcreate-switch-link {
    margin-top: 24px;
}

.bookcreate-app__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.bc-media-modal {
    width: min(900px, 95vw);
    max-width: 1200px;
    max-height: 80vh;
}

@media (min-width: 768px) {
    .bc-media-modal {
        width: min(1100px, 90vw);
    }
}

@media (max-width: 768px) {
    .bc-media-modal {
        max-height: 90vh;
    }
}

.bc-media-modal__tabs {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.25rem;
}

.bc-media-modal__tab {
    padding: 0.5rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s ease;
}

.bc-media-modal__tab:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.bc-media-modal__tab.is-active {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
    box-shadow: inset 0 0 0 1px #7dd3fc;
}

.bc-media-modal__preview {
    width: 100%;
    max-width: 320px;
    min-width: 260px;
}

.bc-media-modal__preview-image {
    max-width: 300px;
    width: 100%;
    height: auto;
}

.bc-editor-main {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 12px;
}

.bc-editor__help-intro {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.5;
}

.bc-editor__help-intro i[data-lucide] {
    color: #0284c7;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.bc-block-card {
    outline: 1px solid #fff;
    outline-offset: -1px;
}

.bc-block {
    border-radius: 16px;
    position: relative;
    border: 0 dashed #d3d3d3;
    box-sizing: border-box;
}

.bc-block--inactive {
    border-style: dashed;
    border-color: #d3d3d3;
    border-width: 0;
}

.bc-block__notes-indicator {
    align-items: center;
    background: #facc15;
    border-radius: 9999px;
    color: #92400e;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    line-height: 1.1;
    padding: 6px 10px;
}

.bc-block--active,
.bc-block--selected {
    border-width: 3px;
    border-style: solid;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 1px #16a34a inset, 0 12px 24px rgba(22, 163, 74, 0.08) !important;
}

.bc-toc__link--active .bc-toc__title {
    color: #0066cc;
    font-weight: 700;
}

.bc-toc__link--active .bc-toc__meta {
    color: #0a4fa3;
    font-weight: 600;
}

.bc-toc__status {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 1.25rem;
}

.bc-toc__status--translated {
    color: #16a34a;
}

.bc-toc__status--pending {
    color: #475569;
}

.bc-app-body {
    display: grid;
    gap: 1.25rem;
    align-items: start;
    --bc-editor-footer-height: 3.5rem;
    padding-bottom: calc(1rem + var(--bc-editor-footer-height));
    grid-template-columns: 270px minmax(0, 1fr) 320px;
}

.bc-app-sidebar {
    max-height: calc(100vh - var(--bc-editor-header, calc(var(--app-shell-top, 3rem) + 7rem)) - 1.25rem);
    overflow-y: auto;
}

.bc-app-sidebar {
    position: sticky;
    top: var(--bc-editor-header, calc(var(--app-shell-top, 3rem) + 7rem));
}

.bc-app-main {
    min-height: 320px;
}

.bc-toc-panel {
    position: fixed;
    top: 185px;
    left: 20px;
    bottom: 60px;
    max-width: 280px;
    overflow: auto;
    z-index: 20;
}

.bc-editor-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
}

@media (min-width: 768px) {
    .bc-app-sidebar--toc {
        grid-column: 1;
    }

    .bc-app-main {
        grid-column: 2;
    }

    .bc-app-sidebar--inspector {
        grid-column: 3;
    }
}

@media (max-width: 767px) {
    .bc-app-body {
        grid-template-columns: 1fr;
    }
}

.bc-app-sidebar--toc li {
    border: 0 !important;
    background: #ffffff !important;
}

.bc-focus-mode {
    --bc-focus-top: calc(var(--bc-editor-header, calc(var(--app-shell-top, 3rem) + 7rem)) + 1.5rem);
    --bc-focus-bottom: calc(var(--bc-editor-footer-height, 3.5rem) + 1.5rem);
}

.bc-focus-mode .bc-app-body {
    grid-template-columns: minmax(0, 1fr);
}

.bc-focus-mode .bc-app-header {
    display: none;
}

.bc-focus-mode .bc-app-sidebar--toc,
.bc-focus-mode .bc-app-sidebar--inspector {
    display: none !important;
}

.bc-focus-mode .bc-app-main {
    grid-column: 1 / -1;
}

.bc-focus-mode .bc-editor-main {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.bc-focus-mode .bc-editor__help-intro {
    display: none;
}

.bc-focus-mode [data-add-trigger],
.bc-focus-mode .bc-block__delete,
.bc-focus-mode .bc-block__notes-indicator {
    display: none !important;
}

.bc-focus-mode .bc-block:not(.is-focused) {
    display: none !important;
}

.bc-focus-overlay {
    position: fixed;
    top: var(--bc-focus-top, calc(var(--app-shell-top, 3rem) + 9rem));
    bottom: var(--bc-focus-bottom, 5rem);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 50;
}

.bc-focus-wrapper {
    position: fixed;
    top: var(--bc-focus-top, calc(var(--app-shell-top, 3rem) + 9rem));
    bottom: var(--bc-focus-bottom, 5rem);
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 60;
    pointer-events: none;
}

.bc-focus-wrapper .bc-block {
    pointer-events: auto;
}

.bc-focus-mode .bc-block {
    transition: opacity 0.2s ease;
}

.bc-focus-mode .bc-block.is-focused {
    max-width: 1100px;
    width: min(1100px, 100%);
    margin: 0;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.bc-focus-mode .bc-block.is-focused .editor-wrapper {
    --editor-min-height: 70vh !important;
}

.bc-focus-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 2;
}

.bc-focus-close:hover {
    color: #0f172a;
    border-color: #bae6fd;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.2);
}

.bc-focus-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.3);
}

body.bc-focus-scroll-lock,
html.bc-focus-scroll-lock {
    overflow: hidden;
}

.bc-preview {
    padding: 1.5rem 1rem 2.5rem;
    background: #e5e7eb;
}

.bc-preview__wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.bc-preview__panel {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
    padding: 2.5rem 2.75rem 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bc-preview__cover-wrapper {
    max-width: 50%;
    margin: 0 auto 200px;
}

.bc-preview__cover-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 16px;
}

.bc-book-meta__cover-preview {
    max-width: 150px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 14px;
}

.bc-preview__authors {
    margin: 0 0 200px;
    text-align: center;
    font-size: 18px;
    color: #334155;
}

.bc-preview__header {
    margin-bottom: 200px;
    text-align: center;
}

.bc-preview__book-title {
    font-size: 38px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.6rem;
}

.bc-preview__book-subtitle {
    margin: 0;
    color: #475569;
    font-size: 17px;
}

.bc-preview__section-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.75rem;
}

.bc-preview__toc {
    margin-bottom: 200px;
}

.bc-preview__publisher {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 200px;
}

.bc-preview__publisher-logo img {
    max-width: 250px;
    height: auto;
    display: block;
}

.bc-preview__publisher-name {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
}

.bc-preview-toc__list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bc-preview-toc__item {
    padding: 0.25rem 0.1rem;
}

.bc-preview-toc__item--child {
    padding-left: 1.5rem;
}

.bc-preview-toc__children {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bc-preview-toc__link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.65rem;
    color: #0f172a;
    text-decoration: none;
}

.bc-preview-toc__number {
    font-weight: 700;
    color: #0f172a;
    min-width: 2.5rem;
    text-align: right;
}

.bc-preview-toc__title {
    font-weight: 600;
    color: #0f172a;
}

.bc-preview-toc__empty {
    padding: 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
    background: #f8fafc;
    font-size: 14px;
}

.bc-preview__content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bc-preview-heading {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
}

.bc-preview-heading--paragraph {
    margin-left: 1.5rem;
}

.bc-preview-number {
    min-width: 3rem;
    text-align: right;
    font-weight: 700;
    color: #0f172a;
}

.bc-preview-content,
.bc-preview-content .bc-preview-block__content {
    text-align: justify;
}

.bc-preview__chapter-title {
    font-size: 35px;
    font-weight: 800;
    color: #0066cc;
    margin: 0 0 0.35rem;
}

.bc-preview__paragraph-title {
    font-size: 25px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 0.35rem;
}

.bc-preview-content h1 {
    font-size: 26px;
    font-weight: 800;
}

.bc-preview-content h2 {
    font-size: 30px;
    font-weight: 700;
}

.bc-preview-content h3 {
    font-size: 25px;
    font-weight: 700;
}

.bc-preview-content h4,
.bc-preview-content h5,
.bc-preview-content h6 {
    font-size: 20px;
    font-weight: 700;
}

.bc-preview-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1.25rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.bc-preview-block:last-child {
    border-bottom: none;
}

.bc-preview-block__subtitle {
    color: #475569;
    font-size: 16px;
    margin: 0;
}

.bc-preview-block__eyebrow {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #64748b;
    margin: 0;
}

.bc-preview-block__content {
    color: #0f172a;
    font-size: 16px;
    line-height: 1.7;
}

.bc-preview-block__content p {
    margin: 0 0 0.85em;
}

.bc-preview-block__quote {
    border-left: 3px solid #cbd5e1;
    padding-left: 1rem;
    color: #0f172a;
    font-style: italic;
}

.bc-preview-block__meta {
    color: #475569;
    font-size: 14px;
    margin-top: 0.35rem;
}

.bc-preview-block__note {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 1rem;
}

.bc-preview-block__figure,
.bc-preview-block__blank {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bc-preview-block__img {
    border-radius: 14px;
    max-width: 100%;
    height: auto;
}

.bc-preview-block__caption {
    color: #475569;
    font-size: 13px;
}

.bc-preview__blank-page {
    width: 100%;
    height: 400px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    text-align: center;
}

.bc-preview__blank-page-label {
    color: #cbd5e1;
    font-size: 16px;
    font-weight: 600;
}

.bc-preview__blank-page--with-image {
    flex-direction: column;
    gap: 1rem;
}

.bc-preview__blank-page.bc-page-align-top {
    align-items: flex-start;
}

.bc-preview__blank-page.bc-page-align-center {
    align-items: center;
}

.bc-preview__blank-page.bc-page-align-bottom {
    align-items: flex-end;
}

.bc-preview .bc-preview__chapter-title {
    font-size: 45px;
    font-weight: 800;
    color: #0f172a;
}

.bc-preview .bc-preview__paragraph-title {
    font-size: 35px;
    font-weight: 700;
    color: #0f172a;
}

.bc-preview .bc-preview-content h2 {
    font-size: 30px;
    font-weight: 700;
}

.bc-preview .bc-preview-content h3 {
    font-size: 25px;
    font-weight: 700;
}

.bc-preview .bc-preview-content h4,
.bc-preview .bc-preview-content h5,
.bc-preview .bc-preview-content h6 {
    font-size: 20px;
    font-weight: 700;
}

.bc-preview__blank-page .bc-page-image {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 100%;
    width: 100%;
}

.bc-preview__blank-page .bc-page-image.bc-img-left,
.bc-preview__blank-page .bc-page-image.alignleft {
    align-items: flex-start;
    margin-right: auto;
    text-align: left;
}

.bc-preview__blank-page .bc-page-image.bc-img-center,
.bc-preview__blank-page .bc-page-image.aligncenter {
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.bc-preview__blank-page .bc-page-image.bc-img-right,
.bc-preview__blank-page .bc-page-image.alignright {
    align-items: flex-end;
    margin-left: auto;
    text-align: right;
}

.bc-preview__blank-page .bc-page-image .bc-page-image-media {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.bc-preview__blank-page .bc-page-image.bc-width-25 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.alignleft.bc-width-25 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.aligncenter.bc-width-25 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.alignright.bc-width-25 .bc-page-image-media {
    max-width: 25%;
}

.bc-preview__blank-page .bc-page-image.bc-width-50 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.alignleft.bc-width-50 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.aligncenter.bc-width-50 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.alignright.bc-width-50 .bc-page-image-media {
    max-width: 50%;
}

.bc-preview__blank-page .bc-page-image.bc-width-75 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.alignleft.bc-width-75 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.aligncenter.bc-width-75 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.alignright.bc-width-75 .bc-page-image-media {
    max-width: 75%;
}

.bc-preview__blank-page .bc-page-image.bc-width-100 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.alignleft.bc-width-100 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.aligncenter.bc-width-100 .bc-page-image-media,
.bc-preview__blank-page .bc-page-image.alignright.bc-width-100 .bc-page-image-media {
    max-width: 100%;
}

.bc-preview__blank-page-caption {
    font-size: 13px;
    color: #475569;
}

.bc-preview-block__empty {
    min-height: 200px;
    background: #fff;
    border-radius: 12px;
}

.bc-preview__scroll-top {
    position: sticky;
    bottom: 1.25rem;
    align-self: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: #0ea5e9;
    color: #fff;
    border: none;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 30;
}

.bc-preview__scroll-top-icon {
    width: 1.35rem;
    height: 1.35rem;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
}

.bc-preview__scroll-top:hover {
    background: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(56, 189, 248, 0.35);
}

.bc-page-block .bc-page-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    width: 100%;
    text-align: center;
    gap: 1rem;
}

.bc-page-block .bc-page-align-top {
    align-items: flex-start;
}

.bc-page-block .bc-page-align-center {
    align-items: center;
}

.bc-page-block .bc-page-align-bottom {
    align-items: flex-end;
}

.bc-page-block .bc-page-image {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 100%;
}

.bc-page-block .bc-page-image-media {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.bc-page-block .bc-page-image-caption {
    font-size: 12px;
    color: #475569;
    text-align: center;
}
.bc-page-block .bc-page-image-wrapper .bc-page-image {
    align-items: center;
}
.bc-page-block .bc-page-image-wrapper .bc-page-image.bc-img-left,
.bc-page-block .bc-page-image-wrapper .bc-page-image.alignleft {
    align-items: flex-start;
    margin-right: auto;
    text-align: left;
}
.bc-page-block .bc-page-image-wrapper .bc-page-image.bc-img-center,
.bc-page-block .bc-page-image-wrapper .bc-page-image.aligncenter {
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.bc-page-block .bc-page-image-wrapper .bc-page-image.bc-img-right,
.bc-page-block .bc-page-image-wrapper .bc-page-image.alignright {
    align-items: flex-end;
    margin-left: auto;
    text-align: right;
}
.bc-page-block .bc-page-image-wrapper .bc-page-image .bc-page-image-media {
    width: 100%;
    height: auto;
}
.bc-page-block .bc-page-image.bc-width-25 .bc-page-image-media,
.bc-page-block .bc-page-image.alignleft.bc-width-25 .bc-page-image-media,
.bc-page-block .bc-page-image.aligncenter.bc-width-25 .bc-page-image-media,
.bc-page-block .bc-page-image.alignright.bc-width-25 .bc-page-image-media {
    max-width: 25%;
}
.bc-page-block .bc-page-image.bc-width-50 .bc-page-image-media,
.bc-page-block .bc-page-image.alignleft.bc-width-50 .bc-page-image-media,
.bc-page-block .bc-page-image.aligncenter.bc-width-50 .bc-page-image-media,
.bc-page-block .bc-page-image.alignright.bc-width-50 .bc-page-image-media {
    max-width: 50%;
}
.bc-page-block .bc-page-image.bc-width-75 .bc-page-image-media,
.bc-page-block .bc-page-image.alignleft.bc-width-75 .bc-page-image-media,
.bc-page-block .bc-page-image.aligncenter.bc-width-75 .bc-page-image-media,
.bc-page-block .bc-page-image.alignright.bc-width-75 .bc-page-image-media {
    max-width: 75%;
}
.bc-page-block .bc-page-image.bc-width-100 .bc-page-image-media,
.bc-page-block .bc-page-image.alignleft.bc-width-100 .bc-page-image-media,
.bc-page-block .bc-page-image.aligncenter.bc-width-100 .bc-page-image-media,
.bc-page-block .bc-page-image.alignright.bc-width-100 .bc-page-image-media {
    max-width: 100%;
}

.bc-img-left {
    align-self: flex-start;
    text-align: left;
}

.bc-img-center {
    align-self: center;
    text-align: center;
}

.bc-img-right {
    align-self: flex-end;
    text-align: right;
}

.bc-media-modal__primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 16px;
    border-radius: 10px;
    background: #0284c7;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
    border: 1px solid #0284c7;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.bc-media-modal__primary-btn:hover {
    background: #0369a1;
    box-shadow: 0 6px 14px rgba(3, 105, 161, 0.25);
    transform: translateY(-1px);
}

.bc-media-modal__primary-btn:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 2px;
}

.bc-media-modal__primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.bc-media-modal__library {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .bc-media-modal__library {
        grid-template-columns: 1fr;
    }
}

.bc-media-modal__library-left {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bc-media-modal__library-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bc-media-modal__filters {
    display: inline-flex;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.35rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
}

.bc-media-modal__filter {
    border: 1px solid transparent;
    background: transparent;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s ease;
}

.bc-media-modal__filter:hover {
    background: #e2e8f0;
}

.bc-media-modal__filter.is-active {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.bc-media-modal__thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .bc-media-modal__thumb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.bc-media-modal__thumb {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.6rem;
    background: #fff;
    text-align: left;
    transition: all 0.15s ease;
}

.bc-media-modal__thumb:hover {
    border-color: #94a3b8;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.bc-media-modal__thumb.is-selected {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4);
}

.bc-media-modal__thumb-frame {
    width: 100%;
    height: 150px;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bc-media-modal__thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bc-media-modal__thumb-placeholder {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    background: #0ea5e9;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.25);
}

.bc-media-modal__thumb-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.bc-media-modal__pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

figure.bc-figure,
.bc-figure {
    display: block;
}

.bc-figure-image,
.bc-figure img {
    width: 100%;
    height: auto;
    display: block;
}

figure.bc-figure.alignleft,
img.alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
    display: block;
}

figure.bc-figure.aligncenter,
img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    clear: both;
}

figure.bc-figure.alignright,
img.alignright {
    float: right;
    margin: 0 0 1rem 1rem;
    display: block;
}

figure.bc-figure.alignleft,
figure.bc-figure.alignright {
    max-width: 100%;
}

figure.bc-figure.bc-width-25,
img.bc-width-25 {
    width: 25%;
    max-width: 100%;
}

figure.bc-figure.bc-width-50,
img.bc-width-50 {
    width: 50%;
    max-width: 100%;
}

figure.bc-figure.bc-width-75,
img.bc-width-75 {
    width: 75%;
    max-width: 100%;
}

figure.bc-figure.bc-width-100,
img.bc-width-100 {
    width: 100%;
    max-width: 100%;
}

figure.bc-figure figcaption,
.bc-figure-caption {
    display: block;
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
    text-align: center;
}

.bookcreate-app__actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.bookcreate-app__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 32px;
}

.bookcreate-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bookcreate-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-height: 200px;
    overflow: hidden;
}

.bookcreate-list li {
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
    cursor: pointer;
}

.bookcreate-list li:last-child {
    border-bottom: none;
}

.bookcreate-list li.is-active {
    background: #e0f2fe;
}

.bookcreate-hidden {
    display: none;
}

.bookcreate-feedback {
    margin-top: 24px;
    padding: 12px 16px;
    background: #d1fae5;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    display: none;
}

.bookcreate-feedback.is-error {
    background: #fee2e2;
    border-color: #fecaca;
}

.bookcreate-logout {
    color: #dc2626;
    text-decoration: none;
}

@media (max-width: 768px) {
    .bookcreate-app__body {
        grid-template-columns: 1fr;
    }
}

/* Fallback landing page */
.bookcreate-landing {
    max-width: 640px;
    margin: 4rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.bookcreate-landing h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.bookcreate-landing p {
    margin-bottom: 1rem;
    color: #4b5563;
}

/* TipTap rich text editor */
.editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.editor-btn:hover:not(:disabled) {
    background: #f8fafc;
}

.editor-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.editor-wrapper {
    --editor-min-height: 200px;
    min-height: var(--editor-min-height);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    overflow: hidden;
    padding: 10px;
}

.editor-wrapper figure.bc-figure,
.editor-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 0 1rem;
}

.editor-wrapper figure.bc-figure {
    width: 100%;
    clear: both;
}

.editor-wrapper .bc-figure-image {
    width: 100%;
    height: auto;
    display: block;
}

.editor-wrapper figure.bc-figure.alignleft,
.editor-wrapper img.alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
    display: block;
}

.editor-wrapper figure.bc-figure.aligncenter,
.editor-wrapper img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    clear: both;
}

.editor-wrapper figure.bc-figure.alignright,
.editor-wrapper img.alignright {
    float: right;
    margin: 0 0 1rem 1rem;
    display: block;
}

.editor-wrapper figure.bc-figure.alignleft,
.editor-wrapper figure.bc-figure.alignright {
    max-width: 100%;
}

.editor-wrapper figure.bc-figure.bc-width-25,
.editor-wrapper img.bc-width-25 {
    width: 25%;
    max-width: 100%;
}

.editor-wrapper figure.bc-figure.bc-width-50,
.editor-wrapper img.bc-width-50 {
    width: 50%;
    max-width: 100%;
}

.editor-wrapper figure.bc-figure.bc-width-75,
.editor-wrapper img.bc-width-75 {
    width: 75%;
    max-width: 100%;
}

.editor-wrapper figure.bc-figure.bc-width-100,
.editor-wrapper img.bc-width-100 {
    width: 100%;
    max-width: 100%;
}

.editor-wrapper figure.bc-figure figcaption,
.editor-wrapper .bc-figure-caption {
    display: block;
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
    text-align: center;
}

.editor-wrapper.quote {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.editor-wrapper.note {
    background: #fffbeb;
    border-color: #f59e0b;
}

.editor-surface {
    min-height: var(--editor-min-height);
}

.editor-surface.is-active {
    box-shadow: inset 0 0 0 2px #bae6fd;
}

.wysiwyg-textarea {
    width: 100%;
    min-height: var(--editor-min-height);
    border: 0;
    padding: 12px;
    resize: vertical;
    background: transparent;
    outline: none;
}

.mce-content-body {
    padding: 14px 16px;
}

.tox-tinymce {
    border: none !important;
    box-shadow: none !important;
}

.tox .tox-toolbar__primary {
    background: #f8fafc;
}

.tox .tox-edit-area__iframe {
    background: #ffffff;
}

.editor-wrapper ul,
.editor-wrapper ol {
    padding-left: 1.5rem;
    margin: 0 0 0.75rem 0;
}

.editor-wrapper blockquote {
    border-left: 3px solid #cbd5e1;
    margin: 0 0 0.75rem 0;
    padding-left: 0.75rem;
    color: #475569;
}

.editor-wrapper pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.75rem;
    border-radius: 8px;
    overflow: auto;
}

.bc-book-cover-img {
    height: auto;
    width: 100%;
    display: block;
    object-fit: cover;
}

.bc-translate-btn {
    background-color: #2563eb;
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid #1d4ed8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
    transition: background-color 150ms ease, transform 150ms ease;
}

.bc-translate-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.bc-translate-btn:disabled,
.bc-translate-btn.bc-translate-btn--loading {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

.bc-translate-btn .lucide {
    stroke: currentColor;
}

.bc-bookdesigner {
    color: #0f172a;
}

.bc-bd-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.bc-bd-panel__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.6rem;
}

.bc-bd-fields {
    display: grid;
    gap: 0.75rem;
}

.bc-bd-fields--compact {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.bc-bd-field {
    display: grid;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #334155;
}

.bc-bd-input {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.bc-bd-input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
    background: #ffffff;
}

.bc-bd-preview {
    position: relative;
    background: linear-gradient(120deg, #e0f2fe 0%, #e2e8f0 50%, #e0f2fe 100%);
    border-radius: 18px;
    padding: 1.5rem;
    min-height: 100%;
}

.bc-bd-preview__page {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 24mm;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.bc-bd-preview__page .bc-block-chapter,
.bc-bd-preview__page .bc-block-paragraph,
.bc-bd-preview__page .bc-block-quote,
.bc-bd-preview__page .bc-block-note,
.bc-bd-preview__page .bc-block-image {
    margin-bottom: 18px;
}

.bc-bd-preview__page .bc-paragraph-body {
    margin-top: 0.35rem;
}

.bc-bd-preview__page .bc-block-quote {
    border-left: 3px solid currentColor;
    padding-left: 1rem;
    font-style: italic;
}

.bc-bd-preview__page .bc-block-note {
    background: #f8fafc;
    border: 1px dashed currentColor;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
}

.bc-bd-preview__page .bc-block-image {
    border: 2px dashed #0ea5e9;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
}

.bc-bd-preview__page .bc-figure {
    background: #e2e8f0;
    border-radius: 10px;
    padding: 2.5rem 1.5rem;
    font-weight: 600;
    color: #0f172a;
}

.bc-bd-preview__page .bc-figure-caption {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 0.4rem;
}

.bc-bd-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-weight: 600;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 18px;
}

.bc-bd-json {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 14px;
    min-height: 200px;
    overflow: auto;
    font-size: 0.85rem;
    line-height: 1.45;
}

.bc-designer-preview {
    min-height: clamp(720px, calc(100vh - 12rem), 920px);
}

.bc-designer-preview iframe {
    min-height: clamp(720px, calc(100vh - 12rem), 920px);
}

.bc-designer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .bc-designer-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    }
    .bc-designer-sidebar {
        grid-column: 1;
    }
    .bc-designer-preview {
        grid-column: 2;
    }
    .bc-designer-tools {
        grid-column: 3;
    }
    .bc-designer-preview,
    .bc-designer-tools {
        min-width: 0;
    }
}

#bc-paged-preview-scroll {
    height: 100%;
    overflow: auto;
}

.bc-preview-host,
#bc-preview-host {
    width: 100%;
    height: 100%;
    min-height: 320px;
}

.bc-paged-pages-wrapper iframe {
    display: block;
}

.bg-emerald-600 {
    background-color: #059669;
}

.text-white {
    color: #ffffff;
}

.hover\:bg-emerald-700:hover {
    background-color: #047857;
}
