/*
 * MADO POP BANNER AREA CSS — バナーエリア作成専用
 * SSOT / ownership (2026-09-22)
 * - mode=banner-area の配置wizardだけを担当する。creative編集CSSを持たない。
 * - 共通土台は pop-campaign-common.css。JSは public/js/pop-campaign-banner-area.js のみ。
 * - Normal/Easyのselectorをこのファイルへ追加しない。
 */

/* R56 / 2026-11-14: Banner Area background must survive creation STEP1-6
 * and the shorter/longer installation phase without jumping to flat purple.
 * The document canvas is the ONE fixed gradient owner; Portal shell and its
 * content layers are transparent. The shell fills at least the viewport and
 * the wizard has a modest bottom gutter after its navigator. Installation's
 * segmented toolbar aligns with the existing max-920px white work panel.
 * Keep this scoped to the banner-area page, not normal/easy POP or analytics.
 * No PHP, JS, REST, storage, preview or publication behavior changes. */
/* R52 / 2026-11-14: R51 notice behavior unchanged. Creation STEP guide uses
 * Easy palette, toolbar uses two equal mint-selection tabs, size help lives on
 * STEP2 progress line, and the find action matches preview button height.
 * Only Banner Area CSS/PHP changed; no duplicated logic or extra API. */
/* R50 / 2026-11-13: Separate ACTION from SELECTION palette.
 * Only filled primary action buttons use purple. Mint cards, focus borders,
 * radio checks, progress circles and pale backgrounds retain their R48 colors.
 * Text accent stays #007094. Scoped to Banner Area, never global Portal. */
#mado-pop-campaign-page.is-banner-area-mode {
    --mado-brand-accent: #06bfb5;
    --mado-brand-accent-hover: #05a9a1;
    --mado-brand-accent-text: #007094;
    --mado-brand-accent-soft: #e6fbf9;
    --mado-brand-accent-border: #b9eeea;
    --mado-brand-accent-ring: rgba(6, 191, 181, .20);
    --mado-action-primary-bg: #716bc2;
    --mado-action-primary-bg-hover: #5d57ac;
    --mado-action-primary-border: #716bc2;
    --mado-action-primary-border-hover: #5d57ac;
    --mado-ui-accent: #06bfb5;
    --mado-ui-switch-accent: #06bfb5;
}

/* One viewport-anchored gradient on the document canvas. R55 painted the
 * variable-height shell, so short steps ended at the purple body fallback.
 * Background attachment stays fixed when steps change or the user scrolls. */
body.mado-portal-account-page:has(#mado-pop-campaign-page.is-banner-area-mode) {
    background-color: #aaa1d7;
    background-image: linear-gradient(145deg, #aaa1d7 0%, #b8f7ef 52%, #7257a6 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}
body:has(#mado-pop-campaign-page.is-banner-area-mode)
[data-mado-portal-shell][data-mado-portal-nav-version="v2"].mado-portal-shell--action-pop-campaign {
    min-height: 100vh;
    min-height: 100dvh;
    background: transparent;
}
body:has(#mado-pop-campaign-page.is-banner-area-mode)
[data-mado-portal-shell][data-mado-portal-nav-version="v2"].mado-portal-shell--action-pop-campaign > .mado-portal-frame-toolbar,
body:has(#mado-pop-campaign-page.is-banner-area-mode)
[data-mado-portal-shell][data-mado-portal-nav-version="v2"].mado-portal-shell--action-pop-campaign > .mado-portal-frame-toolbar > .mado-portal-global-utility,
body:has(#mado-pop-campaign-page.is-banner-area-mode)
[data-mado-portal-shell][data-mado-portal-nav-version="v2"].mado-portal-shell--action-pop-campaign .mado-portal-global-utility__cluster,
body:has(#mado-pop-campaign-page.is-banner-area-mode)
[data-mado-portal-shell][data-mado-portal-nav-version="v2"].mado-portal-shell--action-pop-campaign > .mado-portal-shell__content,
body:has(#mado-pop-campaign-page.is-banner-area-mode)
[data-mado-portal-shell][data-mado-portal-nav-version="v2"].mado-portal-shell--action-pop-campaign > .mado-portal-shell__content > .mado-portal-shell__content-frame {
    background: transparent;
}
body:has(#mado-pop-campaign-page.is-banner-area-mode)
[data-mado-portal-shell][data-mado-portal-nav-version="v2"].mado-portal-shell--action-pop-campaign .mado-portal-global-utility__button--notification:not(:hover):not(:focus-visible),
body:has(#mado-pop-campaign-page.is-banner-area-mode)
[data-mado-portal-shell][data-mado-portal-nav-version="v2"].mado-portal-shell--action-pop-campaign .mado-portal-global-utility__link:not(:hover):not(:focus-visible) {
    background-color: transparent;
}

/* The wizard surface is only a layout grid, not a second gradient card. */
#mado-pop-campaign-page.is-banner-area-mode .mado-pop-campaign-page__surface {
    box-sizing: border-box;
    gap: 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Keep a consistent small gutter after the STEP navigator, regardless of
 * which creation/installation step is visible. Avoid spacer min-heights on
 * individual cards, which previously varied with the step's content. */
#mado-pop-campaign-page.is-banner-area-mode {
    box-sizing: border-box;
    padding-bottom: 28px;
}

/* Installation uses a centered 920px work panel (R15); match that exact
 * width on its persistent top segmented toolbar. Creation STEP1-6 remain
 * stretched to the existing two-column workspace. */
#mado-pop-campaign-page.is-banner-area-mode
.mado-banner-area[data-mado-banner-area-phase="installation"] > .mado-banner-area__manager-toolbar {
    box-sizing: border-box;
    width: 100%;
    max-width: 920px;
    margin-inline: auto;
}

/* R55: The compact preview heading and device switch formerly touched the
 * edges of their white card. Inset only these header rows. Do not pad the
 * viewport itself: it must remain as wide as before on small screens. */
@media (max-width: 720px) {
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area-preview__head {
        padding: 12px 12px 0;
        box-sizing: border-box;
        min-width: 0;
    }
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area-preview__meta {
        padding-inline: 12px;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area-preview__step-index {
        padding-inline: 12px;
        box-sizing: border-box;
    }
}
@media (max-width: 360px) {
    /* Preserve a single readable row on narrow 320px phones. */
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area-preview__head {
        padding-inline: 8px;
        gap: 6px;
    }
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area-preview__tabs button {
        padding-inline: 7px;
        font-size: 12px;
    }
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area-preview__meta,
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area-preview__step-index {
        padding-inline: 8px;
    }
}

/* BANNER AREA COMPACT HEADER / 2026-10-16
 * The long explanatory lead was moved out of the repeated wizard header.
 * Keep only a small upward nudge for this mode; shared POP header CSS stays untouched.
 */
#mado-pop-campaign-page.is-banner-area-mode .mado-pop-campaign-page__title {
    top: -3px;
}

/* R36 / 2026-11-13: Banner-area hero only. The shared POP hero uses a
 * horizontal flex row, so explicitly stack the page title and subtitle here.
 * The compact view has a separate subtitle because the desktop hero is hidden. */
#mado-pop-campaign-page.is-banner-area-mode .mado-pop-campaign-page__hero-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__hero-subtitle {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}
#mado-pop-campaign-page .mado-banner-area__compact-subtitle {
    display: none;
    margin: 0;
}
@media (max-width: 1100px) {
    #mado-pop-campaign-page .mado-banner-area__compact-subtitle {
        display: block;
        margin: 4px 0 0;
        padding: 0 14px;
        color: #475569;
        font-size: 14px;
        line-height: 1.5;
    }
}

#mado-pop-campaign-page .mado-banner-area {
    display: grid;
    gap: 12px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-banner-area [hidden] {
    display: none;
}


#mado-pop-campaign-page .mado-banner-area__step-nav {
    scroll-margin-top: 76px; /* R62: compact Next/Back returns here consistently. */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    margin-bottom: -4px;
}

#mado-pop-campaign-page .mado-banner-area__step-nav .mado-ui-button {
    min-width: 84px;
    min-height: 42px;
    padding: 9px 18px;
    font-size: 14px;
}

#mado-pop-campaign-page .mado-banner-area__layout {
    display: grid;
    grid-template-columns: minmax(400px, 48%) minmax(430px, 1fr);
    gap: 18px;
    align-items: start;
    min-width: 0;
}

/* R54: White content cards on the gradient workspace, like customer-plugin.
 * Avoid decorative borders inside borders; native form focus remains intact. */
#mado-pop-campaign-page .mado-banner-area__steps,
#mado-pop-campaign-page .mado-banner-area-preview {
    min-width: 0;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
}
#mado-pop-campaign-page .mado-banner-area__steps {
    box-sizing: border-box; /* tablet width: 100% must include padding */
    padding: 20px;
    /* Responsive choice cards follow the actual settings-panel width, not only the browser viewport. */
    container-type: inline-size;
    container-name: mado-banner-area-settings;
}

#mado-pop-campaign-page .mado-banner-area__step {
    display: grid;
    gap: 10px;
    min-height: 420px;
    align-content: start;
}

#mado-pop-campaign-page .mado-banner-area__step[hidden] {
    display: none;
}

#mado-pop-campaign-page .mado-banner-area__step-kicker {
    color: #007094;
    font-size: 12px;
    font-weight: 900;
    /* The progress label and the task title are one heading unit. */
    margin-bottom: -10px;
}

#mado-pop-campaign-page .mado-banner-area__step h3 {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.45;
}

#mado-pop-campaign-page .mado-banner-area__step p {
    margin: 0;
    color: #475569;
    font-size: 15px;
    line-height: 1.65;
}

/* STEP HEADING COPY RHYTHM / 2026-10-15
 * The step grid itself uses 10px so every heading -> explanatory paragraph pair
 * is reliably 10px apart. Primary controls add their own spacing below the copy.
 */
#mado-pop-campaign-page .mado-banner-area__step > .mado-banner-area__field,
#mado-pop-campaign-page .mado-banner-area__step > .mado-banner-area__choice-grid,
#mado-pop-campaign-page .mado-banner-area__step > .mado-banner-area__motion-options,
#mado-pop-campaign-page .mado-banner-area__step > .mado-banner-area__mount-code {
    margin-top: 10px;
}

#mado-pop-campaign-page .mado-banner-area__field {
    display: grid;
    gap: 7px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-banner-area__field input:not(.mado-ui-number-stepper__input),
#mado-pop-campaign-page .mado-banner-area__field textarea,
#mado-pop-campaign-page .mado-banner-area__field select,
#mado-pop-campaign-page .mado-banner-area__size-fields input:not(.mado-ui-number-stepper__input),
#mado-pop-campaign-page .mado-banner-area__motion-options select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #8494a6;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-size: 15px;
}

/* R50 retained R49: banner-specific drop-down chevron, moved ~10px inward.
 * Remove only the native graphic, not the native <select> control itself. */
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 46px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 3 5 5 5-5' fill='none' stroke='%23007094' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 16px center;
    background-size: 14px 10px;
    background-repeat: no-repeat;
}
@media (forced-colors: active) {
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area select {
        appearance: auto;
        background-image: none;
    }
}

#mado-pop-campaign-page .mado-banner-area__field input:not(.mado-ui-number-stepper__input):focus,
#mado-pop-campaign-page .mado-banner-area__field textarea:focus,
#mado-pop-campaign-page .mado-banner-area__field select:focus,
#mado-pop-campaign-page .mado-banner-area__size-fields input:not(.mado-ui-number-stepper__input):focus,
#mado-pop-campaign-page .mado-banner-area__motion-options select:focus {
    border-color: var(--mado-brand-accent, #06bfb5);
    outline: 3px solid var(--mado-brand-accent-ring, rgba(6, 191, 181, .20));
    outline-offset: 1px;
}

#mado-pop-campaign-page .mado-banner-area__unit {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
    gap: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

/*
 * BANNER AREA NUMBER STEPPER / 2026-10-17 R24 -> SHARED SSOT
 * - 134x48 pill, exact pointer-side hover, focus and disabled visuals now live in mado-base.css
 *   plus public/js/mado-ui-compact-controls.js.
 * - Banner Area keeps only surrounding field/grid layout here; do not restore a second visual implementation.
 */
#mado-pop-campaign-page .mado-banner-area__size-fields {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    gap: 14px 18px;
    align-items: start;
    width: 100%;
}

#mado-pop-campaign-page .mado-banner-area__size-fields--responsive .mado-banner-area__field {
    min-width: 0;
}

#mado-pop-campaign-page .mado-banner-area__field > small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

#mado-pop-campaign-page .mado-banner-area__step code {
    padding: 1px 5px;
    border-radius: 5px;
    background: #eef6f6;
    color: #007094;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .92em;
}

/*
 * BANNER AREA SIZE HELP / 2026-11-11 R5
 * Shared color / shape / hover / focus / open-state for '?' and help panel live
 * exclusively in public/css/mado-base.css (.mado-ui-help-chip,
 * .mado-ui-help-details, .mado-ui-help-details__panel).
 * The following rules own only layout, local content width and scroll handling.
 * Native details/summary + existing JS remain the sole interaction path.
 */
#mado-pop-campaign-page .mado-banner-area__size-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__size-topline > .mado-banner-area__step-kicker {
    margin-bottom: 0;
}
#mado-pop-campaign-page .mado-banner-area__size-heading-row {
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__size-heading-row > h3 {
    margin: 0;
    min-width: 0;
    width: 100%;
}

#mado-pop-campaign-page .mado-banner-area__size-help-inline {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-left: auto;
    max-width: 100%;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-banner-area__size-help-label {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

/* The base class determines the shape and color; local rules only anchor the popover. */
#mado-pop-campaign-page .mado-banner-area__size-tips {
    position: relative;
    margin: 0;
}

#mado-pop-campaign-page .mado-banner-area__size-tips-content {
    display: grid;
    gap: 7px;
    width: min(385px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(65vh, 550px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    white-space: normal; /* do not inherit single-line label behavior into help paragraphs */
}

@media (max-width: 640px) {
    #mado-pop-campaign-page .mado-banner-area__size-tips-content {
        width: min(340px, calc(100vw - 88px));
        max-width: calc(100vw - 88px);
    }
}

#mado-pop-campaign-page .mado-banner-area__size-tips:not([open]) > .mado-banner-area__size-tips-content { display: none; }

