.ace26 [hidden] { display: none !important; }
.ace26[data-ace-widgets] {
    position: fixed;
    inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
        max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    top: max(12px, env(safe-area-inset-top), calc(var(--ace26-header-offset, 0px) + 12px));
    bottom: max(12px, env(safe-area-inset-bottom), calc(var(--ace26-footer-clearance, 0px) + 12px));
    z-index: 9990;
    display: grid;
    grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr) minmax(0, 1fr);
    pointer-events: none;
}
.admin-bar .ace26[data-ace-widgets] { --ace26-header-offset: 32px; }
.ace26-rail {
    display: flex;
    gap: 10px;
    flex-direction: column;
    min-height: 0;
    scrollbar-width: thin;
    pointer-events: none;
}
.ace26-rail-left { grid-area: 2 / 1; justify-self: start; }
.ace26-rail-right { grid-area: 2 / 2; justify-self: end; align-items: end; }
.ace26-rail-left, .ace26-rail-right {
    overflow: auto;
    width: max-content;
    max-width: 100%;
    align-self: center;
    max-height: 100%;
}
.ace26-rail-top, .ace26-rail-bottom {
    grid-column: 1 / -1;
    align-items: center;
    max-height: 28dvh;
    overflow: auto;
}
.ace26-rail-top { grid-row: 1; }
.ace26-rail-bottom { grid-row: 3; }
.ace26-widget, .ace26-widget *, .ace26-widget *::before { box-sizing: border-box; }
.ace26-widget {
    flex: none;
    max-width: 100%;
    pointer-events: auto;
    font-size: var(--ace-font, inherit);
    color: var(--ace-fg, inherit);
}
.ace26-content, .ace26 dialog {
    background: var(--ace-bg, var(--ace-theme-surface, Canvas));
    color: var(--ace-fg, var(--ace-theme-color, inherit));
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: var(--ace-theme-panel-radius, 14px);
    padding: var(--ace-gap, var(--wp--style--block-gap, 1rem));
    overflow-wrap: anywhere;
}
.ace26-content {
    width: var(--ace-width, 20rem);
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ace-gap, 12px);
    text-align: var(--ace-align, start);
}
.ace26-bar .ace26-content { width: var(--ace-width, 52rem); }
.ace26-stack .ace26-content { width: var(--ace-width, 12rem); }
.ace26-stack .ace26-actions { flex-direction: column; }
.ace26-panel { margin-top: 6px; }
.ace26 .ace26-title { margin-block: 0; }
.ace26-description { white-space: pre-line; }
.ace26-copy { flex: 1 1 12rem; min-width: 0; }
.ace26 .ace26-image {
    width: min(100%, 9rem);
    height: auto;
    max-height: 7rem;
    object-fit: var(--ace-fit, contain);
    object-position: var(--ace-focus, center);
    align-self: var(--ace-align, start);
}
.ace26 [data-image-side="end"] .ace26-image { order: 1; }
.ace26-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    justify-content: var(--ace-align, start);
}
.ace26 .ace26-action {
    max-width: 100%;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.ace26 .ace26-tab-trigger { writing-mode: vertical-rl; }
.ace26-rail-top .ace26-tab-trigger,
.ace26-rail-bottom .ace26-tab-trigger { writing-mode: horizontal-tb; }
.ace26 .ace26-combo > .ace26-tab-trigger { margin-inline-end: 5px; }
.ace26 dialog {
    width: min(var(--ace-width, 30rem), calc(100% - 24px));
    max-height: calc(100% - 24px);
    overflow: auto;
    margin: auto;
    font-family: inherit;
    pointer-events: auto;
}
.ace26 dialog::backdrop { background: rgb(0 0 0 / 57%); }
.ace26 dialog .ace26-content { border: 0; padding: 0; width: 100%; }
#ace-preview { margin-bottom: 20px; }
#ace-preview .ace26-action { display: inline-block; }

/* Keep these fallbacks below ordinary theme selectors in the cascade. */
:where(.ace26[data-ace-theme]) {
    font-family: var(--ace-theme-font-family, inherit);
    font-size: var(--ace-theme-font-size, inherit);
    line-height: var(--ace-theme-line-height, inherit);
    color: var(--ace-theme-color, inherit);
}
:where(.ace26[data-ace-theme] .ace26-action) {
    display: inline-block;
    font: inherit;
    padding: .45em .75em;
}
:where(.ace26[data-ace-widgets] .ace26-action:focus-visible) {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

:where(.ace26[data-ace-theme] .ace26-action) {
    background-color: ButtonFace;
    color: ButtonText;
}
:where(.ace26[data-ace-theme] .ace26-action:is(:hover, :active, [aria-expanded="true"])) {
    box-shadow: inset 0 0 0 2px currentColor;
}

/* A sampled button supplies a complete color pair across interaction states. */
.ace26[data-ace-button-sample] :is(.ace26-action, .ace26-action:hover, .ace26-action:focus, .ace26-action:active) {
    background-color: var(--ace-accent, var(--ace-theme-button-background-color));
    background-image: none;
    color: var(--ace-action-text, var(--ace-theme-button-color));
    font-family: var(--ace-theme-button-font-family);
    font-weight: var(--ace-theme-button-font-weight);
    font-size: var(--ace-font, var(--ace-theme-button-font-size));
    line-height: var(--ace-theme-button-line-height);
    letter-spacing: var(--ace-theme-button-letter-spacing);
    text-transform: var(--ace-theme-button-text-transform);
    padding: var(--ace-theme-button-padding);
    border: var(--ace-theme-button-border);
    border-radius: var(--ace-theme-button-border-radius);
}
.ace26[data-ace-button-sample] .ace26-action:is(:hover, :active, [aria-expanded="true"]) {
    box-shadow: inset 0 0 0 2px currentColor;
}
:where(.ace26 .ace26-action:focus-visible) {
    outline: 2px solid currentColor;
    outline-offset: -3px;
}
.ace26[data-ace-heading-sample] .ace26-title {
    font-family: var(--ace-theme-heading-font-family);
    font-size: var(--ace-theme-heading-font-size);
    font-weight: var(--ace-theme-heading-font-weight);
    line-height: var(--ace-theme-heading-line-height);
    letter-spacing: var(--ace-theme-heading-letter-spacing);
    text-transform: var(--ace-theme-heading-text-transform);
}
.ace26[data-ace-heading-color] .ace26-title { color: var(--ace-theme-heading-color); }
.ace26 :is([style*="--ace-accent:"] .ace26-action, .ace26-action[style*="--ace-accent:"]) {
    background-color: var(--ace-accent) !important;
    background-image: none !important;
}
.ace26 :is([style*="--ace-action-text:"] .ace26-action, .ace26-action[style*="--ace-action-text:"]) { color: var(--ace-action-text) !important; }
/* A site-wide link color can otherwise become unreadable on a theme button fill. */
.ace26 .ace26-action[data-ace-readable-label] {
    color: var(--ace-readable-text) !important;
}
.ace26 [style*="--ace-fg:"] { color: var(--ace-fg); }
.ace26 [style*="--ace-heading:"] :is(.ace26-title, h2) { color: var(--ace-heading) !important; }
.ace26 [style*="--ace-font:"] .ace26-action { font-size: var(--ace-font) !important; }
.ace26 [data-device="none"] { display: none !important; }
@media (width < 769px) {
    .ace26 [data-device="desktop"] { display: none !important; }
    .admin-bar .ace26[data-ace-widgets] { --ace26-header-offset: 46px; }
}
@media (min-width: 769px) {
    .ace26 [data-device="mobile"] { display: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
    .ace26 dialog[data-animate="1"][open],
    .ace26 [data-animate="1"] .ace26-panel:not([hidden]) {
        animation: ace26-open 150ms ease-out;
    }
    @keyframes ace26-open { from { opacity: 0; transform: translateY(5px); } }
}
.ace26-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.ace26-rail-top .ace26-group, .ace26-rail-bottom .ace26-group { align-items: center; }
.ace26-rail-right .ace26-group { align-items: end; }
.ace26-rail-left .ace26-group { align-items: start; }
.ace26-rail-left, .ace26-rail-right {
    align-self: stretch;
    justify-content: safe center;
}
.ace26-rail-left:has(.ace26-group-lower:not(:empty)),
.ace26-rail-right:has(.ace26-group-lower:not(:empty)) { justify-content: safe end; }
.ace26-rail-left .ace26-group-middle:has(+ .ace26-group-lower),
.ace26-rail-right .ace26-group-middle:has(+ .ace26-group-lower) { margin-block: auto; }


.ace26-menu .ace26-actions, .ace26-card .ace26-actions, .ace26-combo .ace26-actions {
    display: grid;
    justify-content: stretch;
}
.ace26-card .ace26-actions {
    border-block-start: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    padding-block-start: var(--ace-gap, .75em);
}
.ace26-combo { display: flex; flex-direction: column-reverse; align-items: end; }

.ace26-bar .ace26-content { align-items: center; }
.ace26-bar .ace26-image {
    flex: 0 1 auto;
    width: auto;
    max-width: min(100%, 12rem);
    max-height: min(7rem, 15vh);
    align-self: center;
}
.ace26-bar .ace26-copy {
    display: flex;
    align-items: center;
    justify-content: var(--ace-align, start);
    flex-wrap: wrap;
    gap: var(--ace-gap, .5em);
}
.ace26-bar .ace26-actions { margin: 0; }
@media (max-width: 480px) {
    .ace26-bar .ace26-image { max-width: min(100%, 7rem); max-height: 4rem; }
    .ace26-bar .ace26-copy { flex-basis: 10rem; }
}

.ace26-embedded {
    display: grid;
    gap: var(--wp--style--block-gap, 1.25rem);
}
.ace26-embedded .ace26-bar .ace26-content {
    width: 100%;
    max-width: var(--ace-width, 100%);
    gap: var(--ace-gap, 1rem);
    padding: var(--ace-gap, clamp(1rem, 3vw, 2rem));
    background: var(--ace-bg, var(--ace-theme-surface, Canvas));
}
.ace26-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    align-items: center;
    gap: var(--wp--style--block-gap, 1.5rem);
    padding-block: clamp(1rem, 4vw, 3rem);
}
.ace26-hero .ace26-image {
    width: 100%;
    max-height: 26rem;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: var(--ace-fit, cover);
}
:where(.ace26-embedded .ace26-action) {
    display: inline-block;
    font: inherit;
    padding: .45em .75em;
}

.ace26-image-link { display: block; max-inline-size: 100%; }
.ace26 [data-image-side="end"] .ace26-image-link { order: 1; }
.ace26-hero > .ace26-image-link { min-inline-size: 0; }
.ace26-tab .ace26-image { display: block; max-width: 3rem; }
.ace26 dialog.ace26-popup {
    --ace-dialog-padding: var(--ace-gap, var(--wp--style--block-gap, 1rem));
    max-height: calc(100dvh - 24px);
}
.ace26 dialog.ace26-popup[style*="--ace-photo-width:"] {
    width: min(var(--ace-width, 100%), calc(100% - 24px),
        calc(min(var(--ace-photo-width), 68dvh * var(--ace-photo-ratio)) + 2 * var(--ace-dialog-padding) + 2px));
}
.ace26 .ace26-popup .ace26-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}
.ace26 .ace26-popup .ace26-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 68dvh;
    height: auto;
    margin-inline: auto;
    object-fit: contain;
}

