/*
 * MADO POP COMMON CSS — POP family shared primitives
 * SSOT / ownership (2026-09-22)
 * - Normal POP, Easy, Banner Area が実際に共用するPOP管理画面の土台だけを持つ。
 * - Easy固有UIは pop-campaign-easy.css。Banner Area固有UIは pop-campaign-banner-area.css。
 * - Normal editor固有UIは pop-campaign-page.css。全MADO共通token/button/modalは mado-base.css。
 * - 新しい画面固有selectorをこのファイルへ追加しない。
 */

#mado-pop-campaign-page {
    --mado-pop-text: #111827;
    --mado-pop-primary: var(--mado-brand-accent, #06bfb5);
    --mado-pop-primary-dark: var(--mado-brand-accent, #06bfb5);
    --mado-pop-primary-soft: var(--mado-brand-accent-soft, #e6fbf9);
    --mado-pop-primary-ring: var(--mado-brand-accent-ring, rgba(6, 191, 181, 0.20));
    --mado-pop-micro-accent: var(--mado-selection-accent, #f47a14);
    --mado-pop-micro-accent-soft: var(--mado-selection-accent-soft, #fce7d9);
    --mado-pop-catalog-card-min-width: 152px;
    display: block;
    color: var(--mado-pop-text);
    --mado-pop-typo-section-size: 14px;
    --mado-pop-typo-section-weight: 600;
    --mado-pop-typo-help-size: 12px;
    --mado-pop-typo-help-weight: 400;
    --mado-pop-typo-muted: #475569;
    font-family: var(--ai-chat-font-family, "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* R362 / 2026-10-31: one shared, decorative control-icon vocabulary for Normal/Easy.
 * SVGs are embedded here once; no JavaScript mutation, extra HTTP request,
 * duplicate icon markup, new editor implementation, or change to aria labels.
 * The copyright SVG is deliberately excluded: it belongs to the form MADO logo.
 * Remove only after the controls are redesigned in both modes. */
#mado-pop-campaign-page {--mado-pop-pictogram-size:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M14%2C7H10.5Q9.88%2C7%209.44%2C6.56T9%2C5.5T9.44%2C4.44T10.5%2C4h10q0.63%2C0%201.06%2C0.44T22%2C5.5T21.56%2C6.56T20.5%2C7H17V18.5q0%2C0.63-0.44%2C1.06T15.5%2C20t-1.06-0.44T14%2C18.5V7ZM5%2C12H3.5q-0.63%2C0-1.06-0.44T2%2C10.5T2.44%2C9.44T3.5%2C9h6q0.63%2C0%201.06%2C0.44T11%2C10.5t-0.44%2C1.06T9.5%2C12H8v6.5q0%2C0.63-0.44%2C1.06T6.5%2C20T5.44%2C19.56T5%2C18.5V12Z%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-bold:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M8.8%2C19q-0.83%2C0-1.41-0.59T6.8%2C17V7q0-0.82%200.59-1.41T8.8%2C5h3.53q1.63%2C0%203%2C1T16.7%2C8.77q0%2C1.28-0.57%2C1.96t-1.07%2C0.99q0.63%2C0.28%201.39%2C1.03T17.2%2C15q0%2C2.23-1.62%2C3.11T12.53%2C19H8.8Zm1.03-2.8h2.6q1.2%2C0%201.46-0.61t0.26-0.89t-0.26-0.89T12.35%2C13.2H9.83v3Zm0-5.7h2.32q0.83%2C0%201.2-0.43t0.38-0.95q0-0.6-0.43-0.98T12.2%2C7.77H9.83V10.5Z%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-letter:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M7.83%2C19l0.9%2C0.9Q9%2C20.18%209%2C20.59T8.7%2C21.3Q8.43%2C21.58%208%2C21.58q-0.42%2C0-0.7-0.27L4.7%2C18.7Q4.4%2C18.4%204.4%2C18t0.3-0.7l2.6-2.6q0.27-0.28%200.69-0.28T8.7%2C14.7Q9%2C15%209%2C15.41T8.7%2C16.13L7.83%2C17h8.35l-0.9-0.9Q15%2C15.83%2015%2C15.41t0.3-0.71q0.28-0.28%200.7-0.28q0.43%2C0%200.7%2C0.28l2.6%2C2.6q0.3%2C0.3%200.3%2C0.7t-0.3%2C0.7l-2.6%2C2.6q-0.27%2C0.27-0.69%2C0.27T15.3%2C21.3Q15%2C21%2015%2C20.59q0-0.41%200.3-0.71L16.18%2C19H7.83ZM5.29%2C11.71Q5%2C11.43%205%2C11V3Q5%2C2.57%205.29%2C2.29T6%2C2T6.71%2C2.29T7%2C3v8q0%2C0.42-0.29%2C0.71T6%2C12q-0.42%2C0-0.71-0.29Zm6%2C0Q11%2C11.43%2011%2C11V3q0-0.43%200.29-0.71T12%2C2t0.71%2C0.29T13%2C3v8q0%2C0.42-0.29%2C0.71T12%2C12t-0.71-0.29Zm6%2C0Q17%2C11.43%2017%2C11V3q0-0.43%200.29-0.71T18%2C2t0.71%2C0.29T19%2C3v8q0%2C0.42-0.29%2C0.71T18%2C12t-0.71-0.29Z%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-line:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M5%2C7.85L4.1%2C8.73Q3.83%2C9%203.41%2C9T2.7%2C8.7Q2.43%2C8.42%202.43%2C8q0-0.43%200.27-0.7L5.3%2C4.7Q5.45%2C4.55%205.63%2C4.49T6%2C4.42T6.38%2C4.49T6.7%2C4.7L9.3%2C7.3Q9.58%2C7.57%209.59%2C7.99T9.3%2C8.7Q9.03%2C8.98%208.61%2C8.99T7.9%2C8.73L7%2C7.85v8.3l0.9-0.87Q8.18%2C15%208.59%2C15T9.3%2C15.3Q9.58%2C15.58%209.58%2C16T9.3%2C16.7L6.7%2C19.3q-0.15%2C0.15-0.33%2C0.21T6%2C19.58T5.63%2C19.51T5.3%2C19.3L2.7%2C16.7q-0.27-0.27-0.29-0.69T2.7%2C15.3q0.27-0.27%200.69-0.29T4.1%2C15.28L5%2C16.15V7.85ZM13%2C19q-0.42%2C0-0.71-0.29Q12%2C18.43%2012%2C18t0.29-0.71T13%2C17h8q0.43%2C0%200.71%2C0.29T22%2C18t-0.29%2C0.71T21%2C19H13Zm0-6q-0.42%2C0-0.71-0.29Q12%2C12.43%2012%2C12t0.29-0.71T13%2C11h8q0.43%2C0%200.71%2C0.29T22%2C12t-0.29%2C0.71T21%2C13H13Zm0-6q-0.42%2C0-0.71-0.29Q12%2C6.43%2012%2C6t0.29-0.71T13%2C5h8q0.43%2C0%200.71%2C0.29T22%2C6T21.71%2C6.71T21%2C7H13Z%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-rotate:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M21%2012a9%209%200%201%201-9-9c2.49%200%204.74%201.01%206.36%202.64L21%208M21%203v5h-5%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-vertical:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M8.29%2C12.71Q8%2C12.43%208%2C12V5.82L6.13%2C7.7Q5.85%2C7.97%205.44%2C7.97q-0.41%2C0-0.71-0.27q-0.3-0.3-0.3-0.71q0-0.41%200.3-0.71L8.3%2C2.7Q8.45%2C2.55%208.63%2C2.49T9%2C2.42T9.38%2C2.49T9.7%2C2.7l3.6%2C3.6Q13.6%2C6.6%2013.59%2C7T13.28%2C7.7q-0.3%2C0.27-0.7%2C0.29T11.88%2C7.7L10%2C5.82V12q0%2C0.42-0.29%2C0.71T9%2C13q-0.42%2C0-0.71-0.29Zm6.34%2C8.8q-0.17-0.06-0.32-0.21l-3.6-3.6q-0.3-0.3-0.29-0.7t0.31-0.7q0.3-0.28%200.7-0.29t0.7%2C0.29L14%2C18.18V12q0-0.43%200.29-0.71T15%2C11t0.71%2C0.29T16%2C12v6.18l1.88-1.88q0.28-0.28%200.69-0.28q0.41%2C0%200.71%2C0.28q0.3%2C0.3%200.3%2C0.71q0%2C0.41-0.3%2C0.71L15.7%2C21.3q-0.15%2C0.15-0.33%2C0.21T15%2C21.58t-0.38-0.06Z%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-horizontal:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M5.83%2C16L7.7%2C17.88q0.28%2C0.27%200.28%2C0.69T7.7%2C19.27q-0.3%2C0.3-0.71%2C0.3t-0.71-0.3L2.7%2C15.7q-0.15-0.15-0.21-0.32T2.43%2C15t0.06-0.38T2.7%2C14.3l3.6-3.6Q6.6%2C10.4%207%2C10.41t0.7%2C0.31q0.28%2C0.3%200.29%2C0.7T7.7%2C12.13L5.83%2C14H12q0.43%2C0%200.71%2C0.29T13%2C15t-0.29%2C0.71T12%2C16H5.83Zm12.35-6H12q-0.42%2C0-0.71-0.29T11%2C9q0-0.43%200.29-0.71T12%2C8h6.18L16.3%2C6.13q-0.27-0.28-0.27-0.69q0-0.41%200.27-0.71q0.3-0.3%200.71-0.3q0.41%2C0%200.71%2C0.3L21.3%2C8.3q0.15%2C0.15%200.21%2C0.33T21.58%2C9T21.51%2C9.38T21.3%2C9.7l-3.6%2C3.6q-0.3%2C0.3-0.7%2C0.29q-0.4-0.01-0.7-0.31q-0.27-0.3-0.29-0.7t0.29-0.7L18.18%2C10Z%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-opacity:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M6.34%2C18.7Q4%2C16.4%204%2C13.1q0-1.63%200.63-3.04T6.35%2C7.55l4.6-4.53q0.22-0.2%200.5-0.31T12%2C2.6q0.28%2C0%200.55%2C0.11t0.5%2C0.31l4.6%2C4.53q1.1%2C1.1%201.72%2C2.51T20%2C13.1q0%2C3.3-2.34%2C5.6T12%2C21q-3.32%2C0-5.66-2.3ZM6.05%2C14H17.9q0.3-1.8-0.34-3.08T16.25%2C9L12%2C4.8L7.75%2C9Q7.08%2C9.65%206.43%2C10.93T6.05%2C14Z%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-aspect:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M17%2C15H15q-0.42%2C0-0.71%2C0.29T14%2C16t0.29%2C0.71T15%2C17h3q0.43%2C0%200.71-0.29Q19%2C16.43%2019%2C16V13q0-0.43-0.29-0.71T18%2C12t-0.71%2C0.29T17%2C13v2ZM7%2C9H9Q9.43%2C9%209.71%2C8.71T10%2C8q0-0.43-0.29-0.71T9%2C7H6Q5.58%2C7%205.29%2C7.29T5%2C8v3q0%2C0.42%200.29%2C0.71T6%2C12t0.71-0.29Q7%2C11.43%207%2C11V9ZM4%2C20q-0.82%2C0-1.41-0.59T2%2C18V6Q2%2C5.18%202.59%2C4.59T4%2C4H20q0.83%2C0%201.41%2C0.59Q22%2C5.18%2022%2C6V18q0%2C0.82-0.59%2C1.41T20%2C20H4Zm0-2H20V6H4V18Zm0%2C0V6V18Z%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-font:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4%2020%2011%204l7%2016M6.5%2014h9M19%207h3%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-palette:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%203a9%209%200%201%200%200%2018h1a2.5%202.5%200%200%200%201-4.8A2%202%200%200%201%2016%2013h2a3%203%200%200%200%203-3C21%206%2017%203%2012%203Z%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%2F%3E%3Ccircle%20cx%3D%227.5%22%20cy%3D%2210%22%20r%3D%221.1%22%2F%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%227%22%20r%3D%221.1%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%228.5%22%20r%3D%221.1%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Crect%20x%3D%223%22%20y%3D%224%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%222%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20fill%3D%22none%22%2F%3E%3Ccircle%20cx%3D%228%22%20cy%3D%229%22%20r%3D%222%22%2F%3E%3Cpath%20d%3D%22m5%2018%205-5%203%202%203-4%203%207%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-align:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4%205h16M4%209h10M4%2013h16M4%2017h10%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-writing:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M6%204v15M3%2015l3%204%203-4M12%205h9M15%209h5M12%2013h9M15%2017h5%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page {--mado-pop-pictogram-placement:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.7%22%2F%3E%3Cpath%20d%3D%22M3%209h18M3%2015h18M9%203v18M15%203v18%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%2F%3E%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%226%22%20height%3D%226%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_size"]){--mado-pop-field-icon:var(--mado-pop-pictogram-size);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="text_color"]){--mado-pop-field-icon:var(--mado-pop-pictogram-palette);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_weight"]){--mado-pop-field-icon:var(--mado-pop-pictogram-bold);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_family"]){--mado-pop-field-icon:var(--mado-pop-pictogram-font);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="letter_spacing"]){--mado-pop-field-icon:var(--mado-pop-pictogram-letter);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="line_height"]){--mado-pop-field-icon:var(--mado-pop-pictogram-line);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="rotation"]){--mado-pop-field-icon:var(--mado-pop-pictogram-rotate);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="align"]){--mado-pop-field-icon:var(--mado-pop-pictogram-align);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="writing_mode"]){--mado-pop-field-icon:var(--mado-pop-pictogram-writing);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="offset_y"]){--mado-pop-field-icon:var(--mado-pop-pictogram-vertical);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="offset_x"]){--mado-pop-field-icon:var(--mado-pop-pictogram-horizontal);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_scale_percent"]){--mado-pop-field-icon:var(--mado-pop-pictogram-image);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="bg_opacity"]){--mado-pop-field-icon:var(--mado-pop-pictogram-opacity);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_rotation"]){--mado-pop-field-icon:var(--mado-pop-pictogram-rotate);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_offset_y"]){--mado-pop-field-icon:var(--mado-pop-pictogram-vertical);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_offset_x"]){--mado-pop-field-icon:var(--mado-pop-pictogram-horizontal);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="font_size"]){--mado-pop-field-icon:var(--mado-pop-pictogram-size);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="text_color"]){--mado-pop-field-icon:var(--mado-pop-pictogram-palette);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="font_weight"]){--mado-pop-field-icon:var(--mado-pop-pictogram-bold);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="letter_spacing"]){--mado-pop-field-icon:var(--mado-pop-pictogram-letter);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="line_height"]){--mado-pop-field-icon:var(--mado-pop-pictogram-line);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="rotation"]){--mado-pop-field-icon:var(--mado-pop-pictogram-rotate);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="offset_x"]){--mado-pop-field-icon:var(--mado-pop-pictogram-horizontal);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="offset_y"]){--mado-pop-field-icon:var(--mado-pop-pictogram-vertical);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-size]){--mado-pop-field-icon:var(--mado-pop-pictogram-size);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-color]){--mado-pop-field-icon:var(--mado-pop-pictogram-palette);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-weight]){--mado-pop-field-icon:var(--mado-pop-pictogram-bold);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-spacing]){--mado-pop-field-icon:var(--mado-pop-pictogram-letter);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-rotation]){--mado-pop-field-icon:var(--mado-pop-pictogram-rotate);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-offset-x]){--mado-pop-field-icon:var(--mado-pop-pictogram-horizontal);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-offset-y]){--mado-pop-field-icon:var(--mado-pop-pictogram-vertical);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-scale]){--mado-pop-field-icon:var(--mado-pop-pictogram-image);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-opacity]){--mado-pop-field-icon:var(--mado-pop-pictogram-opacity);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-rotation]){--mado-pop-field-icon:var(--mado-pop-pictogram-rotate);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-offset-x]){--mado-pop-field-icon:var(--mado-pop-pictogram-horizontal);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-offset-y]){--mado-pop-field-icon:var(--mado-pop-pictogram-vertical);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-svg-scale-x]){--mado-pop-field-icon:var(--mado-pop-pictogram-horizontal);}
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-svg-scale-y]){--mado-pop-field-icon:var(--mado-pop-pictogram-vertical);}
#mado-pop-campaign-page .mado-pop-preview-context-panel [data-mado-pop-context-image-placement] > strong{--mado-pop-field-icon:var(--mado-pop-pictogram-placement);}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_size"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="text_color"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_weight"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_family"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="letter_spacing"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="line_height"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="rotation"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="align"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="writing_mode"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="offset_y"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="offset_x"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_scale_percent"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="bg_opacity"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_rotation"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_offset_y"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_offset_x"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="font_size"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="text_color"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="font_weight"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="letter_spacing"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="line_height"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="rotation"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="offset_x"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="offset_y"]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-size]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-color]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-weight]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-spacing]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-rotation]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-offset-x]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-offset-y]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-scale]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-opacity]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-rotation]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-offset-x]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-offset-y]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-svg-scale-x]) > span:first-child,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-svg-scale-y]) > span:first-child,
#mado-pop-campaign-page .mado-pop-preview-context-panel [data-mado-pop-context-image-placement] > strong{display:inline-flex;align-items:center;justify-content:center;gap:5px;}
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_size"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="text_color"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_weight"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="font_family"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="letter_spacing"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="line_height"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="rotation"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="align"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="writing_mode"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="offset_y"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="offset_x"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_scale_percent"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="bg_opacity"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_rotation"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_offset_y"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel :is(label,.mado-pop-preview-context-panel__field):has([data-mado-pop-context-field="image_offset_x"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="font_size"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="text_color"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="font_weight"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="letter_spacing"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="line_height"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="rotation"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="offset_x"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-body-field="offset_y"]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-size]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-color]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-weight]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-spacing]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-rotation]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-offset-x]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-title-offset-y]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-scale]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-opacity]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-rotation]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-offset-x]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-material-offset-y]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-svg-scale-x]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-easy__compact-field:has([data-mado-pop-easy-svg-scale-y]) > span:first-child::before,
#mado-pop-campaign-page .mado-pop-preview-context-panel [data-mado-pop-context-image-placement] > strong::before{
 content:"";display:inline-block;flex:none;width:18px;height:18px;background:currentColor;
 -webkit-mask:var(--mado-pop-field-icon) center / contain no-repeat;
 mask:var(--mado-pop-field-icon) center / contain no-repeat;
 pointer-events:none;
}
#mado-pop-campaign-page .mado-pop-preview-context-panel__text-menu > button[data-mado-pop-context-text-nav="style"]::before{
 content:"";display:inline-block;flex:none;width:16px;height:16px;
 margin-right:4px;background:currentColor;
 -webkit-mask:var(--mado-pop-pictogram-font) center / contain no-repeat;
 mask:var(--mado-pop-pictogram-font) center / contain no-repeat;
 pointer-events:none;
}
#mado-pop-campaign-page .mado-pop-preview-context-panel__text-menu > button[data-mado-pop-context-text-nav="position"]::before{
 content:"";display:inline-block;flex:none;width:16px;height:16px;
 margin-right:4px;background:currentColor;
 -webkit-mask:var(--mado-pop-pictogram-horizontal) center / contain no-repeat;
 mask:var(--mado-pop-pictogram-horizontal) center / contain no-repeat;
 pointer-events:none;
}

body.mado-portal-account-page .mado-portal-shell--action-pop-campaign .mado-portal-shell__content-frame.is-standard {
    width: 100%;
    max-width: var(--mado-portal-page-wide-max-width, 1240px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--mado-portal-page-gutter-x, clamp(18px, 2.4vw, 32px));
    padding-right: var(--mado-portal-page-gutter-x, clamp(18px, 2.4vw, 32px));
}

body.mado-portal-account-page .mado-portal-shell--action-pop-campaign .mado-portal-shell__content-frame.is-with-preview {
    margin-right: 0;
    padding-left: var(--mado-portal-page-gutter-x, clamp(18px, 2.4vw, 32px));
    padding-right: var(--mado-portal-page-gutter-x, clamp(18px, 2.4vw, 32px));
}

body.mado-portal-account-page .mado-portal-shell--action-pop-campaign .mado-portal-shell__content {
    overflow: visible;
}

body.mado-portal-account-page .mado-portal-shell--action-pop-campaign .mado-portal-shell__content-frame {
    overflow: visible;
}

#mado-pop-campaign-page .mado-pop-campaign-page__surface {
    display: grid;
    align-content: start;
    grid-auto-rows: max-content;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 14px;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#mado-pop-campaign-page .mado-pop-campaign-page__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

#mado-pop-campaign-page .mado-pop-campaign-page__hero-copy {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#mado-pop-campaign-page .mado-pop-campaign-page__title {
    position: relative;
    top: -6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin: 0;
}

