[v-cloak] {
      display: none;
    }

canvas {
    border: 1px solid #ccc;
    display: block;
    width: 100%;
    height: 100%;
}

.sidebar {
    display: flex;
    flex-direction: column;
    width: 280px;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow: hidden;
    align-self: flex-start;
}

.sidebar .nav-link {
    color: inherit;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
}

.pages-section {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow-y: auto;
}

.page-thumb {
    width: 60px;
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.page-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-width: 2px;
    border-radius: 0.5rem;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.page-grid-item img {
    max-width: 100%;
    height: auto;
}

.page-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.publication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.publication-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 2rem rgba(33, 37, 41, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.publication-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 1.5rem 3rem rgba(33, 37, 41, 0.16);
}

.publication-card__cover {
    position: relative;
    padding-top: 140%;
    background: #f8f9fa;
}

.publication-card__cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.publication-card__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: inherit;
}

.publication-card__body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.publication-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0;
}

.publication-card__meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.publication-card__lock {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(33, 37, 41, 0.7);
    color: #fff;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.publication-cover-preview {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: #f8f9fa;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.publication-cover-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.publication-cover-preview__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 37, 41, 0.45);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.publication-detail {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.12);
    padding: 2rem;
}

.publication-detail__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.publication-detail__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.publication-detail__content {
    margin-top: 1.5rem;
}

.full-height {
    min-height: 100vh;
}

.canvas-container {
    flex: 1 1 0;
}

.canvas-stage {
    position: relative;
    width: 992px;
    height: 1275px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    pointer-events: none;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 0.25rem;
}

.canvas-loader__spinner {
    width: 3rem;
    height: 3rem;
}

.canvas-loader__message {
    font-weight: 600;
}

/* Limit versions dropdown height */
.versions-dropdown {
    max-height: 300px;
    overflow-y: auto;
}

.admin-background {
    background-color: #e6f3ff;
    min-height: 100vh;
}

.admin-banner {
    background-color: #0d6efd;
    color: #fff;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.body-modal-open {
    overflow: hidden;
}

.vue-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1050;
}

.vue-modal {
    background-color: #fff;
    border-radius: 0.75rem;
    width: min(640px, calc(100vw - 3rem));
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.35);
}

.vue-modal--wide {
    width: min(1120px, calc(100vw - 3rem));
}

.vue-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    gap: 1rem;
}

.vue-modal__title-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vue-modal__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.vue-modal__subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
}

.vue-modal__body {
    padding: 1.25rem;
    overflow-y: auto;
}

.vue-modal__body iframe {
    width: 100%;
    border: none;
}

.vue-modal-overlay--floating {
    background-color: transparent;
    pointer-events: none;
    display: block;
    padding: 0;
}

.vue-modal--floating {
    position: fixed;
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.35);
    max-height: none;
    pointer-events: auto;
    min-width: 320px;
    min-height: 200px;
}

.embed-modal__drag-handle {
    cursor: move;
    user-select: none;
}

.embed-modal__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.embed-modal__button {
    border: none;
    background: transparent;
    color: #0f172a;
    padding: 0.25rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.embed-modal__button:hover,
.embed-modal__button:focus {
    background-color: rgba(148, 163, 184, 0.2);
    outline: none;
}

.embed-modal__button:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.embed-modal__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.embed-modal__nav {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.embed-modal__tab {
    flex: 1 1 0;
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.embed-modal__tab:hover,
.embed-modal__tab:focus {
    color: #0f172a;
    background-color: rgba(148, 163, 184, 0.1);
    outline: none;
}

.embed-modal__tab--active {
    color: #0f172a;
    border-bottom: 2px solid #0d6efd;
}

.embed-modal__tab:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

.embed-modal__pane {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.embed-modal__content,
.embed-modal__code,
.embed-modal__options {
    flex: 1 1 auto;
    padding: 1rem 1.25rem;
    overflow: hidden;
}

.embed-modal__content iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
}

.embed-modal__code {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.embed-modal__options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.embed-modal__options-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.anchor-modal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

.anchor-modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.anchor-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.anchor-modal__error {
    color: #dc3545;
    font-size: 0.875rem;
}

.embed-modal__legend {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.embed-modal__options-section .form-check {
    margin-bottom: 0.25rem;
}

.embed-modal__options-section .form-check:last-child {
    margin-bottom: 0;
}

.embed-modal__textarea {
    flex: 1 1 auto;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    min-height: 200px;
    resize: vertical;
}

.embed-modal__code-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.page-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #f8faff 0%, #eef4ff 100%);
    border: 1px solid rgba(13, 110, 253, 0.12);
    box-shadow: 0 0.75rem 2rem rgba(13, 110, 253, 0.08);
}

.page-heading__info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-heading__label {
    letter-spacing: 0.2em;
}

.page-heading__title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #0f172a;
}

.page-heading__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.page-heading__badge {
    --page-heading-badge-bg: rgba(15, 23, 42, 0.04);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background-color: var(--page-heading-badge-bg);
    color: #0f172a;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.page-heading__badge--highlight {
    --page-heading-badge-bg: rgba(13, 110, 253, 0.15);
    color: #0d6efd;
}

.page-heading__badge--button {
    border: none;
    background-color: var(--page-heading-badge-bg);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.page-heading__badge--button:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
}

.page-heading__badge--button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.08);
}

.page-heading__badge--button:disabled,
.page-heading__badge--disabled {
    cursor: not-allowed;
    opacity: 0.65;
    box-shadow: none;
}

.page-heading__dropdown .dropdown-toggle::after {
    margin-left: 0.35rem;
}

.page-heading__menu {
    min-width: 220px;
    padding: 0.5rem 0;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.page-heading__menu .dropdown-item.active,
.page-heading__menu .dropdown-item:active {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.page-heading__nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-heading__nav .btn {
    min-width: 110px;
    font-weight: 600;
}

@media (max-width: 576px) {
    .page-heading {
        padding: 1.25rem;
        align-items: flex-start;
    }

    .page-heading__nav {
        width: 100%;
        justify-content: space-between;
    }

    .page-heading__nav .btn {
        flex: 1 1 0;
    }
}
