/* Shared MELODY FLAG afterword modal styles. Loaded by TOP, list and detail. */
body.melody_flag-modal-open{overflow:hidden}
.melody_flag-afterword-modal[hidden]{display:none!important}
.melody_flag-afterword-modal{position:fixed!important;inset:0!important;z-index:2147483000!important;display:flex;align-items:center;justify-content:center;padding:20px;box-sizing:border-box}
.melody_flag-afterword-backdrop{position:absolute;inset:0;background:rgba(30,20,35,.72);backdrop-filter:blur(3px)}
.melody_flag-afterword-dialog{position:relative;z-index:1;display:flex;flex-direction:column;width:min(960px,96vw);height:min(820px,90vh);margin:auto;background:#fff;border-radius:20px;box-shadow:0 18px 60px rgba(0,0,0,.35);overflow:hidden;box-sizing:border-box}
.melody_flag-afterword-header{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--theme-border-soft);background:#fff}
.melody_flag-afterword-header h2{margin:0;font-size:16px;color:var(--theme-heading);overflow-wrap:anywhere}
.melody_flag-afterword-close{flex:0 0 auto;width:36px;height:36px;border:0;border-radius:50%;background:var(--theme-blush);color:var(--theme-brand);font-size:26px;line-height:1;cursor:pointer}
.melody_flag-afterword-frame-wrap{position:relative;display:flex;flex:1 1 0;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#fff}
.melody_flag-afterword-frame-wrap iframe[hidden]{display:none!important}
.melody_flag-afterword-frame-wrap iframe{display:block;flex:1;width:100%;height:100%;min-height:0;border:0;background:#fff}
.melody_flag-afterword-content{display:flex;flex-direction:column;align-items:stretch;align-self:stretch;flex:1 1 0;min-width:0;min-height:0;max-height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:18px;background:#fff;box-sizing:border-box}
.melody_flag-afterword-content[hidden]{display:none!important}
.melody_flag-afterword-external-note{margin:0 auto 14px;max-width:620px;padding:12px 14px;border-radius:10px;background:var(--theme-blush);color:var(--theme-text-sub);font-size:13px;line-height:1.7}
.melody_flag-afterword-content .twitter-tweet{width:100%;max-width:550px;margin:12px auto!important}
.melody_flag-afterword-content iframe{max-width:100%!important}
.melody_flag-afterword-footer{display:flex;flex:0 0 auto;justify-content:flex-end;padding:10px 16px;border-top:1px solid var(--theme-border-soft);background:#fff}
.melody_flag-afterword-open-original{padding:8px 12px;border-radius:999px;background:var(--theme-blush);color:var(--theme-brand);text-decoration:none;font-size:12px}
.melody_flag-afterword-content .twitter-tweet-rendered{margin:12px auto!important}
@media(max-width:600px){.melody_flag-afterword-modal{padding:8px}.melody_flag-afterword-dialog{width:100%;height:92vh;border-radius:12px}.melody_flag-afterword-header{padding:10px 12px}.melody_flag-afterword-header h2{font-size:14px}.melody_flag-afterword-content{padding:12px}}

/* Instagram embeds can be taller than the viewport; keep scrolling in the modal content pane. */
.melody_flag-afterword-content .instagram-media{flex:0 0 auto!important;width:100%!important;max-width:540px!important;min-width:0!important;margin:0 auto 12px!important;}
.melody_flag-afterword-content .instagram-media iframe{display:block!important;width:100%!important;max-width:100%!important;}
@media(max-height:700px){.melody_flag-afterword-dialog{height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}.melody_flag-afterword-content{padding:12px}}