#mado-pop-campaign-page .mado-banner-area__size-tips-content h4 {
    margin: 7px 0 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
}

#mado-pop-campaign-page .mado-banner-area__size-tips-content h4:first-child { margin-top: 0; }

#mado-pop-campaign-page .mado-banner-area__size-tips-content ul {
    display: grid;
    gap: 6px;
    margin: 0 0 3px;
    padding-left: 1.3em;
}

#mado-pop-campaign-page .mado-banner-area__size-tips-content li { margin: 0; }

#mado-pop-campaign-page .mado-banner-area__size-tips-content [data-mado-banner-size-help-readable]:focus-visible {
    border-radius: 4px;
    outline: 2px solid #0f7776;
    outline-offset: 2px;
}

#mado-pop-campaign-page .mado-banner-area__size-help-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    min-height: 42px;
    margin-top: 3px;
    padding: 8px 14px;
    border: 1px solid #8494a6;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-banner-area__choice-grid {
    display: grid;
    gap: 10px;
}

/* TARGET-PAGE CHOICE GRID SSOT / 2026-10-17 r19
 * PC and phone: stack the three choices vertically.
 * Tablet alone uses three columns.
 */
#mado-pop-campaign-page .mado-banner-area__choice-grid--target {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

/* MOTION CHOICE GRID / 2026-10-17 r17
 * Motion copy is longer: desktop keeps three columns, compact layouts stack vertically.
 */
@media (min-width: 1101px) {
    #mado-pop-campaign-page .mado-banner-area__choice-grid--motion {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    /* PC only: target-page card copy was visually too large after the earlier enlargement. */
    #mado-pop-campaign-page .mado-banner-area__choice-grid--target .mado-banner-area__choice > span strong {
        font-size: 14px;
    }

    #mado-pop-campaign-page .mado-banner-area__choice-grid--target .mado-banner-area__choice > span small {
        font-size: 13px;
    }
}

#mado-pop-campaign-page .mado-banner-area__choice {
    position: relative;
    display: block;
    cursor: pointer;
}

/* Accessible radio touch target / 2026-10-19:
 * Native radio occupies its entire visual card, preserving radio-group keyboard behavior.
 * Previous zero-size transparent input + pointer-events:none was hard for mobile AT exploration.
 * Labels/descriptions come from the canonical input aria-labelledby/aria-describedby.
 */
#mado-pop-campaign-page .mado-banner-area__choice input[type="radio"] {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0.01;
    pointer-events: auto;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-banner-area__choice > span {
    display: grid;
    gap: 3px;
    min-height: 68px;
    padding: 13px 14px;
    border: 1px solid #cbd8e4;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
}

#mado-pop-campaign-page .mado-banner-area__choice > span strong {
    font-size: 15px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-banner-area__choice > span small {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

#mado-pop-campaign-page .mado-banner-area__choice input:checked + span {
    border-color: var(--mado-brand-accent, #06bfb5);
    background: var(--mado-brand-accent-soft, #e6fbf9);
    box-shadow: 0 0 0 2px var(--mado-brand-accent-ring, rgba(6, 191, 181, .20));
}

#mado-pop-campaign-page .mado-banner-area__choice input:focus-visible + span {
    outline: 3px solid #0f6665;
    outline-offset: 3px;
}

#mado-pop-campaign-page .mado-banner-area__motion-options {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: 14px;
    align-items: end;
    padding: 14px;
    border: 1px solid #d9e4ef;
    border-radius: 12px;
    background: #f8fbff;
}

#mado-pop-campaign-page .mado-banner-area__check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

#mado-pop-campaign-page .mado-banner-area__check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--mado-brand-accent, #06bfb5);
}

#mado-pop-campaign-page .mado-banner-area__item-picker {
    display: grid;
    gap: 8px;
    max-height: 310px;
    overflow: auto;
    padding-right: 4px;
}

#mado-pop-campaign-page .mado-banner-area__item-option {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #d5e0ea;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-banner-area__item-option:hover {
    border-color: #9bcfc9;
    background: #f8fffe;
}

/* R58: when a banner checkbox has keyboard focus, outline the whole labeled
 * card. The native checkbox still owns its checked state and screen-reader name. */
#mado-pop-campaign-page .mado-banner-area__item-option:focus-within {
    outline: 3px solid var(--mado-brand-accent, #06bfb5);
    outline-offset: 2px;
}

#mado-pop-campaign-page .mado-banner-area__item-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--mado-brand-accent, #06bfb5);
}

#mado-pop-campaign-page .mado-banner-area__item-swatch {
    display: grid;
    place-items: center;
    width: 58px;
    height: 42px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 8px;
    background: var(--mado-banner-item-bg, #e6fbf9);
    color: var(--mado-banner-item-text, #0f172a);
}

/* Saved completed POP preview. Keep aspect ratio; do not crop or upsample a material. */
#mado-pop-campaign-page .mado-banner-area__item-swatch img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#mado-pop-campaign-page .mado-banner-area__item-swatch span {
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .76);
    font-size: 11px;
    font-weight: 900;
}

#mado-pop-campaign-page .mado-banner-area__item-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-banner-area__item-copy strong,
#mado-pop-campaign-page .mado-banner-area__item-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-banner-area__item-copy strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-banner-area__item-copy small {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

#mado-pop-campaign-page .mado-banner-area__selected-order {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #dce6ef;
    border-radius: 12px;
    background: #f8fbff;
}

#mado-pop-campaign-page .mado-banner-area__selected-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #334155;
    font-size: 13px;
}

#mado-pop-campaign-page [data-mado-banner-area-selected-list] {
    display: grid;
    gap: 6px;
}

#mado-pop-campaign-page .mado-banner-area__selected-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #d4dee8;
    border-radius: 9px;
    background: #ffffff;
}

#mado-pop-campaign-page .mado-banner-area__selected-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
    flex: 1 1 auto;
}

#mado-pop-campaign-page .mado-banner-area__selected-copy strong,
#mado-pop-campaign-page .mado-banner-area__selected-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-banner-area__selected-copy strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-banner-area__selected-copy small {
    color: #64748b;
    font-size: 10px;
}

#mado-pop-campaign-page .mado-banner-area__selected-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

#mado-pop-campaign-page .mado-banner-area__selected-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-banner-area__selected-actions button:disabled {
    opacity: .35;
    cursor: default;
}

#mado-pop-campaign-page .mado-banner-area__selected-empty {
    color: #64748b;
    font-size: 12px;
}

#mado-pop-campaign-page .mado-banner-area__empty {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #d9e4ef;
    border-radius: 12px;
    background: #f8fbff;
}

#mado-pop-campaign-page .mado-banner-area__empty strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-banner-area__empty p {
    font-size: 12px;
}

#mado-pop-campaign-page .mado-banner-area__status {
    min-height: 20px;
    color: #007094;
    font-size: 12px;
    font-weight: 700;
}

#mado-pop-campaign-page .mado-banner-area__preview {
    position: sticky;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 16px);
}

#mado-pop-campaign-page .mado-banner-area-preview {
    display: grid;
    gap: 12px;
    padding: 16px;
}

#mado-pop-campaign-page .mado-banner-area-preview__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
}

#mado-pop-campaign-page .mado-banner-area-preview__head h3 {
    grid-column: 1;
    justify-self: start;
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-banner-area-preview__tabs {
    grid-column: 2;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid #cbd8e4;
    border-radius: 999px;
    background: #f8fafc;
}

#mado-pop-campaign-page .mado-banner-area-preview__tabs button {
    min-height: 30px;
    padding: 5px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-banner-area-preview__tabs button.is-selected {
    background: #716bc2;
    color: #ffffff;
}

#mado-pop-campaign-page .mado-banner-area-preview__meta {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

#mado-pop-campaign-page .mado-banner-area-preview__viewport {
    width: 100%;
    max-width: 720px;
    min-height: 430px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #cbd8e4;
    border-radius: 16px;
    background: #ffffff;
    transition: width .2s ease;
}

#mado-pop-campaign-page .mado-banner-area-preview__viewport[data-device="tablet"] {
    width: 74%;
}

#mado-pop-campaign-page .mado-banner-area-preview__viewport[data-device="mobile"] {
    width: 42%;
    min-width: 250px;
}

#mado-pop-campaign-page .mado-banner-area-preview__browser-top {
    display: flex;
    gap: 5px;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-bottom: 1px solid #e1e8ef;
    background: #f4f7fa;
}

#mado-pop-campaign-page .mado-banner-area-preview__browser-top span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #b8c5d2;
}

#mado-pop-campaign-page .mado-banner-area-preview__page {
    display: grid;
    gap: 16px;
    min-height: 404px;
    align-content: start;
    padding: 22px 18px 28px;
    background-color: #fbfdff;
    background-image:
        linear-gradient(rgba(148, 163, 184, .10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .10) 1px, transparent 1px);
    background-size: 18px 18px;
}

#mado-pop-campaign-page .mado-banner-area-preview__content {
    display: grid;
    gap: 7px;
    width: min(82%, 500px);
    margin: 0 auto;
}

#mado-pop-campaign-page .mado-banner-area-preview__content span {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .28);
}

#mado-pop-campaign-page .mado-banner-area-preview__content span:nth-child(2) {
    width: 76%;
}

#mado-pop-campaign-page .mado-banner-area-preview__content span:nth-child(3) {
    width: 58%;
}

#mado-pop-campaign-page .mado-banner-area-preview__inline-area {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--mado-banner-area-ratio, 4.09);
    min-height: 92px;
    max-height: 250px;
    overflow: hidden;
    margin: 6px auto;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .82);
}

#mado-pop-campaign-page .mado-banner-area-preview__runtime-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    /*
     * MANAGEMENT PREVIEW IFRAME WIDTH / 2026-10-15:
     * Theme/global iframe rules commonly cap embeds with max-width:100%.
     * That must not shrink the simulated 1200/900/390px device viewport,
     * because widget-pop-runtime.js selects its PC/tablet/mobile creative
     * from contentWindow.innerWidth. JS remains the owner of dynamic width,
     * height and scale; this scoped reset only removes the external cap.
     */
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}


/* TABLET / NARROW DESKTOP STACK / 2026-10-16
 * 721-1100px keeps one ordinary vertical document flow: settings first, the one canonical
 * management preview immediately below. This deliberately removes the former horizontal
 * swipe/off-canvas editor path, so mouse-wheel/trackpad/touch all reach the preview the same way.
 * No duplicate preview DOM, save path, polling, or second wizard state is introduced.
 * Step 2 keeps its three compact numeric controls in one row. Step 3's longer motion choices
 * return to one vertical column at this width so label length never distorts the card rhythm.
 * Step 5 keeps its three short page-target choices in one row; only <=520px stacks them.
 */
@media (min-width: 721px) and (max-width: 1100px) {
    #mado-pop-campaign-page .mado-banner-area__layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        min-width: 0;
        overflow: visible;
        padding: 0;
    }

    #mado-pop-campaign-page .mado-banner-area__steps,
    #mado-pop-campaign-page .mado-banner-area__preview {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    #mado-pop-campaign-page .mado-banner-area__preview {
        position: static;
    }

    #mado-pop-campaign-page .mado-banner-area__step {
        min-height: 0;
    }

    #mado-pop-campaign-page .mado-banner-area__step--size {
        gap: 8px;
        justify-items: stretch;
        text-align: left;
    }

    /* R62 / 2026-11-14: A tablet has one wide settings panel. Keep STEP2's
     * three numeric columns, count selector and width note in ONE centered
     * 560px group rather than leaving the count label 134px at the left.
     * Do not change the phone grid or the desktop balanced workspace. */
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-body--size {
        box-sizing: border-box;
        width: min(100%, 560px);
        justify-self: center;
        margin-inline: auto;
    }

    #mado-pop-campaign-page.is-banner-area-mode
    .mado-banner-area__step--size .mado-banner-area__mobile-visible-count {
        width: 100%;
        min-width: 0;
        max-width: none;
        justify-self: stretch;
        justify-items: stretch;
        text-align: left;
    }

    #mado-pop-campaign-page.is-banner-area-mode
    .mado-banner-area__step--size .mado-banner-area__mobile-visible-count select {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
    }

    #mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields {
        grid-template-columns: repeat(3, max-content);
        justify-content: center;
        width: 100%;
        gap: 12px 16px;
    }

    #mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__field {
        width: 134px;
        min-width: 134px;
        justify-items: center;
        text-align: center;
    }

    #mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__unit {
        justify-content: center;
    }

    /* Motion copy is longer than the target-page copy; keep these three choices vertically even on tablet. */
    #mado-pop-campaign-page .mado-banner-area__choice-grid--motion {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    #mado-pop-campaign-page .mado-banner-area__choice-grid--motion .mado-banner-area__choice > span {
        min-height: 0;
        padding: 11px 13px;
    }

    #mado-pop-campaign-page .mado-banner-area__step--motion {
        gap: 8px;
    }

    #mado-pop-campaign-page .mado-banner-area__choice-grid--target {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    #mado-pop-campaign-page .mado-banner-area__choice-grid--target .mado-banner-area__choice > span {
        min-height: 0;
        padding: 10px 11px;
    }

    #mado-pop-campaign-page .mado-banner-area__step[data-mado-banner-area-step="5"] {
        gap: 8px;
    }

    #mado-pop-campaign-page .mado-banner-area__step[data-mado-banner-area-step="5"] > p {
        margin-bottom: 2px;
    }

    #mado-pop-campaign-page .mado-banner-area-preview__viewport {
        max-width: 720px;
    }
}


/* NARROW SETTINGS PANEL CHOICES / 2026-10-17
 * The left settings column can become phone-like before the whole browser reaches the global breakpoint.
 * Stack the longer motion cards whenever the actual settings panel is narrow. Target-page cards use their own viewport SSOT above.
 */
/* COMPACT CHOICE CARD SSOT / 2026-10-17 r14
 * The actual settings-card width is authoritative. Do not override this later with a desktop viewport rule:
 * a wide browser can still leave this panel narrow beside the preview.
 */
@container mado-banner-area-settings (max-width: 620px) {
    #mado-pop-campaign-page .mado-banner-area__choice-grid--motion {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    #mado-pop-campaign-page .mado-banner-area__choice-grid--motion .mado-banner-area__choice > span {
        min-height: 0;
    }
}

