.content-website-app {
    --website-text: #25252a;
    --website-muted: rgba(37, 37, 42, .68);
    --website-border: rgba(37, 37, 42, .16);
}

.content-website-app .content-website-title {
    color: var(--website-text) !important;
}

.content-website-app .content-website-muted {
    color: var(--website-muted) !important;
    opacity: 1 !important;
}

.content-website-field.input-style {
    margin-bottom: 0 !important;
}

.content-website-field--brief.input-style {
    margin-bottom: 15px !important;
}

.content-website-field.input-style .form-control {
    font-size: 16px;
    line-height: 1.5;
}

/* Базовый style.css задаёт date ширину от viewport. В сетке формы поле должно
   занимать только свою колонку, иначе оно перекрывает соседнее время. */
.content-website-field.input-style input[type="date"] {
    min-width: 0;
    width: 100%;
}

.content-website-field.input-style textarea.form-control,
.content-website-field.input-style textarea.form-control:focus {
    height: auto;
    min-height: 152px;
    padding: 14px 13px !important;
}

.content-website-field--poem.input-style textarea.form-control,
.content-website-field--poem.input-style textarea.form-control:focus {
    min-height: 240px;
}

.content-website-field--lyrics.input-style textarea.form-control,
.content-website-field--lyrics.input-style textarea.form-control:focus {
    min-height: 190px;
}

.content-website-field--edit-short.input-style textarea.form-control,
.content-website-field--edit-short.input-style textarea.form-control:focus {
    min-height: 132px;
}

.content-website-field--edit-story.input-style textarea.form-control,
.content-website-field--edit-story.input-style textarea.form-control:focus {
    min-height: 190px;
}

.content-website-selected-template img {
    flex: 0 0 auto;
    height: 76px;
    object-fit: cover;
    width: 76px;
}

.content-website-selected-template {
    align-items: center;
    background: rgba(128, 128, 128, .035);
    border: 1px solid var(--website-border);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    padding: 12px 14px 12px 12px;
    position: relative;
    transition: border-color .2s ease, background-color .2s ease;
}

.content-website-template-selector {
    border-radius: inherit;
    inset: 0;
    position: absolute;
    z-index: 1;
}

.content-website-selected-template:has(.content-website-template-selector:hover) {
    background: rgba(128, 128, 128, .065);
    border-color: var(--highlight);
}

.content-website-selected-template:has(.content-website-template-selector:focus-visible) {
    border-color: var(--highlight);
    outline: 2px solid var(--highlight);
    outline-offset: 2px;
}

.content-website-template-demo {
    align-items: center;
    display: inline-flex;
    min-height: 44px;
    position: relative;
    z-index: 2;
}

.content-website-template-selector__action {
    align-items: center;
    color: var(--website-muted);
    display: flex;
    flex: 0 0 auto;
    font-size: 12px;
    gap: 8px;
    pointer-events: none;
    position: relative;
    z-index: 2;
}

.content-website-template-menu__preview {
    aspect-ratio: 4 / 5;
    display: block;
    overflow: hidden;
}

.content-website-template-menu__image {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    width: 100%;
}

.content-website-template-menu__item:hover .content-website-template-menu__image,
.content-website-template-menu__item:focus-visible .content-website-template-menu__image {
    transform: scale(1.025);
}

.content-website-template-menu__item:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: 3px;
}

.content-website-generate-form {
    overflow: visible;
}

.content-website-editor-block[hidden],
.content-website-block-catalog__item[hidden] {
    display: none !important;
}

.content-website-editor-block {
    border: 1px solid var(--website-border);
    overflow: visible;
}

.content-website-editor-block__header {
    min-width: 0;
}