#mado-pop-campaign-page .mado-pop-campaign-page__title-icon {
    display: block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

#mado-pop-campaign-page.is-easy-create-mode .mado-pop-campaign-page__surface { gap: 12px; }

/* 2026-11-02 / POP size guide: Normal & Easy share this one text size.
 * The superseded 15px declarations in their mode styles are held commented
 * until release, rather than becoming another end-of-file override. */
#mado-pop-campaign-page .mado-pop-size-guide > summary { font-size: 14px; }

#mado-pop-campaign-page .mado-pop-size-guide__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    /* PRE-LAUNCH HOLD 2026-11-02: gap: 10px; 新規作成の案内間隔を20pxに変更。 */
    gap: 20px;
}

#mado-pop-campaign-page .mado-pop-size-guide__grid strong,
#mado-pop-campaign-page .mado-pop-size-guide__grid span,
#mado-pop-campaign-page .mado-pop-size-guide__grid small { display: block; }

#mado-pop-campaign-page .mado-pop-size-guide__grid strong { margin-bottom: 5px; color: #0f172a; font-size: 13px; font-weight: 900; }

#mado-pop-campaign-page .mado-pop-size-guide__grid span { color: #334155; font-size: 13px; font-weight: 500; line-height: 1.5; }

#mado-pop-campaign-page .mado-pop-size-guide__grid small { margin-top: 5px; color: #64748b; font-size: 11px; line-height: 1.55; }

#mado-pop-campaign-page .mado-pop-size-guide__note { color: #64748b; font-size: 11px; }

#mado-pop-campaign-page .mado-pop-campaign-field--text-content textarea.mado-pop-campaign-field__control { min-height: 76px; resize: vertical; line-height: 1.55; }

@media (max-width: 620px) {
#mado-pop-campaign-page { --mado-pop-catalog-card-min-width: 104px; }

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

#mado-pop-campaign-page .mado-pop-section-panel--pop-size .mado-pop-campaign-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#mado-pop-campaign-page .mado-pop-section-panel--color-image .mado-pop-style-mode-grid,
#mado-pop-campaign-page .mado-pop-section-panel--color-image .mado-pop-icon-mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
#mado-pop-campaign-page .mado-pop-campaign-page__hero-copy {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

#mado-pop-campaign-page .mado-pop-campaign-page__title {
        top: -6px;
    }
}

#mado-pop-campaign-page .mado-pop-style-section {
    display: grid;
    gap: 12px;
}

#mado-pop-campaign-page .mado-pop-style-section + .mado-pop-style-section {
    margin-top: 18px;
}

#mado-pop-campaign-page .mado-pop-campaign-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-font-weight-field,
#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-field--color:not(.mado-pop-campaign-field--text-color-wide) {
    grid-column: auto;
}

#mado-pop-campaign-page .mado-pop-campaign-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-pop-campaign-field__label {
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

#mado-pop-campaign-page .mado-pop-field-color > input[type="color"],
#mado-pop-campaign-page .mado-pop-campaign-color-control__picker,
#mado-pop-campaign-page .mado-pop-svg-color-panel__swatch-picker {
    width: var(--mado-ui-comfortable-color-picker-width, 42px);
    min-width: var(--mado-ui-comfortable-color-picker-width, 42px);
    height: var(--mado-ui-comfortable-color-picker-height, 38.4px);
    padding: var(--mado-ui-comfortable-color-picker-padding, 4px);
    border: 1px solid #cbd8e6;
    border-radius: var(--mado-portal-radius-sm, 8px);
    background: #ffffff;
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-pop-field-color > input[type="color"]::-webkit-color-swatch-wrapper,
#mado-pop-campaign-page .mado-pop-campaign-color-control__picker::-webkit-color-swatch-wrapper,
#mado-pop-campaign-page .mado-pop-svg-color-panel__swatch-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

#mado-pop-campaign-page .mado-pop-field-color > input[type="color"]::-webkit-color-swatch,
#mado-pop-campaign-page .mado-pop-campaign-color-control__picker::-webkit-color-swatch,
#mado-pop-campaign-page .mado-pop-svg-color-panel__swatch-picker::-webkit-color-swatch,
#mado-pop-campaign-page .mado-pop-field-color > input[type="color"]::-moz-color-swatch,
#mado-pop-campaign-page .mado-pop-campaign-color-control__picker::-moz-color-swatch,
#mado-pop-campaign-page .mado-pop-svg-color-panel__swatch-picker::-moz-color-swatch {
    border: 0;
    border-radius: 4px;
}

#mado-pop-campaign-page .mado-pop-campaign-field__control:not(.mado-ui-number-stepper__input) {
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    line-height: 1.45;
}

#mado-pop-campaign-page .mado-pop-campaign-field__control:not(.mado-ui-number-stepper__input):focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    outline: none;
}

/* MADO CSS AUDIT 2026-11-02 / stage only: same selector + same media context; all properties overridden later.
#mado-pop-campaign-page .mado-ui-range-control__slider {
    accent-color: var(--mado-ui-range-accent, #2dd4bf);
}
*/

#mado-pop-campaign-page .mado-pop-campaign-color-control {
    display: grid;
    grid-template-columns: var(--mado-ui-comfortable-color-picker-width, 42px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

#mado-pop-campaign-page .mado-pop-layer-menu__list {
    display: grid;
    gap: 4px;
    min-height: 96px;
    max-height: min(70vh, 720px);
    overflow: auto;
    resize: vertical;
}

/* LAYER LIST RESIZE / 2026-10-01:
 * Normal and Easy share the browser-native vertical resize grip.
 * Resizing changes editor UI only; it never writes POP data or a second layout state.
 */

/* IMAGE LAYER THUMBNAIL / 2026-09-24: existing image inside the shared small glyph slot. */
#mado-pop-campaign-page .mado-pop-layer-menu__item-icon {
    overflow: hidden;
}
#mado-pop-campaign-page .mado-pop-layer-menu__thumbnail {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: 0 0 auto;
    background: #fff;
    border-radius: 5px;
}

@media (max-width: 760px) {
body.mado-portal-account-page .mado-portal-shell--action-pop-campaign .mado-portal-shell__content-frame.is-standard,
    body.mado-portal-account-page .mado-portal-shell--action-pop-campaign .mado-portal-shell__content-frame.is-with-preview {
        padding-left: var(--mado-portal-page-gutter-x-mobile, 16px);
        padding-right: var(--mado-portal-page-gutter-x-mobile, 16px);
    }

#mado-pop-campaign-page .mado-pop-campaign-page__hero,
    #mado-pop-campaign-page .mado-pop-campaign-field-grid,
    #mado-pop-campaign-page .mado-pop-create-panel__grid,
    #mado-pop-campaign-page .mado-pop-style-mode-grid,
    #mado-pop-campaign-page .mado-pop-icon-mode-grid {
        grid-template-columns: minmax(0, 1fr);
    }

#mado-pop-campaign-page .mado-pop-section-panel--pop-size .mado-pop-campaign-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

#mado-pop-campaign-page .mado-pop-section-panel--color-image .mado-pop-style-mode-grid,
    #mado-pop-campaign-page .mado-pop-section-panel--color-image .mado-pop-icon-mode-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

#mado-pop-campaign-page .mado-pop-campaign-page__surface {
        border-radius: 0;
    }

#mado-pop-campaign-page .mado-pop-campaign-page__hero-copy,
    #mado-pop-campaign-page .mado-pop-preview {
        border-radius: 12px;
    }
}

#mado-pop-campaign-page .mado-pop-display-rules__label-row .mado-pop-campaign-field__label {
    min-width: 0;
}

#mado-pop-campaign-page .mado-ui-select,
#mado-pop-campaign-page select.mado-pop-campaign-field__control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 14px;
}

#mado-pop-campaign-page .mado-pop-click-action .mado-ui-mode-panel,
#mado-pop-campaign-page .mado-pop-start-condition-panel,
#mado-pop-campaign-page .mado-pop-display-rules__paths {
    gap: 10px;
}

#mado-pop-campaign-page {
    --mado-pop-ui-line: #d8e4ef;
    --mado-pop-ui-text: #0f172a;
    --mado-pop-ui-text-soft: #475569;
    --mado-pop-ui-surface: #ffffff;
    --mado-pop-ui-surface-soft: #f8fafc;
    --mado-pop-ui-accent: var(--mado-brand-accent, #06bfb5);
    --mado-pop-ui-accent-soft: var(--mado-brand-accent-soft, #e6fbf9);
    --mado-pop-ui-focus-ring: var(--mado-brand-accent-ring, rgba(6, 191, 181, 0.20));
    --mado-pop-ui-control-border: #cbd5e1;
    --mado-pop-ui-control-height: 32px;
    --mado-pop-ui-control-radius: 8px;
}

#mado-pop-campaign-page .mado-ui-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

#mado-pop-campaign-page .mado-ui-mode-grid--small {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

#mado-pop-campaign-page .mado-ui-mode-card {
    appearance: none;
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--mado-pop-ui-line);
    border-radius: 8px;
    background: var(--mado-pop-ui-surface);
    color: var(--mado-pop-ui-text);
    text-align: left;
    cursor: pointer;
    font: inherit;
    box-shadow: none;
}

#mado-pop-campaign-page .mado-ui-mode-card:hover,
#mado-pop-campaign-page .mado-ui-mode-card:focus-visible {
    border-color: var(--mado-pop-ui-accent);
    background: #f8fdff;
    color: var(--mado-pop-ui-text);
    outline: none;
}

#mado-pop-campaign-page .mado-ui-mode-card.is-active,
#mado-pop-campaign-page .mado-ui-mode-card.is-selected,
#mado-pop-campaign-page .mado-ui-mode-card[aria-selected="true"],
#mado-pop-campaign-page .mado-ui-mode-card[aria-pressed="true"] {
    border-color: var(--mado-pop-ui-accent);
    background: var(--mado-pop-ui-accent-soft);
    color: var(--mado-pop-ui-text);
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.12);
}

#mado-pop-campaign-page .mado-ui-mode-card.is-inactive,
#mado-pop-campaign-page .mado-ui-mode-card[aria-selected="false"] {
    border-color: var(--mado-pop-ui-line);
    background: var(--mado-pop-ui-surface);
    color: var(--mado-pop-ui-text);
    box-shadow: none;
}

#mado-pop-campaign-page .mado-ui-mode-card__title {
    color: inherit;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 900;
}

#mado-pop-campaign-page .mado-ui-mode-panel[hidden] {
    display: none;
}

#mado-pop-campaign-page .mado-ui-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--mado-pop-ui-line);
    border-radius: 10px;
    background: var(--mado-pop-ui-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#mado-pop-campaign-page .mado-ui-card__title {
    display: block;
    margin: 0 0 14px;
    color: var(--mado-pop-ui-text);
    font-size: 16px;
    line-height: 1.45;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-ui-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-ui-field__label {
    display: block;
    margin: 0;
    color: var(--mado-pop-ui-text);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-ui-input,
#mado-pop-campaign-page .mado-ui-select {
    box-sizing: border-box;
    width: 100%;
    min-height: var(--mado-pop-ui-control-height);
    padding: 4px 9px;
    border: 1px solid var(--mado-pop-ui-control-border);
    border-radius: var(--mado-pop-ui-control-radius);
    background: #ffffff;
    color: var(--mado-pop-ui-text);
    font: inherit;
    box-shadow: none;
}

#mado-pop-campaign-page .mado-ui-input:focus,
#mado-pop-campaign-page .mado-ui-select:focus {
    border-color: var(--mado-pop-ui-accent);
    outline: 3px solid var(--mado-pop-ui-focus-ring);
    outline-offset: 0;
}

#mado-pop-campaign-page .mado-ui-input--number {
    width: 78px;
    max-width: 78px;
}

#mado-pop-campaign-page .mado-ui-range-control {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) 78px auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

#mado-pop-campaign-page .mado-ui-range-control__slider {
    width: 100%;
    accent-color: var(--mado-pop-ui-accent);
}

#mado-pop-campaign-page .mado-ui-range-control__number {
    width: 78px;
    max-width: 78px;
    min-width: 0;
    text-align: center;
}

#mado-pop-campaign-page .mado-ui-range-control__unit,
#mado-pop-campaign-page .mado-ui-unit-control__unit,
#mado-pop-campaign-page .mado-ui-angle-control__unit {
    flex: 0 0 auto;
    color: var(--mado-pop-ui-text);
    font-size: 12px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-ui-angle-control {
    --mado-ui-angle-control-value: var(--mado-ui-angle, calc(var(--radial-angle, 135) * 1deg));
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

#mado-pop-campaign-page .mado-ui-angle-control__dial {
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    flex: 0 0 54px;
    width: 54px;
    min-width: 54px;
    height: 54px;
    min-height: 54px;
    aspect-ratio: 1;
    border: 2px solid #cdebf4;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    cursor: grab;
    touch-action: none;
}

#mado-pop-campaign-page .mado-ui-angle-control__dial::before {
    content: "";
    position: absolute;
    box-sizing: border-box;
    inset: 7px;
    border: 2px solid var(--mado-pop-ui-accent);
    border-radius: 999px;
}

#mado-pop-campaign-page .mado-ui-angle-control__dial.is-dragging {
    cursor: grabbing;
}

#mado-pop-campaign-page .mado-ui-angle-control__needle {
    position: absolute;
    left: 50%;
    top: 9px;
    width: 2px;
    height: 22px;
    border-radius: 999px;
    background: var(--mado-pop-ui-text);
    transform: translateX(-50%) rotate(var(--mado-ui-angle-control-value));
    transform-origin: 50% 18px;
}

#mado-pop-campaign-page .mado-ui-angle-control__needle::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--mado-pop-ui-accent);
    transform: translateX(-50%);
}

#mado-pop-campaign-page .mado-ui-angle-control__number {
    width: 78px;
    max-width: 78px;
    min-width: 0;
    text-align: center;
}

@media (max-width: 720px) {
#mado-pop-campaign-page .mado-ui-mode-grid,
    #mado-pop-campaign-page .mado-ui-mode-grid--small,
    #mado-pop-campaign-page .mado-ui-range-control {
        grid-template-columns: minmax(0, 1fr);
    }