/* MOBILE WIZARD / 2026-10-17
 * - Normal steps stay in ordinary document flow: compact settings first, the canonical preview immediately below.
 * - Step 4 alone keeps the existing two-tab picker/preview switch because banner selection is a repeated compare-and-adjust task.
 * - Remove desktop-sized minimum step height so a short form never creates a blank screen before its preview.
 * - Step 2 keeps three numeric columns on tablet, two columns on phones.
 */
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        overflow: visible;
        padding: 0;
    }

    #mado-pop-campaign-page .mado-banner-area__step {
        min-height: 0;
    }

    #mado-pop-campaign-page .mado-banner-area__steps,
    #mado-pop-campaign-page .mado-banner-area-preview {
        padding: 14px;
    }

    #mado-pop-campaign-page .mado-banner-area__step--size {
        gap: 8px;
    }

    #mado-pop-campaign-page .mado-banner-area__size-fields {
        grid-template-columns: repeat(3, max-content);
        justify-content: center;
        gap: 12px 12px;
        width: 100%;
    }

    #mado-pop-campaign-page .mado-banner-area__size-fields .mado-banner-area__field {
        width: 134px;
        min-width: 134px;
        justify-items: center;
        text-align: center;
    }

    #mado-pop-campaign-page .mado-banner-area__size-fields .mado-banner-area__unit {
        justify-content: center;
    }

    #mado-pop-campaign-page .mado-banner-area__motion-options {
        grid-template-columns: minmax(0, 1fr);
    }

    #mado-pop-campaign-page .mado-banner-area__choice-grid--motion {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media (max-width: 520px) {
    #mado-pop-campaign-page .mado-banner-area__size-heading-row {
        flex-wrap: wrap;
        gap: 8px;
    }


#mado-pop-campaign-page .mado-banner-area__item-option {
        grid-template-columns: auto 48px minmax(0, 1fr);
    }

#mado-pop-campaign-page .mado-banner-area__item-swatch {
        width: 48px;
        height: 38px;
    }

#mado-pop-campaign-page .mado-banner-area-preview__viewport[data-device="mobile"] {
        width: 100%;
        min-width: 0;
    }
}

#mado-pop-campaign-page .mado-banner-area__gate{display:grid;gap:4px;padding:14px 16px;border:1px solid var(--mado-brand-accent-border,#b9eeea);border-radius:12px;background:var(--mado-brand-accent-soft,#e6fbf9);color:#007094}

#mado-pop-campaign-page .mado-banner-area__gate.is-error{border-color:#fecaca;background:#fff1f2;color:#991b1b}

#mado-pop-campaign-page .mado-banner-area__gate strong{font-size:14px}

.mado-banner-area__gate span{font-size:12px;line-height:1.6}

/* Steps 2-3 are ordinary content; only the AI helper below is highlighted. */
#mado-pop-campaign-page .mado-banner-area__mount-code {
    display: grid;
    gap: 18px;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#mado-pop-campaign-page .mado-banner-area__mount-code[hidden] { display: none; }

#mado-pop-campaign-page .mado-banner-area__install-code-block {
    display: grid;
    gap: 7px;
}

#mado-pop-campaign-page .mado-banner-area__install-label-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: #49328b;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
}

#mado-pop-campaign-page .mado-banner-area__mount-code textarea[data-mado-banner-area-mount-code],
#mado-pop-campaign-page .mado-banner-area__mount-code input[data-mado-banner-area-shortcode] {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
}
/* R10: readonly HTML/Shopify/other mount code matches WP's one-line input height;
 * if code becomes longer, the user can scroll horizontally or expand the field. */
#mado-pop-campaign-page .mado-banner-area__mount-code textarea[data-mado-banner-area-mount-code] {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    padding-block: 9px;
    line-height: 24px;
    white-space: pre;
    overflow-x: auto;
    overflow-y: hidden;
    resize: vertical;
}

#mado-pop-campaign-page .mado-banner-area__action-with-help {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-banner-area__action-with-help > .mado-ui-button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}

/* R66: explain unavailable Save/Preview/Publish progression to all visitors;
 * aria-disabled (without native disabled) keeps the two actions discoverable. */
#mado-pop-campaign-page .mado-banner-area__publish-help {
    margin: 0;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.65;
}
#mado-pop-campaign-page .mado-banner-area__publish-help:focus-visible,
#mado-pop-campaign-page .mado-banner-area__step [aria-disabled="true"]:focus-visible {
    outline: 3px solid #0f6665;
    outline-offset: 3px;
    border-radius: 6px;
}

#mado-pop-campaign-page .mado-banner-area__html-tools {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    background: #fff;
}

#mado-pop-campaign-page .mado-banner-area__html-tools > summary {
    width: fit-content;
    color: #334155;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-banner-area__html-tools > summary:focus-visible {
    outline: 2px solid #0f7776;
    outline-offset: 3px;
    border-radius: 4px;
}

#mado-pop-campaign-page .mado-banner-area__html-tools-body {
    display: grid;
    gap: 18px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

#mado-pop-campaign-page .mado-banner-area__html-tool-block {
    display: grid;
    gap: 8px;
}

#mado-pop-campaign-page .mado-banner-area__html-tool-block + .mado-banner-area__html-tool-block {
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

#mado-pop-campaign-page .mado-banner-area__html-tool-block .mado-ui-button {
    width: fit-content;
    max-width: 100%;
    font-size: 15px;
    font-weight: 800;
    white-space: normal;
}

#mado-pop-campaign-page .mado-banner-area__html-tool-description {
    margin: 0;
    color: #475569;
    font-size: 15px;
    line-height: 1.7;
}

#mado-pop-campaign-page .mado-banner-area__status[data-state="success"]{color:#49328b}

#mado-pop-campaign-page .mado-banner-area__status[data-state="error"]{color:#b42318}

#mado-pop-campaign-page [data-mado-banner-area-disabled="1"]{opacity:.72}

/* R42: Saved-area list lives in the modal; no nested disclosure is required. */
#mado-pop-campaign-page .mado-banner-area__area-switcher {
    display: block;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__area-switcher-body {
    display: grid;
    gap: 10px;
}

#mado-pop-campaign-page .mado-banner-area__area-switcher-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#mado-pop-campaign-page .mado-banner-area__area-switcher-item {
    display: inline-grid;
    gap: 2px;
    min-width: 138px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    text-decoration: none;
}

#mado-pop-campaign-page .mado-banner-area__area-switcher-item:hover {
    border-color: var(--mado-brand-accent, #06bfb5);
}

#mado-pop-campaign-page .mado-banner-area__area-switcher-item:focus-visible {
    border-color: var(--mado-brand-accent, #06bfb5);
    outline: 3px solid var(--mado-brand-accent-ring, rgba(6, 191, 181, .20));
    outline-offset: 2px;
}

#mado-pop-campaign-page .mado-banner-area__area-switcher-item.is-active {
    border-color: var(--mado-brand-accent, #06bfb5);
    background: var(--mado-brand-accent-soft, #e6fbf9);
}

#mado-pop-campaign-page .mado-banner-area__area-switcher-item strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-banner-area__area-switcher-item span,
#mado-pop-campaign-page .mado-banner-area__area-switcher-empty {
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__area-switcher-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    #mado-pop-campaign-page .mado-banner-area__area-switcher-item {
        min-width: 0;
    }
}

/* R43 / 2026-11-13: One manager. PC = true native modal; mobile = separate in-flow screen.
 * No duplicated list DOM, no custom focus trap, no new REST or plan logic. */
#mado-pop-campaign-page .mado-banner-area__step h3[tabindex="-1"]:focus { outline: none; }
/* R53: One two-part segmented navigation, no outer card-in-card frame.
 * Existing aria-pressed logic/management dialog is the only state owner. */
#mado-pop-campaign-page .mado-banner-area__manager-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: 1px solid #bddfdf;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}
#mado-pop-campaign-page .mado-banner-area__editor-entry,
#mado-pop-campaign-page .mado-banner-area__open-manager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 0;
    border: 0;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area__open-manager {
    border-inline-start: 1px solid #bddfdf;
}
#mado-pop-campaign-page .mado-banner-area__manager-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    stroke: currentColor;
}
/* On narrow 2-column screens, break only between the two meaningful phrases,
 * never leave the final character of 「管理」 alone on a new line. */
#mado-pop-campaign-page .mado-banner-area__manager-label {
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__manager-label-part {
    display: inline-block;
    white-space: nowrap;
}
#mado-pop-campaign-page .mado-banner-area__editor-entry[aria-pressed="true"],
#mado-pop-campaign-page .mado-banner-area__open-manager[aria-pressed="true"] {
    color: #0f172a;
    background: #e8faf8;
}
#mado-pop-campaign-page .mado-banner-area__editor-entry:focus-visible,
#mado-pop-campaign-page .mado-banner-area__open-manager:focus-visible,
#mado-pop-campaign-page .mado-banner-area__new-area-link:focus-visible,
#mado-pop-campaign-page .mado-banner-area__manager-dialog-close:focus-visible {
    outline: 3px solid #087d7c;
    outline-offset: -3px;
}
#mado-pop-campaign-page .mado-banner-area__manager-dialog {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(92vw, 680px);
    max-width: calc(100vw - 24px);
    max-height: min(82dvh, 760px);
    margin: auto;
    padding: 22px;
    overflow-y: auto;
    color: #0f172a;
    background: #fff;
    border: 1px solid #d5e5eb;
    border-radius: 16px;
    box-shadow: 0 20px 70px rgba(15, 23, 42, .27);
}
#mado-pop-campaign-page .mado-banner-area__manager-dialog:not([open]) { display: none; }
#mado-pop-campaign-page .mado-banner-area__manager-dialog::backdrop { background: rgba(15, 23, 42, .54); }
#mado-pop-campaign-page .mado-banner-area__manager-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
#mado-pop-campaign-page .mado-banner-area__manager-dialog-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 800;
}
#mado-pop-campaign-page .mado-banner-area__manager-dialog-head h2:focus { outline: none; }
#mado-pop-campaign-page .mado-banner-area__manager-dialog-close {
    min-width: 66px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #ccd8e3;
    border-radius: 9px;
    color: #334155;
    background: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area__new-area-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    box-sizing: border-box;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    --mado-ai-surface-gradient: linear-gradient(
        135deg,
        rgba(88, 215, 231, 0.092) 0%,
        rgba(95, 187, 232, 0.0805) 34%,
        rgba(122, 101, 200, 0.115) 68%,
        rgba(94, 216, 210, 0.0805) 100%
    );
}
#mado-pop-campaign-page .mado-banner-area__new-area-plus {
    flex: 0 0 20px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    text-align: right;
}
#mado-pop-campaign-page .mado-banner-area__manager-saved-heading {
    margin: 22px 0 10px;
    font-size: 15px;
    font-weight: 800;
}
#mado-pop-campaign-page .mado-banner-area__saved-manager,
#mado-pop-campaign-page .mado-banner-area__area-switcher {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
#mado-pop-campaign-page .mado-banner-area__manager-dialog .mado-banner-area__area-switcher {
    border: 0;
    padding: 0;
    background: transparent;
}
#mado-pop-campaign-page .mado-banner-area__manager-dialog .mado-banner-area__area-switcher-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}
#mado-pop-campaign-page .mado-banner-area__manager-dialog .mado-banner-area__area-switcher-item {
    min-width: 0;
    width: 100%;
    padding: 12px 14px;
    box-sizing: border-box;
}
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__manager-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }
    #mado-pop-campaign-page .mado-banner-area__editor-entry,
    #mado-pop-campaign-page .mado-banner-area__open-manager {
        min-height: 48px;
        height: auto;
        padding: 8px 6px;
        font-size: clamp(12px, 3.4vw, 14px);
        line-height: 1.35;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    #mado-pop-campaign-page .mado-banner-area__manager-icon {
        flex-basis: 18px;
        width: 18px;
        height: 18px;
    }
    #mado-pop-campaign-page .mado-banner-area[data-mado-banner-area-manager-screen="manager"] > :not(.mado-banner-area__manager-toolbar):not(.mado-banner-area__manager-dialog) {
        display: none !important;
    }
    #mado-pop-campaign-page .mado-banner-area__manager-dialog[open] {
        position: static;
        display: block;
        width: 100%;
        max-width: none;
        max-height: none;
        min-height: 350px;
        margin: 0;
        padding: 18px 14px;
        box-shadow: none;
        border: 1px solid #d9e4ef;
        border-radius: 16px;
        overflow: visible;
    }
    /* R44: keep the header readable without forcing a one-character second line;
     * remove just the outer preview card, not the simulated webpage frame. */
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__compact-purpose,
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__compact-subtitle {
        padding-right: 1px;
        padding-left: 1px;
    }
    #mado-pop-campaign-page .mado-banner-area-preview {
        padding: 0;
        border: 0;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: none;
    }
    #mado-pop-campaign-page .mado-banner-area__manager-dialog-head { gap: 8px; }
    #mado-pop-campaign-page .mado-banner-area__manager-dialog-head h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__manager-dialog[open] {
        animation: mado-banner-manager-in .2s ease-out both;
    }
    @keyframes mado-banner-manager-in {
        from { opacity: .4; transform: translateX(14px); }
        to { opacity: 1; transform: translateX(0); }
    }
}
#mado-pop-campaign-page .mado-banner-area__saved-card {
    display: grid;
    min-width: 0;
    max-width: 100%;
}
#mado-pop-campaign-page .mado-banner-area__saved-card > summary {
    cursor: pointer;
    list-style: none;
}
#mado-pop-campaign-page .mado-banner-area__saved-card > summary::-webkit-details-marker { display: none; }
#mado-pop-campaign-page .mado-banner-area__saved-card > summary::marker { content: ''; }
#mado-pop-campaign-page .mado-banner-area__saved-card > summary::after {
    content: '▾';
    font-size: 12px;
    color: #475569;
    justify-self: end;
}
#mado-pop-campaign-page .mado-banner-area__saved-card[open] > summary::after {
    transform: rotate(180deg);
}
#mado-pop-campaign-page .mado-banner-area__saved-card > summary:focus-visible {
    outline: 3px solid var(--mado-brand-accent-ring, rgba(6, 191, 181, .35));
    outline-offset: 2px;
}
#mado-pop-campaign-page .mado-banner-area__saved-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    max-width: 100%;
}
#mado-pop-campaign-page .mado-banner-area__saved-card-actions .mado-ui-button {
    min-height: 38px;
    font-size: 13px;
}
#mado-pop-campaign-page .mado-banner-area__saved-card-note {
    flex-basis: 100%;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__saved-card-actions .mado-ui-button {
        width: 100%;
        justify-content: center;
    }
}