.ace26[data-ace-shape="rounded"] .ace26-action { border-radius: 8px !important; }
.ace26[data-ace-shape="rounded"] .ace26-content { border-radius: 14px; }
.ace26[data-ace-shape="rounded"] dialog.ace26-popup { border-radius: 18px; }
.ace26[data-ace-shape="rounded"] .ace26-combo [data-ace-toggle] { border-radius: 50% !important; }
.ace26 .ace26-combo button.ace26-action[data-ace-toggle] {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    padding: .4rem;
    overflow-wrap: anywhere;
}
.ace26-preview-menu {
    grid-area: 1 / 1 / 2 / -1;
    justify-self: center;
    align-self: start;
    z-index: 1;
    pointer-events: auto;
    max-width: 100%;
    padding: .75rem;
    background: var(--ace-theme-surface, Canvas);
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 14px;
}
.ace26-preview-menu [aria-current="true"] {
    outline: 2px solid currentColor;
    outline-offset: -4px;
}

.ace26[data-ace-widgets]:has(.ace26-preview-menu) {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    row-gap: 6px;
}
.ace26[data-ace-widgets]:has(.ace26-preview-menu) .ace26-rail-top { grid-row: 2; }
.ace26[data-ace-widgets]:has(.ace26-preview-menu) :is(.ace26-rail-left, .ace26-rail-right) { grid-row: 3; }
.ace26[data-ace-widgets]:has(.ace26-preview-menu) .ace26-rail-bottom { grid-row: 4; }


