.form-card {
    width: min(100%, 920px);
    margin-inline: auto;
    padding: clamp(18px, 3vw, 32px);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    background: var(--color-surface);
}

/* Profile and media controls */
.video-upload__preview,
.video-upload__player,
.video-upload__progress {
    margin-right: auto;
    margin-left: auto;
}

.video-upload__actions {
    justify-content: center;
}

.avatar-manager {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-surface-muted);
}

.avatar-manager__preview {
    display: grid;
    width: 104px;
    height: 104px;
    place-items: center;
    overflow: hidden;
    border: 4px solid var(--color-surface);
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.avatar-manager__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-manager__preview .icon {
    width: 38px;
    height: 38px;
}

.avatar-manager__content p {
    max-width: 62ch;
    margin-bottom: 12px;
    color: var(--color-text-muted);
}

.avatar-manager__actions,
.avatar-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar-manager__status {
    min-height: 22px;
    margin-top: 8px;
    color: var(--color-success);
    font-size: 0.875rem;
}

.avatar-manager__status.is-error {
    color: var(--color-danger);
}

.avatar-dialog {
    width: min(92vw, 680px);
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    background: var(--color-surface);
    color: var(--color-text);
}

.avatar-dialog::backdrop {
    background: var(--color-overlay);
    backdrop-filter: blur(6px);
}

.avatar-dialog__canvas {
    height: min(62vh, 520px);
    margin: 12px 0 18px;
    overflow: hidden;
    border-radius: 16px;
    background: #171717;
}

.avatar-dialog__canvas img {
    display: block;
    max-width: 100%;
}

.avatar-dialog__actions {
    justify-content: flex-end;
}

@media (max-width: 680px) {
    .avatar-manager {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .avatar-manager__actions {
        justify-content: center;
    }
}

.auth-card {
    width: min(100%, 720px);
    box-shadow: var(--shadow-sm);
}

.form-card__header {
    margin-bottom: 28px;
}

.form-card__header h1 {
    margin-bottom: 0;
}

.form-card--entity {
    padding: 0;
    border: 0;
    background: transparent;
}

.form-card--entity .form-card__header {
    padding: 4px 2px 8px;
}

.form-card--entity .form-card__header h1 {
    font-size: clamp(1.75rem, 1.45rem + 1.4vw, 2.5rem);
}

.entity-form {
    display: grid;
    gap: 20px;
    counter-reset: aurora-form-step;
}

.form-section {
    display: grid;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    margin: 0;
    background: var(--color-surface);
    box-shadow: 0 1px 2px rgb(15 23 42 / 3%);
}

.form-section > legend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-inline: 8px;
    font-size: 1.125rem;
    font-weight: 750;
}

.entity-form > .form-section > legend,
.entity-form > [data-add-fields] > .form-section > legend {
    counter-increment: aurora-form-step;
}

.entity-form > .form-section > legend::before,
.entity-form > [data-add-fields] > .form-section > legend::before {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: 0 7px 18px rgb(85 71 232 / 18%);
    color: #fff;
    content: counter(aurora-form-step);
    font-size: 0.82rem;
    font-weight: 800;
}

.form-grid,
.dynamic-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-field {
    min-width: 0;
}

.form-field > label,
.choice-field > legend {
    display: block;
    padding: 0;
    margin-bottom: 7px;
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 11px 13px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text);
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        background-color 150ms ease;
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
    border-color: var(--color-border-strong);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgb(85 71 232 / 10%);
    outline: 0;
}

.form-field textarea {
    min-height: 150px;
    resize: vertical;
}

.form-readonly {
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
    color: var(--color-text);
}

.form-field small {
    display: block;
    margin-top: 5px;
    color: var(--color-text-muted);
}

.dynamic-field-grid__wide {
    grid-column: 1 / -1;
}

.dynamic-field-grid__centered {
    grid-column: 1 / -1;
    width: min(100%, 560px);
    justify-self: center;
}

.tree-select-stack {
    display: grid;
    gap: 10px;
}

.tree-select-stack__control {
    width: 100%;
}

.choice-field {
    min-width: 0;
    padding: 0;
    border: 0;
    margin: 0;
}

.choice-field label,
.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-block: 8px;
}

.choice-field input,
.form-consent input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 2px 0 0;
}

.paid-comment-option {
    border-color: rgb(85 71 232 / 22%);
    background:
        linear-gradient(145deg, rgb(85 71 232 / 7%), rgb(118 86 232 / 5%)),
        var(--color-surface);
}

.paid-comment-option__toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 700;
}

.paid-comment-option__toggle span {
    line-height: 1.45;
}

.paid-comment-option__toggle input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin: 2px 0 0;
}

.paid-comment-option__toggle strong,
.paid-comment-price strong {
    color: var(--color-warning);
    white-space: nowrap;
}

.paid-comment-option__fields {
    display: grid;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.paid-comment-option__fields[hidden] {
    display: none;
}

.price-field > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 0.45fr);
    gap: 8px;
}