/* BANNER AREA DIRECT STEP INDEX / 2026-10-02
 * Numeric controls are deliberately quiet (14px) but keep >=30px targets and a strong
 * focus-visible ring. aria-current=step identifies the active position to AT.
 */
#mado-pop-campaign-page .mado-banner-area-preview__step-index {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 6px;
    min-height: 32px;
}
#mado-pop-campaign-page .mado-banner-area-preview__step-index button {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area-preview__step-index button:hover {
    border-color: #b9eeea;
    background: #f0fdfa;
    color: #0f7776;
}
#mado-pop-campaign-page .mado-banner-area-preview__step-index button.is-current,
#mado-pop-campaign-page .mado-banner-area-preview__step-index button[aria-current="step"] {
    border-color: #06bfb5;
    background: #e6fbf9;
    color: #0f7776;
    font-weight: 800;
}
#mado-pop-campaign-page .mado-banner-area-preview__step-index button:focus-visible {
    outline: 2px solid #0f7776;
    outline-offset: 2px;
}

/* BANNER AREA INSTALL / Q&A OWNERSHIP / 2026-10-16
 * The former footer “どういう仕組み？” explanation moved to Q&A and is intentionally not rendered here.
 * Installation/AI placement controls stay in Step 6; saved-area navigation remains the only footer content.
 */
/* A single mint card marks the optional AI-assisted placement path in stage 3. */
#mado-pop-campaign-page .mado-banner-area__ai-placement {
    display: block;
    overflow: hidden;
    margin-top: 0;
    padding: 0;
    min-width: 0;
    border-width: 1px;
    border-style: solid;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
    /* Visual color and animation: shared .mado-ai-surface (mado-base.css). */
}
/* Native details/summary: closed content must remain hidden even when child controls
 * use author-defined display:grid. Focus and keyboard behavior are browser-native. */
#mado-pop-campaign-page .mado-banner-area__ai-placement:not([open]) > .mado-banner-area__ai-placement-body {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement[open] > .mado-banner-area__ai-placement-body {
    display: grid;
    gap: 10px;
    padding: 16px 18px 18px;
    background: rgba(255, 255, 255, 0.46);
}


/* Banner Area: eight explicit candidates, including inner/outer block pairs. Provider-only.
 * Radio/fieldset keep native keyboard and screen-reader semantics. */
#mado-pop-campaign-page .mado-banner-area__placement-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
    padding: 0;
    margin: 6px 0 0;
    border: 0;
}
#mado-pop-campaign-page .mado-banner-area__placement-presets legend {
    font-weight: 800;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 10px;
}
#mado-pop-campaign-page .mado-banner-area__placement-presets .mado-banner-area__placement-intro {
    grid-column: 1 / -1;
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}
#mado-pop-campaign-page .mado-banner-area__placement-presets label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    background: #fff;
    font-weight: 400;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__placement-presets label:has(input:checked) {
    border-color: #0f9488;
    background: #effffd;
}
#mado-pop-campaign-page .mado-banner-area__placement-presets input[type="radio"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 3px 0 0;
    padding: 0;
    accent-color: #2563eb;
}
#mado-pop-campaign-page .mado-banner-area__placement-presets label span {
    display: grid;
    gap: 4px;
}
#mado-pop-campaign-page .mado-banner-area__placement-presets label strong {font-size: 15px;color: #0f172a;}
#mado-pop-campaign-page .mado-banner-area__placement-presets label small {font-size: 13px;line-height: 1.45;color: #475569;}
#mado-pop-campaign-page .mado-banner-area__placement-target[hidden] {display: none;}
#mado-pop-campaign-page .mado-banner-area__placement-target input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    font: inherit;
}
#mado-pop-campaign-page .mado-banner-area__placement-target small {
    font-size: 13px;
    font-weight: 400;
    color: #475569;
    line-height: 1.55;
}
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__placement-presets {grid-template-columns: 1fr;}
}

#mado-pop-campaign-page .mado-banner-area__ai-placement-actions > span {
    margin: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

/* Only text-entry labels use the grid layout. Preset radio labels remain flex rows. */
#mado-pop-campaign-page .mado-banner-area__ai-placement label.mado-banner-area__placement-target {
    display: grid;
    gap: 6px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 800;
}
/* Respect JS-controlled visibility: the stronger label display:grid must not
   overrule the [hidden] attribute when a heading/image name is not required. */
#mado-pop-campaign-page .mado-banner-area__ai-placement label.mado-banner-area__placement-target[hidden] {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement label textarea {
    min-height: 82px;
    resize: vertical;
    font-family: var(--ai-chat-font-family, "Noto Sans JP", system-ui, sans-serif);
    line-height: 1.55;
}
/* Prevent a full-width text field from growing past the disclosure padding. */
#mado-pop-campaign-page .mado-banner-area__placement-target input {
    box-sizing: border-box;
    max-width: 100%;
}

#mado-pop-campaign-page .mado-banner-area__ai-placement-actions {
    display: grid;
    justify-items: center;
    gap: 8px 10px;
    margin-top: 15px;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement-actions > .mado-ui-button {
    box-sizing: border-box;
    width: 100%;
    max-width: 370px;
    min-height: 48px;
    justify-content: center;
}

/* 2026-11-20: Only Banner Area's installation picker is affected.
 * Radio marks remain blue, selected cards remain pale mint; search CTA
 * retains the mint background with #1f2937 text. Form/quick UI unchanged. */
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__ai-placement-actions > [data-mado-banner-area-ai-placement-find] {
    background: #c7f2ed;
    border-color: #c7f2ed;
    color: #1f2937;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__ai-placement-actions > [data-mado-banner-area-ai-placement-find]:is(:hover, :focus-visible, :active) {
    background: #baf0e9;
    border-color: #baf0e9;
    color: #1f2937;
}

#mado-pop-campaign-page .mado-banner-area__ai-placement-actions .mado-ui-button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__ai-placement-actions {
        justify-items: stretch;
    }

    #mado-pop-campaign-page .mado-banner-area__ai-placement-actions .mado-ui-button {
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__action-with-help {
        max-width: 100%;
    }
}


/* RESPONSIVE ITEM/PREVIEW TABS / 2026-10-16
 * Step 4 is the only compact-layout screen that needs rapid repeated switching while choosing banners.
 * Reuse the one settings panel and one management-preview panel; do not add horizontal overflow/swipe navigation.
 * Desktop (>1100px) keeps the normal side-by-side layout and does not show these tabs.
 */
#mado-pop-campaign-page .mado-banner-area__view-tabs {
    display: none;
}

@media (max-width: 1100px) {
    #mado-pop-campaign-page .mado-banner-area__view-tabs:not([hidden]) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        width: min(420px, 100%);
        margin: 0 auto 10px;
        padding: 4px;
        border: 1px solid #d7e3ec;
        border-radius: 12px;
        background: #f3f7fa;
    }

    #mado-pop-campaign-page .mado-banner-area__view-tabs button {
        appearance: none;
        min-height: 40px;
        padding: 8px 12px;
        border: 1px solid transparent;
        border-radius: 9px;
        background: transparent;
        color: #475569;
        font: inherit;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.25;
        cursor: pointer;
    }

    #mado-pop-campaign-page .mado-banner-area__view-tabs button[aria-selected="true"] {
        border-color: #b9eeea;
        background: #ffffff;
        color: #007094;
        box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
    }

    #mado-pop-campaign-page .mado-banner-area__view-tabs button:focus-visible {
        outline: 3px solid var(--mado-brand-accent-ring, rgba(6, 191, 181, .20));
        outline-offset: 2px;
    }

    #mado-pop-campaign-page [data-mado-banner-area-compact-view="settings"] .mado-banner-area__preview {
        display: none;
    }

    #mado-pop-campaign-page [data-mado-banner-area-compact-view="preview"] .mado-banner-area__steps {
        display: none;
    }

    #mado-pop-campaign-page [data-mado-banner-area-compact-view="preview"] .mado-banner-area__preview {
        display: block;
        width: 100%;
        max-width: none;
        min-width: 0;
        position: static;
    }
}


/* R55: keep the newly active banner STEP heading visible after a footer pager
 * jump, including under the portal's persistent compact navigation. */
@media (max-width: 1100px) {
    #mado-pop-campaign-page .mado-banner-area__step,
    #mado-pop-campaign-page .mado-banner-area__step h3 {
        scroll-margin-top: 86px;
    }
}

/* BANNER AREA COPY / COMPACT HIERARCHY / R65
 * Tablet/mobile omit the page-level H1 from the visual layout, but preserve the
 * visible STEP N / 6 markers above each task heading on every screen size.
 * The old orphaned `.mado-banner-area__step-kicker,` rule was invalid CSS.
 */
@media (max-width: 1100px) {
    #mado-pop-campaign-page.is-banner-area-mode .mado-pop-campaign-page__hero {
        display: none;
    }
}

/* STEP 6 / 2026-11-09: one connected 1→2→3→4 workflow.
 * The reusable 42/36px circles stay in the markup, but their vertical rail belongs
 * to STEP 6 alone. No JavaScript positioning, duplicate labels, or global CSS.
 * One 40px step gap is shared by the flow and its existing mount-code child.
 */
#mado-pop-campaign-page .mado-banner-area__install-flow {
    --mado-banner-step-circle: 42px;
    --mado-banner-step-title-gap: 14px;
    --mado-banner-step-space: 40px;
    display: grid;
    gap: var(--mado-banner-step-space);
    min-width: 0;
    margin-top: 10px;
}
#mado-pop-campaign-page .mado-banner-area__mount-code {
    gap: 40px;
    margin: 0;
}
#mado-pop-campaign-page .mado-banner-area__install-stage {
    display: grid;
    gap: 12px;
    position: relative;
    min-width: 0;
    box-sizing: border-box;
    padding-inline-start: calc(var(--mado-banner-step-circle) + var(--mado-banner-step-title-gap));
}
/* Segment length includes its own stage height, 40px section gap and half
 * of the next circle, so no disconnected segments at nested DOM boundaries. */
#mado-pop-campaign-page .mado-banner-area__install-stage--save::before,
#mado-pop-campaign-page .mado-banner-area__install-stage--place::before {
    content: '';
    position: absolute;
    top: calc(var(--mado-banner-step-circle) / 2);
    bottom: calc(-1 * (var(--mado-banner-step-space) + var(--mado-banner-step-circle) / 2));
    left: calc(var(--mado-banner-step-circle) / 2);
    width: 1px;
    background: #b9eeea;
    pointer-events: none;
}
/* Before initial save, there is no visible second stage to connect to. */
#mado-pop-campaign-page .mado-banner-area__install-flow:has(.mado-banner-area__mount-code[hidden]) .mado-banner-area__install-stage--save::before {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__install-stage-head {
    /* Each title stays inside the padded stage; a negative margin here could
       clip STEP3 when the actual Portal viewport is narrow. */
    display: block;
    min-width: 0;
    margin: 0;
}
/* R11: the step-2 label is vertically centred against the same 42/36px circle,
 * rather than being top-aligned while the circle sits alongside it. */
/* R20: STEP3 title shares the number/title vertical center with STEP2. */
#mado-pop-campaign-page .mado-banner-area__install-stage--place > .mado-banner-area__install-stage-head,
#mado-pop-campaign-page .mado-banner-area__install-stage--preview > .mado-banner-area__install-stage-head {
    display: flex;
    align-items: center;
    min-height: var(--mado-banner-step-circle);
}
#mado-pop-campaign-page .mado-banner-area__install-stage-number {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--mado-banner-step-circle);
    width: var(--mado-banner-step-circle);
    height: var(--mado-banner-step-circle);
    border: 1px solid #b9eeea;
    border-radius: 50%;
    background: #e6fbf9;
    color: #00388d;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    box-sizing: border-box;
}
#mado-pop-campaign-page .mado-banner-area__install-stage-head > div {min-width: 0;}
#mado-pop-campaign-page .mado-banner-area__install-stage-head h4 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
}
#mado-pop-campaign-page .mado-banner-area__install-stage-head p,
#mado-pop-campaign-page .mado-banner-area__install-stage-hint {
    margin: 4px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
}
#mado-pop-campaign-page .mado-banner-area__install-stage--save {margin-top: 0;}
#mado-pop-campaign-page .mado-banner-area__install-stage--save > .mado-ui-button,
#mado-pop-campaign-page .mado-banner-area__install-stage--test > .mado-ui-button {
    width: 100%;
    max-width: 370px;
    box-sizing: border-box;
    justify-self: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}
#mado-pop-campaign-page .mado-banner-area__mount-code > .mado-banner-area__install-stage + .mado-banner-area__install-stage {
    padding-top: 0;
    border: 0;
}
#mado-pop-campaign-page .mado-banner-area__place-preview-action > .mado-ui-button {box-sizing: border-box;}
#mado-pop-campaign-page .mado-banner-area__place-preview-action {
    width: 100%;
    max-width: 399px;
    grid-template-columns: minmax(0, 370px) 22px;
    margin: 5px auto 0;
}
#mado-pop-campaign-page .mado-banner-area__install-stage--test > .mado-ui-button {
    border: 1px solid #8adbd4;
    background: #e6fbf9;
    color: #075e59;
}
#mado-pop-campaign-page .mado-banner-area__install-stage--test > .mado-ui-button:hover {
    border-color: #06bfb5;
    background: #d2f7f4;
}
#mado-pop-campaign-page .mado-banner-area__install-stage--test > .mado-ui-button:focus-visible {
    outline: 3px solid #0f7776;
    outline-offset: 2px;
}
/* The two actual-site preview actions have a neutral, identical contract. */
#mado-pop-campaign-page .mado-banner-area__place-preview-action > .mado-ui-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid #1f2937;
    background: #ffffff;
    color: #1f2937;
    font-weight: 800;
}
#mado-pop-campaign-page .mado-banner-area__place-preview-action > .mado-ui-button:hover {
    background: #f1f5f9;
    border-color: #1f2937;
    color: #1f2937;
}
#mado-pop-campaign-page .mado-banner-area__place-preview-action > .mado-ui-button:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}
#mado-pop-campaign-page .mado-banner-area__preview-eye-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#mado-pop-campaign-page .mado-banner-area__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 782px) {
    #mado-pop-campaign-page .mado-banner-area__install-flow {
        --mado-banner-step-circle: 36px;
        --mado-banner-step-title-gap: 11px;
    }
}