.ace26 [data-ace-dismissable] {
    position: relative;
}
.ace26 button.ace26-close-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    margin: 0 0 .25rem auto;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: Canvas;
    color: CanvasText;
    font: 1.15rem/1 system-ui, sans-serif;
    cursor: pointer;
}
.ace26 .ace26-close-icon:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.ace26 :is(.ace26-hero, .ace26-menu:not(:has(.ace26-panel)), .ace26-stack, .ace26-bar, .ace26-card) > .ace26-close-icon {
    position: absolute;
    inset-block-start: .35rem;
    inset-inline-end: .35rem;
    z-index: 1;
}
.ace26 :is(.ace26-menu:not(:has(.ace26-panel)), .ace26-stack, .ace26-bar, .ace26-card) > .ace26-content {
    padding-block-start: calc(2.4rem + var(--ace-gap, .2rem));
}
.ace26 .ace26-hero[data-ace-dismissable] {
    padding-block-start: max(2.5rem, clamp(1rem, 4vw, 3rem));
}
.ace26 .ace26-combo > .ace26-close-icon { order: -1; }
.ace26-hero-preview {
    grid-area: 3 / 1 / 4 / -1;
    align-self: center;
    justify-self: center;
    width: min(100%, 52rem);
    max-height: 100%;
    overflow: auto;
    background: var(--ace-theme-surface, Canvas);
    pointer-events: auto;
}
.ace26-hero-preview > .ace26-hero { padding-inline: 1rem; }
.ace26-preview-menu { max-height: 45dvh; overflow: auto; }