.form-map {
    width: 100%;
    min-height: 360px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.timing-frame {
    width: 100%;
    height: 48px;
    border: 0;
}

.file-picker {
    position: relative;
    overflow: hidden;
}

.file-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.upload-status {
    display: flex;
    min-height: 20px;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.upload-status__spinner {
    display: none;
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    border: 2px solid color-mix(in srgb, var(--color-primary) 24%, transparent);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: aurora-upload-spin 700ms linear infinite;
}

.ajaxupload.is-uploading .upload-status__spinner {
    display: block;
}

.upload-status.is-success {
    color: var(--color-success);
    font-weight: 600;
}

.upload-status.is-error {
    color: var(--color-danger);
}

@keyframes aurora-upload-spin {
    to {
        transform: rotate(360deg);
    }
}

.files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.upload-file {
    position: relative;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
}

.upload-file__preview {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: calc(var(--radius-sm) - 3px);
    background: var(--color-surface);
}

.upload-file__name {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: var(--color-text);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file__delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-danger);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.ajaxupload.is-uploading .file-picker {
    opacity: 0.6;
    pointer-events: none;
}

.form-field .video-upload__input {
    position: absolute;
    width: 1px;
    max-width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

.video-upload__dropzone {
    display: grid;
    width: 100%;
    min-height: 180px;
    place-items: center;
    gap: 12px;
    padding: 20px;
    border: 1px dashed var(--color-border-strong);
    border-radius: 18px;
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
    cursor: pointer;
    font: inherit;
    text-align: center;
}

.video-upload__dropzone:hover,
.video-upload__dropzone.is-dragover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.video-upload__preview,
.video-upload__player {
    display: block;
    width: min(100%, 520px);
    max-height: 360px;
    margin-top: 12px;
    border-radius: var(--radius-md);
    background: #111;
    object-fit: contain;
}

.video-upload__progress {
    width: min(100%, 520px);
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--color-border);
}

.video-upload__progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
    transition: width 120ms linear;
}

.video-upload__status {
    min-height: 22px;
    margin-top: 8px;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.video-upload__status.is-error {
    color: var(--color-danger);
}

.video-upload__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-submit {
    width: min(100%, 420px);
    min-height: 54px;
    justify-self: center;
    font-size: 1rem;
    box-shadow: 0 14px 30px rgb(85 71 232 / 22%);
}

.notice {
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-muted);
}

.notice--warning {
    border-color: var(--color-warning);
    background: var(--color-warning-soft);
}

.notice--danger {
    border-color: var(--color-danger);
    background: var(--color-danger-soft);
}

.notice--success {
    border-color: var(--color-success);
    background: var(--color-success-soft);
}

.publication-success {
    display: grid;
    justify-items: center;
    gap: 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.publication-success__icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border-radius: 20px;
    background: var(--color-success-soft);
    color: var(--color-success);
}

.publication-success__icon .icon {
    width: 30px;
    height: 30px;
}

.publication-success__notice {
    width: min(100%, 620px);
    margin: 0;
    font-size: 1.08rem;
    font-weight: 650;
}

.publication-success__promotion {
    width: 100%;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid color-mix(in srgb, var(--color-primary) 17%, var(--color-border));
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgb(118 86 232 / 12%), transparent 38%),
        var(--color-surface-muted);
    text-align: left;
}

.publication-success__eyebrow {
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.publication-success__promotion h2 {
    margin: 7px 0 5px;
    font-size: clamp(1.25rem, 1rem + 0.7vw, 1.65rem);
}

.publication-success__promotion p {
    margin: 0;
    color: var(--color-text-muted);
}

.publication-success__services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.publication-success__services a {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 580;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.publication-success__services a:hover {
    border-color: color-mix(in srgb, var(--color-primary) 36%, var(--color-border));
    box-shadow: var(--shadow-sm);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.publication-success__services .icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.publication-success__actions {
    justify-content: center;
}

.notice ul {
    margin: 0;
}

@media (max-width: 680px) {
    .form-card {
        padding: 16px;
    }

    .form-card--entity {
        padding: 0;
    }

    .form-card--entity .form-card__header {
        padding-inline: 2px;
    }

    .form-section {
        gap: 14px;
        padding: 17px;
        border-radius: 18px;
    }

    .entity-form {
        gap: 18px;
    }

    .form-section > legend {
        font-size: 1rem;
    }

    .entity-form > .form-section > legend::before,
    .entity-form > [data-add-fields] > .form-section > legend::before {
        width: 27px;
        height: 27px;
        border-radius: 9px;
    }

    .form-grid,
    .dynamic-field-grid {
        grid-template-columns: 1fr;
    }

    .dynamic-field-grid__wide {
        grid-column: auto;
    }

    .price-field > div {
        grid-template-columns: 1fr;
    }

    .publication-success__services {
        grid-template-columns: 1fr;
    }

    .form-map {
        min-height: 300px;
    }
}