#mado-pop-campaign-page .mado-ui-range-control__number,
    #mado-pop-campaign-page .mado-ui-angle-control__number,
    #mado-pop-campaign-page .mado-ui-input--number {
        width: 100%;
        max-width: 100%;
    }
}

#mado-pop-campaign-page .mado-pop-style-section .mado-ui-mode-card {
    min-height: 48px;
    padding: 11px 14px;
    align-content: center;
}

#mado-pop-campaign-page .mado-pop-style-section .mado-ui-mode-card__title {
    font-weight: var(--mado-pop-typo-section-weight);
}

#mado-pop-campaign-page .mado-ui-mode-card.is-active,
#mado-pop-campaign-page .mado-ui-mode-card.is-selected {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: var(--mado-pop-text);
    box-shadow: 0 0 0 2px rgba(6, 191, 181, 0.16);
}

#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-campaign-page__hero,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-mado-preview-bar,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-campaign-editor__main,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-selected-summary,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-preview__panel--editor {
    display: none;
}

#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-campaign-page__surface,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-campaign-editor,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-campaign-editor__layout,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-campaign-editor__preview,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-preview,
#mado-pop-campaign-page.is-mado-preview-mode .mado-pop-preview__split {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
}

#mado-pop-campaign-page:not(.is-mado-preview-mode) .mado-pop-campaign-page__surface {
    gap: 6px;
}

#mado-pop-campaign-page:not(.is-mado-preview-mode) .mado-pop-campaign-page__hero {
    gap: 0;
}

#mado-pop-campaign-page:not(.is-mado-preview-mode) .mado-pop-campaign-page__title {
    top: 0;
}

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-field-grid--text-settings > .mado-pop-campaign-field--color:not(.mado-pop-campaign-field--text-color-wide) {
    grid-column: span 1;
}

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-field-grid--text-settings textarea.mado-pop-campaign-field__control {
    min-height: 72px;
}

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-field__label {
    margin-bottom: 4px;
}

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-color-control__text,
#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-field__control:not(.mado-ui-number-stepper__input),
#mado-pop-campaign-page .mado-pop-text-group .mado-ui-select {
    min-height: 42px;
}

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-color-control {
    align-items: stretch;
}

#mado-pop-campaign-page .mado-pop-text-group .mado-pop-campaign-field__unit-row > .mado-pop-campaign-field__control {
    flex: 1 1 auto;
}

#mado-pop-campaign-page .mado-pop-svg-aspect-controls[hidden],
#mado-pop-campaign-page .mado-pop-svg-aspect-controls__axis[hidden],
.mado-pop-preview-quick-panel__svg-aspect[hidden],
.mado-pop-preview-quick-panel__svg-axis[hidden],
#mado-pop-campaign-page .mado-pop-campaign-field[hidden] { display: none; }

#mado-pop-campaign-page .mado-pop-image-url-only > .mado-pop-campaign-field {
    margin: 0;
}

@media (max-width: 480px) {
#mado-pop-campaign-page .mado-pop-section-panel--color-image .mado-pop-style-mode-grid,
    #mado-pop-campaign-page .mado-pop-section-panel--color-image .mado-pop-icon-mode-grid {
        gap: 5px;
    }

#mado-pop-campaign-page .mado-pop-section-panel--color-image .mado-ui-mode-card {
        min-width: 0;
        padding-right: 6px;
        padding-left: 6px;
        font-size: 11px;
    }
}

.mado-pop-preview-quick-panel__angle-control .mado-ui-angle-control__number {
    width: 76px;
    min-width: 76px;
}

/* SHARED POP LAYER PRESENTER / 2026-09-27:
 * Normal and Easy render identical row/action DOM from source [04 UI]. This is its single CSS owner.
 * Normal-specific workspace/floating-layout rules remain in pop-campaign-page.css;
 * Easy-specific step layout remains in pop-campaign-easy.css.
 * Deleting this block requires moving both callers together; do not restore a Normal-only duplicate.
 */
#mado-pop-campaign-page .mado-pop-layer-menu__action {
    appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 7px;
    line-height: 1;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-pop-layer-menu__visibility,
#mado-pop-campaign-page .mado-pop-layer-menu__display-mode {
    border: 1px solid #cbd9e7;
    background: #ffffff;
    color: #334155;
}

#mado-pop-campaign-page .mado-pop-layer-menu__visibility:hover,
#mado-pop-campaign-page .mado-pop-layer-menu__visibility:focus-visible,
#mado-pop-campaign-page .mado-pop-layer-menu__display-mode:hover,
#mado-pop-campaign-page .mado-pop-layer-menu__display-mode:focus-visible {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: #0f7776;
    outline: 0;
}

#mado-pop-campaign-page .mado-pop-layer-menu__visibility-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    pointer-events: none;
}

#mado-pop-campaign-page .mado-pop-layer-menu__visibility-slash {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(-45deg);
    opacity: 0;
    pointer-events: none;
}

#mado-pop-campaign-page .mado-pop-layer-menu__visibility.is-hidden .mado-pop-layer-menu__visibility-slash { opacity: 1; }

#mado-pop-campaign-page .mado-pop-layer-menu__display-mode {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    color: #64748b;
}

/* IMAGE DISPLAY MODE ICONS / 2026-10-01:
 * The compact layer switch uses the user-provided frame-inside / frame-outside silhouettes.
 * currentColor keeps them visually consistent with eye/link/lock controls in every state. */
#mado-pop-campaign-page .mado-pop-layer-menu__display-mode-icon {
    display: block;
    width: 17px;
    height: 17px;
    fill: currentColor;
    opacity: .76;
    pointer-events: none;
}
#mado-pop-campaign-page .mado-pop-layer-menu__display-mode:hover .mado-pop-layer-menu__display-mode-icon,
#mado-pop-campaign-page .mado-pop-layer-menu__display-mode:focus-visible .mado-pop-layer-menu__display-mode-icon,
#mado-pop-campaign-page .mado-pop-layer-menu__display-mode.is-natural .mado-pop-layer-menu__display-mode-icon {
    opacity: .88;
}

#mado-pop-campaign-page .mado-pop-layer-menu__display-mode.is-natural {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: #0f7776;
}

#mado-pop-campaign-page .mado-pop-layer-menu__position-lock {
    border: 1px solid #cbd9e7;
    background: #ffffff;
    color: #64748b;
}
#mado-pop-campaign-page .mado-pop-layer-menu__position-lock:hover,
#mado-pop-campaign-page .mado-pop-layer-menu__position-lock:focus-visible {
    border-color: #f59e0b;
    background: #fff7ed;
    color: #b45309;
    outline: 0;
}
#mado-pop-campaign-page .mado-pop-layer-menu__position-lock.is-locked {
    border-color: #f59e0b;
    background: #fff7ed;
    color: #b45309;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .12);
}
#mado-pop-campaign-page .mado-pop-layer-menu__position-lock-icon {
    width: 15px;
    height: 15px;
    pointer-events: none;
}

/* Keep the chain symbol visually secondary to move/lock controls. */
#mado-pop-campaign-page .mado-pop-layer-menu__link-icon {
    display: block;
    width: 15px;
    height: 15px;
    pointer-events: none;
}

/* A hidden layer stays fully readable in the editor; the eye-off indicator
   and struck-through title express the state without low-contrast opacity. */
#mado-pop-campaign-page .mado-pop-layer-menu__row.is-layer-hidden .mado-pop-layer-menu__item { opacity: 1; }
#mado-pop-campaign-page .mado-pop-layer-menu__row.is-layer-hidden .mado-pop-layer-menu__item-label {
    color: #475569;
    text-decoration: line-through;
}

#mado-pop-campaign-page .mado-pop-layer-menu__edit {
    border: 1px solid #cbd9e4;
    background: #ffffff;
    color: #334155;
    font-size: 15px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-pop-layer-menu__edit-icon {
    display: block;
    pointer-events: none;
}

#mado-pop-campaign-page .mado-pop-layer-menu__edit:hover,
#mado-pop-campaign-page .mado-pop-layer-menu__edit:focus-visible { border-color: var(--mado-pop-primary); background: var(--mado-pop-primary-soft); color: #0f6665; }

#mado-pop-campaign-page .mado-pop-layer-menu__toggle {
    appearance: none;
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr) 8px;
    align-items: center;
    gap: 6px;
    min-width: 112px;
    max-width: 230px;
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid #cbd9e7;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-pop-layer-menu__toggle:hover,
#mado-pop-campaign-page .mado-pop-layer-menu__toggle:focus-visible,
#mado-pop-campaign-page .mado-pop-layer-menu__toggle[aria-expanded="true"] {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: #0f7776;
    outline: 0;
    box-shadow: 0 0 0 2px var(--mado-pop-primary-ring);
}

#mado-pop-campaign-page .mado-pop-layer-menu__toggle-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

#mado-pop-campaign-page .mado-pop-layer-menu__toggle strong {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-pop-layer-menu__chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}

#mado-pop-campaign-page .mado-pop-layer-menu__toggle[aria-expanded="true"] .mado-pop-layer-menu__chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

#mado-pop-campaign-page .mado-pop-layer-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 60;
    width: min(286px, calc(100vw - 32px));
    padding: 7px;
    border: 1px solid #cbd9e7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

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

#mado-pop-campaign-page .mado-pop-layer-menu__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    align-items: center;
    border-radius: 8px;
}

#mado-pop-campaign-page .mado-pop-layer-menu__row.is-selected {
    background: var(--mado-pop-primary-soft);
    box-shadow: inset 0 0 0 1px var(--mado-pop-primary);
}

#mado-pop-campaign-page .mado-pop-layer-menu__item {
    appearance: none;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #0f172a;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-pop-layer-menu__item.has-reorder-handle {
    grid-template-columns: 12px 24px minmax(0, 1fr) auto;
    column-gap: 6px;
}

#mado-pop-campaign-page .mado-pop-layer-menu__drag-handle {
    display: inline-grid;
    place-items: center;
    width: 12px;
    height: 24px;
    color: #8a9aab;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
#mado-pop-campaign-page .mado-pop-layer-menu__drag-handle svg {
    width: 12px;
    height: 18px;
    fill: currentColor;
    pointer-events: none;
}
#mado-pop-campaign-page .mado-pop-layer-menu__row.is-position-locked .mado-pop-layer-menu__drag-handle {
    opacity: .32;
    cursor: not-allowed;
}
#mado-pop-campaign-page .mado-pop-layer-menu__row.is-reorder-dragging {
    opacity: .58;
}
#mado-pop-campaign-page .mado-pop-layer-menu__row.is-drop-before {
    box-shadow: inset 0 2px 0 #11aaa4;
}
#mado-pop-campaign-page .mado-pop-layer-menu__row.is-drop-after {
    box-shadow: inset 0 -2px 0 #11aaa4;
}

#mado-pop-campaign-page .mado-pop-layer-menu__item:hover,
#mado-pop-campaign-page .mado-pop-layer-menu__item:focus-visible {
    border-color: #bfe8e5;
    background: #f0fdfa;
    outline: 0;
}

#mado-pop-campaign-page .mado-pop-layer-menu__item.is-selected {
    border-color: transparent;
    background: transparent;
    color: #0f7776;
}

#mado-pop-campaign-page .mado-pop-layer-menu__item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #d8e4ef;
    border-radius: 7px;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
}

/* Shared Normal/Easy layer state rail. Buttons are DOM siblings for valid
   keyboard semantics; only the lock glyph can be activated to unlock. */
#mado-pop-campaign-page .mado-pop-layer-menu__primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 5px;
    min-width: 0;
}
#mado-pop-campaign-page .mado-pop-layer-menu__primary > .mado-pop-layer-menu__item {
    flex: 1 1 130px;
    width: auto;
}
#mado-pop-campaign-page .mado-pop-layer-menu__item-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 7px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-pop-layer-menu__status-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    flex: 0 1 auto;
    min-width: 0;
}

#mado-pop-campaign-page .mado-pop-layer-menu__status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #f8fafc;
    color: #334155;
}

#mado-pop-campaign-page .mado-pop-layer-menu__status-icon svg {
    display: block;
    width: 14px;
    height: 14px;
    pointer-events: none;
}

/* Same quick controls for lock, hidden and natural overflow. Their existing
   Settings delegates own the state; no separate listener is installed. */
#mado-pop-campaign-page .mado-pop-layer-menu__quick-status {
    appearance: none;
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    color: #1e4059;
    background: #e6f7f5;
    border-color: #7fbab6;
}
#mado-pop-campaign-page .mado-pop-layer-menu__quick-status:hover {
    border-color: #0d9488;
    background: #ccfbf1;
}
#mado-pop-campaign-page .mado-pop-layer-menu__quick-status:focus-visible {
    outline: 3px solid #0f766e;
    outline-offset: 2px;
}
/* Quick badges share their exact active Settings icons. The eye slash is a
   positioned sibling in the same button; the natural SVG is reused directly. */
#mado-pop-campaign-page .mado-pop-layer-menu__status-icon--hidden {
    position: relative;
}
#mado-pop-campaign-page .mado-pop-layer-menu__status-icon--hidden .mado-pop-layer-menu__visibility-slash {
    width: 17px;
    opacity: 1;
}
#mado-pop-campaign-page .mado-pop-layer-menu__status-icon--overflow .mado-pop-layer-menu__display-mode-icon {
    width: 17px;
    height: 17px;
    opacity: 1;
}

#mado-pop-campaign-page .mado-pop-layer-menu__item-label {
    display: block;
    flex: 1 1 135px;
    width: auto;
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-pop-layer-menu__item-lock {
    font-size: 11px;
}

#mado-pop-campaign-page .mado-pop-layer-menu__item-lock--control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    color: #64748b;
}

#mado-pop-campaign-page .mado-pop-layer-menu__move-controls {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

#mado-pop-campaign-page .mado-pop-layer-menu__move {
    border: 1px solid #cbd9e7;
    background: #ffffff;
    color: #334155;
    font-size: 15px;
    font-weight: 900;
}

#mado-pop-campaign-page .mado-pop-layer-menu__move:hover,
#mado-pop-campaign-page .mado-pop-layer-menu__move:focus-visible {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: #0f7776;
    outline: 0;
}

#mado-pop-campaign-page .mado-pop-layer-menu__move:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#mado-pop-campaign-page .mado-pop-layer-menu__motion {
    overflow: visible;
    border: 1px solid transparent;
    box-shadow: none;
}

#mado-pop-campaign-page .mado-pop-layer-menu__motion-icon {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    fill: currentColor;
    pointer-events: none;
}

#mado-pop-campaign-page .mado-pop-layer-menu__motion.has-motion {
    box-shadow: 0 0 0 2px rgba(89, 195, 232, 0.28);
}

/* R254: a compact motion editor leaves the POP visible during replay.
 * Only this shared motion dialog changes (Normal and Easy use one source).
 * The native dialog remains modal for predictable keyboard focus. */
#mado-pop-campaign-page .mado-pop-motion-modal__dialog {
    width: min(510px, 100%);
    max-height: min(540px, 67dvh);
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #b8c8d8;
    border-radius: 16px;
    background: #f7faff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .22);
    overflow: visible;
    overscroll-behavior: contain;
}
#mado-pop-campaign-page .mado-pop-motion-modal__dialog > .mado-ui-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Base modal body has margin-top:18px. Own it here instead of stacking gaps. */
    margin-top: 6px;
    row-gap: 0;
    /* Match the thin mint preview scrollbar; the body scrolls only if the
     * viewport is too short to keep every control reachable. */
    scrollbar-width: thin;
    scrollbar-color: #8fd8d3 #f2f8f8;
}
#mado-pop-campaign-page .mado-pop-motion-modal__dialog > .mado-pop-motion-modal__actions {
    flex: 0 0 auto;
    margin-top: 8px;
}

/* Shared layer URL modal label / PC only / 2026-11-02.
 * Keep the common dialog's label owner here, not in Easy and Normal twice. */
@media (min-width: 1025px) {
    #mado-pop-campaign-page dialog.mado-pop-layer-link-modal
    .mado-pop-layer-link-modal__field > .mado-ui-modal__label {
        font-size: 14px;
    }
}

/* R361 / 2026-10-31: Shared native dialog geometry now also owns layer deletion.
 * Normal and Easy import the same UI controller. No duplicate overlay CSS.
 * R43: Native dialogs keep the rest of the portal inert, including its
 * screen-reader navigation. Retain the original MADO backdrop and panel. */
#mado-pop-campaign-page dialog:is(.mado-pop-layer-link-modal, .mado-pop-motion-modal, .mado-pop-layer-delete-confirm, .mado-pop-easy__touch-color-modal, .mado-pop-easy__leave-modal) {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    box-sizing: border-box;
    margin: 0;
    padding: 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    overflow: hidden;
}
#mado-pop-campaign-page dialog:is(.mado-pop-layer-link-modal, .mado-pop-motion-modal, .mado-pop-layer-delete-confirm, .mado-pop-easy__touch-color-modal, .mado-pop-easy__leave-modal)[hidden] {
    display: none;
}
#mado-pop-campaign-page dialog:is(.mado-pop-layer-link-modal, .mado-pop-motion-modal, .mado-pop-layer-delete-confirm, .mado-pop-easy__touch-color-modal, .mado-pop-easy__leave-modal)::backdrop {
    background: transparent;
}
@media (max-width: 782px) {
    #mado-pop-campaign-page dialog:is(.mado-pop-layer-link-modal, .mado-pop-motion-modal, .mado-pop-layer-delete-confirm, .mado-pop-easy__touch-color-modal, .mado-pop-easy__leave-modal) {
        padding: 16px;
    }
}

/* R254: park the compact motion dialog in the lower-left, not over the POP.
 * Transparent scrim means animations remain visible; outside click still closes. */