/* EMPTY / NOT-YET-SET COPY / 2026-10-17 */
#mado-pop-campaign-page .mado-banner-area__empty strong,
#mado-pop-campaign-page .mado-banner-area__empty span,
#mado-pop-campaign-page .mado-banner-area__empty p,
#mado-pop-campaign-page .mado-banner-area__selected-empty,
#mado-pop-campaign-page .mado-banner-area__area-switcher-empty {
    color: #475569;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.65;
}

/* HTML tools remain secondary and follow the numbered publish section. */
#mado-pop-campaign-page .mado-banner-area__step > .mado-banner-area__html-tools {
    margin-top: 10px;
}

/* COMPACT HEADING SCALE / 2026-10-17
 * Tablet/mobile keep the in-panel task heading at 18px.
 * The duplicate wizard header is intentionally absent; the page H1 remains hidden on <=1100px.
 */
@media (max-width: 1100px) {
    #mado-pop-campaign-page .mado-banner-area__step h3,
    #mado-pop-campaign-page .mado-banner-area__size-heading-row > h3 {
        font-size: 18px;
        line-height: 1.45;
    }
}


/* STEP 6 final copy / spacing / 2026-11-09
 * - Publication status/actions remain the only owner in Step 6.
 * - Numbered action stages replace the duplicated "全体の流れ" overview.
 * - Only the AI location finder has a mint-highlighted container.
 */
#mado-pop-campaign-page .mado-banner-area__install-code-intro {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.65;
}

#mado-pop-campaign-page .mado-banner-area__install-code-intro strong {
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
}

#mado-pop-campaign-page .mado-banner-area__install-code-intro span {
    color: #475569;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.65;
}


/* Q&A AI audit visual: use mado-base.css for the actual pale gradient.
 * These rules own only the banner accordion's layout and icon sizing. */
#mado-pop-campaign-page .mado-banner-area__ai-placement-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 9px 14px;
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: #0f172a;
    list-style: none;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement-head::-webkit-details-marker {display: none;}
#mado-pop-campaign-page .mado-banner-area__ai-placement-head::marker {content: '';}
#mado-pop-campaign-page .mado-banner-area__ai-placement-head:focus-visible {
    outline: 2px solid rgba(104, 118, 201, .52);
    outline-offset: -2px;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement[open] > .mado-banner-area__ai-placement-head {
    border-bottom-color: rgba(105, 132, 201, .16);
}
#mado-pop-campaign-page .mado-banner-area__ai-placement-heading-group {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement-icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    /* Background, gradient motion and white icon color are the shared
       .mado-ai-action primitive in mado-base.css, not a copied palette. */
}
#mado-pop-campaign-page .mado-banner-area__ai-placement-icon svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: currentColor;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement-head strong {
    min-width: 0;
    color: #182238;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement-chevron {
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #0f172a;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement-chevron::before {
    content: '+';
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}
#mado-pop-campaign-page .mado-banner-area__ai-placement[open] .mado-banner-area__ai-placement-chevron::before {
    content: '−';
}
@media (max-width: 520px) {
    #mado-pop-campaign-page .mado-banner-area__ai-placement-head {padding: 9px 12px;}
    #mado-pop-campaign-page .mado-banner-area__ai-placement-head strong {font-size: 15px;}
    #mado-pop-campaign-page .mado-banner-area__ai-placement[open] > .mado-banner-area__ai-placement-body {padding: 14px 12px 16px;}
}

#mado-pop-campaign-page .mado-banner-area__ai-placement-actions .mado-ui-button {
    font-size: 15px;
    font-weight: 800;
}

/* COMPACT PAGE PURPOSE / 2026-10-17
 * The desktop H1 remains the page identity. On tablet/mobile it is visually removed to save height,
 * so one stable purpose heading replaces the former step-by-step duplicate heading.
 * This heading never changes with the wizard step and introduces no JS state.
 */
#mado-pop-campaign-page .mado-banner-area__compact-purpose {
    display: none;
    margin: 0;
}

@media (max-width: 1100px) {
    #mado-pop-campaign-page .mado-banner-area__compact-purpose {
        display: block;
        margin: 0;
        padding: 0 14px;
        border: 0;
        background: transparent;
        color: #0f172a;
        font-size: 18px;
        font-weight: 800;
        line-height: 1.4;
    }
}


/* DESKTOP WORKSPACE BALANCE / 2026-10-17
 * - Desktop keeps the settings card the same visual height as the canonical preview card.
 * - Short steps are vertically centered; banner selection centers only its empty state.
 * - Tablet/mobile keep the compact document flow defined above.
 */
@media (min-width: 1101px) {
    #mado-pop-campaign-page .mado-banner-area__layout {
        align-items: stretch;
    }

    #mado-pop-campaign-page .mado-banner-area__steps {
        display: grid;
        height: 100%;
        box-sizing: border-box;
    }

    #mado-pop-campaign-page .mado-banner-area__preview {
        height: 100%;
    }

    #mado-pop-campaign-page .mado-banner-area-preview {
        height: 100%;
        box-sizing: border-box;
        /* STEP 6 / 2026-11-08: The long install instructions make the left
         * column taller. Prevent auto grid rows from stretching the preview
         * heading/meta/viewport down to match that column; keep them at top. */
        align-content: start;
    }

    #mado-pop-campaign-page .mado-banner-area__step {
        min-height: 100%;
        box-sizing: border-box;
    }


    #mado-pop-campaign-page .mado-banner-area__step--size {
        row-gap: 16px;
    }


    /* On desktop the device switch belongs at the right edge of the preview heading. */
    #mado-pop-campaign-page .mado-banner-area-preview__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    #mado-pop-campaign-page .mado-banner-area-preview__head h3 {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    #mado-pop-campaign-page .mado-banner-area-preview__tabs {
        margin-left: auto;
        justify-self: auto;
    }
}

/* STEP 2 popover remains scoped to the size card; other steps are unchanged. */
#mado-pop-campaign-page .mado-banner-area__step--size { position: relative; }


/* NAME FIELD COPY / 2026-10-17 */
#mado-pop-campaign-page .mado-banner-area__field > span > small {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

/* NUMBER STEPPER POINTER STATE / 2026-10-17 R24
 * Promoted to the shared Provider number-stepper SSOT. Banner Area no longer owns pointer paint.
 */

/* STEP CONTENT BALANCE / 2026-10-17 r11
 * - Headings stay at the top of each desktop settings card.
 * - Only the editable/choice content is centered in the remaining card height.
 * - Compact layouts keep their normal document flow; no duplicated DOM/state is introduced.
 */
#mado-pop-campaign-page .mado-banner-area__step-body {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin-top: 10px;
}


@media (min-width: 1101px) {
    #mado-pop-campaign-page .mado-banner-area__step--balanced,
    #mado-pop-campaign-page .mado-banner-area__step--items {
        display: flex;
        flex-direction: column;
        align-content: initial;
        min-height: 100%;
        box-sizing: border-box;
    }

    #mado-pop-campaign-page .mado-banner-area__step--balanced > .mado-banner-area__step-body {
        flex: 1 1 auto;
        display: grid;
        align-content: center;
        width: 100%;
        min-height: 0;
        margin-top: 14px;
    }

    /* Name: heading stays at the top; move only the management-name field 50px above visual center. */
    #mado-pop-campaign-page .mado-banner-area__step-body--name {
        grid-template-columns: minmax(0, 1fr);
        transform: translateY(-50px);
    }

    /* WCAG: never translate the numeric controls over the help summary or expanded text. */
    #mado-pop-campaign-page .mado-banner-area__step-body--size {
        gap: 24px;
        align-content: center;
        transform: none;
    }

    #mado-pop-campaign-page .mado-banner-area__step-body--size .mado-banner-area__size-fields {
        grid-template-columns: repeat(3, max-content);
        justify-content: center;
        gap: 16px 24px;
        width: 100%;
        margin: 0;
        align-items: start;
        justify-self: center;
    }

    #mado-pop-campaign-page .mado-banner-area__step-body--size .mado-banner-area__field {
        min-width: 0;
        justify-items: center;
        text-align: center;
    }

    #mado-pop-campaign-page .mado-banner-area__step-body--size .mado-banner-area__unit {
        justify-content: center;
    }

    #mado-pop-campaign-page .mado-banner-area__step-body--motion,
    #mado-pop-campaign-page .mado-banner-area__step-body--target {
        gap: 14px;
        transform: translateY(-20px);
    }

    /* Motion alone does not keep the shared desktop 14px top offset. */
    #mado-pop-campaign-page .mado-banner-area__step-body--motion {
        margin-top: 0;
    }

    /* Banner picker: title stays at the top. Only the empty state occupies the visual center. */
    #mado-pop-campaign-page .mado-banner-area__step--empty-items {
        align-content: initial;
    }

    #mado-pop-campaign-page .mado-banner-area__step--empty-items .mado-banner-area__empty {
        margin-top: auto;
        margin-bottom: auto;
        transform: translateY(-20px);
    }
}

/* SIZE GRID + MOBILE PREVIEW HEADER / R53
 * The size-help trigger belongs beside STEP2 progress.
 * Desktop/tablet keep three number columns; phones use 2 + 2 + 1.
 */

#mado-pop-campaign-page .mado-banner-area__step--size > .mado-banner-area__step-body--size {
    margin-top: 10px;
}

#mado-pop-campaign-page .mado-banner-area__size-fields,
#mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 12px;
}

#mado-pop-campaign-page .mado-banner-area__size-fields .mado-banner-area__field,
#mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields .mado-banner-area__field {
    width: 134px;
    min-width: 134px;
    justify-items: center;
    justify-self: center;
    text-align: center;
}

#mado-pop-campaign-page .mado-banner-area__size-fields .mado-banner-area__unit,
#mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields .mado-banner-area__unit {
    width: 134px;
    min-width: 134px;
    justify-content: center;
}

@media (max-width: 720px) {
    /* Phone preview header only: title stays left, device switch stays right. */
    #mado-pop-campaign-page .mado-banner-area-preview__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    #mado-pop-campaign-page .mado-banner-area-preview__head h3 {
        flex: 0 0 auto;
        min-width: 0;
        margin: 0;
        white-space: nowrap;
    }

    #mado-pop-campaign-page .mado-banner-area-preview__tabs {
        flex: 0 0 auto;
        justify-self: auto;
        margin-left: auto;
    }
}



/* r18 / 2026-10-17
 * Keep the size controls visually centered and compact across devices.
 */
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area-preview__tabs {
        margin-left: auto;
    }
}


/* STEP 6 / 2026-11-09: Keep one canonical code value per platform family.
 * Radio-controlled tabs need no extra script or polling, support arrow keys,
 * and avoid showing all four platform explanations simultaneously. */
#mado-pop-campaign-page .mado-banner-area__code-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
#mado-pop-campaign-page .mado-banner-area__code-picker > legend {
    float: none;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    color: #49328b;
    font-size: 15px;
    font-weight: 800;
}
#mado-pop-campaign-page .mado-banner-area__code-picker-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
}
#mado-pop-campaign-page .mado-banner-area__code-picker-tab {
    display: flex;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    border: 1px solid #cbd5e1;
    border-radius: 8px 8px 0 0;
    background: #f7fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}
#mado-pop-campaign-page .mado-banner-area__code-picker-radio:checked + .mado-banner-area__code-picker-tab {
    border-color: #8adbd4;
    background: #e6fbf9;
    color: #075e59;
}
#mado-pop-campaign-page .mado-banner-area__code-picker-radio:focus-visible + .mado-banner-area__code-picker-tab {
    outline: 3px solid #0f7776;
    outline-offset: 2px;
}
#mado-pop-campaign-page .mado-banner-area__code-picker-content {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 14px 12px;
    border: 1px solid #d1e8e6;
    border-radius: 0 0 9px 9px;
    background: #fff;
}
#mado-pop-campaign-page .mado-banner-area__code-platform-copy,
#mado-pop-campaign-page .mado-banner-area__code-common-html {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__code-platform-copy > p {
    margin: 0 0 10px;
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
}
#mado-pop-campaign-page #mado-banner-area-code-wordpress:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-instruction="wordpress"],
#mado-pop-campaign-page #mado-banner-area-code-shopify:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-instruction="shopify"],
#mado-pop-campaign-page #mado-banner-area-code-other:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-instruction="other"],
#mado-pop-campaign-page #mado-banner-area-code-html:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-instruction="html"],
#mado-pop-campaign-page #mado-banner-area-code-shopify:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-common-html],
#mado-pop-campaign-page #mado-banner-area-code-other:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-common-html],
#mado-pop-campaign-page #mado-banner-area-code-html:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-common-html] {
    display: block;
}
/* R14: Restore conditional platform labels and HTML helper visibility.
 * The four legacy radio ids and data attributes are still present in PHP. */
#mado-pop-campaign-page [data-mado-banner-code-label],
#mado-pop-campaign-page [data-mado-banner-code-html-tools] {
    display: none;
}
#mado-pop-campaign-page #mado-banner-area-code-shopify:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-label="shopify"],
#mado-pop-campaign-page #mado-banner-area-code-other:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-label="other"],
#mado-pop-campaign-page #mado-banner-area-code-html:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-label="html"] {
    display: inline;
}
#mado-pop-campaign-page #mado-banner-area-code-html:checked ~ .mado-banner-area__code-picker-content [data-mado-banner-code-html-tools] {
    display: block;
}
#mado-pop-campaign-page .mado-banner-area__code-html-tools {
    margin-top: 12px;
}
#mado-pop-campaign-page .mado-banner-area__code-platform-copy > .mado-banner-area__platform-caution {
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 430px) {
    #mado-pop-campaign-page .mado-banner-area__code-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #mado-pop-campaign-page .mado-banner-area__code-picker-tab {
        border-radius: 8px;
    }
}


/* STEP 6 INSTALL MODE / 2026-11-09
 * Only one install method's instructions are shown; no extra runtime or save key.
 * Native radio controls remain accessible by keyboard and screen readers.
 */
