/* The player and the reading surface keep their positions behind the native dialog. */
html.vpd-active,html.vpd-active body { overflow:hidden!important; overscroll-behavior:none }
dialog.vpd:not([open]),dialog.vpd[hidden],dialog.vpd [hidden] {display:none!important}
dialog.vpd[open] {
    --vpd-ink:#342531; --vpd-berry:#922b55; --vpd-line:#eadde4;
    --vpd-pad:clamp(16px,4vw,28px);
    position:fixed; inset:0; z-index:2147483646; box-sizing:border-box;
    display:block; width:min(680px,calc(100vw - 32px)); height:fit-content;
    max-width:none; max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px);
    margin:auto; padding:0; overflow:hidden; overflow:clip; border:0; border-radius:24px;
    background:white; color:var(--vpd-ink); text-align:start; text-shadow:none;
    box-shadow:0 24px 80px #220e294a,0 3px 12px #3215271a;
    font-family:inherit; font-size:16px; line-height:1.55; letter-spacing:normal;
    color-scheme:light; isolation:isolate;
}
dialog.vpd[open][data-vp-reply-mode="owner"] {width:min(560px,calc(100vw - 32px))}
dialog.vpd::backdrop {background:rgba(28,17,34,.58);backdrop-filter:blur(3px)}
dialog.vpd *,dialog.vpd *::before,dialog.vpd *::after {box-sizing:border-box}
dialog.vpd .vpd-shell {display:flex;flex-direction:column;max-height:inherit;min-width:0}
dialog.vpd .vpd-bar {
    flex:none;display:flex;align-items:center;gap:12px;min-height:68px;
    padding:10px 12px 10px var(--vpd-pad);border-bottom:1px solid var(--vpd-line);
    background:linear-gradient(105deg,#fff2f6,#fff9f6 76%,#fff);
}
dialog.vpd .vpd-mark {
    display:grid;place-items:center;width:38px;height:38px;flex:none;
    border-radius:14px;background:linear-gradient(140deg,#bc406d,#812249);color:white;
    box-shadow:0 3px 9px #90204b24;
}
dialog.vpd :is(.vpd-mark,.vpd-x,.vpd-private) svg {
    display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;
    width:24px;height:24px;flex:none;
}
dialog.vpd .vpd-bar h2 {
    flex:1;min-width:0;display:block;margin:0;padding:0;border:0;background:none;
    color:var(--vpd-ink);font:inherit;font-size:clamp(18px,1.5vw,22px);font-weight:750;
    line-height:1.35;letter-spacing:.02em;box-shadow:none;text-align:start;outline:none;
}
dialog.vpd .vpd-bar h2::before,dialog.vpd .vpd-bar h2::after,dialog.vpd .vpd-invite h3::before,dialog.vpd .vpd-invite h3::after {content:none!important}
dialog.vpd .vpd-x {
    flex:none;display:grid;place-items:center;min-width:44px;width:44px;height:44px;min-height:44px;
    margin:0;padding:0;border:0;border-radius:50%;box-shadow:none;color:#513544;background:transparent;cursor:pointer;
}
dialog.vpd .vpd-scroll {
    flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;
    scroll-padding-block:16px;padding:var(--vpd-pad);padding-bottom:max(var(--vpd-pad),env(safe-area-inset-bottom));
    overflow-wrap:anywhere;
}
dialog.vpd :is(button,a,input,select,textarea,summary):focus-visible {
    outline:3px solid #7f2350!important;outline-offset:2px;
}
dialog.vpd :is(button,a,summary){touch-action:manipulation}
dialog.vpd .vpd-note {margin:0;line-height:1.75;color:#563d4b}
dialog.vpd .vpd-alert,dialog.vpd .vpd-confirm {
    margin:0;padding:14px var(--vpd-pad) max(16px,env(safe-area-inset-bottom));
    flex:none;background:#fff5f0;color:#69334b;border-top:1px solid #edd7ce;font-size:15px;
    max-height:48vh;overflow:auto;
}
dialog.vpd .vpd-confirm p {margin:0 0 12px;font-weight:700}
dialog.vpd .vpd-confirm button {
    font:inherit;min-height:44px;padding:8px 13px;margin:2px 6px 2px 0;
    border-radius:12px;border:1px solid #b891a1;background:white;color:#732143;cursor:pointer;
}
dialog.vpd .vpd-confirm [data-vpd-keep] {background:#922b55;color:white;border-color:#922b55}
.vpd-toast:not(:empty) {
    position:fixed;z-index:2147483645;top:max(18px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);
    width:max-content;max-width:calc(100vw - 32px);padding:13px 19px;border-radius:16px;
    background:#472639;color:white;box-shadow:0 4px 18px #29101e33;pointer-events:none;
    font:600 15px/1.6 system-ui,sans-serif;overflow-wrap:anywhere;
}
body.admin-bar .vpd-toast:not(:empty) {top:calc(54px + env(safe-area-inset-top))}
#page .super-header-bottom .vp-reply-jump[data-vpd-unsent] {position:relative}
#page .super-header-bottom .vp-reply-jump[data-vpd-unsent]::after {
    content:"";position:absolute;top:3px;right:4px;width:9px;height:9px;border-radius:50%;background:#ffce73;box-shadow:0 0 0 1px #651437;
}
dialog.vpd[data-vp-reply-mode="guest"] .vpd-scroll {padding:0}
dialog.vpd .vpd-welcome {display:grid;grid-template-columns:42% 1fr;align-items:stretch}
dialog.vpd .vpd-scene {
    position:relative;isolation:isolate;overflow:hidden;min-height:285px;
    background:radial-gradient(ellipse at 55% 70%,#fff7ea 0 42%,transparent 42.4%),
               radial-gradient(circle at 17% 40%,#fff9 0 4px,transparent 5px),
               radial-gradient(circle at 86% 14%,#fff9 0 6px,transparent 7px),
               linear-gradient(140deg,#ffdae8,#ffe8d8 72%,#ffe0ee);
}
dialog.vpd .vpd-scene img {
    display:block;position:absolute;bottom:-2%;left:50%;transform:translateX(-50%);
    height:auto;width:min(110%,328px);max-width:none;margin:0;padding:0;border:0;box-shadow:none;
}
dialog.vpd .vpd-line {
    position:absolute;left:10%;top:6%;transform:rotate(-7deg);padding:9px 16px;
    border-radius:22px 22px 5px 22px;box-shadow:0 3px 12px #6a164418;
    background:white;color:#8c234e;font:800 16px/1.25 system-ui,sans-serif;text-align:center;
}
dialog.vpd .vpd-invite {align-self:center;padding:28px var(--vpd-pad) max(28px,env(safe-area-inset-bottom))}
dialog.vpd .vpd-invite h3 {
    margin:0;padding:0;border:none;background:none;color:#762046;box-shadow:none;text-align:start;
    font:inherit;font-size:clamp(21px,3.8vw,26px);font-weight:800;line-height:1.5;letter-spacing:.01em;
}
dialog.vpd .vpd-invite p {margin:14px 0 0;font:inherit;line-height:1.8;text-align:start;color:#453243}
dialog.vpd .vpd-invite .vpd-private {display:flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:#733254}
dialog.vpd .vpd-private svg {width:18px;height:18px}
dialog.vpd a.vpd-login {
    display:flex;align-items:center;justify-content:center;gap:10px;min-height:50px;margin:22px 0 0;
    padding:12px 14px;border-radius:15px;background:linear-gradient(105deg,#88254f,#ad305b);
    color:white;font-weight:750;line-height:1.4;text-decoration:none;box-shadow:0 4px 12px #97264d25;
}
dialog.vpd .vpd-login span {font-size:20px;line-height:1}
@media(hover:hover){
    dialog.vpd .vpd-x:hover {background:#f4e4eb}
    dialog.vpd a.vpd-login:hover {background:#761c45}
}
@media(max-width:600px){
    dialog.vpd[open],dialog.vpd[open][data-vp-reply-mode="owner"] {
        width:100%;margin:auto 0 0;border-radius:22px 22px 0 0;
        max-height:calc(100vh - 16px);max-height:calc(100dvh - max(12px,env(safe-area-inset-top)));
    }
    dialog.vpd .vpd-bar {min-height:58px;gap:10px;padding:7px 8px 7px var(--vpd-pad)}
    dialog.vpd .vpd-mark {width:33px;height:33px;border-radius:12px}
    dialog.vpd .vpd-mark svg {width:22px;height:22px}
    dialog.vpd .vpd-welcome {display:block}
    dialog.vpd .vpd-scene {min-height:0;height:clamp(120px,27dvh,220px)}
    dialog.vpd .vpd-scene img {height:112%;width:auto;left:58%;bottom:-13%}
    dialog.vpd .vpd-line {left:max(6%,calc(50% - 153px));top:20%;font-size:15px;padding:8px 12px}
    dialog.vpd .vpd-invite {padding:18px 22px max(22px,env(safe-area-inset-bottom))}
    dialog.vpd .vpd-invite h3 br {display:none}
    dialog.vpd .vpd-invite h3 {font-size:20px;text-wrap:balance;word-break:keep-all;overflow-wrap:anywhere}
    dialog.vpd .vpd-invite p {font-size:15px;margin-top:10px}
    dialog.vpd a.vpd-login {margin-top:15px}
}
@media(max-height:480px) {
    dialog.vpd[open] {max-height:calc(100dvh - 8px)}
    dialog.vpd .vpd-bar {min-height:48px;padding-block:2px}
    dialog.vpd .vpd-confirm,.vpd .vpd-alert {max-height:42dvh}
    dialog.vpd .vpd-scene {height:130px;min-height:0}
    dialog.vpd .vpd-scene img {height:100%;width:auto;bottom:0}
}
@media(prefers-reduced-motion:no-preference) {
    dialog.vpd[open] {animation:vpd-arrive .16s ease-out}
    @keyframes vpd-arrive {from {opacity:.6;transform:translateY(8px)} to {opacity:1;transform:translateY(0)}}
}
@media(forced-colors:active) {
    dialog.vpd[open],dialog.vpd .vpd-mark,dialog.vpd a.vpd-login {border:1px solid CanvasText}
}