#mado-pop-campaign-page dialog.mado-pop-motion-modal {
    place-items: end start;
    padding: 12px 14px max(14px, env(safe-area-inset-bottom)) clamp(14px, 4vw, 60px);
}
#mado-pop-campaign-page dialog.mado-pop-motion-modal > .mado-ui-modal__backdrop {
    background: transparent;
    opacity: 0;
}
@media (max-width: 620px) {
    #mado-pop-campaign-page dialog.mado-pop-motion-modal {
        padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    }
    #mado-pop-campaign-page .mado-pop-motion-modal__dialog {
        width: 100%;
        max-height: min(460px, 57dvh);
        padding: 10px;
    }
}

/* R6 / 2026-11-03: Park the Easy motion dialog a little farther right
 * so the left-hand step navigation remains visible. Normal keeps its
 * existing default placement. The grid track shrinks to stay in viewport;
 * the shared Motion Service's drag position supersedes this starting point. */
@media (min-width: 621px) {
    #mado-pop-campaign-page.is-easy-create-mode dialog.mado-pop-motion-modal {
        padding-left: clamp(38px, calc(4vw + 24px), 84px);
    }
}
@media (max-width: 620px) {
    #mado-pop-campaign-page.is-easy-create-mode dialog.mado-pop-motion-modal {
        padding-left: 20px;
        padding-right: 10px;
    }
}

/* R258: reuse the existing MADO help chip beside the CSS note.
 * The same mado-pop-help-chip__toggle class is used at 終了前に通知する.
 * Keep positioning within the heading row, not pinned to the textarea edge. */
#mado-pop-campaign-page .mado-pop-motion-modal__code-section { position: relative; }
#mado-pop-campaign-page .mado-pop-motion-modal__css-heading {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
#mado-pop-campaign-page .mado-pop-motion-modal__css-heading .mado-pop-motion-modal__css-label {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 7px;
    min-width: 0;
}
#mado-pop-campaign-page .mado-pop-motion-modal__help-widget {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
/* Easy and Normal use the same motion component; this is the normal
 * MADO chip size/palette, not the old bespoke 30px motion button. */
#mado-pop-campaign-page .mado-pop-motion-modal__help-widget .mado-pop-help-chip__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border: 1px solid rgba(6, 191, 181, .35);
    border-radius: 999px;
    background: var(--mado-pop-primary-soft);
    color: #129f9e;
    box-shadow: 0 8px 18px rgba(6, 191, 181, .16);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-pop-motion-modal__help-widget .mado-pop-help-chip__toggle:focus-visible {
    outline: 2px solid var(--mado-pop-selected-border, #02b5ad);
    outline-offset: 2px;
}
/* R391: the CSS '?' opens a native child dialog, not a nonmodal bubble.
 * showModal() prevents both Tab and screen-reader virtual navigation into
 * the editor behind the help. No extra overlay/observer/polling is created. */
#mado-pop-campaign-page .mado-pop-motion-modal__dialog > .mado-pop-motion-modal__code-help {
    position: fixed;
    inset: 0;
    z-index: 15;
    margin: auto;
    width: min(360px, calc(100vw - 32px));
    max-width: min(360px, calc(100vw - 32px));
    height: max-content;
    max-height: calc(100dvh - 32px);
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #aabecf;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15,23,42,.20);
    box-sizing: border-box;
}
#mado-pop-campaign-page .mado-pop-motion-modal__code-help::backdrop {
    background: rgba(15,23,42,.24);
}
#mado-pop-campaign-page .mado-pop-motion-modal__code-help-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 9px;
}
#mado-pop-campaign-page .mado-pop-motion-modal__code-help-head .mado-pop-motion-modal__code-help-title {
    margin: 0;
}
#mado-pop-campaign-page .mado-pop-motion-modal__code-help-close {
    flex: 0 0 auto;
    min-width: 56px;
    min-height: 44px;
    padding: 6px 10px;
    border: 1px solid #bcd5dd;
    border-radius: 9px;
    background: #fff;
    color: #17364b;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-pop-motion-modal__code-help-close:focus-visible {
    outline: 3px solid #087f79;
    outline-offset: 2px;
}
#mado-pop-campaign-page .mado-pop-motion-modal__dialog > .mado-pop-motion-modal__code-help[hidden] {
    display: none !important;
}
#mado-pop-campaign-page .mado-pop-motion-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 0;
}
/* Browser-default h2 margins made the title region disproportionately tall.
 * The motion dialog owns its own spacing; other modal headings are unchanged. */
#mado-pop-campaign-page .mado-pop-motion-modal__head .mado-ui-modal__title {
    margin: 0;
}
/* Shared motion dialog close control: retain native button/focus semantics. */
#mado-pop-campaign-page .mado-pop-motion-modal__head .mado-pop-motion-modal__x {
    display: inline-grid;
    place-items: center;
    flex:0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--mado-brand-accent-border, #b9eeea);
    border-radius: 10px;
    background: var(--mado-pop-primary-soft);
    color: var(--mado-brand-accent-text, #129f9e);
    font: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-pop-motion-modal__head .mado-pop-motion-modal__x:focus-visible {
    outline: 2px solid var(--mado-pop-primary);
    outline-offset: 2px;
}

/* R257: drag by the compact heading instead of covering the POP. */
@media (min-width: 768px) {
  #mado-pop-campaign-page .mado-pop-motion-modal__head { cursor: grab; user-select: none; touch-action: none; }
  #mado-pop-campaign-page .mado-pop-motion-modal__head:active { cursor: grabbing; }
  #mado-pop-campaign-page .mado-pop-motion-modal__head:focus-visible {
    outline: 2px solid var(--mado-pop-selected-border, #02b5ad);
    outline-offset: 2px;
  }
  #mado-pop-campaign-page .mado-pop-motion-modal__head :is(label,button,input) { cursor: auto; }
}
/* Only non-interactive dialog containers lose default black focus rings. */
#mado-pop-campaign-page .mado-pop-motion-modal__dialog[tabindex="-1"]:focus { outline: none; }

/* R255: selected-layer caption is removed. The AI instruction label now
 * sits directly below the dialog title and labels the textarea by ID. */
#mado-pop-campaign-page .mado-pop-motion-modal__instruction-label {
    display: block;
    margin-top: 5px;
    color: #334155;
}

#mado-pop-campaign-page .mado-pop-motion-modal__ai-section {
    display: grid;
    gap: 7px; /* Compact but distinct textarea -> generate action. */
}
/* R382 / 2026-11-02: One AI/CSS tab component, shared by Normal and Easy.
 * Only content visibility changes; the Motion Service remains the sole replay/save owner. */
#mado-pop-campaign-page .mado-pop-motion-modal__tabs {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:9px;
}
#mado-pop-campaign-page .mado-pop-motion-modal__tab {
    display:flex; align-items:center; justify-content:center; gap:7px;
    min-width:0; min-height:44px; padding:7px 9px;
    border:1px solid #cbdff2; border-radius:11px; background:#fff;
    color:#153249; font:inherit; font-size:14px; font-weight:700; cursor:pointer;
}
#mado-pop-campaign-page .mado-pop-motion-modal__tab[aria-selected="true"] {
    border-color:var(--mado-pop-primary,#06bfb5);
    background:var(--mado-pop-primary-soft,#e2f8f5); color:#087d77;
}
#mado-pop-campaign-page .mado-pop-motion-modal__tab:focus-visible {
    outline:3px solid #0f7776; outline-offset:2px;
}
#mado-pop-campaign-page .mado-pop-motion-modal__tab svg {flex:0 0 20px;}
#mado-pop-campaign-page .mado-pop-motion-modal__target {margin:3px 0 0; font-size:13px; font-weight:600; color:#64748b;}
#mado-pop-campaign-page .mado-pop-motion-modal__ai-section[hidden],
#mado-pop-campaign-page .mado-pop-motion-modal__code-section[hidden] {display:none;}
#mado-pop-campaign-page .mado-pop-motion-modal__code-section:not([hidden]) {margin-top:0;}
/* R385 / 2026-11-02: Clear shares the CSS heading, not a standalone row.
 * Keep a readable label and accessible target; changing CSS is committed by Decide. */
#mado-pop-campaign-page .mado-pop-motion-modal__remove {
    appearance:none;
    flex:0 0 auto;
    margin-left:auto;
    min-width:46px;
    min-height:30px;
    padding:3px 7px;
    border:1px solid #cbdff2;
    border-radius:8px;
    background:#fff;
    color:#334155;
    font:inherit;
    font-size:12px;
    font-weight:650;
    line-height:1.25;
    cursor:pointer;
}
#mado-pop-campaign-page .mado-pop-motion-modal__remove:hover {border-color:#06bfb5; background:#effcfb;}
#mado-pop-campaign-page .mado-pop-motion-modal__remove:focus-visible {outline:2px solid #087f79;outline-offset:2px;}
#mado-pop-campaign-page .mado-pop-motion-modal__remove[hidden] {display:none;}


#mado-pop-campaign-page .mado-pop-motion-modal__code-section {
    display: grid;
    gap: 6px;
    /* Compact separation between generating CSS and editing its result. */
    margin-top: 8px;
    padding-top: 0;
    border-top: 0;
}
#mado-pop-campaign-page .mado-pop-motion-modal__css-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px; /* CSS heading -> code input. */
}

#mado-pop-campaign-page .mado-pop-motion-modal__ai-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
/* Same button dimensions and typographic rhythm as the compact editor. */
#mado-pop-campaign-page .mado-pop-motion-modal__ai-row > .mado-pop-motion-modal__ai {
    min-height: 42px;
    padding: 5px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.25;
}
/* R252: the two previews and three management actions are one canonical row.
 * Keep all five original button nodes and listeners, without duplicating state. */
#mado-pop-campaign-page .mado-pop-motion-modal .mado-pop-motion-modal__dialog > .mado-pop-motion-modal__actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    align-items: stretch;
}
#mado-pop-campaign-page .mado-pop-motion-modal .mado-pop-motion-modal__actions > button.mado-ui-button {
    width: 100%;
    min-width: 0;
    /* AUDIT R13 TRIAL HOLD | later same selector near original 3758 | original: min-height: 42px; */
    /* AUDIT R13 TRIAL HOLD | later same selector near original 3758 | original: padding: 5px 4px; */
    /* AUDIT R13 TRIAL HOLD | later same selector near original 3758 | original: font-size: 14px; */
    /* AUDIT R13 TRIAL HOLD | later same selector near original 3758 | original: font-weight: 750; */
    /* AUDIT R13 TRIAL HOLD | later same selector near original 3758 | original: text-align: center; */
    /* AUDIT R13 TRIAL HOLD | later same selector near original 3758 | original: white-space: normal; */
    /* AUDIT R13 TRIAL HOLD | later same selector near original 3758 | original: overflow-wrap: anywhere; */
    line-height: 1.35;
}
/* Dedicated stop replaces the redundant footer Close action.
 * It only removes temporary preview CSS; saved layer CSS is untouched. */
#mado-pop-campaign-page .mado-pop-motion-modal__actions > [data-mado-pop-motion-stop]:disabled {
    opacity: .52;
    cursor: not-allowed;
}
/* On a phone, four actions remain visible in a 2x2 grid.
 * All controls meet the normal 44px minimum touch target. */
@media (max-width: 620px) {
  #mado-pop-campaign-page .mado-pop-motion-modal .mado-pop-motion-modal__dialog > .mado-pop-motion-modal__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* R252: compact editorial note beside the existing CSS label. */
#mado-pop-campaign-page .mado-pop-motion-modal__css-tip {
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: inherit;
    white-space: nowrap;
}
/* No empty instruction status placeholder when the modal first opens. */
#mado-pop-campaign-page .mado-pop-motion-modal__status:empty {
    display: none;
}

#mado-pop-campaign-page .mado-pop-motion-modal__instruction::placeholder,
#mado-pop-campaign-page .mado-pop-motion-modal__css::placeholder {
    color: #94a3b8;
    opacity: 1;
}

#mado-pop-campaign-page .mado-pop-motion-modal__instruction {
    min-height: 64px;
    height: 64px; /* Approximately three lines; still user-resizable. */
}
/* 2026-11-03: A previously resized Easy CSS textarea can retain an inline
 * height (e.g. 296px), overflowing the compact shared modal and clipping its
 * top focus ring. Keep editor and guide on the SAME modal/textarea markup:
 * cap only the code field, put its scrollbar inside the field, and leave an
 * outer body scroll available solely for small viewports/zoom. */
#mado-pop-campaign-page .mado-pop-motion-modal__css {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 116px;
    height: 116px;
    max-height: min(180px, 26dvh);
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    tab-size: 2;
    scrollbar-width: thin;
    scrollbar-color: #8fd8d3 #f2f8f8;
}
/* R5: one continuous 2px border instead of border + overlapping outline,
 * which made the top edge appear markedly darker/thicker on focus.
 * The higher-contrast border remains visible for keyboard focus as well. */
#mado-pop-campaign-page .mado-pop-motion-modal textarea.mado-pop-motion-modal__css[data-mado-pop-motion-css] {
    border: 2px solid #cbd9e7;
}
#mado-pop-campaign-page .mado-pop-motion-modal textarea.mado-pop-motion-modal__css[data-mado-pop-motion-css]:focus {
    border-color: #526579;
    outline: none;
    box-shadow: none;
}
/* Exactly the preview canvas scrollbar palette and dimensions (8px track,
 * 2px inset border -> a visually thin 4px thumb). Applies only to motion CSS
 * editing and its accessibility fallback scroller, not all portal textareas. */
#mado-pop-campaign-page :is(
    .mado-pop-motion-modal__css,
    .mado-pop-motion-modal__dialog > .mado-ui-modal__body
)::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
#mado-pop-campaign-page :is(
    .mado-pop-motion-modal__css,
    .mado-pop-motion-modal__dialog > .mado-ui-modal__body
)::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #f2f8f8;
}
#mado-pop-campaign-page :is(
    .mado-pop-motion-modal__css,
    .mado-pop-motion-modal__dialog > .mado-ui-modal__body
)::-webkit-scrollbar-thumb {
    min-height: 32px;
    border: 2px solid #f2f8f8;
    border-radius: 999px;
    background: #8fd8d3;
    background-clip: padding-box;
}
#mado-pop-campaign-page :is(
    .mado-pop-motion-modal__css,
    .mado-pop-motion-modal__dialog > .mado-ui-modal__body
)::-webkit-scrollbar-thumb:hover {
    background: #52c4bd;
    background-clip: padding-box;
}
#mado-pop-campaign-page :is(
    .mado-pop-motion-modal__css,
    .mado-pop-motion-modal__dialog > .mado-ui-modal__body
)::-webkit-scrollbar-corner {
    background: transparent;
}

#mado-pop-campaign-page .mado-pop-motion-modal__code-help {
    margin: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

#mado-pop-campaign-page .mado-pop-motion-modal__code-help-title {
    display: block;
    margin: 0 0 7px;
    color: #334155;
    /* R44: h3 semantics for Narrator, original compact visual hierarchy. */
    font-size: 16px;
    line-height: 1.55;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-pop-motion-modal__code-help-list,
#mado-pop-campaign-page .mado-pop-motion-modal__code-help-list ul {
    margin: 0;
    padding-left: 1.45em;
}

/* R253: only the seven emphasized help labels are dark; body copy stays muted. */
#mado-pop-campaign-page .mado-pop-motion-modal__code-help-list strong,
#mado-pop-campaign-page .mado-pop-motion-modal__code-help-list strong code {
    color: #0f172a;
}

#mado-pop-campaign-page .mado-pop-motion-modal__code-help-list > li + li {
    margin-top: 8px;
}

#mado-pop-campaign-page .mado-pop-motion-modal__code-help-list li > ul {
    margin-top: 3px;
}

#mado-pop-campaign-page .mado-pop-motion-modal__code-help-list li > ul > li + li {
    margin-top: 2px;
}

#mado-pop-campaign-page .mado-pop-motion-modal__code-help code {
    padding: 1px 4px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#mado-pop-campaign-page .mado-pop-motion-modal__status {
    min-height: 20px;
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

#mado-pop-campaign-page .mado-pop-motion-modal__status[data-state="error"] {
    color: #b42318;
}

#mado-pop-campaign-page .mado-pop-motion-modal__status[data-state="ok"] {
    color: #0f766e;
}

/* R72: motion is a neutral full-width row; only the icon-square gets the
 * existing MADO AI gradient. Easy and Normal use the same presenter. */
#mado-pop-campaign-page .mado-pop-layer-menu__motion-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    border-radius: 6px;
    background-color: #5fbbe8;
    background-image: var(--mado-ai-action-gradient);
    background-size: 260% 260%;
    color: #fff;
    animation: mado-ai-action-gradient-flow 10s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    #mado-pop-campaign-page .mado-pop-layer-menu__motion-glyph {
        animation: none;
    }
}


/* Catalog selection note shared between Normal and Easy. */
#mado-pop-campaign-page .mado-pop-catalog-selection-note {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #0f7776;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    white-space: normal;
}
#mado-pop-campaign-page .mado-pop-catalog-selection-note[hidden] { display:none; }

/*
 * SHARED POP CATALOG MODAL / 2026-09-27:
 * This one catalog dialog is moved into the active POP root while open; the PHP
 * section containing its dormant markup can be hidden. One DOM instance in Normal or Easy; use [06 CATALOG] shared renderer.
 * Overlay, backdrop, option grid and persistent action row are shared CSS SSOT.
 */
