kbd {
    background: rgba(127, 127, 127, 0.08);
}

@keyframes pasteFlash {
    0% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-primary) 45%, transparent);
        border-color: var(--accent-primary);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

.animate-paste-flash {
    animation: pasteFlash 0.6s ease-out;
}

.editor-fullscreen {
    position: fixed !important;
    inset: 5vh 5vw !important;
    width: 90vw !important;
    height: 90vh !important;
    min-height: 90vh !important;
    max-width: none !important;
    z-index: 1000 !important;
    margin: 0 !important;
    border-radius: 1rem !important;
    background: var(--bg-primary, #fff);
}

.fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.fs-button-active {
    position: fixed !important;
    top: calc(5vh + 16px) !important;
    right: calc(5vw + 16px) !important;
    z-index: 1001 !important;
}

#create-page-grid .create-settings-column {
    display: flex;
    flex-direction: column;
}

#create-page-grid .create-content-column {
    min-height: 0;
}

.paste-editor-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: clamp(260px, 42vh, 360px);
}

@media (min-width: 1024px) {
    .paste-editor-shell {
        flex: 1 1 0;
        height: auto;
        min-height: 420px;
    }
}

.paste-editor-surface {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

#content.paste-editor-surface {
    overflow-y: auto;
}

#paste-editor-area,
#toastui-host,
#cm-host {
    max-width: 100%;
    min-width: 0;
}

#toastui-host {
    display: flex;
    flex-direction: column;
}

#cm-host {
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

#cm-host .cm-editor {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    font-size: 0.875rem;
}

#cm-host .cm-scroller {
    font-family: inherit;
    overflow: auto;
}

.toastui-host .toastui-editor-defaultUI,
#toastui-host .toastui-editor-defaultUI {
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    height: 100% !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#toastui-host .toastui-editor-defaultUI-toolbar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

#toastui-host .toastui-editor-main,
#toastui-host .toastui-editor-ww-container,
#toastui-host .toastui-editor-md-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.paste-editor-textarea.paste-editor-hidden,
#toastui-host.hidden,
#cm-host.hidden {
    display: none !important;
}

.drop-zone--active #content,
.drop-zone--active #cm-host,
.drop-zone--active #toastui-host {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

.password-strength {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 1rem;
}

.password-strength--weak { color: #dc2626; }
.password-strength--fair { color: #ea580c; }
.password-strength--good { color: #ca8a04; }
.password-strength--strong { color: #16a34a; }
.password-strength--empty { display: none; }

#draft-banner {
    border-color: color-mix(in srgb, var(--accent-primary) 35%, var(--border-color));
}

@media (prefers-reduced-motion: reduce) {
    .animate-paste-flash {
        animation: none;
    }
}