.ace26 [data-ace-typography][style*="--ace-field-family:"] { font-family: var(--ace-field-family, inherit) !important; }
.ace26 [data-ace-typography][style*="--ace-field-color:"] { color: var(--ace-field-color) !important; }
.ace26 [data-ace-typography][style*="--ace-field-size:"] { font-size: var(--ace-field-size) !important; }
@media (width < 769px) {
    .ace26 [data-ace-typography][style*="--ace-field-mobile:"] { font-size: var(--ace-field-mobile) !important; }
}

.ace26-type-panel { margin-top: .5rem; }
.ace26-type-panel > summary { cursor: pointer; width: fit-content; }
.ace26-type-controls { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .5rem; }
.ace26-type-controls label { display: grid; gap: .25rem; }
.ace26-type-controls input[type="number"] { width: 6rem; }

.ace26[data-ace26-overlay-obstructed] .ace26-rail { visibility: hidden; }
@media (width < 769px) {
    .ace26[data-ace-widgets] :is(.ace26-widget .ace26-action, .ace26-close-icon),
    .ace26-embedded :is(.ace26-widget .ace26-action, .ace26-close-icon) {
        box-sizing: border-box;
        min-inline-size: min(100%, 48px);
        min-block-size: 48px;
    }
    .ace26 :is(.ace26-menu:not(:has(.ace26-panel)), .ace26-stack, .ace26-bar, .ace26-card) > .ace26-content {
        padding-block-start: calc(3.35rem + var(--ace-gap, .2rem));
    }
    .ace26 .ace26-hero[data-ace-dismissable] {
        padding-block-start: max(3.35rem, clamp(1rem, 4vw, 3rem));
    }
}