#mado-pop-campaign-page .mado-ui-catalog-modal {
    position: fixed;
    inset: 0;
    z-index: 2147482500;
    display: grid;
    place-items: center;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    /* 2026-10-04: Search added a utility row, so use more of the available PC viewport
     * instead of sacrificing another catalog-card row to large outer margins. */
    padding: 8px;
    isolation: isolate;
    /* Reset the native dialog box: only the inner white catalog panel is visible. */
    box-sizing: border-box;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

#mado-pop-campaign-page .mado-ui-catalog-modal[hidden] {
    display: none;
}

/* showModal() supplies the actual top layer and background inertness. */
#mado-pop-campaign-page .mado-ui-catalog-modal::backdrop {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__backdrop {
    position: absolute;
    inset: 0;
    /* The catalog should float without a dark, bordered board behind it. */
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    min-width: 0;
    border: 1px solid #d4e3ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.3);
    overflow: hidden;
}

/* R294: The dialog is a scripted Narrator reading target (tabindex=-1), not
 * a keyboard Tab stop. Suppress its native heavy black focus rectangle only.
 * :focus-visible styling for searchable inputs, category chips, cards and actions
 * remains unchanged, so keyboard navigation still has a visible indicator. */
#mado-pop-campaign-page .mado-ui-catalog-modal__dialog[tabindex="-1"]:focus {
    outline: none;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 34px;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    border-bottom: 1px solid #dae6f1;
    background: #f8fbff;
}

/* Heading and disclosure are one visual unit. Place the heading a little higher
 * rather than vertically centering the title against the 40px search field. */
#mado-pop-campaign-page .mado-ui-catalog-modal__heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    justify-content: flex-start;
    gap: 2px;
    min-width: 0;
    padding-top: 1px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__header .mado-ui-catalog-modal__title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    color: #172b44;
    white-space: nowrap;
}

/* The shared chooser is also used for SNS logos. Do not claim those are MADO materials. */
#mado-pop-campaign-page .mado-ui-catalog-modal__header:has(.mado-ui-catalog-modal__search[hidden]) .mado-ui-catalog-modal__ai-note {
    display: none;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0 12px;
}

/* R294: Keep the 11 MADO category chips on one row when the dialog has room.
 * All labels remain intact; narrow devices retain their accessible wrap/disclosure.
 * This is the one shared Normal/Easy catalog layout, not another tab implementation. */
@media (min-width: 621px) {
    #mado-pop-campaign-page .mado-ui-catalog-modal__tabs {
        gap: 4px;
        padding-bottom: 8px;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__tabs .mado-ui-catalog-modal__tab {
        min-width: 0;
        min-height: 36px;
        padding: 6px 8px;
        font-size: 13px;
        line-height: 1.3;
        white-space: nowrap;
    }
}

#mado-pop-campaign-page .mado-ui-catalog-modal__tab.is-active {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: #086f70;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__grid {
    display: grid;
    align-content: start;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    border: 1px solid #d8e4ef;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font: inherit;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option[hidden] {
    display: none;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option:hover,
#mado-pop-campaign-page .mado-ui-catalog-modal__option:focus-visible {
    border-color: var(--mado-pop-primary);
    background: #f1fffd;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option.is-selected {
    border: 2px solid #0ca69e;
    background: #eafffc;
    box-shadow: inset 0 0 0 1px rgba(12,166,158,.16);
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option-image-wrap {

    flex: none;
    max-width: 100%;
}

/* MADO CSS AUDIT 2026-11-02 / stage only: same selector + same media context; all properties overridden later.
#mado-pop-campaign-page .mado-ui-catalog-modal__option-image {

    width: 100%;

}
*/

#mado-pop-campaign-page .mado-ui-catalog-modal__empty {
    padding: 20px 12px;
    text-align: center;
    color: #64748b;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__empty[hidden] {
    display: none;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__actions {
    padding: 12px 18px;
    border-top: 1px solid #dae6f1;
    background: #f8fbff;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    /* R299 / CONTENT-FIT CATALOG VIEWPORT (2026-10-28):
     * Fit the intended five card rows rather than fill tall desktop screens.
     * Reserve those rows while the first REST page loads (no collapsed dialog).
     * On shorter screens the middle body scrolls; header/actions stay visible.
     * No JS measurement, polling or second renderer. */
    height: auto;
    max-height: calc(100dvh - 16px);
}

#mado-pop-campaign-page .mado-ui-catalog-modal__body {
    min-height: 0;
    padding: 14px 18px;
    overflow-y: auto;
    /* R298: Keep available grid width stable when the first 25/30 cards arrive. */
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

/* MADO CSS AUDIT 2026-11-02 / stage only: same selector + same media context; all properties overridden later.
#mado-pop-campaign-page .mado-ui-catalog-modal__actions {

    grid-template-columns: minmax(0, 1fr) auto;

}
*/

#mado-pop-campaign-page .mado-ui-catalog-modal__actions .mado-ui-catalog-modal__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

#mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

/* R46: shared footer shortcut precedes pagination in DOM and sits at the left edge. */
#mado-pop-campaign-page .mado-pop-catalog-modal__back-to-categories {
    min-height: 40px;
    white-space: nowrap;
}

@media (max-width: 720px) {
#mado-pop-campaign-page .mado-ui-catalog-modal__actions {
        /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: grid-template-columns: minmax(0, 1fr); */
        gap: 10px;
    }

#mado-pop-campaign-page .mado-ui-catalog-modal__actions .mado-ui-catalog-modal__pagination,
    #mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons {
        justify-content: center;
    }
}

#mado-pop-campaign-page .mado-ui-catalog-modal__close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid var(--mado-brand-accent-border);
    border-radius: 9px;
    background: var(--mado-brand-accent-soft);
    /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: color: var(--mado-brand-accent-hover); */

    font-weight: 500;

}

#mado-pop-campaign-page .mado-ui-catalog-modal__close:hover,
#mado-pop-campaign-page .mado-ui-catalog-modal__close:focus-visible {
    border-color: var(--mado-brand-accent);
    background: var(--mado-brand-accent-border);
    color: var(--mado-brand-accent-hover);
    outline: none;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__grid {
    grid-template-columns: repeat(auto-fill, minmax(var(--mado-pop-catalog-card-min-width), 1fr));
    gap: 12px;
    /* Five complete rows, including while cards have not yet arrived.
     * align-content:start above prevents short pages from stretching cards. */
    min-height: calc(5 * 128px + 4 * 12px);
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option {
    min-height: 122px;
    padding: 10px 9px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option-image-wrap {

    height: 72px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option-image {

}

#mado-pop-campaign-page .mado-ui-catalog-modal__option-label {
    display: block;
    width: 100%;
    min-width: 0;
    color: #334155;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 900;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/*
 * SHARED POP CATALOG VISUAL POLISH SSOT / 2026-10-02:
 * - Normal/Easy share the single PHP catalog dialog and the same paging JS, so visual rules live in common CSS.
 * - Larger previews, background-art sizing, centered pager and geometric close mark must not drift by editor mode.
 * - Page size, fetch route, selection state and catalog data are unchanged; this block is presentation only.
 */
#mado-pop-campaign-page .mado-ui-catalog-modal__close {
    position: relative;
    display: grid;
    place-items: center;
    padding: 0;
    color: #0f7776;
    font-size: 0;
    line-height: 1;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__close::before,
#mado-pop-campaign-page .mado-ui-catalog-modal__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#mado-pop-campaign-page .mado-ui-catalog-modal__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option-image-wrap {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 82px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option-image {
    display: block;
    width: min(100%, 96px);
    height: 82px;
    max-width: 100%;
    max-height: 82px;
    object-fit: contain;
}

/* Wide background art needs enough preview area to be judged before selection. */
#mado-pop-campaign-page .mado-ui-catalog-modal__option[data-category="background-illustrations"] .mado-ui-catalog-modal__option-image-wrap {
    min-height: 100px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option[data-category="background-illustrations"] .mado-ui-catalog-modal__option-image {
    width: 100%;
    height: 100px;
    max-width: none;
    max-height: 100px;
}

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

#mado-pop-campaign-page .mado-pop-catalog-modal__back-to-categories {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__pagination {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 6px;
    border: 1px solid #d7e3ec;
    border-radius: 999px;
    background: #f7fafc;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__pagination .mado-ui-button {
    min-width: 60px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__pagination [data-mado-pop-catalog-prev]::before {
    content: "‹";
    margin-right: 4px;
    font-size: 18px;
    line-height: 1;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__pagination [data-mado-pop-catalog-next]::after {
    content: "›";
    margin-left: 4px;
    font-size: 18px;
    line-height: 1;
}

/*
 * NUMERIC CATALOG PAGINATION / 2026-10-04:
 * Page visibility, not a viewport-specific row count, communicates that more material exists.
 * Normal/Easy share these controls and may wrap them on narrow screens without changing per_page.
 */
#mado-pop-campaign-page .mado-ui-catalog-modal__page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-number {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border: 1px solid #cbd9e5;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-number:hover {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: #086f70;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-number:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.28);
    outline-offset: 2px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-number[aria-current="page"] {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary);
    color: #ffffff;
    cursor: default;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-ellipsis {
    display: inline-grid;
    place-items: center;
    width: 18px;
    min-width: 18px;
    height: 32px;
    color: #64748b;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

/* LARGE CATALOG FAST JUMP / 2026-10-15:
 * Shared [06 CATALOG] adds this only at 30+ pages. It changes navigation only; per_page and REST stay canonical. */
#mado-pop-campaign-page .mado-ui-catalog-modal__page-fast {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 3px;
    padding-left: 6px;
    border-left: 1px solid #d7e3ec;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-jump,
#mado-pop-campaign-page .mado-ui-catalog-modal__page-go {
    appearance: none;
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid #cbd9e5;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-jump:hover,
#mado-pop-campaign-page .mado-ui-catalog-modal__page-go:hover {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: #086f70;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-jump:focus-visible,
#mado-pop-campaign-page .mado-ui-catalog-modal__page-go:focus-visible,
#mado-pop-campaign-page .mado-ui-catalog-modal__page-direct input:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.24);
    outline-offset: 2px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-jump:disabled {
    opacity: 0.42;
    cursor: default;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-direct {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__page-direct input {
    width: 58px;
    height: 30px;
    padding: 3px 6px;
    border: 1px solid #cbd9e5;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

#mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

/* Tablet: pagination follows the left shortcut; Apply/Cancel occupy their own row. */
@media (max-width: 1024px) {
    #mado-pop-campaign-page .mado-ui-catalog-modal__actions {
        grid-template-columns: auto minmax(0, 1fr);
    }

    #mado-pop-campaign-page .mado-pop-catalog-modal__back-to-categories {
        grid-column: 1;
        grid-row: 1;
    }

    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
    }

    #mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: end;
    }
}

/* Phone: keep a predictable top-to-bottom Tab order without horizontal overflow. */
@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-ui-catalog-modal__actions {
        grid-template-columns: minmax(0, 1fr);
    }

    #mado-pop-campaign-page .mado-pop-catalog-modal__back-to-categories {
        grid-column: 1;
        grid-row: 1;
    }

    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
    }

    #mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons {
        grid-column: 1;
        grid-row: 3;
    }
}




@media (max-width: 520px) {
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination {
        width: 100%;
        border-radius: 14px;
    }

    #mado-pop-campaign-page .mado-ui-catalog-modal__page-numbers {
        order: -1;
        width: 100%;
    }

    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination .mado-ui-button {
        min-width: 72px;
    }
}

/*
 * POP GUEST AUTH BENEFITS / 2026-09-27
 * Shared Provider owner for the Normal/Easy POP guest save modal generated by
 * public/js/mado-public-editor-auth.js. The generic overlay/dialog/actions stay
 * in mado-base.css; only POP's three benefits are styled here. No duplicate
 * modal, customer-plugin CSS, or JS-generated style strings. When removing
 * benefits, remove this block together with createPopBenefits in the JS.
 */
.mado-portal-container .mado-public-editor-auth-modal--with-benefits .mado-public-editor-auth-modal__benefits {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}
.mado-portal-container .mado-public-editor-auth-modal--with-benefits .mado-public-editor-auth-modal__benefit {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e1eaf1;
    border-radius: 12px;
    background: #f8fbfd;
}
.mado-portal-container .mado-public-editor-auth-modal--with-benefits .mado-public-editor-auth-modal__benefit-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #0f7776;
    background: #e6fbf9;
    border-radius: 10px;
}
.mado-portal-container .mado-public-editor-auth-modal--with-benefits .mado-public-editor-auth-modal__benefit-icon > svg {
    display: block;
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    fill: currentColor;
}
.mado-portal-container .mado-public-editor-auth-modal--with-benefits .mado-public-editor-auth-modal__benefit-body {
    min-width: 0;
}
.mado-portal-container .mado-public-editor-auth-modal--with-benefits .mado-public-editor-auth-modal__benefit-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
    color: #0f172a;
}
.mado-portal-container .mado-public-editor-auth-modal--with-benefits .mado-public-editor-auth-modal__benefit-copy {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #475569;
}
.mado-portal-container .mado-public-editor-auth-modal--with-benefits .mado-ui-confirm-modal__actions {
    flex-wrap: wrap;
}


/* SHARED NORMAL/EASY LAYER POPOVER / 2026-10-18 r17
 * Visual presentation only: reuses each existing action button and handler.
 * PC/tablet/phone share the same popover; phones use a narrower, right-aligned width.
 * Position is fixed by the shared presenter on explicit user open only.
 * 2026-10-18 follow-up: unify selected green with shared variables, make layer/popup text 15px,
 * keep 「次へ」 text white, align menu icons, and fine-tune the 設定 chevron position.
 */
#mado-pop-campaign-page .mado-pop-easy__layer-guide-touch-label,
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__compact-toggle,
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__compact-only { display: none; }