#mado-pop-campaign-page .mado-banner-area__install-method-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    min-width: 0;
    border: 0;
}
#mado-pop-campaign-page .mado-banner-area__install-method-choice legend {
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 800;
    color: #49328b;
}
#mado-pop-campaign-page .mado-banner-area__install-method-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    min-width: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area__install-method-option:has(input:checked) {
    border-color: #0d9e99;
    background: #e8faf8;
}
#mado-pop-campaign-page .mado-banner-area__install-method-option:has(input:focus-visible) {
    outline: 3px solid #0d9488;
    outline-offset: 2px;
}
#mado-pop-campaign-page .mado-banner-area__install-method-option > input {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    accent-color: #079e97;
}
#mado-pop-campaign-page .mado-banner-area__install-method-option span {
    display: grid;
    gap: 4px;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__install-method-option strong {
    font-size: 15px;
    color: #0f172a;
}
#mado-pop-campaign-page .mado-banner-area__install-method-option small {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}
#mado-pop-campaign-page .mado-banner-area__install-method-panel[hidden] {display: none;}
#mado-pop-campaign-page .mado-banner-area__install-method-panel {min-width: 0;}
/* R10: 30px only BETWEEN the method cards and its selected content.
 * The install stage default grid gap remains 12px elsewhere. */
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__install-method-panel:not([hidden]) {
    margin-top: 18px;
}
#mado-pop-campaign-page .mado-banner-area__install-method-panel > .mado-banner-area__ai-placement {
    margin-top: 0;
}
#mado-pop-campaign-page .mado-banner-area__placement-limit-note,
#mado-pop-campaign-page .mado-banner-area__preview-disclaimer {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #475569;
}
#mado-pop-campaign-page .mado-banner-area__install-stage--preview > .mado-banner-area__preview-disclaimer {
    margin: 0;
}
#mado-pop-campaign-page .mado-banner-area__install-stage--preview .mado-banner-area__place-preview-action {
    margin: 0 auto;
}
/* Renumbered 1(save) -> 2(method) -> 3(preview) -> 4(publish), no WordPress detour. */
#mado-pop-campaign-page .mado-banner-area__mount-code > .mado-banner-area__install-stage + .mado-banner-area__install-stage {
    padding-top: 0;
    border-top: 0;
}
@media (max-width: 600px) {
    #mado-pop-campaign-page .mado-banner-area__install-method-choice {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* CREATE / INSTALL SCREEN SEPARATION — 2026-11-10
 * One Provider draft/publication SSOT; this CSS only shows the selected UI phase.
 * Keep runtime/widget styles and existing preview-frame assets untouched.
 */
#mado-pop-campaign-page .mado-banner-area__status:empty {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__creation-finish-note {
    max-width: 60ch;
    margin: 6px 0 14px;
    color: #475569;
    font-size: 15px;
    line-height: 1.65;
}
#mado-pop-campaign-page .mado-banner-area__save-primary {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    font-weight: 800;
}
/* R14 / 2026-11-10: Deliberately DO NOT alter .__layout or .__steps width here.
 * The same desktop two-column settings / preview workspace must remain in all
 * phases. At <=1100px the canonical responsive CSS stacks them normally. */
#mado-pop-campaign-page .mado-banner-area__install-screen {
    display: grid;
    gap: 22px;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__install-screen-intro {
    display: grid;
    gap: 10px;
    justify-items: start;
}
/* R10: single status chip on the right of the installation heading. */
#mado-pop-campaign-page .mado-banner-area__install-title-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 14px;
    width: 100%;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__install-title-row > h3 {margin: 0;}
#mado-pop-campaign-page .mado-banner-area__install-title-row > .mado-banner-area__publication-state {
    margin: 0;
    flex: 0 0 auto;
    align-self: center;
}

#mado-pop-campaign-page .mado-banner-area__install-screen-intro h3 {
    margin: 4px 0 0;
    font-size: clamp(20px, 2vw, 24px);
    line-height: 1.5;
    color: #0f172a;
}
#mado-pop-campaign-page .mado-banner-area__install-screen-intro p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #334155;
}
#mado-pop-campaign-page .mado-banner-area__install-screen-intro .mado-banner-area__publication-state {
    padding: 10px 13px;
    border-inline-start: 3px solid #089e91;
    border-radius: 5px;
    background: #f1fbfa;
}
#mado-pop-campaign-page .mado-banner-area__install-screen-intro .mado-banner-area__publication-state[data-state="published"] {
    border-inline-start-color: #157a59;
}
#mado-pop-campaign-page .mado-banner-area__install-screen-intro > .mado-ui-button {
    min-height: 40px;
}
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__install-flow {
    --mado-banner-step-space: 34px;
    margin-top: 0;
}
/* Avoid rail lines pointing toward progressive stages not yet rendered. */
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__install-stage--place::before,
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__install-stage--preview::before {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__mount-code:has(> .mado-banner-area__install-stage--preview:not([hidden])) > .mado-banner-area__install-stage--place::before {
    display: block;
}
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__method-confirm {
    width: 100%;
    max-width: 370px;
    min-height: 44px;
    justify-self: center;
    box-sizing: border-box;
}
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__place-preview-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 370px;
    margin-inline: auto;
}
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__place-preview-action > .mado-ui-button {
    width: 100%;
    max-width: none;
}
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__install-stage.is-revealing {
    animation: mado-banner-area-stage-enter 250ms ease-out both;
}
@keyframes mado-banner-area-stage-enter {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}
#mado-pop-campaign-page .mado-banner-area__install-screen h3:focus,
#mado-pop-campaign-page .mado-banner-area__install-screen h4:focus {
    outline: 2px solid #0b8d84;
    outline-offset: 4px;
    border-radius: 3px;
}
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__install-screen {
        gap: 16px;
    }
    #mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__install-flow {
        --mado-banner-step-space: 24px;
    }
}
@media (prefers-reduced-motion: reduce) {
    #mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__install-stage.is-revealing {
        animation: none;
    }
}

/* STEP 1–6 NAVIGATION CONTINUITY / 2026-11-13 R33
 * The redundant top progress card was removed. The canonical numbered
 * navigator and each step kicker remain the only step progress indicators.
 */
/* On the install screen, completed links retain quiet mint outlines,
 * while the active creation step alone gets aria-current=step. */
#mado-pop-campaign-page .mado-banner-area-preview__step-index button.is-completed:not(.is-current) {
    border-color: #b9eeea;
    background: #f0fbfa;
    color: #0f7776;
}
/* R62 / 2026-11-14: The ONE canonical numbered navigator lives INSIDE
 * the white preview card at its left edge during creation, not beneath the card.
 * The existing JS moves it to the installation intro after draft save. */
#mado-pop-campaign-page .mado-banner-area__step-index-home {
    display: flex;
    justify-content: flex-start;
    box-sizing: border-box;
    min-width: 0;
    padding-block: 2px 0;
}
#mado-pop-campaign-page .mado-banner-area__step-index-home .mado-banner-area-preview__step-index {
    margin: 0;
}
#mado-pop-campaign-page .mado-banner-area__step-index-install {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}
#mado-pop-campaign-page .mado-banner-area__step-index-install .mado-banner-area-preview__step-index {
    margin: 0;
}
/* Centre the real-site preview action within the full-width installation panel. */
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__place-preview-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 370px);
    max-width: 370px;
    margin: 8px auto 0;
    justify-items: stretch;
}
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__place-preview-action > .mado-ui-button {
    display: flex;
    width: 100%;
    max-width: none;
    justify-content: center;
    text-align: center;
}


/* INSTALLATION INTRO COMPACT / 2026-11-10 R5
 * The top of the installation phase has one completion sentence and a
 * existing one 1–6 editing navigator. Keep live errors/actions in the common status.
 * Scope button typography to this phase; creation and other POP UI are unchanged.
 */
#mado-pop-campaign-page .mado-banner-area__install-screen-intro h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
}
#mado-pop-campaign-page .mado-banner-area__install-screen-intro .mado-banner-area__publication-state {
    display: inline-flex;
    padding: 3px 10px;
    border: 1px solid #b9e1dc;
    border-radius: 999px;
    background: #f1fbfa;
    color: #27635d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
#mado-pop-campaign-page .mado-banner-area[data-mado-banner-area-phase="installation"] button,
#mado-pop-campaign-page .mado-banner-area[data-mado-banner-area-phase="installation"] .mado-banner-area__code-picker-tab {
    font-size: 15px;
}

/* R38 / 2026-11-13: Width cap headline remains visible; detail expands on demand in STEP 2. */
#mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-limit-note {
    box-sizing: border-box;
    width: min(560px, 100%);
    margin: 12px auto 0;
    padding: 10px 12px;
    border-left: 3px solid #0aaea4;
    border-radius: 5px;
    background: #f1fbfa;
    color: #264452;
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
}
#mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-limit-note strong {
    font-weight: 700;
}
/* Native disclosure: keep the important width constraint visible and the full details optional. */
#mado-pop-campaign-page .mado-banner-area__size-limit-note > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
}
#mado-pop-campaign-page .mado-banner-area__size-limit-note > summary::-webkit-details-marker {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__size-limit-note > summary::after {
    content: "＋";
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 700;
    color: #007094;
}
#mado-pop-campaign-page .mado-banner-area__size-limit-note[open] > summary::after {
    content: "−";
}
#mado-pop-campaign-page .mado-banner-area__size-limit-note > summary:focus-visible {
    outline: 3px solid var(--mado-brand-accent-ring, rgba(6, 191, 181, .3));
    outline-offset: 3px;
    border-radius: 3px;
}
#mado-pop-campaign-page .mado-banner-area__size-limit-note__content {
    margin-top: 8px;
}
/* The extra spacing belongs ONLY ABOVE the mobile-count field in STEP 2.
 * Define the mobile rows explicitly so a competing generic step-body gap cannot
 * unintentionally turn the requested 40px into another value. The note stays 10px below. */
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__step-body--size {
        row-gap: 0;
    }
    #mado-pop-campaign-page .mado-banner-area__step-body--size > .mado-banner-area__size-fields {
        margin-bottom: 40px;
    }
    #mado-pop-campaign-page .mado-banner-area__step-body--size > .mado-banner-area__mobile-visible-count {
        margin-top: 0;
        margin-bottom: 10px;
    }
}
/* Desktop had a separate 24px row gap, retain its existing total 40px rhythm. */
@media (min-width: 1101px) {
    #mado-pop-campaign-page .mado-banner-area__step-body--size > .mado-banner-area__mobile-visible-count {
        margin-top: 16px;
    }
}

#mado-pop-campaign-page .mado-banner-area__saved-card[open] {
    flex-basis: 100%;
}
#mado-pop-campaign-page .mado-banner-area__saved-card:not([open]) > .mado-banner-area__saved-card-actions {
    display: none;
}

/* R14 / 2026-11-10: The install screen occupies the SAME settings column
 * used by STEP 1-6. Stack verbose option cards based on its actual width,
 * not on the window viewport; preserve the desktop preview on the right. */
@container mado-banner-area-settings (max-width: 560px) {
    #mado-pop-campaign-page .mado-banner-area__install-method-choice,
    #mado-pop-campaign-page .mado-banner-area__placement-presets {
        grid-template-columns: minmax(0, 1fr);
    }
}
#mado-pop-campaign-page .mado-banner-area__install-screen,
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__step-index-install {
    max-width: 100%;
    min-width: 0;
}

/* R15 / 2026-11-10: Restore the original installation-only one-column screen.
 * STEP1-6 retain the canonical desktop two-column settings + preview.
 * Do NOT hide the preview without also changing the installation grid to
 * one column: that was the R12/R13 narrow-left-panel regression.
 * Keep R14's restored 22px/600 typography, spacing and saved-area manager.
 */
#mado-pop-campaign-page .mado-banner-area[data-mado-banner-area-phase="installation"] .mado-banner-area__layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
#mado-pop-campaign-page .mado-banner-area[data-mado-banner-area-phase="installation"] .mado-banner-area__steps {
    box-sizing: border-box;
    width: 100%;
    max-width: 920px;
    height: auto;
    margin-inline: auto;
}


/* SINGLE-BANNER SETTINGS / 2026-11-11: only STEP4, distinct from the carousel's STEP3. */
#mado-pop-campaign-page .mado-banner-area__single-settings {
    margin-top: 16px; border: 1px solid #d4e2eb; border-radius: 12px;
    background: #f8fbfc; color: #0f172a;
}
#mado-pop-campaign-page .mado-banner-area__single-settings > summary {
    cursor: pointer; padding: 14px 16px; font-weight: 700; line-height: 1.55;
}
#mado-pop-campaign-page .mado-banner-area__single-settings > summary:focus-visible {
    outline: 3px solid #0d9488; outline-offset: 2px; border-radius: 8px;
}
#mado-pop-campaign-page .mado-banner-area__single-settings-body {
    display: grid; gap: 14px; padding: 0 16px 16px;
}
#mado-pop-campaign-page .mado-banner-area__single-fieldset {
    min-width: 0; margin: 0; padding: 0; border: 0;
}
#mado-pop-campaign-page .mado-banner-area__single-fieldset legend {
    margin-bottom: 9px; font-weight: 700; font-size: 14px;
}
/* R2 / 2026-11-11: Equal-width three-column choice cards.
 * Five entrance choices naturally occupy three cells on row 1, two on row 2.
 * Responsive fallback is strictly for narrow settings columns, never a second UI path. */
#mado-pop-campaign-page .mado-banner-area__single-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__single-options label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    min-height: 64px;
    padding: 9px 4px;
    gap: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area__single-options label:has(input:checked) {
    border-color: #0db9ad;
    background: #e9faf8;
    box-shadow: inset 0 0 0 1px #0db9ad;
}
#mado-pop-campaign-page .mado-banner-area__single-options label:focus-within {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}
#mado-pop-campaign-page .mado-banner-area__single-options input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #0d9488;
}
@container mado-banner-area-settings (max-width: 340px) {
    #mado-pop-campaign-page .mado-banner-area__single-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
#mado-pop-campaign-page .mado-banner-area__single-duration {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-weight: 700; font-size: 14px;
}
/* The POP shared number stepper owns the enhanced input's shape and +/- events. */
#mado-pop-campaign-page .mado-banner-area__single-duration input:not(.mado-ui-number-stepper__input) {
    max-width: 134px; min-height: 44px; padding: 8px;
    border: 1px solid #8494a6; border-radius: 999px;
}
#mado-pop-campaign-page .mado-banner-area__single-note {
    color: #475569; font-size: 13px; line-height: 1.7;
}

