.forest-full-backup-dialog {
    box-sizing: border-box;
    width: min(520px, calc(100vw - 28px));
    max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: clamp(22px, 5vw, 34px);
    border: 1px solid #cedbd1;
    border-radius: 24px;
    background: #f8faf6;
    color: #2b4236;
    box-shadow: 0 25px 80px #1b382638;
    overflow: auto;
}

.forest-full-backup-dialog::backdrop {
    background: #17271c91;
}

.forest-full-backup-dialog h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 5vw, 30px);
    line-height: 1.3;
}

.forest-full-backup-dialog p {
    margin: 0 0 17px;
    line-height: 1.65;
}

.forest-full-backup-dialog .forest-full-backup-note {
    color: #687b70;
    font-size: 14px;
}

.forest-full-backup-dialog pre {
    max-height: 33vh;
    padding: 16px;
    border: 1px solid #d7e2d8;
    border-radius: 14px;
    background: #eef4ed;
    font: inherit;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow: auto;
}

.forest-full-backup-dialog pre:empty {
    display: none;
}

.forest-full-backup-dialog [data-state="error"] {
    color: #9e3f32;
}

.forest-full-backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.forest-full-backup-actions button,
.forest-full-backup-actions a {
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid #c4d5c9;
    border-radius: 22px;
    background: #fff;
    color: #345643;
    font: inherit;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
}

.forest-full-backup-actions button:first-child,
.forest-full-backup-actions a {
    border-color: #3c644c;
    background: #3c644c;
    color: #fff;
}

.forest-full-backup-actions button:disabled {
    opacity: .55;
    cursor: wait;
}

.forest-full-backup-dialog [hidden] {
    display: none;
}

.forest-full-backup-actions :focus-visible {
    outline: 3px solid #9ebba6;
    outline-offset: 3px;
}

body.night-mode .forest-full-backup-dialog {
    border-color: #52685a;
    background: #26352d;
    color: #e6efe5;
}

body.night-mode .forest-full-backup-dialog .forest-full-backup-note {
    color: #bbcbbb;
}

body.night-mode .forest-full-backup-dialog pre {
    border-color: #52685a;
    background: #1e2d25;
}

body.night-mode .forest-full-backup-actions button {
    border-color: #688471;
    background: #344c3b;
    color: #e6efe5;
}

body.night-mode .forest-full-backup-actions button:first-child,
body.night-mode .forest-full-backup-actions a {
    background: #a9c5a9;
    color: #1f3428;
}

@media (max-width: 460px) {
    .forest-full-backup-actions > * {
        flex: 1 1 100%;
    }

    .forest-full-backup-actions form button {
        width: 100%;
    }
}