#mado-pop-campaign-page .mado-pop-easy__layer-guide-head--actions { padding: 0 2px 2px; }
#mado-pop-campaign-page .mado-pop-easy__layer-guide-head--actions .mado-pop-easy__layer-guide-help-item { display: none; }
#mado-pop-campaign-page .mado-pop-easy__layer-guide-touch-label {
    display: block; color: #0f7776; font-size: 14px; font-weight: 800; line-height: 1.4;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__row {
    position: relative; grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px; align-items: center; padding: 5px 6px; overflow: visible;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__item { min-height: 34px; padding: 4px 5px; }
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__item-label {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__compact-toggle {
    appearance: none; display: inline-flex; align-items: center; justify-content: center;
    gap: 0; /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: width: 44px; */ /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: min-width: 44px; */ /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: height: 44px; */ /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: min-height: 44px; */
    margin: 0; padding: 0;
    border: 1px solid #cbd9e7; border-radius: 9px;
    background: #fff; color: #334155;
    font: inherit; font-size: 15px; font-weight: 800; line-height: 1.2;
    cursor: pointer; box-shadow: none;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__compact-toggle:focus-visible,
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__compact-toggle[aria-expanded="true"] {
    border-color: var(--mado-pop-primary); background: var(--mado-pop-primary-soft);
    color: #0f7776; outline: 2px solid var(--mado-pop-primary-ring); outline-offset: 1px;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] {
    position: fixed; z-index: 2147482400;
    display: none; box-sizing: border-box; width: min(246px, calc(100vw - 16px));
    max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px);
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    grid-column: auto; gap: 4px;
    margin: 0; padding: 7px;
    border: 1px solid #dbe5ef; border-radius: 12px;
    background: #fff; box-shadow: 0 14px 36px rgba(15, 23, 42, .18);
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__row.is-compact-menu-open .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] {
    display: grid;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action {
    box-sizing: border-box; display: flex; align-items: center; justify-content: flex-start;
    gap: 9px; width: 100%; min-width: 0; min-height: 42px;
    margin: 0; padding: 8px 10px;
    border: 0; border-radius: 8px; background: #f8fafc; color: #24364b;
    box-shadow: none; font: inherit; font-size: 15px; font-weight: 700;
    line-height: 1.35; text-align: left; cursor: pointer;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action::after {
    content: attr(data-mado-compact-label); display: block; flex: 1 1 auto;
    min-width: 0; font-size: 15px; font-weight: 700; line-height: 1.35;
}
/* Keep the original eye, frame, lock, pen, chain, play and bin icons visible. */
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action > svg,
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action > .mado-pop-layer-menu__edit-icon,
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action > .mado-pop-layer-menu__compact-glyph {
    display: inline-flex; flex: 0 0 20px; width: 20px; height: 20px;
    align-items: center; justify-content: center; position: relative;
    margin: 0; color: currentColor; pointer-events: none; transform: translateY(-1px);
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action > .mado-pop-layer-menu__compact-glyph {
    font-size: 18px; font-weight: 800; line-height: 1;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action > .mado-pop-layer-menu__edit-icon svg,
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action > .mado-pop-layer-menu__edit-icon path {
    fill: currentColor;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__item-lock--control {
    display: none;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__visibility > .mado-pop-layer-menu__visibility-slash {
    display: block; left: 11px; top: 18px; width: 18px;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action:hover:not(:disabled),
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action:focus-visible:not(:disabled) {
    border: 0; background: var(--mado-pop-primary-soft); color: #0f6665; outline: 0;
    box-shadow: inset 0 0 0 1px var(--mado-pop-primary), 0 0 0 2px var(--mado-pop-primary-ring);
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action:disabled { opacity: .4; cursor: not-allowed; }
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > [data-mado-compact-divider="1"] {
    margin-top: 0; padding-top: 8px; border-top: 0;
    border-radius: 8px;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__delete { color: #b42318; }
@media (max-width: 720px) {
    /* On phones, the menu is a right-aligned compact card, not a full-width row. */
    #mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] {
        width: min(244px, calc(100vw - 16px)); padding: 7px;
    }
    #mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action {
        gap: 15px; min-height: 44px; padding: 8px 10px;
    }
    #mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__move-controls[data-mado-pop-layer-compact-panel="1"] > .mado-pop-layer-menu__action::after,
    #mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__compact-toggle,
    #mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__item-label {
        font-size: 15px;
    }
}

/* R68: Normal/Easy compact actions use the shared MADO gear alone, a 44px target;
   the semantic button name and aria-expanded stay in the shared presenter. */
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"] .mado-pop-layer-menu__compact-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"]
    .mado-pop-layer-menu__compact-toggle > span:first-child {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
}
#mado-pop-campaign-page [data-mado-pop-layer-compact-ui="1"]
    .mado-pop-layer-menu__compact-toggle > span:first-child::after {
    content: "";
    display: inline-block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M19.14%2012.94c.04-.31.06-.63.06-.94s-.02-.63-.06-.94l2.03-1.58a.5.5%200%200%200%20.12-.64l-1.92-3.32a.5.5%200%200%200-.6-.22l-2.39.96a7.03%207.03%200%200%200-1.63-.94l-.36-2.54A.5.5%200%200%200%2013.9%202h-3.8a.5.5%200%200%200-.49.42l-.36%202.54c-.58.22-1.12.53-1.63.94l-2.39-.96a.5.5%200%200%200-.6.22L2.71%208.48a.5.5%200%200%200%20.12.64l2.03%201.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03%201.58a.5.5%200%200%200-.12.64l1.92%203.32a.5.5%200%200%200%20.6.22l2.39-.96c.5.41%201.05.72%201.63.94l.36%202.54a.5.5%200%200%200%20.49.42h3.8a.5.5%200%200%200%20.49-.42l.36-2.54c.58-.22%201.12-.53%201.63-.94l2.39.96a.5.5%200%200%200%20.6-.22l1.92-3.32a.5.5%200%200%200-.12-.64l-2.03-1.58ZM12%2015.5A3.5%203.5%200%201%201%2012%208.5a3.5%203.5%200%200%201%200%207Z%22%2F%3E%3C%2Fsvg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M19.14%2012.94c.04-.31.06-.63.06-.94s-.02-.63-.06-.94l2.03-1.58a.5.5%200%200%200%20.12-.64l-1.92-3.32a.5.5%200%200%200-.6-.22l-2.39.96a7.03%207.03%200%200%200-1.63-.94l-.36-2.54A.5.5%200%200%200%2013.9%202h-3.8a.5.5%200%200%200-.49.42l-.36%202.54c-.58.22-1.12.53-1.63.94l-2.39-.96a.5.5%200%200%200-.6.22L2.71%208.48a.5.5%200%200%200%20.12.64l2.03%201.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03%201.58a.5.5%200%200%200-.12.64l1.92%203.32a.5.5%200%200%200%20.6.22l2.39-.96c.5.41%201.05.72%201.63.94l.36%202.54a.5.5%200%200%200%20.49.42h3.8a.5.5%200%200%200%20.49-.42l.36-2.54c.58-.22%201.12-.53%201.63-.94l2.39.96a.5.5%200%200%200%20.6-.22l1.92-3.32a.5.5%200%200%200-.12-.64l-2.03-1.58ZM12%2015.5A3.5%203.5%200%201%201%2012%208.5a3.5%203.5%200%200%201%200%207Z%22%2F%3E%3C%2Fsvg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* SHARED LAYER ACTION TOOLTIP / 2026-09-27
 * Normal and Easy both render actions via renderLayerDescriptorList.
 * The tooltip is portaled to <body> to escape the scrolling layer-list clipping.
 * Text comes from data-mado-tooltip; accessible names remain on the buttons.
 */
.mado-pop-layer-action-tooltip {
    position: fixed;
    z-index: 2147483000;
    box-sizing: border-box;
    max-width: min(280px, calc(100vw - 16px));
    padding: 7px 10px;
    border-radius: 7px;
    background: #172b43;
    color: #fff;
    font: 500 12px/1.5 "Noto Sans JP", system-ui, sans-serif;
    white-space: normal;
    text-align: left;
    overflow-wrap: anywhere;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .18);
    pointer-events: none;
}
.mado-pop-layer-action-tooltip[hidden] { display: none; }


/* MULTI-LAYER SELECTION / 2026-10-01: transient editor-only outline; never serialized. */
#mado-pop-campaign-page [data-mado-pop-layer-token].is-mado-layer-multi-selected {
    outline: 2px dashed rgba(15, 157, 151, .78);
    outline-offset: 2px;
}
#mado-pop-campaign-page [data-mado-pop-layer-token].is-mado-layer-multi-selected.is-mado-layer-position-locked {
    outline-color: rgba(180, 83, 9, .8);
}

/*
 * MINIMAL SHARED POP CATALOG SEARCH / R42:
 * - One labeled text field and one submit button for both editors.
 * - All categories are searched only on explicit submit; no input-time refresh.
 * - No search-scope UI, clear icon, helper block, or separate search controller.
 */
#mado-pop-campaign-page .mado-ui-catalog-modal__utility-row {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    align-items: center;
    min-width: 0;
    margin: 0;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__utility-row .mado-pop-catalog-selection-note {
    order: -1; /* Desktop JS restores this node after form; show it before search. */
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__search {
    display: flex;
    align-items: center;
    flex: 0 1 370px;
    margin: 0;
    min-width: 0;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__search[hidden] {
    display: none;
}

/* Keep the native label for Narrator/NVDA while reclaiming its visible row. */
#mado-pop-campaign-page .mado-ui-catalog-modal__search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__search-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    flex: 1 1 280px;
    width: min(100%, 370px);
    max-width: 370px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__ai-note {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__search-input {
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 7px 11px;
    border: 1px solid #8494a6;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-size: 15px;
    line-height: 1.2;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__search-input:focus-visible {
    border-color: var(--mado-pop-primary);
    outline: 2px solid var(--mado-pop-primary-ring);
    outline-offset: 1px;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__search-submit {
    min-height: 40px;
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
}

/* Below tablet width, preserve the two-line heading while searching on row two. */
@media (max-width: 760px) {
    #mado-pop-campaign-page .mado-ui-catalog-modal__header {
        grid-template-columns: minmax(0, 1fr) 34px;
        column-gap: 10px;
        row-gap: 7px;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__heading {
        grid-column: 1;
        grid-row: 1;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__header .mado-ui-catalog-modal__close {
        grid-column: 2;
        grid-row: 1;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__utility-row {
        grid-column: 1 / -1;
        grid-row: 2;
        gap: 10px;
    }
}

/*
 * GOOGLE MATERIAL ICON STYLE FILTER / 2026-10-15:
 * - One global アイコン tab owns all five upstream style folders.
 * - This second-level row only filters the existing catalog GET; it is not a second catalog/runtime.
 * - R42 searches all categories; browsing tabs still retains icon-style selection.
 */
#mado-pop-campaign-page .mado-ui-catalog-modal__icon-style {
    /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: display: flex; */
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin: -4px 0 10px;
    padding: 7px 9px;
    border: 1px solid #d8e4ef;
    border-radius: 10px;
    background: #f8fbff;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__icon-style[hidden] {
    display: none;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__icon-style-label {
    flex: 0 0 auto;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__icon-style-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__icon-style-options .mado-ui-button {
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.2;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__icon-style-options .mado-ui-button.is-active {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    color: #086f70;
}

#mado-pop-campaign-page .mado-ui-catalog-modal__option-style {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin-top: -4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 9px;
    line-height: 1.35;
    white-space: nowrap;
}

@media (max-width: 720px) {
    #mado-pop-campaign-page .mado-ui-catalog-modal__icon-style {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}


/* ICON CATEGORY TABS / R42
 * Google icon styles remain top-level picker tabs; no second-level selector.
 */
#mado-pop-campaign-page .mado-ui-catalog-modal__icon-style {
    display: none !important;
}

/* SHARED POP CATALOG TABLET DIALOG / R41
 * Native modal dialog is in the top layer at every viewport, with a single
 * focus contract and no manual popover + JS inert + JS Tab trap combination.
 * Keep the original 8px tablet interior layout from R37.
 */
@media (min-width: 721px) and (max-width: 1024px) {
    #mado-pop-campaign-page .mado-ui-catalog-modal:modal {
        box-sizing: border-box;
        width: 100vw;
        max-width: none;
        height: 100dvh;
        max-height: none;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        overflow: visible;
        padding: 8px;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal:modal > .mado-ui-catalog-modal__dialog {
        box-sizing: border-box;
        max-width: min(1040px, calc(100vw - 16px));
        min-width: 0;
    }
}

/* SHARED POP TOUCH HSV / 2026-10-18
 * Same Easy/Normal picker controller from canonical source [04 UI].
 * Keep historical Easy class names for existing styling compatibility.
 */
#mado-pop-campaign-page .mado-pop-easy__touch-color-modal[hidden] { display:none; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-modal { z-index: 2147483200; box-sizing: border-box; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-modal * { box-sizing: border-box; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-dialog {
    width: min(430px, 100%); max-height: calc(100dvh - 32px);
    padding: 20px; font-family: var(--mado-portal-font-family, "Noto Sans JP", sans-serif);
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-dialog .mado-ui-modal__title {
    color: var(--mado-portal-text, #0f172a); font-size: 18px; font-weight: 700;
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-preview {
    display:flex; align-items:center; gap:14px; margin:16px 0 20px;
    padding:12px; border:1px solid var(--mado-portal-field-border, #cbd5e1);
    border-radius:12px; background:#fff;
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-sample {
    display:block; flex:0 0 68px; width:68px; height:68px;
    border:1px solid var(--mado-portal-field-border, #cbd5e1); border-radius:12px;
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-preview strong { display:block; font-size:15px; font-weight:700; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-preview output { display:block; margin-top:5px; font-size:14px; font-weight:600; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-sliders { display:grid; gap:17px; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-sliders label { display:grid; gap:8px; font-size:15px; font-weight:700; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-sliders label > span { display:flex; justify-content:space-between; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-sliders input[type="range"] {
    appearance:none; -webkit-appearance:none; width:100%; height:17px; margin:7px 0;
    padding:0; border:0; border-radius:999px; touch-action:pan-y;
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-sliders input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance:none; appearance:none; width:30px; height:30px;
    border:3px solid white; border-radius:50%; background:#fff;
    box-shadow:0 0 0 2px #526477,0 1px 5px rgba(15,23,42,.22); cursor:grab;
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-sliders input[type="range"]::-moz-range-thumb {
    width:24px; height:24px; border:3px solid #fff; border-radius:50%; background:#fff;
    box-shadow:0 0 0 2px #526477,0 1px 5px rgba(15,23,42,.22);
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-saved { margin-top:20px; padding-top:16px; border-top:1px solid #e2e8f0; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-saved-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-saved-head strong { font-size:14px; font-weight:700; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-saved-head button {
    min-height:38px; padding:6px 12px; border:1px solid var(--mado-brand-accent, #06bfb5);
    border-radius:999px; background:var(--mado-brand-accent-soft, #e6fbf9); color:#0f172a;
    font:inherit; font-size:14px; font-weight:700;
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-saved-head button:disabled { opacity:.45; cursor:not-allowed; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-saved-swatches { display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-saved-item { position:relative; display:inline-flex; }
#mado-pop-campaign-page .mado-pop-easy__touch-color-saved-item > button:first-child {
    width:40px; height:40px; border:1px solid #94a3b8; border-radius:10px;
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-remove {
    position:absolute; right:-10px; top:-10px; width:24px; height:24px; padding:0;
    border:1px solid #cbd5e1; border-radius:50%; background:#fff; color:#475569; font-size:16px;
}
/* R85: Palette management is available on PCs as well as touch devices.
 * The tiny textual action is intentionally separate from the ten color chips. */
#mado-pop-campaign-page .mado-pop-palette-edit {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; align-self: center; min-width: 40px; min-height: 30px;
    padding: 3px 8px; border: 1px solid #b9d9d5; border-radius: 999px;
    background: #e8fbf7; color: #145b5b; font: inherit;
    font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-pop-palette-edit:hover { background: #d1f7ef; }
#mado-pop-campaign-page .mado-pop-palette-edit:focus-visible {
    outline: 3px solid #087e7a; outline-offset: 2px;
}
#mado-pop-campaign-page .mado-pop-easy__touch-color-actions .mado-ui-button {
    min-width:0; min-height:44px; font-size:15px;
}
@media(max-width:720px) {
    #mado-pop-campaign-page .mado-pop-easy__touch-color-modal { padding:12px; }
    #mado-pop-campaign-page .mado-pop-easy__touch-color-dialog {
        width:100%; padding:18px 14px; max-height:calc(100dvh - 24px);
    }
    #mado-pop-campaign-page .mado-pop-easy__touch-color-actions { flex-wrap:nowrap; }
    #mado-pop-campaign-page .mado-pop-easy__touch-color-actions .mado-ui-button { flex:1 1 0; }
}


/* R101 PHONE SHARED CATALOG: one native dialog, one category set, one pager.
 * Normal/Easy use the same markup and [06 CATALOG] controller. Keep all tablet
 * and desktop layout rules above unchanged. */
#mado-pop-campaign-page .mado-pop-catalog-modal__back-phone { display: none; }
#mado-pop-campaign-page .mado-ui-catalog-modal__page-compact { display: none; }
#mado-pop-campaign-page .mado-ui-catalog-modal__category-toggle[hidden] { display: none; }
@media (max-width: 620px) {
    #mado-pop-campaign-page .mado-ui-catalog-modal__body { padding: 8px 10px; }
    #mado-pop-campaign-page .mado-ui-catalog-modal__header { padding: 8px 10px; }
    #mado-pop-campaign-page .mado-ui-catalog-modal__search {
        display: grid;
        gap: 4px;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__search-control { width: 100%; max-width: none; }
    #mado-pop-campaign-page .mado-ui-catalog-modal__ai-note { white-space: normal; }
    #mado-pop-campaign-page .mado-ui-catalog-modal__category-toggle {
        appearance: none; display: flex; align-items: center; justify-content: space-between;
        width: 100%; min-height: 36px; margin: 6px 0;
        padding: 5px 12px; border: 1px solid #cbd9e5; border-radius: 10px;
        background: #effcfb; color: #0f7776; font-size: 15px; font-weight: 800;
        cursor: pointer;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__category-toggle::after {
        content: ''; width: 8px; height: 8px; margin-right: 4px;
        border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
        transform: translateY(-2px) rotate(45deg);
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__category-toggle[aria-expanded="true"]::after {
        transform: translateY(2px) rotate(225deg);
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__category-toggle:focus-visible {
        outline: 3px solid rgba(15,118,110,.3); outline-offset: 2px;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__tabs:not(.is-expanded) { display: none; }
    #mado-pop-campaign-page .mado-ui-catalog-modal__tabs.is-expanded {
        max-height: min(33dvh, 240px); overflow-y: auto;
        padding: 5px 0; margin-bottom: 5px;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__tabs .mado-ui-catalog-modal__tab {
        min-height: 32px; padding: 5px 8px;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px;
        min-height: calc(5 * 108px + 4 * 7px);
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__option { padding: 6px; min-height: 108px; gap: 5px; }
    #mado-pop-campaign-page .mado-ui-catalog-modal__actions {
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px; padding: 7px 9px;
    }
    /* R103: Phone pager uses three equal columns: large Previous / page status / Next.
     * Same shared catalog DOM and page callbacks for Normal/Easy; do not add duplicate buttons.
     * Keep the primary action row before pagination in keyboard navigation. */
    #mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons {
        display: grid; grid-row: 1; grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch; gap: 5px; width: 100%; min-width: 0;
    }
    #mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons > .mado-ui-button {
        grid-row: 1; width: 100%; /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: min-width: 0; */ /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: min-height: 44px; */
        margin: 0; /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: padding: 5px 3px; */ /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: font-size: 15px; */ /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: line-height: 1.2; */
        /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: white-space: normal; */ /* HOLD 2026-11-02 prelaunch; overwritten by later same-selector rule: overflow-wrap: anywhere; */
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__actions .mado-ui-catalog-modal__pagination {
        grid-column: 1 / -1; grid-row: 2; display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px; width: 100%; max-width: 100%; min-width: 0;
        justify-self: stretch; padding: 3px; border-radius: 12px;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination [data-mado-pop-catalog-prev] {
        grid-column: 1; grid-row: 1;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination [data-mado-pop-catalog-next] {
        grid-column: 3; grid-row: 1;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination .mado-ui-button {
        min-width: 0; min-height: 52px; width: 100%; padding: 8px 4px;
        font-size: 15px; font-weight: 700; white-space: nowrap;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination .mado-ui-catalog-modal__page-numbers {
        display: contents;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination .mado-ui-catalog-modal__page-number,
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination .mado-ui-catalog-modal__page-ellipsis {
        display: none;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__page-compact {
        display: flex; grid-column: 2; grid-row: 1; min-width: 0;
        align-items: center; justify-content: center; white-space: nowrap;
        font-size: 15px; font-weight: 700; color: #334155;
    }
    /* 30+ page categories retain original ±10 and direct-jump controls. */
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination .mado-ui-catalog-modal__page-fast {
        grid-column: 1 / -1; grid-row: 2; justify-content: center;
        min-width: 0; margin: 0; border-left: 0; padding: 4px 0 0;
        border-top: 1px solid #d7e3ec;
    }
    #mado-pop-campaign-page .mado-ui-catalog-modal__pagination .mado-ui-catalog-modal__page-fast input {
        min-width: 0; max-width: 58px;
    }
    #mado-pop-campaign-page .mado-pop-catalog-modal__back-to-categories {
        grid-column: 1;
    }
    #mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons > [data-mado-pop-catalog-apply] {
        grid-column: 2;
    }
    #mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons > [data-mado-pop-catalog-close] {
        grid-column: 3;
    }
    #mado-pop-campaign-page .mado-pop-catalog-modal__back-desktop { display: none; }
    #mado-pop-campaign-page .mado-pop-catalog-modal__back-phone { display: inline; }
}

/* R104 / Mobile catalog: keep category access discoverable and three actions balanced.
 * The same category tabs and event callbacks serve Normal and Easy. */
@media (max-width: 620px) {
  #mado-pop-campaign-page .mado-ui-catalog-modal__category-toggle:not([hidden]) {
    display: flex; flex: 0 0 auto; visibility: visible;
  }
  #mado-pop-campaign-page .mado-pop-catalog-modal__action-buttons > .mado-ui-button {
    min-width: 0; min-height: 48px; padding: 5px 2px;
    font-size: 15px; font-weight: 700; line-height: 1.25;
    overflow-wrap: normal; word-break: keep-all; white-space: nowrap;
  }
  #mado-pop-campaign-page .mado-pop-catalog-modal__back-phone { white-space: nowrap; }
  #mado-pop-campaign-page .mado-pop-catalog-modal__apply-desktop { display: none; }
  #mado-pop-campaign-page .mado-pop-catalog-modal__apply-phone { display: inline; }
}
@media (min-width: 621px) {
  #mado-pop-campaign-page .mado-pop-catalog-modal__apply-phone { display: none; }
  #mado-pop-campaign-page .mado-ui-catalog-modal__tabs { display: flex; }
}
/* R104 / Phone HSV sheet: preview remains visible while adjusting; palette has its
 * own page within the one modal, no new color save or stored state. */
@media (max-width: 620px) {
  #mado-pop-campaign-page dialog.mado-pop-easy__touch-color-modal {
    display: flex; align-items: flex-end; justify-content: center;
    padding: 0; background: transparent;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-modal > .mado-ui-modal__backdrop {
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-dialog {
    position: relative; width: 100%; max-width: none;
    max-height: min(48dvh, 410px); min-height: 0;
    margin: 0; padding: 10px 12px calc(6px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    display: flex; flex-direction: column; gap: 0;
    overflow: hidden; box-shadow: 0 -7px 24px rgba(15,23,42,.17);
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-dialog .mado-ui-modal__title {
    position: absolute; width: 1px; height: 1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-sliders {
    gap: 7px; overflow-y: auto; min-height: 0;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-sliders label {
    gap: 4px; font-size: 15px;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-sliders input[type="range"] {
    height: 12px; margin: 5px 0 11px; flex: 0 0 auto;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-sliders input[type="range"]::-webkit-slider-thumb {
    width: 25px; height: 25px;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-preview {
    flex: 0 0 auto; margin: 6px 0 3px; padding: 0; gap: 9px;
    min-height: 45px; border: 0;
    align-items: flex-end;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-sample {
    flex: 0 0 39px; width: 39px; height: 39px; border-radius: 50%;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-preview-label {
    display: flex; align-items: center; gap: 8px; min-width: 0;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-preview-label strong { display: none; }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-preview-label output {
    margin: 0; font-size: 15px; white-space: nowrap;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-palette-toggle {
    margin-left: auto; min-height: 38px; padding: 4px 10px;
    border: 1px solid var(--mado-pop-primary, #0bb9b1);
    border-radius: 10px; background: #e8faf7; color: #0c7776;
    font: inherit; font-size: 14px; font-weight: 700;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-saved {
    display: none; min-height: 0; margin: 0; padding: 0; border: 0;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-modal[data-mado-touch-color-view="palette"] .mado-pop-easy__touch-color-sliders,
  #mado-pop-campaign-page .mado-pop-easy__touch-color-modal[data-mado-touch-color-view="palette"] .mado-pop-easy__touch-color-preview { display: none; }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-modal[data-mado-touch-color-view="palette"] .mado-pop-easy__touch-color-saved {
    display: flex; flex-direction: column; flex: 1 1 auto; overflow-y: auto;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-saved-head {
    flex-wrap: wrap; gap: 5px;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-saved-head .mado-pop-easy__touch-color-palette-back {
    min-height: 34px; padding: 4px 8px; font-size: 13px;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-saved-swatches {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 11px 6px; padding: 12px 6px 8px; margin: 0;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-saved-item { justify-content: center; min-width: 0; }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-saved-item > button:first-child {
    width: min(38px, 100%); height: 38px;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-actions {
    flex: 0 0 auto; width: 100%; margin: 0; padding: 5px 0 0;
    border-top: 1px solid #dce6ea; gap: 8px;
  }
  #mado-pop-campaign-page .mado-pop-easy__touch-color-actions .mado-ui-button {
    min-height: 44px; font-size: 15px;
  }
}

@media (min-width: 621px) {
  #mado-pop-campaign-page .mado-pop-easy__touch-color-palette-toggle,
  #mado-pop-campaign-page .mado-pop-easy__touch-color-palette-back { display: none; }
}

/* R105 / shared Normal+Easy material chooser on phones.
 * The one canonical selection counter lives beside the search submit button. */
@media (max-width: 620px) {
  #mado-pop-campaign-page .mado-ui-catalog-modal__utility-row {
    display: block;
  }
  #mado-pop-campaign-page .mado-ui-catalog-modal__search-control {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 5px;
  }
  #mado-pop-campaign-page .mado-ui-catalog-modal__search-submit {
    font-size: 15px; padding-inline: 9px;
  }
  #mado-pop-campaign-page .mado-ui-catalog-modal__search-control .mado-pop-catalog-selection-note:not([hidden]) {
    display: block; align-self: center; margin: 0; min-width: 0;
    font-size: 15px; white-space: nowrap; line-height: 1.25;
  }
  #mado-pop-campaign-page .mado-ui-catalog-modal__category-toggle,
  #mado-pop-campaign-page .mado-ui-catalog-modal__tabs .mado-ui-catalog-modal__tab {
    font-size: 15px;
  }
}


/* R128 / EASY + BANNER FOCUS APPEARANCE / 2026-10-22
 * The same shared POP UI is used by Easy Create and Banner Area. Use one
 * MADO focus color for keyboard-operable controls without removing the focus
 * indicator. Neither Normal Editor nor public Widget inherits this contract.
 * Script-focused, tabindex=-1 reading targets are not Tab stops: suppress
 * only their native heavy browser rectangle, never their readable text/focus.
 */
#mado-pop-campaign-page:is(.is-easy-create-mode, .is-banner-area-mode) {
    --mado-pop-wizard-focus: #08766f;
}
#mado-pop-campaign-page:is(.is-easy-create-mode, .is-banner-area-mode)
    :is(button, a[href], summary, input:not([type="hidden"]), select, textarea, [role="button"], [role="tab"]):focus-visible {
    outline: 2px solid var(--mado-pop-wizard-focus);
    outline-offset: 2px;
}
#mado-pop-campaign-page:is(.is-easy-create-mode, .is-banner-area-mode)
    :is(h1, h2, h3, h4, h5, h6, p, section, div)[tabindex="-1"]:focus {
    outline: none;
}


/* R130 / STATIC READING TARGETS / 2026-10-22
 * Noninteractive status/text with programmatic tabindex=-1 may acquire a UA
 * black outline on mobile AT. Keep all interactive :focus-visible rings in
 * the R128 contract above untouched. */
#mado-pop-campaign-page:is(.is-easy-create-mode, .is-banner-area-mode)
 :is(strong, span, label)[tabindex="-1"]:focus {
    outline: none;
    box-shadow: none;
}

/* R291 / 2026-10-27: The Google icon family has one canonical UI tab and one
 * style bar for Normal/Easy.  These buttons are filters, not additional catalogs. */
#mado-pop-campaign-page .mado-pop-catalog-icon-styles:not([hidden]) {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
    padding: 0 0 12px;
}
#mado-pop-campaign-page .mado-pop-catalog-icon-styles__label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-right: 2px;
}
#mado-pop-campaign-page .mado-pop-catalog-icon-styles__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 13px;
    border: 1px solid #cbd9e5;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
}
#mado-pop-campaign-page .mado-pop-catalog-icon-styles__button.is-active {
    background: var(--mado-pop-primary-soft);
    color: #086f70;
    border-color: var(--mado-pop-primary);
}
#mado-pop-campaign-page .mado-pop-catalog-icon-styles__button:focus-visible {
    outline: 2px solid #08766f;
    outline-offset: 2px;
}
@media (max-width: 620px) {
    #mado-pop-campaign-page .mado-pop-catalog-icon-styles:not([hidden]) { gap: 5px; padding-block: 6px 10px; }
    #mado-pop-campaign-page .mado-pop-catalog-icon-styles__button { font-size: 13px; min-height: 36px; padding-inline: 9px; }
}

/* R396 / 2026-11-02: A vacant replay status must not reserve a grid row below
 * the play cards. Keep the aria-live element in the accessibility tree so
 * VoiceOver / TalkBack / Narrator can announce status once it is populated.
 * Both Normal and Easy use this same presentation rule; no JS or DOM changes. */
#mado-pop-campaign-page .mado-pop-preview__motion-status:empty,
#mado-pop-campaign-page .mado-pop-easy__motion-status:empty {
  position: absolute;
  box-sizing: border-box;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* R388 / 2026-11-02: Magnify the actual playback buttons while keeping mode icons secondary.
 * Normal and Easy share this single CSS owner. No JS/HTML/state changes.
 * R387: Two independently operable, compact replay cards.
 * R389 uses the exact MADO layer-toolbar SVG path from live Elements (single=top path only).
 * Each mode selector remains a separate accessible button above its own play/stop toggle.
 * Existing shared motion service remains sole playback owner: no duplicate animation engine. */
/* R392 / 2026-11-02: replay header typography for the existing two-card menu.
 * Normal width is owned only by pop-campaign-page.css;
 * Easy width belongs to pop-campaign-easy.css. */
#mado-pop-campaign-page .mado-pop-preview__motion-menu:has(> .mado-pop-motion-replay-grid) .mado-pop-preview__motion-menu-head {
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
}
#mado-pop-campaign-page .mado-pop-preview__motion-menu:has(> .mado-pop-motion-replay-grid) .mado-pop-preview__motion-menu-eyebrow {
  font-size: 12px;
  white-space: nowrap;
}
#mado-pop-campaign-page .mado-pop-preview__motion-menu:has(> .mado-pop-motion-replay-grid) .mado-pop-preview__motion-menu-count {
  padding: 3px 5px;
  font-size: 11px;
  white-space: nowrap;
}
@media (max-width: 270px) {
  #mado-pop-campaign-page .mado-pop-preview__motion-menu:has(> .mado-pop-motion-replay-grid) .mado-pop-preview__motion-menu-head {
    flex-wrap: wrap;
  }
}
/* R393 / 2026-11-02: One compact, keyboard/touch accessible replay-layer
 * selector above the existing two replay cards. Normal and Easy share this CSS.
 * The list and edit action are driven by the existing Motion Service. */
#mado-pop-campaign-page .mado-pop-motion-target-picker {
  display: grid;
  gap: 5px;
  min-width: 0;
}
#mado-pop-campaign-page .mado-pop-motion-target-picker > label {
  color: #17364b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
#mado-pop-campaign-page .mado-pop-motion-target-picker__row {
  display: grid;
  grid-template-columns: minmax(0, 184px) 38px;
  justify-content: start;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
/* R397 / 2026-11-02: Native select in both Normal and Easy.
 * Keep the existing OS choice widget (including VoiceOver/TalkBack); don't
 * fake a listbox or force an option highlight that the browser may ignore. */
#mado-pop-campaign-page .mado-pop-motion-target-picker select {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #17364b;
  color-scheme: light;
  appearance: auto;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
/* Prevent iPhone Safari from automatically zooming when tapping an input under 16px. */
@media (pointer: coarse) {
  #mado-pop-campaign-page .mado-pop-motion-target-picker select {
    font-size: 16px;
  }
}
/* R398 / 2026-11-02: Selected option = gentle mint + dark text; other options = white + dark text.
 * Keep a real native <select>: when customizable select is unsupported, the OS remains the
 * picker owner. No duplicate listbox, keyboard handler, or playback service is introduced.
 * Scoped to the replay-layer picker in both Normal POP and Easy STEP. */
@supports (appearance: base-select) and selector(::picker(select)) {
  #mado-pop-campaign-page .mado-pop-motion-target-picker select,
  #mado-pop-campaign-page .mado-pop-motion-target-picker select::picker(select) {
    appearance: base-select;
  }
  #mado-pop-campaign-page .mado-pop-motion-target-picker select {
    align-items: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    padding-right: 31px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2317364b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 14px 14px;
    background-position: right 12px center;
  }
  #mado-pop-campaign-page .mado-pop-motion-target-picker select::selected-content {
    align-self: center;
    transform: translateY(2px);
  }
  #mado-pop-campaign-page .mado-pop-motion-target-picker select::picker(select) {
    box-sizing: border-box;
    min-width: 184px;
    max-width: min(280px, calc(100vw - 24px));
    padding: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #17364b;
    box-shadow: 0 8px 22px rgba(15, 38, 54, 0.12);
  }
  #mado-pop-campaign-page .mado-pop-motion-target-picker select option {
    box-sizing: border-box;
    min-height: 37px;
    padding: 9px 10px;
    border-radius: 7px;
    background: #ffffff;
    color: #17364b;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
  }
  #mado-pop-campaign-page .mado-pop-motion-target-picker select option:hover:not(:checked),
  #mado-pop-campaign-page .mado-pop-motion-target-picker select option:focus-visible:not(:checked) {
    background: #f1f6f8;
    color: #17364b;
  }
  #mado-pop-campaign-page .mado-pop-motion-target-picker select option:checked,
  #mado-pop-campaign-page .mado-pop-motion-target-picker select option:checked:hover,
  #mado-pop-campaign-page .mado-pop-motion-target-picker select option:checked:focus-visible {
    background: #ddf5e9;
    color: #17392e;
    font-weight: 600;
  }
  #mado-pop-campaign-page .mado-pop-motion-target-picker select option::checkmark {
    color: #17634d;
  }
  #mado-pop-campaign-page .mado-pop-motion-target-picker select::picker-icon {
    display: none;
  }
  @media (pointer: coarse) {
    #mado-pop-campaign-page .mado-pop-motion-target-picker select option {
      font-size: 16px;
    }
  }
}
#mado-pop-campaign-page .mado-pop-motion-target-picker__edit {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 38px;
  height: 40px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #17364b;
  cursor: pointer;
}
/* A subtle slate-blue, still-visible keyboard focus indicator, not a teal halo.
 * The native popup controls its own highlight on Windows/macOS/iOS/Android. */
#mado-pop-campaign-page .mado-pop-motion-target-picker .mado-pop-motion-target-picker__row :is(select,button):focus-visible {
  outline: 2px solid #6b8797;
  outline-offset: 1px;
  border-color: #99b1c0;
  box-shadow: none;
}
/* Pointer focus stays close to the unfocused input, with no extra glow. */
#mado-pop-campaign-page .mado-pop-motion-target-picker .mado-pop-motion-target-picker__row select:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
  border-color: #b2c5d1;
}
#mado-pop-campaign-page .mado-pop-motion-target-picker__edit:disabled {
  opacity: .45;
  cursor: not-allowed;
}
#mado-pop-campaign-page .mado-pop-motion-replay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 108px));
  justify-content: center;
  align-items: stretch;
  gap: 8px;
}
#mado-pop-campaign-page .mado-pop-motion-replay-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  min-width: 0;
  padding: 7px 6px 6px;
  gap: 13px; /* R393: lower large Play/Stop circles by 10px */
  border: 1px solid #d4e4ec;
  border-radius: 14px;
  background: #fff;
}
#mado-pop-campaign-page .mado-pop-motion-replay-column:has(.mado-pop-motion-mode[aria-pressed="true"]) {
  background: #e6f9f7;
  border-color: #09b9ae;
}
#mado-pop-campaign-page .mado-pop-motion-mode {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 3px 3px 0;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #17364b;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
#mado-pop-campaign-page .mado-pop-motion-mode[aria-pressed="true"] {
  border: 0;
  background: transparent;
  color: #087f79;
}
#mado-pop-campaign-page .mado-pop-motion-mode__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
#mado-pop-campaign-page .mado-pop-motion-action {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 88px;
  padding: 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #203647;
  font: inherit;
  cursor: pointer;
}
#mado-pop-campaign-page .mado-pop-motion-action[aria-pressed="true"] {
  border: 0;
  background: transparent;
}
#mado-pop-campaign-page .mado-pop-motion-action__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
#mado-pop-campaign-page .mado-pop-motion-action__icon[hidden] { display: none; }
#mado-pop-campaign-page .mado-pop-motion-action__svg {
  width: 78px;
  height: 78px;
  display: block;
  flex: none;
  fill: currentColor;
}
#mado-pop-campaign-page .mado-pop-motion-action:disabled {
  opacity: .43;
  cursor: not-allowed;
  background: transparent;
  border: 0;
}
#mado-pop-campaign-page .mado-pop-motion-mode:not(:disabled):hover,
#mado-pop-campaign-page .mado-pop-motion-action:not(:disabled):hover {
  background: rgba(0, 169, 158, .07);
}
#mado-pop-campaign-page .mado-pop-motion-mode:focus-visible,
#mado-pop-campaign-page .mado-pop-motion-action:focus-visible {
  outline: 3px solid #0f7776;
  outline-offset: 1px;
}
@media (max-width: 360px) {
  #mado-pop-campaign-page .mado-pop-motion-replay-grid {
    grid-template-columns: repeat(2, minmax(0, 100px));
    gap: 8px;
  }
  #mado-pop-campaign-page .mado-pop-motion-replay-column { padding-inline: 5px; }
  #mado-pop-campaign-page .mado-pop-motion-action { height: 80px; }
  #mado-pop-campaign-page .mado-pop-motion-action__svg { width: 70px; height: 70px; }
}
/* Layer CSS modal: icon above a short label, 4 equal buttons rather than wrapped text. */
#mado-pop-campaign-page .mado-pop-motion-modal .mado-pop-motion-modal__actions > button.mado-ui-button {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; min-height:61px; padding:6px 3px; font-size:12px; font-weight:650;
  border-radius:9px; white-space:nowrap; overflow-wrap:normal; text-align:center;
}
#mado-pop-campaign-page .mado-pop-motion-modal__actions > button > svg {
  display:block; width:24px; height:24px; flex:0 0 24px;
}
#mado-pop-campaign-page .mado-pop-motion-modal__actions > button > span {
  display:block; white-space:nowrap; text-align:center; line-height:1.2;
}
/* The single-layer graphic uses only the upper half of the toolbar SVG.
 * Shift its SVG (not its text/button) to align with the full-stack icon visually. */
#mado-pop-campaign-page .mado-pop-motion-modal__actions > button[data-mado-pop-motion-css-preview] > svg {
  transform: translateY(4px);
}
/* The selected layer is identified by its type, not a filename. */
#mado-pop-campaign-page .mado-pop-motion-modal__title-icon {
  display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;
  width:26px;height:26px;margin-left:5px;box-sizing:border-box;
  border:1px solid #c7d9e7;border-radius:6px;color:#173e50;background:#f8fbfd;
  font-size:15px;font-weight:700;line-height:1;
}
#mado-pop-campaign-page .mado-pop-motion-modal__title-icon svg {
  width:21px;height:21px;display:block;
}


/* CLOSE BUTTON PICKER + PREVIEW SHARED CONTRACT / 2026-11-03
 * One visual definition for Normal/Easy; public widget runtime remains its own CSS.
 */
#mado-pop-campaign-page .mado-pop-close-style-reveal__inner {
    min-height: 0;
    overflow: hidden;
}