/* R2 / 2026-11-11: The STEP3 auto-interval select matches POP's pill-shaped controls.
 * Preserve native select semantics, caret and keyboard operation. */
#mado-pop-campaign-page .mado-banner-area__motion-options select[data-mado-banner-area-interval] {
    box-sizing: border-box;
    min-height: 46px;
    padding: 9px 16px;
    border: 1px solid #9cb0c5;
    border-radius: 999px;
    background-color: #ffffff;
    color: #0f172a;
    font-weight: 700;
}

/* R3 / 2026-11-11: STEP3 two equal columns; checkbox is centered in its own
 * half both horizontally and vertically (the first half contains title+select).
 * Override earlier narrow viewport one-column rule with equal specificity. */
#mado-pop-campaign-page .mado-banner-area__motion-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}
#mado-pop-campaign-page .mado-banner-area__motion-options > .mado-banner-area__field {
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__motion-options > .mado-banner-area__check {
    display: inline-flex;
    justify-self: center;
    align-self: center;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    white-space: nowrap;
}

/* R3: STEP4 deliberately uses one 10px extra separation before the scroll
 * animation row, and 20px total spacing between that row and the seconds
 * control (base grid gap is 14px, plus 6px). */
#mado-pop-campaign-page .mado-banner-area__single-fieldset + .mado-banner-area__single-fieldset {
    margin-top: 10px;
}
#mado-pop-campaign-page .mado-banner-area__single-duration {
    margin-top: 6px;
    gap: 14px;
    flex-wrap: nowrap;
}
#mado-pop-campaign-page .mado-banner-area__single-duration > span:first-child {
    flex: 0 0 auto;
}
#mado-pop-campaign-page .mado-banner-area__single-duration > .mado-ui-number-stepper {
    flex: 0 0 134px;
}
/* The visibility toggle in the existing JS needs to win against display:flex. */
#mado-pop-campaign-page .mado-banner-area__single-duration[hidden] {
    display: none;
}

/* R38: Expanded copy is block content; the clickable summary remains visible. */
#mado-pop-campaign-page .mado-banner-area__size-limit-note__content { display: block; }

/* R6 / 2026-11-11: Keep page-specific layout adjustments local.
 * POP's shared help-chip shape and behavior remain owned by mado-base.css.
 * No duplicate helper panel or modified publication/save business logic. */

/* Readable STEP2 explanation; the shared '?' palette/shape is unchanged. */
#mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-limit-note {
    font-size: 15px;
}
/* This button is an accessibility alternative to outside click and Esc,
 * so it may stay visually secondary without losing a 24px+ target. */
#mado-pop-campaign-page .mado-banner-area__size-help-close {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 12px;
}

/* Banner creation's compact navigation chips: typography +1px and quiet
 * neutral outline. Preserve a distinct selected fill and visible keyboard ring. */
#mado-pop-campaign-page .mado-banner-area-preview__tabs button {
    font-size: 15px;
}

/* STEP3: second column is aligned to the *select* rather than its heading.
 * A custom CSS arrow is drawn exactly once and 10px further from the right
 * edge than the browser-default arrow; native select semantics remain intact. */
#mado-pop-campaign-page .mado-banner-area__motion-options {
    align-items: end;
}
#mado-pop-campaign-page .mado-banner-area__motion-options > .mado-banner-area__check {
    align-self: end;
    min-height: 46px;
}
#mado-pop-campaign-page .mado-banner-area__motion-options select[data-mado-banner-area-interval] {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 3 5 5 5-5' fill='none' stroke='%231e293b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 28px center;
    background-size: 14px 10px;
}
@media (forced-colors: active) {
    #mado-pop-campaign-page .mado-banner-area__motion-options select[data-mado-banner-area-interval] {
        appearance: auto;
        background-image: none;
    }
}

/* R7 / 2026-11-11 — STEP6 follows STEP1's canonical balanced step/body.
 * Place only the save control in the flexible center region; keep heading/copy
 * at the top and restore ordinary flow below 1101px or at high zoom. Avoid
 * R6 absolute positioning (breaks when layout mode/viewport changes). */
#mado-pop-campaign-page .mado-banner-area__step-body--save {
    width: 100%;
}
@media (min-width: 1101px) {
    #mado-pop-campaign-page .mado-banner-area__step--save > .mado-banner-area__step-body--save {
        align-content: center;
        transform: translateY(-50px);
    }
}

/* R9 / 2026-11-11: Image before/after is an INNER subchoice of card 6;
 * preserve the 2-column six-card grid and reuse mado-base.css help chip. */
#mado-pop-campaign-page .mado-banner-area__image-side-settings[hidden],
#mado-pop-campaign-page .mado-banner-area__completion-home[hidden] {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__anchor-target-shell {display: contents;}
#mado-pop-campaign-page .mado-banner-area__anchor-target-shell:has(> .mado-banner-area__image-side-settings:not([hidden])) {
    display: grid;
    gap: 12px;
    padding: 12px 14px;
    min-width: 0;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #f8fbff;
}
#mado-pop-campaign-page .mado-banner-area__image-side-settings {
    display: grid;
    gap: 10px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-banner-area__placement-subheading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    color: #0f172a;
}
#mado-pop-campaign-page .mado-banner-area__image-side-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}
#mado-pop-campaign-page .mado-banner-area__image-side-choice label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area__image-side-choice label:has(input:checked) {
    border-color: #0f9488;
    background: #effffd;
}
#mado-pop-campaign-page .mado-banner-area__image-side-choice input {
    flex: 0 0 16px;
    accent-color: #0c8b83;
}
#mado-pop-campaign-page .mado-banner-area__image-side-note {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}
#mado-pop-campaign-page .mado-banner-area__image-help-panel {
    overflow-wrap: anywhere;
    max-width: min(340px, calc(100vw - 32px));
}
#mado-pop-campaign-page .mado-banner-area__image-help-panel .mado-banner-area__size-help-close {
    margin-top: 12px;
}
#mado-pop-campaign-page .mado-banner-area__completion-home {
    display: grid;
    gap: 10px;
    padding: 18px;
    margin-top: 22px;
    border: 1px solid #dbe5ef;
    border-radius: 16px;
    background: #f8fbff;
}
#mado-pop-campaign-page .mado-banner-area__completion-home > h4,
#mado-pop-campaign-page .mado-banner-area__completion-home > p {
    margin: 0;
}
@media (max-width: 500px) {
    #mado-pop-campaign-page .mado-banner-area__image-side-choice {
        grid-template-columns: 1fr;
    }
}

/* R9 help popup: base.css owns the styling; prevent parent clipping and
 * anchor the floating explanation to the available text-row width. */
#mado-pop-campaign-page .mado-banner-area__ai-placement:has([data-mado-banner-area-image-help][open]) {
    overflow: visible;
}
#mado-pop-campaign-page .mado-banner-area__placement-subheading {
    position: relative;
}
#mado-pop-campaign-page .mado-banner-area__placement-subheading > .mado-ui-help-details {
    position: static;
}
#mado-pop-campaign-page .mado-banner-area__image-help-panel {
    left: 0;
    right: auto;
    width: min(340px, calc(100vw - 64px));
    max-width: min(340px, calc(100vw - 64px));
    box-sizing: border-box;
}
/* R10: In narrow screens, the additional grouped target padding must not
 * make the existing image-help explanation overflow the right viewport edge. */
@media (max-width: 500px) {
    #mado-pop-campaign-page .mado-banner-area__image-help-panel {
        left: auto;
        right: 0;
    }
}


/* The native hidden attribute must beat the preset display:flex rule.
 * Legacy choices appear only when editing matching previously saved settings. */
#mado-pop-campaign-page .mado-banner-area__placement-presets label[hidden] {
    display: none;
}

/* R13 / 2026-11-11: Automatic-placement device confirmation (one native dialog).
 * CSS is scoped to this screen; no second modal system or shared help-chip style. */
#mado-pop-campaign-page .mado-banner-area__device-dialog {
  position: fixed;
  inset: 0;
  width: min(92vw, 480px);
  max-width: calc(100vw - 24px);
  max-height: min(85dvh, 700px);
  overflow: auto;
  box-sizing: border-box;
  padding: 0;
  margin: auto;
  color: #233346;
  background: #fff;
  border: 1px solid #cdd7df;
  border-radius: 20px;
  box-shadow: 0 22px 70px rgba(24, 45, 65, .24);
}
#mado-pop-campaign-page .mado-banner-area__device-dialog::backdrop {
  background: rgba(18, 34, 48, .50);
}
#mado-pop-campaign-page .mado-banner-area__device-dialog[open] {
  animation: mado-banner-device-dialog-in .24s ease-out both;
}
@keyframes mado-banner-device-dialog-in {
  from { opacity: 0; transform: translateY(9px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
#mado-pop-campaign-page .mado-banner-area__device-dialog-content {
  display: grid;
  gap: 15px;
  padding: 25px;
}
#mado-pop-campaign-page .mado-banner-area__device-dialog h5 {
  margin: 0;
  font-size: 19px;
  font-weight: 800; /* R23: 700 -> 800, modal title only. */
  line-height: 1.5;
}
#mado-pop-campaign-page .mado-banner-area__device-dialog p {
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
}
#mado-pop-campaign-page .mado-banner-area__device-choices {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}
#mado-pop-campaign-page .mado-banner-area__device-choices label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #d5dee4;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500; /* R23: 400 -> 500, three radio options only. */
  line-height: 1.5;
}
#mado-pop-campaign-page .mado-banner-area__device-choices label:has(input:checked) {
  border-color: #0a9288;
  background: #f2fbf9;
}
#mado-pop-campaign-page .mado-banner-area__device-choices input {
  flex: 0 0 auto;
  margin: 0;
  accent-color: #078c82;
}
#mado-pop-campaign-page .mado-banner-area__device-choices label:focus-within {
  outline: 2px solid #0a9288;
  outline-offset: 2px;
}
#mado-pop-campaign-page .mado-banner-area__device-dialog .mado-banner-area__device-dialog-note {
  color: #586674;
  font-size: 13px;
}
#mado-pop-campaign-page .mado-banner-area__device-dialog .mado-banner-area__device-dialog-error {
  padding: 9px 12px;
  color: #9a2020;
  background: #fff4f4;
  border: 1px solid #f4c4c4;
  border-radius: 9px;
}
#mado-pop-campaign-page .mado-banner-area__device-dialog-actions {
  display: flex;
  justify-content: end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 480px) {
  #mado-pop-campaign-page .mado-banner-area__device-dialog-content { padding: 18px; }
  #mado-pop-campaign-page .mado-banner-area__device-dialog-actions .mado-ui-button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #mado-pop-campaign-page .mado-banner-area__device-dialog[open] { animation: none; }
}

/* R14-R16 / 2026-11-11 — one modalized canonical STEP3, compact assurance.
 * The post-preview AI fallback was retired in R16; manual embed remains in STEP2.
 * Only one preview state/token/REST callback exists; the shared ? chip is untouched.
 */
/* R20: The duplicate preview button was deleted.
 * The one canonical preview action remains available in STEP3. */
#mado-pop-campaign-page .mado-banner-area__preview-dialog {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(92vw, 540px);
    max-width: calc(100vw - 24px);
    max-height: min(85dvh, 650px);
    margin: auto;
    padding: 0;
    overflow: auto;
    color: #142335;
    background: #fff;
    border: 1px solid #c9dfdd;
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(20, 45, 49, .27);
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog::backdrop {
    background: rgba(17, 32, 46, .56);
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog-content {
    padding: 28px 24px 8px;
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog .mado-banner-area__install-stage--preview {
    padding: 0;
    gap: 20px;
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog .mado-banner-area__install-stage-number {
    display: none;
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog .mado-banner-area__install-stage-head h4 {
    font-size: 20px;
}
/* Keep the preview-scope help available without the large reassurance sentence.
 * The original signed-preview URL caveat remains inside the native details. */
#mado-pop-campaign-page .mado-banner-area__preview-heading-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #1f2937;
}
#mado-pop-campaign-page .mado-banner-area__preview-help {
    position: relative;
    display: inline-block;
}
/* The shared panel is positioned by mado-base.css; within this narrow dialog,
 * keep its explanation in normal flow to avoid clipped right-side popovers. */
#mado-pop-campaign-page .mado-banner-area__preview-help[open] {
    flex-basis: 100%;
    width: 100%;
}
#mado-pop-campaign-page .mado-banner-area__preview-help .mado-banner-area__preview-help-panel {
    position: static;
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
    text-align: left;
    white-space: normal;
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog .mado-banner-area__place-preview-action {
    width: min(100%, 370px);
    margin: 0 auto;
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog .mado-banner-area__place-preview-action > .mado-ui-button {
    background: #ffffff;
    color: #1f2937;
    border-color: #1f2937;
    min-height: 48px;
    font-weight: 800;
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog .mado-banner-area__place-preview-action > .mado-ui-button:hover {
    background: #f1f5f9;
    color: #1f2937;
    border-color: #1f2937;
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog-close {
    display: block;
    margin: 8px auto 16px;
    padding: 7px 14px;
    min-height: 40px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #475569;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area__preview-dialog-close:hover { background: #eff6f6; }
#mado-pop-campaign-page .mado-banner-area__preview-dialog-close:focus-visible {
    outline: 3px solid #0c8f7a;
    outline-offset: 2px;
}
@media (max-width: 480px) {
    #mado-pop-campaign-page .mado-banner-area__preview-dialog-content { padding: 20px 16px 8px; }
    #mado-pop-campaign-page .mado-banner-area__preview-dialog .mado-banner-area__install-stage-head h4 { font-size: 18px; }
}

/* R15: Show candidate code only while setting an outer block. */
#mado-pop-campaign-page .mado-banner-area__region-code{display:flex;flex-direction:column;gap:6px;margin:12px 0 0;font-size:14px;font-weight:700}
#mado-pop-campaign-page .mado-banner-area__region-code[hidden]{display:none}
#mado-pop-campaign-page .mado-banner-area__region-code input{width:100%;min-height:43px;padding:10px 12px;border:1px solid #9fb1c9;border-radius:8px;background:#fff;color:#172b45;font:inherit;font-size:15px;letter-spacing:.03em}
#mado-pop-campaign-page .mado-banner-area__region-code small{font-size:12px;line-height:1.6;font-weight:400;color:#52637b}

/* R18 / 2026-11-11: Every 1-9 card uses the same grid cell width.
 * No full-span paragraph option; the normal 720px breakpoint still stacks cards. */

/* R18 / 2026-11-11: Optional horizontal alignment for header/footer placements.
 * Keep the nine location cards equal; avoid global Portal or customer CSS overrides. */
/* R31 / 2026-11-12: Three equal choices occupy ONE of the two preset
 * card columns (half the option-grid width), not the entire settings row. */
#mado-pop-campaign-page .mado-banner-area__placement-align {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    width: calc((100% - 10px) / 2);
    max-width: 100%;
    box-sizing: border-box;
    margin: 4px 0 2px;
    padding: 0;
    border: 0;
    min-width: 0;
}
#mado-pop-campaign-page .mado-banner-area__placement-align[hidden] { display: none; }
#mado-pop-campaign-page .mado-banner-area__placement-align legend {
    float: left;
    width: 100%;
    margin: 0 0 2px;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
#mado-pop-campaign-page .mado-banner-area__placement-align label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    justify-content: center;
    padding: 9px 4px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}
#mado-pop-campaign-page .mado-banner-area__placement-align label:has(input:checked) {
    border-color: var(--mado-brand-accent, #06bfb5);
    background: var(--mado-brand-accent-soft, #e6fbf9);
}
#mado-pop-campaign-page .mado-banner-area__placement-align input[type="radio"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #2563eb;
}
/* This is also a one-column settings panel on desktop at narrow container sizes. */
@container mado-banner-area-settings (max-width: 560px) {
    #mado-pop-campaign-page .mado-banner-area__placement-align { width: 100%; }
}
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__placement-align { width: 100%; }
}

/* The shared target becomes multiline only in paragraph mode (rows=5).
 * Other presets keep a single-row control with the original field height. */
#mado-pop-campaign-page .mado-banner-area__placement-target textarea[data-mado-banner-area-placement-target] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}
#mado-pop-campaign-page .mado-banner-area__placement-target textarea[data-mado-banner-area-placement-target][rows="5"] {
    height: auto;
    min-height: 128px;
}

