/* Shared on every integrated page, including pages without inline widgets. */
/* Older running AI previews can still inject this notice until their next rebuild. */
html body #albup-ai-preview-badge { display: none !important; }
/* Expansion fills the browser viewport, not an 880px-wide side panel. */
html body #albup-ai-frame.expanded {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
/* Legacy body has height:100%. Locking it too creates a new scroll container
   and collapses the document scroll range, sending the article back to zero. */
html:has(#albup-ai-frame.expanded:not(.closed)) { overflow: hidden; }
body:has(#albup-ai-frame.expanded:not(.closed)) #albup-ai-recovery {
    inset: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
}
html body #albup-ai-launcher {
    position: fixed;
    z-index: 2147482999;
    border: 0;
    background: #2563eb;
    color: #fff;
    font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    font-weight: 700;
    cursor: pointer;
    right: clamp(32px, 5vw, 96px);
    bottom: 32px;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 26px;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: 0 6px 22px #2563eb30;
}
html body #albup-ai-launcher::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 6px;
    vertical-align: -8px;
    background: url('/page/img/albup-ai-chat.svg?v=2') center / contain no-repeat;
}
#albup-ai-recovery[hidden] { display: none; }
#albup-ai-recovery {
    position: fixed; z-index: 2147483001; inset: 18px 18px 18px auto;
    width: min(600px, calc(100vw - 36px)); box-sizing: border-box;
    background: #fff; border: 1px solid #dce4ee; border-radius: 20px;
    display: grid; place-items: center; padding: 32px;
    font: 15px/1.7 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; color: #172b46;
}
#albup-ai-recovery h2 { font-size: 22px; line-height: 1.4; margin-bottom: 16px; word-break: keep-all; }
#albup-ai-recovery p { margin: 0 0 24px; word-break: keep-all; overflow-wrap: anywhere; }
#albup-ai-recovery button { cursor: pointer; font: inherit; border: 0; border-radius: 12px; padding: 12px 20px; background: #2563eb; color: #fff; }
#albup-ai-recovery button:disabled { opacity: .6; cursor: wait; }
#albup-ai-recovery [data-recovery-close] { position: absolute; top: 14px; right: 14px; background: transparent; color: #234; font-size: 24px; }
@media (max-width: 720px) {
    html:has(#albup-ai-frame:not(.closed)) { overflow: hidden; }
    #albup-ai-recovery { inset: 0; width: 100%; border: 0; border-radius: 0; }
}
@media (max-width: 767px) {
    html body #albup-ai-launcher {
        right: 14px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        min-height: 44px;
        padding: 10px 15px;
        font-size: 13px;
        border-radius: 24px;
        box-shadow: 0 4px 14px #2563eb26;
    }
}