#mado-pop-campaign-page .mado-pop-close-style {
    min-width: 0;
    margin: 16px 0 0;
    padding: 15px 0 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
}

#mado-pop-campaign-page .mado-pop-close-style__title {
    margin: 0 0 6px;
    padding: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-pop-close-style__help {
    margin: 0 0 12px;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
}

#mado-pop-campaign-page .mado-pop-close-style__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#mado-pop-campaign-page .mado-pop-close-style__choice {
    display: block;
    position: relative;
    min-width: 0;
    cursor: pointer;
}

#mado-pop-campaign-page .mado-pop-close-style__choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

#mado-pop-campaign-page .mado-pop-close-style__card {
    box-sizing: border-box;
    display: grid;
    gap: 7px;
    height: 100%;
    min-height: 112px;
    padding: 10px;
    border: 1px solid #d8e4ef;
    border-radius: 11px;
    background: #fff;
    color: #172b43;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

#mado-pop-campaign-page .mado-pop-close-style__choice input:checked + .mado-pop-close-style__card {
    border-color: var(--mado-pop-primary);
    background: var(--mado-pop-primary-soft);
    box-shadow: 0 0 0 2px var(--mado-pop-primary-ring);
}

#mado-pop-campaign-page .mado-pop-close-style__choice input:focus-visible + .mado-pop-close-style__card {
    outline: 2px solid #0f7776;
    outline-offset: 3px;
}