/* R19 / 2026-11-11: One-use preview return result, no duplicate save/REST path. */
#mado-pop-campaign-page .mado-banner-area__review-return{
  display:flex;flex-direction:column;gap:14px;margin:20px 0 10px;
  padding:16px;border:1px solid #a5e2d9;border-radius:12px;
  background:#eafbf8;color:#122f2c;
}
#mado-pop-campaign-page .mado-banner-area__review-return[hidden]{display:none}
#mado-pop-campaign-page .mado-banner-area__review-return p{margin:0;font-size:15px;line-height:1.6;font-weight:700}
#mado-pop-campaign-page .mado-banner-area__review-return-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
#mado-pop-campaign-page .mado-banner-area__review-return-actions button[hidden]{display:none}

/* R20 / 2026-11-12: One final choice after review, not duplicate preview or
 * confirmation buttons. Keep actions side by side on desktop and reachable
 * without horizontal scrolling at narrow viewport widths. */
#mado-pop-campaign-page .mado-banner-area__placement-final-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 20px auto 0;
  width: min(100%, 530px);
}
#mado-pop-campaign-page .mado-banner-area__placement-final-actions[hidden],
#mado-pop-campaign-page .mado-banner-area__placement-final-actions > button[hidden],
#mado-pop-campaign-page .mado-banner-area__placement-saved[hidden] { display: none; }
#mado-pop-campaign-page .mado-banner-area__placement-final-actions > .mado-ui-button {
  flex: 1 1 210px;
  max-width: 260px;
  min-height: 44px;
}
/* The save acknowledgement remains a screen-reader status when shown by JS,
 * but does not create another colored paragraph under the publish control. */
#mado-pop-campaign-page .mado-banner-area__placement-saved:not([hidden]) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 480px) {
  #mado-pop-campaign-page .mado-banner-area__placement-final-actions > .mado-ui-button {
    flex: 1 1 100%;
    max-width: 370px;
  }
}

/* R37 / 2026-11-13: Small guidance under the motion choices (STEP 3 only).
 * Mobile paging is explained alongside the "動かさない" choice, not the STEP 2 count field.
 */
#mado-pop-campaign-page .mado-banner-area__step--motion .mado-banner-area__mobile-motion-note {
    display: grid;
    gap: 3px;
    margin: 4px 0 0;
    color: #475569;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    text-align: left;
}
#mado-pop-campaign-page .mado-banner-area__mobile-motion-note strong {
    color: #334155;
    font-size: inherit;
    font-weight: 700;
}

/* BANNER STEP 6 / 2026-11-13 R40:
 * Phone-only, full-width single-column choices. The controls remain native
 * radio inputs; no duplicate picker DOM or JS state is introduced. */
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__code-picker,
    #mado-pop-campaign-page .mado-banner-area__install-method-choice {
        grid-template-columns: minmax(0, 1fr);
    }
    #mado-pop-campaign-page .mado-banner-area__code-picker-tab {
        width: 100%;
        min-height: 44px;
        border-radius: 8px;
    }
    #mado-pop-campaign-page .mado-banner-area__code-picker-content {
        grid-column: 1;
        border-radius: 9px;
    }
}

/* R46 / 2026-11-13: Banner-only heading alignment and icon size.
 * PC/tablet titles and subtitles follow the shared Portal left alignment;
 * only phones center the compact (visible) purpose copy to avoid awkward wraps.
 * Keep the shared POP CSS, page markup, and public banner Runtime unchanged. */
#mado-pop-campaign-page.is-banner-area-mode .mado-pop-campaign-page__title-icon {
    width: 30px;
    height: 30px;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-pop-campaign-page__hero-copy {
    align-items: flex-start;
    text-align: left;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-pop-campaign-page__title {
    justify-content: flex-start;
    text-align: left;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__compact-purpose,
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__compact-subtitle {
    text-align: left;
}
@media (max-width: 720px) {
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__compact-purpose,
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__compact-subtitle {
        text-align: center;
    }
}
/* Add vertical-space controls as a row separate from width/height/side padding.
 * No global number-control CSS; that remains owned by mado-ui-compact-controls. */
#mado-pop-campaign-page .mado-banner-area__size-fields .mado-banner-area__field--vertical-space {
    grid-row: 2;
}
#mado-pop-campaign-page .mado-banner-area__size-fields .mado-banner-area__field--vertical-space:nth-child(4) {
    grid-column: 1;
}
#mado-pop-campaign-page .mado-banner-area__size-fields .mado-banner-area__field--vertical-space:nth-child(5) {
    grid-column: 2;
}
/* Desktop modal uses an icon-only close button; accessible name is in PHP. */
#mado-pop-campaign-page .mado-banner-area__manager-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
}
/* Extra 20px above the saved-list heading, keeping the rest of the modal unchanged. */
#mado-pop-campaign-page .mado-banner-area__manager-saved-heading {
    margin-top: 42px;
}
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-banner-area__manager-dialog-close {
        display: none;
    }
}

/* R47 / 2026-11-13: Ten / thirty-minute preview choice. Keep two equal columns
 * in the standalone STEP3 and its moved native dialog; no second preview stage. */
#mado-pop-campaign-page .mado-banner-area__install-screen .mado-banner-area__place-preview-action,
#mado-pop-campaign-page .mado-banner-area__preview-dialog .mado-banner-area__place-preview-action {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(100%, 420px);
    max-width: 420px;
    margin-inline: auto;
}
#mado-pop-campaign-page .mado-banner-area__place-preview-action > .mado-ui-button {
    min-width: 0;
    width: 100%;
    min-height: 48px;
    padding-inline: 8px;
    font-size: clamp(13px, 3.6vw, 15px);
    white-space: nowrap;
}
#mado-pop-campaign-page .mado-banner-area__preview-reissue-note {
    margin: -4px 0 0;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}


/* R48 / 2026-11-13: Move the compact explanation 10px towards its heading,
 * transferring that space below the explanation towards the two page tabs.
 * Desktop hero remains unchanged and the two existing buttons are untouched. */
@media (max-width: 1100px) {
  #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__compact-subtitle {
    margin-top: -6px; /* R47: 4px, now 10px closer to its heading. */
  }
  #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__manager-toolbar {
    margin-top: 10px;
  }
}

/* R53 / STEP2: phone size editor mirrors the inquiry form's two-column
 * fields. The fifth field stays at left. Only this banner-area size group. */
@media (max-width: 720px) {
  #mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    justify-items: stretch;
    gap: 18px 8px;
  }
  #mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields > .mado-banner-area__field {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-row: auto;
    grid-column: auto;
    align-items: start;
    justify-items: center;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    row-gap: 8px;
    text-align: center;
  }
  #mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields > .mado-banner-area__field:nth-child(5) {
    grid-row: 3;
    grid-column: 1;
  }
  #mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields .mado-banner-area__unit {
    width: min(134px, 100%);
    min-width: 0;
    justify-self: center;
    justify-content: center;
  }
}
@media (max-width: 360px) {
  /* Still two columns on 320px screens; local CSS variables preserve the
   * one shared +/- control, reducing only its geometry within this group. */
  #mado-pop-campaign-page .mado-banner-area__step--size .mado-banner-area__size-fields {
    --mado-ui-number-stepper-width: 120px;
    --mado-ui-number-stepper-height: 44px;
    --mado-ui-number-stepper-button-size: 40px;
    --mado-ui-number-stepper-value-width: 40px;
  }
}

/* R49 / 2026-11-13: Mobile installation gets the width lost to the outer
 * framed card AND the stage number rail. PC/tablet and creation steps retain
 * the original frame, marker and spacing. No DOM duplication/second workflow. */
@media (max-width: 720px) {
  #mado-pop-campaign-page.is-banner-area-mode
  .mado-banner-area[data-mado-banner-area-phase="installation"] .mado-banner-area__steps {
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
  }
  #mado-pop-campaign-page.is-banner-area-mode
  .mado-banner-area[data-mado-banner-area-phase="installation"] .mado-banner-area__install-stage {
    padding-inline-start: 0;
  }
  #mado-pop-campaign-page.is-banner-area-mode
  .mado-banner-area[data-mado-banner-area-phase="installation"] .mado-banner-area__install-stage-number,
  #mado-pop-campaign-page.is-banner-area-mode
  .mado-banner-area[data-mado-banner-area-phase="installation"] .mado-banner-area__install-stage::before {
    display: none;
  }
}

/* R51 / 2026-11-13: No success/progress notices above STEP1.
 * Errors remain accessible, dismissible and visually separate at page bottom.
 * Fixed positioning never expands either the STEP card or the preview column.
 * Only this banner-area status node is affected; shared Portal notices and
 * contextual step help, preview dialog errors and publication states remain.
 */
#mado-pop-campaign-page .mado-banner-area__status {
  display: none;
  margin: 0;
  min-height: 0;
}
#mado-pop-campaign-page .mado-banner-area__status[data-state="error"]:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: fixed;
  z-index: 99990;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(560px, calc(100vw - 32px));
  max-height: min(40vh, 300px);
  padding: 14px 16px;
  overflow-y: auto;
  border: 1px solid #f4b8b8;
  border-radius: 12px;
  background: #fff;
  color: #a42117;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .20);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  text-align: left;
}
#mado-pop-campaign-page .mado-banner-area__status-message {
  min-width: 0;
  overflow-wrap: anywhere;
}
#mado-pop-campaign-page .mado-banner-area__status-dismiss {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
#mado-pop-campaign-page .mado-banner-area__status-dismiss:focus-visible {
  outline: 3px solid #007094;
  outline-offset: 2px;
}
@media (max-width: 400px) {
  #mado-pop-campaign-page .mado-banner-area__status[data-state="error"]:not([hidden]) {
    padding: 12px;
    font-size: 15px;
  }
}


/* R58 / 2026-11-14: Numeric STEP navigation stays at the left edge, away
 * from the fixed customer-support chat at the lower-right. STEP4's long
 * item list additionally shows a presentation-only nav in its footer;
 * the original remains below the preview. Both share one JS handler. */
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area-preview__step-index,
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-index-home,
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-index-install {
    justify-content: flex-start;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-index-items {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    margin-top: 20px;
    padding-top: 12px;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-index-items .mado-banner-area-preview__step-index {
    margin-top: 0;
}
@media (min-width: 1101px) {
    /* R62: STEP4's presentation-only copy is useful only with compact tabs.
     * On desktop the preview-card navigator is always accessible. */
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-index-items {
        display: none;
    }
}
/* Empty relocation slots must not leave stray space beneath the preview
 * or inside a step when the one navigator is elsewhere. */
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-index-home:empty,
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-index-install:empty,
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__step-index-items:empty {
    display: none;
}
/* Native disclosure in STEP4: align with the mint selection surfaces used
 * elsewhere in the Provider. The summary is the ONLY native clickable
 * control; ::before changes from plus to minus on [open]. */
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__single-settings {
    border: 0;
    background: transparent;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__single-settings > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #06bfb5;
    border-radius: 12px;
    background: #e6fbf9;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    list-style: none;
    cursor: pointer;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__single-settings > summary::-webkit-details-marker {
    display: none;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__single-settings > summary::before {
    content: '+';
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 23px;
    font-weight: 500;
    line-height: 1;
    color: #007094;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__single-settings[open] > summary::before {
    content: '\2212';
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__single-settings[open] > summary {
    border-radius: 12px 12px 0 0;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__single-settings[open] > .mado-banner-area__single-settings-body {
    padding-top: 16px;
    border: 1px solid #b9eeea;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: #fff;
}
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__single-settings > summary:focus-visible {
    outline: 3px solid #007094;
    outline-offset: 3px;
}
/* After STEP6 save, leave breathing room around the introduction and
 * installation controls; on phones, R49 deliberately removed the outer
 * settings-card padding, so only this install screen receives an inset. */
#mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__install-screen {
    box-sizing: border-box;
    padding-block: 12px 20px;
}
@media (max-width: 720px) {
    #mado-pop-campaign-page.is-banner-area-mode .mado-banner-area__install-screen {
        padding: 16px 12px 22px;
    }
}

/* 2026-11-20: Published state now uses publication-ui.css shared palette.
 * Keep this area's confirmation/stop action separate from publish-draft action. */
