.marketus-popup-overlay {
    position: fixed; inset: 0; z-index: 20000; display: flex;
    align-items: center; justify-content: center; padding: 16px; box-sizing: border-box;
    background: radial-gradient(ellipse at top, #5550a866, #10172ad9);
    backdrop-filter: blur(8px);
}
.marketus-popup-panel {
    box-sizing: border-box; max-width: 100%; max-height: calc(100dvh - 32px);
    display: flex; flex-direction: column; color: #23304b; background: #fff;
    border: 1px solid #ffffffb3; border-radius: 24px; overflow: hidden;
    box-shadow: 0 24px 80px #080c2866, 0 0 0 6px #ffffff12;
    font-family: system-ui, -apple-system, "Malgun Gothic", sans-serif;
    animation: marketus-popup-enter .28s ease-out;
}
.marketus-popup-overlay[data-vertical="T"] { align-items: flex-start; }
.marketus-popup-overlay[data-vertical="B"] { align-items: flex-end; }
.marketus-popup-overlay[data-horizontal="L"] { justify-content: flex-start; }
.marketus-popup-overlay[data-horizontal="R"] { justify-content: flex-end; }
.marketus-popup-mobile-custom, .marketus-popup-fullscreen { padding: 0; }
.marketus-popup-mobile-custom .marketus-popup-panel { width: 100% !important; max-height: 100dvh; }
.marketus-popup-fullscreen .marketus-popup-panel { width: 100% !important; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
.marketus-popup-fixed-height .marketus-popup-header { display: flex; flex-direction: column; box-sizing: border-box; max-height: 40%; min-height: 0; padding: 16px 20px; }
.marketus-popup-fixed-height .marketus-popup-badge { align-self: flex-start; flex-shrink: 0; }
.marketus-popup-fixed-height h2 { min-height: 0; }
.marketus-popup-fixed-height .marketus-popup-content { flex: 1; padding: 12px 20px; }
.marketus-popup-header {
    position: relative; isolation: isolate; flex-shrink: 0; padding: 28px;
    color: #fff; background: linear-gradient(125deg, #4531a7, #7436be 55%, #b33387);
    overflow: hidden;
}
.marketus-popup-header::before, .marketus-popup-header::after {
    content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
    border: 1px solid #ffffff30;
}
.marketus-popup-header::before { width: 180px; height: 180px; right: -50px; top: -90px; background: #ffffff0d; }
.marketus-popup-header::after { width: 110px; height: 110px; right: 42px; bottom: -80px; background: #ffffff12; }
.marketus-popup-badge { display: inline-block; padding: 5px 10px; border: 1px solid #ffffff55; border-radius: 30px; background: #ffffff18; font-size: 11px; letter-spacing: .12em; font-weight: 700; }
.marketus-popup-sparkle { position: absolute; right: 24px; top: 18px; color: #ffe3a8; font-size: 32px; line-height: 1; }
.marketus-popup-panel h2 { margin: 16px 0 0; padding: 0; max-height: 28dvh; overflow-y: auto; overflow-wrap: anywhere; font-size: 26px; font-weight: 800; line-height: 1.4; color: inherit; }
.marketus-popup-content { padding: 24px 28px; overflow-y: auto; min-height: 0; line-height: 1.8; background: linear-gradient(#faf8ff, #fff 100px); }
.marketus-popup-content img { display: block; max-width: 100%; height: auto; margin: 0 auto 20px; border-radius: 14px; }
.marketus-popup-content p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 16px; font-size: 16px; }
.marketus-popup-content a { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 20px; box-sizing: border-box; border-radius: 12px; color: #fff; background: linear-gradient(120deg, #5133ad, #813dbb); text-decoration: none; font-weight: 700; box-shadow: 0 6px 18px #6633aa26; }
.marketus-popup-content a:hover { background: #49309d; color: #fff; }
.marketus-popup-content .marketus-popup-preview-note { margin-top: 16px; margin-bottom: 0; color: #68718a; font-size: 12px; }
.marketus-popup-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 12px; border-top: 1px solid #eae5f3; padding: 14px 24px; background: #faf9fc; }
.marketus-popup-today { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin: 0; color: #515b72; font-size: 14px; cursor: pointer; }
.marketus-popup-today input { width: 19px; height: 19px; margin: 0; flex-shrink: 0; accent-color: #6633ae; cursor: pointer; }
.marketus-popup-today:has(input:disabled) { opacity: .6; cursor: default; }
.marketus-popup-footer button { min-height: 44px; padding: 10px 22px; cursor: pointer; border: 1px solid #ddd5ee; border-radius: 12px; color: #493576; background: #fff; font-size: 14px; font-weight: 700; }
.marketus-popup-footer button:hover { background: #eee8f7; }
.marketus-popup-panel :is(a, button, input):focus-visible { outline: 3px solid #d18a16; outline-offset: 3px; }
#marketus-popup-error { position: fixed; bottom: 8px; left: 8px; right: 8px; z-index: 20001; background: #fff3cd; color: #664d03; padding: 8px; border: 1px solid #ffe69c; font-size: 13px; }
@keyframes marketus-popup-enter { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 420px) {
    .marketus-popup-header { padding: 24px 20px; }
    .marketus-popup-panel h2 { font-size: 22px; }
    .marketus-popup-content { padding: 20px; }
    .marketus-popup-footer { padding: 12px 16px; gap: 8px; flex-wrap: wrap; }
    .marketus-popup-footer button { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) { .marketus-popup-panel { animation: none; } }