#mado-pop-campaign-page .mado-pop-close-style__example {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 61px;
    padding: 8px 16px;
    border-radius: 7px;
    background: #f3f8fc;
}

#mado-pop-campaign-page .mado-pop-close-style__mini-pop {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 125px);
    height: 42px;
    border: 1px solid #bcd4df;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 3px 7px rgba(15, 23, 42, .08);
}

#mado-pop-campaign-page .mado-pop-close-style__mini-content {
    color: #8395a6;
    font-size: 11px;
    font-weight: 800;
}

#mado-pop-campaign-page .mado-pop-close-style__mini-button {
    box-sizing: border-box; /* 2026-09-27: offsets use the declared outer box. */
    position: absolute;
    top: 2px;
    right: 3px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid #c6d5df;
    border-radius: 50%;
    background: #fff;
    color: #213547;
    font-size: 0;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

#mado-pop-campaign-page .mado-pop-close-style__example:not([data-close-style="top-center-handle"]):not([data-close-style="bottom-center-handle"]) .mado-pop-close-style__mini-button::before,
#mado-pop-campaign-page .mado-pop-close-style__example:not([data-close-style="top-center-handle"]):not([data-close-style="bottom-center-handle"]) .mado-pop-close-style__mini-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 1.5px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

#mado-pop-campaign-page .mado-pop-close-style__example:not([data-close-style="top-center-handle"]):not([data-close-style="bottom-center-handle"]) .mado-pop-close-style__mini-button::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#mado-pop-campaign-page .mado-pop-close-style__example:not([data-close-style="top-center-handle"]):not([data-close-style="bottom-center-handle"]) .mado-pop-close-style__mini-button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="top-right-outside"] .mado-pop-close-style__mini-button {
    top: -9px;
    right: -9px;
}

#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="top-center-round"] .mado-pop-close-style__mini-button {
    top: -11px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
}

#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="top-center-handle"] .mado-pop-close-style__mini-button {
    top: -16px; /* Slightly lower, with the last 2px visually clipped at the POP edge. */
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 18px;
    border-radius: 12px 12px 0 0;
    clip-path: inset(-3px -3px 2px -3px); /* Square joining edge, no backdrop-dependent mask. */
    font-size: 0; /* Font glyph metrics vary between devices; draw the chevron in CSS. */
}

/* One centered chevron for the miniature handle and the read-only editor preview. */
#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="top-center-handle"] .mado-pop-close-style__mini-button::before,
#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="bottom-center-handle"] .mado-pop-close-style__mini-button::before,
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-center-handle"] .mado-pop-preview-item__close-indicator::before,
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="bottom-center-handle"] .mado-pop-preview-item__close-indicator::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(1px) rotate(45deg); /* Center the visible V, not its unrotated box. */
}

/* New inverse top handle: same seam discipline, mirrored below the POP. */
#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="bottom-center-handle"] .mado-pop-close-style__mini-button {
    top: auto;
    right: auto;
    bottom: -12px; /* Sample only: tuck the little handle closer to the POP edge. */
    left: 50%;
    transform: translateX(-50%);
    width: 30px; /* Roughly 20% smaller than 38px. */
    height: 15px;
    border-radius: 0 0 10px 10px;
    clip-path: inset(2px -3px -3px -3px);
}
#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="bottom-center-handle"] .mado-pop-close-style__mini-button::before {
    width: 7px;
    height: 7px;
    border-width: 1.7px;
    transform: translateY(3px) rotate(225deg);
}

#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="bottom-center"] .mado-pop-close-style__mini-button {
    top: auto;
    right: auto;
    bottom: -9px; /* Half outside the mini POP, mirroring the top-center treatment. */
    left: 50%;
    transform: translateX(-50%);
}

#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="side-right-tab"] .mado-pop-close-style__mini-button {
    top: 50%;
    right: -16px; /* 19px wide: 3px is tucked behind the miniature POP edge. */
    transform: translateY(-50%);
    width: 19px;
    height: 29px;
    border-radius: 0 9px 9px 0;
}

#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="side-left-tab"] .mado-pop-close-style__mini-button {
    top: 50%;
    right: auto;
    left: -19px;
    transform: translateY(-50%);
    width: 19px;
    height: 29px;
    border-radius: 9px 0 0 9px;
}

/* The right-side miniature tab still uses its own edge join; the TOP handle
 * ends flush with the POP without a color-dependent face overlay. */
#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="side-right-tab"] .mado-pop-close-style__mini-pop::after {
    content: "";
    position: absolute;
    z-index: 3;
    pointer-events: none;
    background: #fff;
}
#mado-pop-campaign-page .mado-pop-close-style__example[data-close-style="side-right-tab"] .mado-pop-close-style__mini-pop::after {
    top: calc(50% - 15px);
    right: 0;
    width: 4px;
    height: 30px;
}

#mado-pop-campaign-page .mado-pop-close-style__name {
    align-self: center;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
}

/*
 * CLOSE BUTTON PREVIEW GEOMETRY / 2026-09-28, optical polish 2026-09-29:
 * - Normal and Easy share the same eight close_button_style markers and preview-only geometry.
 * - 2026-11-01: upper tab touches the POP edge without any face-color mask (SVG/gradient-safe).
 * - 2026-09-29 follow-up: top-right-inside uses equal 6px top/right inset so the whole circle is optically square to the POP corner.
 * - Public Runtime close-button geometry remains owned by public/css/widget-runtime.css; keep both visual contracts in parity.
 * - Snapshot/device/media work must not modify these coordinates. Verify all 8 presets on PC/tablet/mobile after any future change.
 */
/* Read-only marker for Normal and Easy previews; public click/close logic is not duplicated here. */
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button .mado-pop-preview-item__close-indicator {
    box-sizing: border-box; /* Tabs join the POP edge at their declared width/height. */
    position: absolute;
    z-index: 80;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    aspect-ratio: 1;
    border: 1px solid #d3dee6;
    border-radius: 50%;
    background: #fff;
    color: #172b43;
    font-size: 0;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .09);
    pointer-events: none;
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button:not([data-close-button-style="top-center-handle"]):not([data-close-button-style="bottom-center-handle"]) .mado-pop-preview-item__close-indicator::before,
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button:not([data-close-button-style="top-center-handle"]):not([data-close-button-style="bottom-center-handle"]) .mado-pop-preview-item__close-indicator::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button:not([data-close-button-style="top-center-handle"]):not([data-close-button-style="bottom-center-handle"]) .mado-pop-preview-item__close-indicator::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button:not([data-close-button-style="top-center-handle"]):not([data-close-button-style="bottom-center-handle"]) .mado-pop-preview-item__close-indicator::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-right-outside"],
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-center-round"],
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-center-handle"],
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="bottom-center-handle"],
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="bottom-center"],
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="side-right-tab"],
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="side-left-tab"] {
    overflow: visible;
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-right-outside"] .mado-pop-preview-item__close-indicator {
    top: -14px;
    right: -14px;
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-center-round"] .mado-pop-preview-item__close-indicator,
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-center-handle"] .mado-pop-preview-item__close-indicator {
    top: -14px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-center-handle"] .mado-pop-preview-item__close-indicator {
    /* 2026-11-01: end flush at the POP edge; no color-only mask across SVG/gradient layers. */
    top: -24px; /* Move the top handle down 2px; after clipping, it meets the POP edge. */
    width: 56px;
    height: 27px;
    border-width: 0.5px;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    clip-path: inset(-4px -4px 3px -4px);
    font-size: 0; /* CSS chevron above stays centered regardless of font metrics. */
    box-shadow: 0 -1px 0 rgba(255, 255, 255, .65), 0 1px 3px rgba(15, 23, 42, .06);
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="bottom-center-handle"] .mado-pop-preview-item__close-indicator {
    top: auto;
    right: auto;
    bottom: -23px; /* Move the bottom handle down 2px; clipped join meets the POP edge. */
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 27px;
    border-width: 0.5px;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    clip-path: inset(3px -4px -4px -4px);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="bottom-center-handle"] .mado-pop-preview-item__close-indicator::before {
    /* 2026-11-01: keep the upward chevron inside the visible lower tab. */
    transform: translateY(7px) rotate(225deg);
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="bottom-center"] .mado-pop-preview-item__close-indicator {
    top: auto;
    right: auto;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="side-right-tab"] .mado-pop-preview-item__close-indicator {
    top: 50%;
    right: -27px; /* Inset 2px compared with R17; 3px lies behind the POP face. */
    width: 30px;
    height: 47px;
    border-width: 0.5px;
    border-radius: 0 11px 11px 0;
    transform: translateY(-50%);
    /* Clip the 3px inner lip. Works over photos, gradients and SVGs; no color mask. */
    clip-path: inset(-5px -5px -5px 3px);
    box-shadow: 1px 1px 3px rgba(15, 23, 42, .06);
}

#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="side-left-tab"] .mado-pop-preview-item__close-indicator {
    top: 50%;
    right: auto;
    left: -28px; /* 2px inner lip, clipped under the POP face for symmetry. */
    width: 30px;
    height: 47px;
    border-width: 0.5px;
    border-right: 0;
    border-radius: 11px 0 0 11px;
    transform: translateY(-50%);
    box-shadow: -1px 1px 3px rgba(15, 23, 42, .06);
    clip-path: inset(-5px 2px -5px -5px);
}

/* Preview close controls stay visually underneath their POP face. The top
 * handle joins the edge without an overlay; the side tab retains its own join.
 * This read-only marker stays separate from the public Runtime button. */
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="top-center-handle"] .mado-pop-preview-item__close-indicator,
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="bottom-center-handle"] .mado-pop-preview-item__close-indicator,
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="side-right-tab"] .mado-pop-preview-item__close-indicator,
#mado-pop-campaign-page .mado-pop-preview-item.has-close-button[data-close-button-style="side-left-tab"] .mado-pop-preview-item__close-indicator {
    z-index: 1;
}


/* MADO POP GRADIENT TYPE / 2026-11-03: shared visual contract for Normal and Easy. */
#mado-pop-campaign-page .mado-pop-gradient__field,
#mado-pop-campaign-page .mado-pop-preview-context-panel__grid > label.mado-pop-gradient__field {
  display: grid;
  gap: 6px;
  min-width: 0;
  justify-items: stretch;
}
#mado-pop-campaign-page select.mado-pop-gradient__select,
#mado-pop-campaign-page .mado-pop-preview-context-panel__grid > label.mado-pop-gradient__field > select {
  width: min(165px, 100%);
  min-width: 0;
  justify-self: center;
  height: 42px;
  min-height: 42px;
  padding: 0 32px 0 19px;
  border-radius: 999px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2317364b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 14px 14px;
  background-position: right 12px center;
  appearance: none;
  -webkit-appearance: none;
}
/* The arrow is drawn once as a background image in base-select browsers. */
#mado-pop-campaign-page select.mado-pop-gradient__select::picker-icon {
  display: none;
}
/* Preserve the native/customizable option picker where supported. */
@supports (appearance: base-select) and selector(::picker(select)) {
  #mado-pop-campaign-page select.mado-pop-gradient__select,
  #mado-pop-campaign-page .mado-pop-preview-context-panel__grid > label.mado-pop-gradient__field > select {
    appearance: base-select;
    -webkit-appearance: base-select;
  }
}
#mado-pop-campaign-page .mado-pop-gradient__select:focus-visible,
#mado-pop-campaign-page .mado-pop-preview-context-panel__grid > label.mado-pop-gradient__field > select:focus-visible {
  outline: 2px solid #007e79;
  outline-offset: 2px;
}
#mado-pop-campaign-page [data-mado-pop-gradient-angle-wrap][hidden],
#mado-pop-campaign-page [data-mado-pop-gradient-spread-wrap][hidden],
#mado-pop-campaign-page [data-mado-pop-context-gradient-angle][hidden],
#mado-pop-campaign-page [data-mado-pop-context-gradient-spread][hidden],
#mado-pop-campaign-page [data-mado-pop-easy-gradient-angle-wrap][hidden],
#mado-pop-campaign-page [data-mado-pop-easy-gradient-spread-wrap][hidden] { display: none; }
/* This beats the later page.css rule that gives each preview label display:grid.
 * Preserve the HTML hidden contract: only the control for the active type exists
 * in the visual flow (and accessibility tree). */
#mado-pop-campaign-page .mado-pop-preview-context-panel__grid > label.mado-pop-gradient__field:is(
  [data-mado-pop-context-gradient-angle],
  [data-mado-pop-context-gradient-spread]
)[hidden] { display: none; }
#mado-pop-campaign-page .mado-pop-preview-context-panel__grid .mado-pop-gradient__field > input[type="number"] {
  width: min(134px, 100%);
  min-width: 0;
  justify-self: center;
  min-height: 42px;
  padding-inline: 8px;
  border: 1px solid #a5b9d0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  text-align: center;
}

/* POP GRADIENT shared control / R21. One CSS for Normal and Easy. */
#mado-pop-campaign-page .mado-pop-gradient__field .mado-pop-gradient__slider {
  display: block;
  width: min(165px, 100%);
  max-width: 100%;
  min-width: 0;
  min-height: 28px;
  margin: 1px auto 0;
  padding: 0;
  accent-color: #06bfb5;
  cursor: pointer;
  touch-action: pan-y;
}
#mado-pop-campaign-page .mado-pop-gradient__field output { color: #334155; font-variant-numeric: tabular-nums; }
#mado-pop-campaign-page .mado-pop-preview-context-panel__grid > label.mado-pop-gradient__field .mado-pop-gradient__slider {
  box-sizing: border-box;
  border: 0;
  background: transparent;
  border-radius: 0;
}