.content-website-editor-block__icon {
    align-items: center;
    background: rgba(218, 68, 83, .12);
    border-radius: 50%;
    color: var(--color-highlight, #da4453);
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.content-website-editor-block__actions {
    flex: 0 0 auto;
}

.content-website-block-action {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
    transition: background-color .18s ease, color .18s ease;
    width: 44px;
}

.content-website-block-action:hover,
.content-website-block-action:focus-visible {
    background: rgba(218, 68, 83, .1);
    color: var(--color-highlight, #da4453) !important;
}

.content-website-block-action:disabled {
    opacity: .25;
    pointer-events: none;
}

.content-website-block-action--remove {
    color: #c0392b;
    margin-left: 8px;
}

.content-website-add-block-slot {
    background: transparent;
    border: 1px dashed var(--website-border);
    box-shadow: none;
    min-height: 80px;
    overflow: hidden;
}

.content-website-add-block-button {
    align-items: center;
    background: transparent;
    border: 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    min-height: 80px;
    padding: 12px 16px;
    transition: color .18s ease;
    width: 100%;
}

.content-website-add-block-button:hover,
.content-website-add-block-button:focus-visible {
    color: var(--color-highlight, #da4453) !important;
}

.content-website-add-block-button:focus-visible {
    outline: 2px solid var(--color-highlight, #da4453);
    outline-offset: -3px;
}

.content-website-add-block-button__icon {
    align-items: center;
    background: rgba(218, 68, 83, .12);
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.content-website-block-catalog__item {
    align-items: center;
    background: rgba(128, 128, 128, .045);
    border: 1px solid rgba(128, 128, 128, .2);
    border-radius: 12px;
    color: inherit;
    display: grid;
    gap: 12px;
    grid-template-columns: 40px minmax(0, 1fr) 36px;
    line-height: 1.3;
    min-height: 76px;
    padding: 12px;
    text-align: left;
    transition: background-color .18s ease, border-color .18s ease;
    width: 100%;
}

.content-website-block-menu {
    max-width: calc(100vw - 24px);
    overflow: hidden;
}

.content-website-block-menu .menu-title a {
    height: 44px;
    line-height: 44px;
    right: 8px;
    top: 8px;
    width: 44px;
}

.content-website-block-catalog {
    display: grid;
    gap: 8px;
    max-height: calc(80vh - 126px);
    overflow-y: auto;
    padding: 2px;
}

.content-website-block-catalog__hint,
.content-website-block-catalog__description {
    color: var(--website-muted, rgba(128, 128, 128, .85));
}

.content-website-block-catalog__copy strong {
    color: var(--website-text, currentColor);
    line-height: 1.3;
}

.content-website-block-catalog__description {
    line-height: 1.4;
    margin-top: 4px;
}

.content-website-block-catalog__add {
    align-items: center;
    background: rgba(218, 68, 83, .1);
    border-radius: 50%;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.content-website-block-catalog__item:hover,
.content-website-block-catalog__item:focus-visible {
    background: rgba(218, 68, 83, .06);
    border-color: var(--color-highlight, #da4453);
}

.content-website-block-catalog__item:focus-visible {
    outline: 2px solid var(--color-highlight, #da4453);
    outline-offset: -2px;
}

.content-website-block-catalog__empty {
    margin-inline: auto;
    max-width: 280px;
}

.content-website-form-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    margin-top: 24px !important;
    padding: 24px 0 0;
}

.content-website-generate-form .content-website-form-section--first {
    border-top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0;
}

.content-website-kind-picker {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 18px 0 22px;
}

.content-website-kind-option {
    align-items: center;
    border: 1px solid var(--website-border);
    border-radius: 10px;
    color: var(--website-text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
    gap: 7px;
    justify-content: center;
    line-height: 1.25;
    min-height: 88px;
    padding: 11px 7px;
    text-align: center;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.content-website-kind-option:hover {
    border-color: var(--color-highlight, #da4453);
    transform: translateY(-1px);
}

.content-website-kind-option input {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.content-website-kind-option:has(input:checked) {
    background: rgba(218, 68, 83, .1);
    border-color: var(--color-highlight, #da4453);
    color: var(--color-highlight, #da4453);
}

.content-website-kind-option__icon {
    align-items: center;
    background: rgba(218, 68, 83, .1);
    border-radius: 50%;
    display: inline-flex;
    font-size: 17px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.content-website-kind-panel {
    display: none;
}

.content-website-generate-form:has(input[name="content_kind"][value="poem"]:checked) .content-website-kind-panel--poem,
.content-website-generate-form:has(input[name="content_kind"][value="song"]:checked) .content-website-kind-panel--media,
.content-website-generate-form:has(input[name="content_kind"][value="video"]:checked) .content-website-kind-panel--media,
.content-website-generate-form:has(input[name="content_kind"][value="song"]:checked) .content-website-kind-panel--cover,
.content-website-generate-form:has(input[name="content_kind"][value="video"]:checked) .content-website-kind-panel--cover {
    display: block;
}

.content-website-generate-form:has(input[name="content_kind"][value="video"]:checked) .content-website-song-fields {
    display: none;
}

.content-website-kind-panel--poem textarea {
    min-height: 240px;
}

.content-website-file-picker,
.content-website-compact-picker {
    align-items: center;
    border: 1px dashed var(--website-border);
    border-radius: 10px;
    color: var(--website-text);
    cursor: pointer;
    display: flex;
    gap: 12px;
    min-height: 68px;
    padding: 13px 15px;
    transition: border-color .18s ease, background-color .18s ease;
}

.content-website-file-picker:hover,
.content-website-compact-picker:hover {
    background: rgba(218, 68, 83, .05);
    border-color: var(--color-highlight, #da4453);
}

.content-website-file-picker__icon {
    align-items: center;
    background: rgba(218, 68, 83, .1);
    border-radius: 50%;
    color: var(--color-highlight, #da4453);
    display: inline-flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
}

.content-website-file-picker span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.content-website-file-picker small,
.content-website-compact-picker small {
    color: var(--website-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-website-compact-picker {
    border-style: solid;
    min-height: 48px;
}

.content-website-compact-picker i {
    color: var(--color-highlight, #da4453);
}

.content-website-compact-picker small {
    margin-left: auto;
    max-width: 45%;
}

.content-website-attached-preview {
    background: rgba(128, 128, 128, .055);
    border: 1px solid var(--website-border);
    border-radius: 10px;
    padding: 12px;
}

.content-website-attached-preview__summary {
    align-items: center;
    display: flex;
    gap: 12px;
}

.content-website-attached-preview__cover {
    align-items: center;
    display: inline-flex;
    flex: 0 0 48px;
    height: 48px;
    justify-content: center;
    overflow: hidden;
    width: 48px;
}

.content-website-attached-preview__cover img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.content-website-attached-preview__cover > i {
    color: #fff;
    font-size: 18px;
}

.content-website-attached-preview__remove {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    transition: background-color .18s ease;
    width: 44px;
}

.content-website-attached-preview__remove:hover,
.content-website-attached-preview__remove:focus-visible {
    background: rgba(218, 68, 83, .1);
}

.content-website-attached-preview__video {
    display: block;
    margin-top: 12px;
    max-height: 360px;
    object-fit: contain;
    width: 100%;
}

.content-website-attached-preview audio {
    display: block;
    height: 40px;
}

.content-website-form-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-website-form-actions .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    margin: 0;
    min-height: 48px;
    width: 100%;
}

.content-website-photo-picker {
    border-radius: 10px;
    color: var(--website-text);
    cursor: pointer;
    min-height: 112px;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.content-website-photo-picker:hover,
.content-website-photo-picker.is-dragover,
.content-website-photo-picker:focus-visible {
    border-color: var(--color-highlight, #da4453) !important;
    background: rgba(218, 68, 83, .045);
    transform: translateY(-1px);
}

.content-website-photo-picker.is-dragover {
    border-style: dashed !important;
}

.content-website-photo-picker.is-processing {
    cursor: progress;
    opacity: .72;
    pointer-events: none;
}

.content-website-photo-picker.has-files {
    border-color: rgba(46, 160, 67, .7) !important;
}

.content-website-photo-remove {
    align-items: center;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 7px;
    min-height: 44px;
    padding: 9px 10px;
}

.content-website-photo-remove input {
    width: 18px;
    height: 18px;
}

.content-website-existing-photos {
    position: relative;
}

.content-website-existing-photo {
    position: relative;
}

.content-website-existing-photo img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.content-website-cover-remove {
    align-items: center;
    border: 0;
    display: flex;
    height: 32px;
    justify-content: center;
    padding: 0;
    position: absolute;
    left: auto;
    right: 0;
    top: 0;
    width: 32px;
    z-index: 2;
}

.app-page-content:has(> .content-website-preview-page) {
    overflow: hidden !important;
    padding: 0 !important;
}

.content-website-preview-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0 !important;
}

.content-website-preview-frame {
    flex: 1 1 0;
    min-height: 0;
    margin: 0 8px 8px;
}

.content-website-preview-toolbar {
    flex: 0 0 52px;
    min-height: 52px;
    margin: 0 8px;
    padding: 4px 0;
}

.content-website-preview-back {
    align-items: center;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    position: relative;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
    width: 44px;
}

.content-website-preview-back::before {
    border: 1px solid var(--website-border);
    border-radius: 50%;
    content: "";
    inset: 4px;
    position: absolute;
    transition: border-color .2s ease;
}

.content-website-preview-back .fa {
    position: relative;
    z-index: 1;
}

.content-website-preview-back:hover {
    color: var(--color-highlight, #da4453) !important;
    transform: translateX(-2px);
}

.content-website-preview-back:hover::before {
    border-color: var(--color-highlight, #da4453);
}

.content-website-preview-actions {
    min-width: 0;
}

.content-website-preview-action {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
    position: relative;
    text-decoration: none !important;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
    width: 44px;
}

.content-website-preview-action:hover {
    background: rgba(218, 68, 83, .1);
    color: var(--color-highlight, #da4453) !important;
    transform: translateY(-1px);
}

.content-website-preview-delete {
    color: #c0392b;
}

.content-website-preview-delete:hover {
    background: rgba(192, 57, 43, .1);
    color: #c0392b;
}

.content-website-preview-action[data-feedback]::after,
.content-website-preview-share[data-feedback]::after {
    background: #25252a;
    border-radius: 8px;
    color: #fff;
    content: attr(data-feedback);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    max-width: min(220px, 72vw);
    padding: 7px 9px;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    white-space: nowrap;
    z-index: 20;
}

.content-website-preview-share {
    align-items: center;
    background: transparent;
    border: 0;
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    position: relative;
    white-space: nowrap;
}

.content-website-preview-share-visual {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    height: 34px;
    justify-content: center;
    line-height: 1;
    padding: 0 12px;
    transition: filter .2s ease, transform .2s ease;
}

.content-website-preview-share:hover .content-website-preview-share-visual {
    filter: brightness(.94);
    transform: translateY(-1px);
}

.content-website-list-card__preview {
    aspect-ratio: 16 / 9;
    background: var(--bs-gray-800, #343a40);
    border-radius: 15px 15px 0 0;
    overflow: hidden;
}

.content-website-list-card {
    overflow: visible !important;
    position: relative;
}

.content-website-list-card__link {
    border-radius: inherit;
    inset: 0;
    position: absolute;
    text-decoration: none !important;
    z-index: 1;
}

.content-website-list-card__menu {
    position: relative;
    z-index: 4;
}

.content-website-list-card__menu > .dropdown-menu {
    min-width: 230px;
}

.content-website-list-card__link:focus-visible {
    outline: 3px solid rgba(218, 68, 83, .38);
    outline-offset: 2px;
}

.content-website-list-card__preview img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .content-website-list-card:hover .content-website-list-card__preview img,
    .content-website-list-card:focus-within .content-website-list-card__preview img {
        transform: scale(1.025);
    }
}

.content-website-danger-action {
    color: #c0392b !important;
    min-height: 44px;
}

.content-website-detail-actions a,
.content-website-detail-actions button {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.content-website-pagination a {
    align-items: center;
    display: inline-flex;
    min-height: 44px;
}

.content-website-app a:focus-visible,
.content-website-app button:focus-visible,
.content-website-app label[for]:focus-within {
    outline: 3px solid rgba(218, 68, 83, .32);
    outline-offset: 3px;
}

.theme-dark .content-website-app {
    --website-text: rgba(255, 255, 255, .95);
    --website-muted: rgba(255, 255, 255, .68);
    --website-border: rgba(255, 255, 255, .18);
}

.theme-dark .content-website-photo-picker:hover,
.theme-dark .content-website-photo-picker.is-dragover,
.theme-dark .content-website-photo-picker:focus-visible {
    background: rgba(255, 255, 255, .05);
}

.theme-dark .content-website-kind-option:has(input:checked),
.theme-dark .content-website-kind-option__icon,
.theme-dark .content-website-file-picker__icon {
    background: rgba(255, 79, 102, .13);
}

@media (prefers-reduced-motion: reduce) {
    .content-website-photo-picker,
    .content-website-preview-back,
    .content-website-preview-action,
    .content-website-preview-share-visual,
    .content-website-selected-template,
    .content-website-template-menu__image,
    .content-website-list-card__preview img {
        transition: none;
    }

    .content-website-template-menu__image,
    .content-website-list-card__preview img {
        transform: none !important;
    }

}

@media (max-width: 420px) {
    .content-website-editor-block__header {
        flex-wrap: wrap;
    }

    .content-website-editor-block__actions {
        justify-content: flex-end;
        margin-left: 48px;
        width: calc(100% - 48px);
    }

    .content-website-form-section {
        margin-top: 24px !important;
        padding-top: 24px;
    }

    .content-website-kind-picker {
        gap: 7px;
    }

    .content-website-kind-option {
        font-size: 12px;
        min-height: 88px;
        padding-inline: 4px;
    }

    .content-website-form-actions {
        grid-template-columns: 1fr;
    }

    .content-website-template-selector__action > span {
        display: none;
    }
}
