.bm-edit-page { margin-block: clamp(2rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem); }
.bm-edit-invite h2 { margin: 0; }
.bm-edit-hero { max-width: 46rem; margin-inline: auto; background: var(--bm-surface); border-block: 1px solid var(--bm-line); }
.bm-edit-hero-copy { padding: clamp(1.4rem, 6vw, 4.5rem); }
.bm-edit-hero h1 { margin: .6rem 0 1rem; max-width: 15ch; font-size: clamp(2.35rem, 6vw, 4.4rem); }
.bm-edit-hero-copy > p:not(.bm-kicker) { max-width: 41ch; font-size: clamp(1.02rem, 1.5vw, 1.18rem); }
.bm-edit-signup { margin-top: 1.6rem; scroll-margin-top: 2rem; }
.bm-edit-signup small { display: block; margin-top: .65rem; max-width: 48ch; color: var(--bm-muted); line-height: 1.45; }
.bm-edit-provider-widget { min-width: 0; }
.bm-edit-provider-widget iframe { width: 100%; max-width: 100%; border: 0; }
.bm-edit-provider-widget form { display: grid; align-items: end; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .65rem; }
.bm-edit-provider-widget label, .bm-edit-provider-widget output { grid-column: 1 / -1; }
.bm-edit-provider-widget input[type=email] { width: 100%; min-width: 0; min-height: 48px; border: 1px solid #997766; background: #fff; padding: .65rem; color: var(--bm-text); font: inherit; }
.bm-edit-awaiting { margin: 0; border-inline-start: 2px solid #997766; padding-inline-start: .85rem; color: var(--bm-muted); }
.bm-edit-invite { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-block: 1px solid var(--bm-line); padding: clamp(1.2rem, 4vw, 2.4rem); background: var(--bm-surface); margin-block: clamp(2.5rem, 6vw, 5rem); }
.bm-edit-invite p:not(.bm-kicker) { margin: .45rem 0 0; }
.bm-edit-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; width: fit-content; padding: .65rem 1rem; border: 1px solid var(--bm-dark); background: var(--bm-dark); color: white; font: 700 .9rem/1.2 var(--bm-type); text-decoration: none; white-space: nowrap; cursor: pointer; }
.bm-edit-button:hover { background: var(--bm-wine); color: white; }
.bm-join > .bm-edit-button { position: relative; }
.bm-edit-banner {
    position: fixed; z-index: 30;
    inset: auto auto max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: .35rem;
    padding: .35rem .45rem .35rem .8rem;
    background: var(--bm-bg); border: 1px solid #ad8b78; box-shadow: 0 2px 16px #29181016;
}
.bm-edit-banner strong, .bm-edit-banner span { display: block; line-height: 1.25; }
.bm-edit-banner strong { font-size: .9rem; }
.bm-edit-banner span { font-size: .75rem; color: var(--bm-muted); }
.bm-edit-banner .bm-edit-button { padding-inline: .7rem; min-height: 44px; }
.bm-edit-banner button { min-height: 44px; border: 0; background: transparent; color: var(--bm-text); font: 400 1.5rem/1 var(--bm-type); cursor: pointer; }
.bm-edit-reader-invite { padding: clamp(1.25rem, 5vw, 3rem); background: var(--bm-surface); border-block: 1px solid var(--bm-line); }
.bm-edit-reader-invite h2 { margin: .4rem 0; }
.bm-edit-reader-invite .bm-edit-button { color: #fff; }
.bm-edit-vignette {
    position:fixed; z-index:31;
    inset:auto auto calc(5.3rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    width:min(21rem, calc(100% - 2rem)); max-height:calc(100dvh - 7rem);
    overflow:auto; isolation:isolate;
    padding:1.2rem 1.45rem 1.35rem; border:1px solid #ad8b78; border-radius:.9rem;
    background:var(--bm-bg); box-shadow:0 .6rem 2rem #29181022;
}
.bm-edit-vignette-mark {
    display:block; height:1.15rem; width:1.15rem; margin-block-end:.35rem;
    border:1px solid var(--bm-wine); border-radius:55% 0 55% 0; transform:rotate(-12deg);
    box-shadow:.24rem .24rem 0 #e7d2c2;
}
.bm-edit-vignette h2 { font-size:clamp(1.35rem, 5vw, 1.65rem); line-height:1.15; margin:.1rem 0 .45rem; }
.bm-edit-vignette > p:not(.bm-kicker) { font-size:.94rem; line-height:1.48; margin:0 0 .8rem; }
.bm-edit-vignette [data-bm-edit-vignette-close] {
    position:absolute; inset:.25rem .25rem auto auto; width:44px; height:44px;
    color:var(--bm-text); border:0; background:transparent; font:1.45rem/1 var(--bm-type); cursor:pointer;
}
@media (prefers-reduced-motion: no-preference) {
    .bm-edit-banner:not([hidden]), .bm-edit-vignette:not([hidden]) { animation:bm-edit-arrive .32s ease-out both; }
    .bm-edit-banner:not([hidden]) .bm-edit-button { animation:bm-edit-glint .65s 1.1s 2 alternate ease-in-out; }
    @keyframes bm-edit-arrive { from { opacity:0; transform:translateY(.6rem); } }
    @keyframes bm-edit-glint { to { box-shadow:0 0 0 .18rem #96715d60; } }
}
.bm-edit-dialog {
    width: min(100% - 2rem, 30rem);
    max-height: calc(100dvh - 2rem - env(safe-area-inset-bottom));
    overflow: auto;
    padding: clamp(1.4rem, 5vw, 2.5rem);
    border: 1px solid var(--bm-line);
    border-radius: 16px;
    background: var(--bm-bg);
    color: var(--bm-text);
}
.bm-edit-dialog::backdrop { background: #19151380; }
.bm-edit-dialog h2 { margin: .35rem 0 .7rem; font-size: clamp(2rem, 7vw, 3rem); max-width: 14ch; }
.bm-edit-dialog > p:not(.bm-kicker) { margin: 0 0 1.1rem; }
.bm-edit-dialog small { display: block; margin-top: .75rem; color: var(--bm-muted); }
.bm-edit-dialog [data-bm-edit-close] { position: absolute; inset: .35rem .35rem auto auto; width: 44px; height: 44px; border: 0; background: transparent; color: var(--bm-text); font: 1.5rem/1 var(--bm-type); cursor: pointer; }
html:has(.bm-edit-dialog[open]) { overflow: hidden; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .bm-edit-banner .bm-edit-button, .bm-edit-dialog .bm-edit-button { transition: background-color .16s ease; }
}

@media (max-width: 767px) {
    .bm-edit-invite { align-items: flex-start; flex-direction: column; }
    html:has([data-bm-edit-banner]) { scroll-padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
    body:has([data-bm-edit-banner]) { padding-bottom:calc(4.5rem + env(safe-area-inset-bottom)); }
    .bm-edit-banner {
        inset: auto 0 0;
        padding: .35rem max(.55rem, env(safe-area-inset-right)) calc(.35rem + env(safe-area-inset-bottom)) max(.65rem, env(safe-area-inset-left));
        border-width: 1px 0 0;
    }
    .bm-edit-vignette { inset-inline: auto .65rem; bottom:calc(4.65rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 374px) {
    .bm-edit-provider-widget form { grid-template-columns: minmax(0, 1fr); }
}
