/* Help4 Builder Suite 1.3.386
 * Help4 hard-reset redesign skin for visual studio.
 * Intentionally layered after builder-studio.css to avoid JS/template regressions.
 */

body.h4bs-builder-studio-body,
body.admin_page_h4bs-builder-studio {
    background: #090f19 !important;
    color: #e6eef8;
}

/* First-use page journey: keep starter choices on the canvas and out of wp-admin menus. */
.h4bs-builder-studio.has-start-journey .h4bs-preview-scale {
    opacity: 0.2;
    pointer-events: none;
}

.h4bs-start-journey[hidden],
.h4bs-copy-source-panel[hidden] {
    display: none !important;
}

.h4bs-start-journey {
    position: absolute;
    z-index: 40;
    top: 50%;
    left: 50%;
    width: min(720px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    padding: 20px;
    overflow: auto;
    transform: translate(-50%, -50%);
    border: 1px solid #b8c8d8;
    border-radius: 6px;
    background: #fff;
    color: #14293d;
    box-shadow: 0 16px 42px rgba(20, 41, 61, 0.2);
    box-sizing: border-box;
}

.h4bs-start-journey-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.h4bs-start-journey-head > .dashicons {
    width: 32px;
    height: 32px;
    font-size: 32px;
    line-height: 1;
    color: #0877c9;
}

.h4bs-start-journey-head h2 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: 0;
}

.h4bs-start-journey-head p {
    margin: 0;
    color: #4b5563;
}

.h4bs-start-journey-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.h4bs-start-choice {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 72px;
    padding: 12px;
    text-align: left;
    color: #14293d;
    border: 1px solid #b8c8d8;
    border-radius: 6px;
    background: #f8fbfe;
    cursor: pointer;
    box-sizing: border-box;
}

.h4bs-start-choice:hover,
.h4bs-start-choice:focus-visible {
    border-color: #0877c9;
    background: #edf7ff;
    outline: 2px solid transparent;
    box-shadow: 0 0 0 2px #0877c9;
}

.h4bs-start-choice > .dashicons {
    grid-row: 1 / span 2;
    align-self: center;
    width: 24px;
    height: 24px;
    font-size: 24px;
    color: #0877c9;
}

.h4bs-start-choice strong,
.h4bs-start-choice small {
    min-width: 0;
    letter-spacing: 0;
}

.h4bs-start-choice strong {
    font-size: 14px;
    line-height: 1.35;
}

.h4bs-start-choice small {
    color: #526579;
    font-size: 12px;
    line-height: 1.35;
}

.h4bs-copy-source-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #d7e1ea;
}

.h4bs-copy-source-panel label {
    display: block;
    margin-bottom: 6px;
}

.h4bs-copy-source-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.h4bs-copy-source-row select,
.h4bs-copy-source-row .button {
    min-height: 44px;
}

.h4bs-copy-source-row select {
    width: 100%;
    max-width: none;
}

.h4bs-start-journey-status {
    min-height: 20px;
    margin: 10px 0 0;
    color: #2f5d3a;
}

.h4bs-start-journey-status.is-error {
    color: #b42318;
}

@media (max-width: 600px) {
    .h4bs-start-journey {
        top: 8px;
        width: calc(100% - 16px);
        max-height: calc(100% - 16px);
        padding: 14px;
        transform: translateX(-50%);
    }

    .h4bs-start-journey-actions,
    .h4bs-copy-source-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .h4bs-start-choice {
        min-height: 58px;
    }

    .h4bs-copy-source-row .button {
        width: 100%;
    }
}

body.h4bs-builder-studio-body #wpbody-content,
body.admin_page_h4bs-builder-studio #wpbody-content {
    margin: 0 !important;
    min-height: 100vh;
}

.h4bs-builder-studio-wrap {
    --h4ds-bg-0: #070d17;
    --h4ds-bg-1: #0d1524;
    --h4ds-bg-2: #131f31;
    --h4ds-surface: #111c2d;
    --h4ds-surface-2: #18263b;
    --h4ds-card: #142238;
    --h4ds-card-2: #1a2d46;
    --h4ds-border: #2a3c57;
    --h4ds-border-strong: #41638f;
    --h4ds-text: #e8f0fb;
    --h4ds-muted: #9eb2cb;
    --h4ds-brand: #41b8ff;
    --h4ds-brand-2: #1f8ad6;
    --h4ds-accent: #7fd45a;
    --h4ds-danger: #ff6d8f;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background:
        radial-gradient(1200px 480px at -6% -20%, rgba(68, 174, 255, 0.32), transparent 58%),
        radial-gradient(1000px 420px at 104% -8%, rgba(127, 212, 90, 0.2), transparent 58%),
        linear-gradient(180deg, var(--h4ds-bg-1), var(--h4ds-bg-0));
    color: var(--h4ds-text);
}

.h4bs-builder-studio-header {
    position: sticky;
    top: 0;
    z-index: 400;
    margin: 0;
    padding: 6px 10px;
    border: 0;
    border-bottom: 1px solid rgba(65, 184, 255, 0.18);
    border-radius: 0;
    background:
        linear-gradient(120deg, rgba(15, 28, 46, 0.95), rgba(17, 38, 61, 0.95) 54%, rgba(20, 45, 70, 0.94));
    box-shadow: 0 10px 24px rgba(0, 7, 19, 0.42);
    backdrop-filter: blur(6px);
}

.h4bs-builder-studio-header h1 {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f3f8ff;
}

.h4bs-builder-studio-header p {
    margin: 2px 0 0;
    font-size: 10px;
    color: #a8bbd2;
}

.h4bs-builder-studio-header-actions {
    gap: 4px;
}

.h4bs-header-icon-btn {
    width: 26px;
    min-width: 26px;
    height: 26px;
    min-height: 26px;
    border-radius: 7px;
    border: 1px solid rgba(118, 150, 188, 0.46) !important;
    background: linear-gradient(180deg, rgba(24, 44, 70, 0.95), rgba(17, 33, 56, 0.95)) !important;
    color: #e5f0ff !important;
    box-shadow: 0 3px 8px rgba(0, 8, 24, 0.34);
}

.h4bs-header-icon-btn .dashicons {
    width: 13px;
    height: 13px;
    font-size: 13px;
    line-height: 13px;
}

.h4bs-header-icon-btn:hover,
.h4bs-header-icon-btn:focus {
    border-color: rgba(131, 204, 255, 0.8) !important;
    transform: translateY(-1px);
}

.h4bs-header-icon-btn.is-primary {
    background: linear-gradient(180deg, #7fd45a, #4da62a) !important;
    border-color: rgba(0, 0, 0, 0.24) !important;
    color: #10230d !important;
}

.h4bs-header-command-btn {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    font-weight: 700;
    gap: 6px;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
}

.h4bs-header-command-btn .dashicons {
    font-size: 18px;
    height: 18px;
    line-height: 18px;
    width: 18px;
}

.h4bs-header-command-btn > kbd {
    margin-left: 2px;
    padding: 1px 5px;
    border: 1px solid #b9c7d5;
    border-bottom-color: #8fa1b2;
    border-radius: 3px;
    background: #f7f9fb;
    color: #31475c;
    box-shadow: 0 1px 0 rgba(14, 31, 48, 0.14);
    font: 600 10px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.h4bs-page-status-badge {
    align-items: center;
    background: #f0f4f8;
    border: 1px solid #bdc8d4;
    border-radius: 999px;
    color: #30445a;
    display: inline-flex;
    font-size: 12px;
    font-weight: 750;
    min-height: 30px;
    padding: 0 10px;
    white-space: nowrap;
}

.h4bs-page-status-badge--publish {
    background: #e9f7ef;
    border-color: #8bc7a2;
    color: #17633f;
}

/* Keep the complete workspace inside the visible wp-admin viewport. */
.h4bs-builder-studio {
    grid-template-rows: minmax(0, calc(100vh - 55px - var(--wp-admin--admin-bar--height, 0px)));
    height: calc(100vh - 55px - var(--wp-admin--admin-bar--height, 0px));
    min-height: 0;
}

.h4bs-builder-studio {
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 12px;
    min-height: calc(100vh - 64px);
    padding: 12px;
}

.h4bs-builder-studio.is-side-collapsed {
    grid-template-columns: minmax(0, 1fr) 58px;
}

.h4bs-studio-main,
.h4bs-studio-side {
    border: 1px solid var(--h4ds-border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(21, 35, 55, 0.94), rgba(14, 26, 43, 0.96));
    box-shadow: 0 18px 40px rgba(0, 8, 20, 0.36);
}

.h4bs-studio-toolbar {
    border-bottom-color: rgba(64, 95, 134, 0.62);
    background: linear-gradient(180deg, rgba(19, 33, 52, 0.9), rgba(15, 27, 45, 0.96));
}

.h4bs-studio-status,
.h4bs-studio-separator {
    color: var(--h4ds-muted);
}

.h4bs-studio-device-switch strong,
.h4bs-studio-main h3,
.h4bs-studio-side h2 {
    color: #e8f2ff;
}

.h4bs-viewport-icon-btn {
    border-color: rgba(99, 130, 166, 0.7);
    background: linear-gradient(180deg, rgba(28, 47, 74, 0.95), rgba(19, 35, 56, 0.95));
    color: #dce8f8;
}

.h4bs-viewport-icon-btn.is-active {
    background: linear-gradient(180deg, #38b6ff, #1c7ac6);
    border-color: rgba(212, 239, 255, 0.75);
    color: #f4f9ff;
}

.h4bs-performance-coach {
    border-color: rgba(84, 120, 162, 0.82);
    background: linear-gradient(180deg, rgba(17, 34, 56, 0.94), rgba(18, 32, 52, 0.94));
    color: #dce8f9;
}

.h4bs-performance-coach-head span,
.h4bs-performance-coach-tips {
    color: #abc1dc;
}

.h4bs-studio-preview h3 {
    color: #eef4ff;
    margin-bottom: 8px;
}

.h4bs-preview-stage {
    border: 1px solid rgba(76, 110, 150, 0.72);
    border-radius: 14px;
    background:
        linear-gradient(45deg, rgba(76, 111, 152, 0.22), transparent 35%),
        linear-gradient(180deg, rgba(14, 25, 41, 0.95), rgba(10, 18, 31, 0.98));
}

.h4bs-preview-shell {
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(0, 5, 15, 0.52);
}

.h4bs-preview-canvas {
    border-radius: 12px;
    background: #fff;
}

.h4bs-preview-block {
    border: 1px dashed rgba(42, 116, 182, 0.42);
    border-radius: 12px;
}

.h4bs-preview-block:hover {
    border-color: rgba(92, 179, 255, 0.96);
    box-shadow: 0 0 0 1px rgba(76, 171, 255, 0.7);
}

.h4bs-preview-block.is-selected {
    border-color: rgba(127, 212, 90, 0.94);
    box-shadow: 0 0 0 1px rgba(127, 212, 90, 0.8), 0 10px 26px rgba(18, 68, 31, 0.25);
}

.h4bs-studio-side {
    padding: 10px;
}

.h4bs-side-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 86, 121, 0.56);
}

.h4bs-side-head-copy {
    min-width: 0;
}

.h4bs-side-panel-head h2 {
    margin: 0;
    letter-spacing: 0.02em;
}

.h4bs-side-head-copy p {
    margin: 4px 0 0;
    color: #a8bfd8;
    font-size: 11px;
    line-height: 1.35;
}

.h4bs-side-panel-body {
    display: grid;
    gap: 10px;
}

.h4bs-side-library-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
}

.h4bs-side-library-tab {
    min-height: 30px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, rgba(23, 40, 63, 0.95), rgba(15, 28, 47, 0.96)) !important;
    border-color: rgba(79, 111, 147, 0.78) !important;
    color: #b9d0e9 !important;
}

.h4bs-side-library-tab .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

.h4bs-side-library-tab.is-active {
    background: linear-gradient(180deg, #41b8ff, #1f8ad6) !important;
    border-color: rgba(185, 229, 255, 0.8) !important;
    color: #f3f9ff !important;
}

.h4bs-side-library-panel {
    display: grid;
    gap: 10px;
}

.h4bs-side-library-panel[hidden] {
    display: none !important;
}

.h4bs-studio-side.is-collapsed .h4bs-side-head-copy p {
    display: none;
}

.h4bs-element-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.h4bs-element-filter-btn {
    min-height: 28px;
    border-radius: 9px !important;
    background: linear-gradient(180deg, rgba(24, 42, 67, 0.9), rgba(19, 34, 56, 0.95)) !important;
    border-color: rgba(79, 111, 147, 0.72) !important;
    color: #c5daf2 !important;
}

.h4bs-element-filter-btn.is-active {
    background: linear-gradient(180deg, #41b8ff, #1f8ad6) !important;
    border-color: rgba(185, 229, 255, 0.8) !important;
    color: #f2f9ff !important;
}

.h4bs-element-group {
    border: 1px solid rgba(79, 111, 147, 0.46);
    border-radius: 10px;
    padding: 8px;
    background: linear-gradient(180deg, rgba(16, 30, 49, 0.78), rgba(14, 25, 41, 0.82));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.h4bs-element-group h4 {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #b8d1ea;
    grid-column: 1 / -1;
}

.h4bs-element-group .h4bs-library-tile {
    margin: 0;
    min-height: 88px;
}

.h4bs-element-search,
.h4bs-template-search,
.h4bs-site-kit-search,
.h4bs-widget-library input[type="search"],
.h4bs-viewport-select-row select,
.h4bs-field input[type="text"],
.h4bs-field input[type="number"],
.h4bs-field input[type="color"],
.h4bs-field select,
.h4bs-field textarea {
    border: 1px solid rgba(86, 119, 157, 0.74) !important;
    border-radius: 10px !important;
    background: #0f1d31 !important;
    color: #e4eefc !important;
}

.h4bs-library-tile {
    border: 1px solid rgba(79, 111, 147, 0.72);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(24, 42, 67, 0.9), rgba(19, 34, 56, 0.95));
    color: #deebfb;
}

.h4bs-theme-pack-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.h4bs-theme-pack-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-radius: 4px;
    background: #081a38;
}

.h4bs-theme-pack-thumb img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: top center;
}

.h4bs-theme-pack-card .h4bs-library-body {
    min-width: 0;
}

.h4bs-theme-pack-card .h4bs-library-meta {
    white-space: normal;
}

.h4bs-library-tile:hover {
    border-color: rgba(108, 193, 255, 0.94);
    box-shadow: 0 12px 20px rgba(0, 10, 23, 0.35);
    transform: translateY(-1px);
}

.h4bs-library-pill {
    background: rgba(70, 173, 255, 0.2);
    border-color: rgba(78, 183, 255, 0.56);
    color: #c7e6ff;
}

/* Visual Page Design library. The preview is generated from each preset's block tree. */
.h4bs-template-library-intro {
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #cdd8e4;
    border-radius: 5px;
    background: #f5f9fc;
    color: #243448;
}

.h4bs-template-library-intro strong {
    font-size: 13px;
    letter-spacing: 0;
}

.h4bs-template-library-intro span {
    color: #526579;
    font-size: 11px;
    line-height: 1.45;
}

.h4bs-template-use-cases {
    display: flex;
    gap: 6px;
    margin: 0 0 10px;
    padding: 1px 1px 5px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.h4bs-template-use-case {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #c7d2df;
    border-radius: 999px;
    background: #fff;
    color: #33485e;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
    cursor: pointer;
}

.h4bs-template-use-case:hover,
.h4bs-template-use-case:focus-visible,
.h4bs-template-use-case.is-active {
    border-color: #0877c9;
    background: #e9f5fe;
    color: #075f9f;
}

.h4bs-template-use-case:focus-visible {
    outline: 2px solid #0877c9;
    outline-offset: 1px;
}

.h4bs-template-results {
    min-height: 18px;
    margin: 7px 0;
    color: #627387;
    font-size: 11px;
}

.h4bs-template-card {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch;
    gap: 0;
    padding: 0 !important;
    overflow: hidden;
    cursor: pointer;
}

.h4bs-template-card:focus-visible {
    outline: 3px solid #0877c9;
    outline-offset: 2px;
}

.h4bs-template-card .h4bs-library-body {
    gap: 5px;
    padding: 10px;
}

.h4bs-template-card .h4bs-library-body > strong {
    color: #1f3145;
    font-size: 14px;
    line-height: 1.3;
}

.h4bs-template-card .h4bs-library-body > span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.h4bs-template-card .h4bs-library-actions {
    align-items: center;
    margin-top: 4px;
}

.h4bs-template-card .h4bs-library-actions .button {
    min-height: 40px;
}

.h4bs-template-drag-hint {
    flex: 1 1 110px;
    color: #6a7888 !important;
    font-size: 10px !important;
    text-align: right;
    white-space: normal !important;
}

.h4bs-template-visual {
    display: grid;
    align-content: start;
    width: 100%;
    overflow: hidden;
    border: 0;
    background: #fff;
    color: #20364c;
    box-sizing: border-box;
}

.h4bs-template-visual.is-card {
    height: 152px;
    border-bottom: 1px solid #d8e0e8;
    background: #edf2f7;
}

.h4bs-template-visual.is-large {
    min-height: 510px;
    border: 1px solid #ccd6e0;
    box-shadow: 0 8px 24px rgba(20, 41, 61, 0.12);
}

.h4bs-template-visual-band {
    display: grid;
    grid-template-columns: repeat(var(--h4bs-template-preview-columns, 1), minmax(0, 1fr));
    gap: 5px;
    min-height: 48px;
    padding: 8px;
    border-bottom: 1px solid rgba(32, 54, 76, 0.1);
    background: #fff;
    box-sizing: border-box;
}

.h4bs-template-visual.is-large .h4bs-template-visual-band {
    gap: 14px;
    min-height: 96px;
    padding: 24px;
}

.h4bs-template-visual-band.tone-surface_alt,
.h4bs-template-visual-band.tone-surface-alt {
    background: #eef4f8;
}

.h4bs-template-visual-band.tone-primary,
.h4bs-template-visual-band.tone-heading,
.h4bs-template-visual-band.tone-on_primary {
    background: #173a5e;
    color: #fff;
}

.h4bs-template-visual-column {
    display: grid;
    align-content: center;
    gap: 5px;
    min-width: 0;
}

.h4bs-template-visual-block {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 4px;
    overflow: hidden;
    border-radius: 3px;
    box-sizing: border-box;
}

.h4bs-template-visual.is-large .h4bs-template-visual-block {
    gap: 7px;
    padding: 8px;
}

.h4bs-template-visual-block strong,
.h4bs-template-visual-block span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 7px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h4bs-template-visual.is-large .h4bs-template-visual-block strong {
    font-size: 20px;
    white-space: normal;
}

.h4bs-template-visual.is-large .h4bs-template-visual-block span {
    font-size: 12px;
    white-space: normal;
}

.h4bs-template-visual-block i {
    justify-self: start;
    max-width: 100%;
    padding: 3px 6px;
    overflow: hidden;
    border-radius: 3px;
    background: #0877c9;
    color: #fff;
    font-size: 6px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h4bs-template-visual.is-large .h4bs-template-visual-block i {
    padding: 8px 12px;
    font-size: 11px;
}

.h4bs-template-visual-block b {
    display: block;
    width: 78%;
    height: 8px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.18;
}

.h4bs-template-visual-block.is-image,
.h4bs-template-visual-block.is-video,
.h4bs-template-visual-block.is-gallery,
.h4bs-template-visual-block.is-slider {
    place-content: center;
    min-height: 32px;
    background: #dbe7f0;
    text-align: center;
}

.h4bs-template-visual.is-large .h4bs-template-visual-block.is-image,
.h4bs-template-visual.is-large .h4bs-template-visual-block.is-video,
.h4bs-template-visual.is-large .h4bs-template-visual-block.is-gallery,
.h4bs-template-visual.is-large .h4bs-template-visual-block.is-slider {
    min-height: 140px;
}

.h4bs-template-visual-block .dashicons {
    width: 16px;
    height: 16px;
    margin: 0 auto;
    font-size: 16px;
}

.h4bs-template-visual.is-large .h4bs-template-visual-block .dashicons {
    width: 30px;
    height: 30px;
    font-size: 30px;
}

.h4bs-template-visual-placeholder {
    display: block;
    min-height: 20px;
    border: 1px dashed rgba(57, 87, 115, 0.28);
    border-radius: 3px;
}

.h4bs-template-preview-modal[hidden] {
    display: none !important;
}

.h4bs-template-preview-modal {
    position: fixed;
    z-index: 100100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 20, 31, 0.72);
    box-sizing: border-box;
}

.h4bs-template-preview-dialog {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: min(1160px, 100%);
    max-height: min(900px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid #bfcbd7;
    border-radius: 6px;
    background: #fff;
    color: #1e3044;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.h4bs-template-preview-head,
.h4bs-template-preview-toolbar,
.h4bs-template-preview-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #d8e0e8;
}

.h4bs-template-preview-head h2 {
    margin: 2px 0 0;
    color: #1d3044;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: 0;
}

.h4bs-template-preview-eyebrow {
    color: #50708d;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.h4bs-template-preview-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0 !important;
}

.h4bs-template-preview-toolbar {
    background: #f6f8fb;
}

.h4bs-template-preview-devices {
    display: flex;
    gap: 4px;
}

.h4bs-template-preview-devices .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 40px;
}

.h4bs-template-preview-devices .button.is-active {
    border-color: #0877c9;
    background: #0877c9;
    color: #fff;
}

.h4bs-template-preview-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    min-height: 0;
    overflow: hidden;
}

.h4bs-template-preview-stage {
    display: grid;
    justify-items: center;
    min-width: 0;
    padding: 24px;
    overflow: auto;
    background: #e8edf2;
}

.h4bs-template-preview-stage.is-tablet .h4bs-template-visual {
    width: min(720px, 100%);
}

.h4bs-template-preview-stage.is-mobile .h4bs-template-visual {
    width: min(390px, 100%);
}

.h4bs-template-preview-summary {
    padding: 20px;
    overflow: auto;
    border-left: 1px solid #d8e0e8;
}

.h4bs-template-preview-summary > p {
    margin: 0 0 18px;
    color: #445a70;
    line-height: 1.55;
}

.h4bs-template-preview-summary h3 {
    margin: 0 0 8px;
    color: #21364b;
    font-size: 14px;
    letter-spacing: 0;
}

.h4bs-template-preview-summary ul {
    margin: 0 0 20px 18px;
}

.h4bs-template-preview-summary li {
    margin-bottom: 5px;
}

.h4bs-template-preview-safety {
    padding: 10px;
    border: 1px solid #c9d9e8;
    border-radius: 4px;
    background: #f1f7fc;
    font-size: 11px;
}

.h4bs-template-preview-actions {
    justify-content: flex-end;
    border-top: 1px solid #d8e0e8;
    border-bottom: 0;
}

.h4bs-template-preview-actions .button {
    min-height: 44px;
}

.h4bs-template-preview-actions [data-h4bs-template-preview-secondary][hidden] {
    display: none !important;
}

@media (max-width: 800px) {
    .h4bs-template-preview-modal {
        padding: 8px;
    }

    .h4bs-template-preview-dialog {
        max-height: calc(100vh - 16px);
    }

    .h4bs-template-preview-content {
        grid-template-columns: minmax(0, 1fr);
        overflow: auto;
    }

    .h4bs-template-preview-stage {
        min-height: 360px;
        padding: 12px;
        overflow: visible;
    }

    .h4bs-template-preview-summary {
        border-top: 1px solid #d8e0e8;
        border-left: 0;
    }

    .h4bs-template-preview-toolbar,
    .h4bs-template-preview-actions {
        flex-wrap: wrap;
    }

    .h4bs-template-preview-devices {
        width: 100%;
    }

    .h4bs-template-preview-devices .button {
        flex: 1 1 0;
        justify-content: center;
        min-width: 44px;
    }

    .h4bs-template-preview-devices .button span:last-child {
        display: none;
    }

    .h4bs-template-preview-actions .button {
        flex: 1 1 140px;
    }
}

.h4bs-widget-group h4 {
    color: #c8dbf2;
}

.h4bs-widget-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.h4bs-widget-item .h4bs-library-body strong {
    color: #e7f1ff;
}

.h4bs-widget-item .h4bs-library-body span {
    color: #9ec0e2;
}

.h4bs-element-group .h4bs-library-body strong,
.h4bs-element-group .h4bs-library-body span {
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
}

.h4bs-widget-filter-btn.is-active,
.h4bs-studio-device-switch .button.is-active,
.h4bs-inspector-tabs .button.is-active {
    background: linear-gradient(180deg, #41b8ff, #1f8ad6) !important;
    border-color: rgba(185, 229, 255, 0.8) !important;
    color: #f2f9ff !important;
}

.h4bs-setting-finder {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    padding: 9px 10px;
    border-bottom: 1px solid #d8dee7;
    background: #f7f9fb;
}

.h4bs-setting-finder > label {
    display: block;
    min-width: 0;
}

.h4bs-setting-finder-input {
    width: 100%;
    min-height: 38px;
    margin: 0 !important;
    padding: 7px 34px 7px 10px !important;
    border: 1px solid #aebaca !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    color: #172333 !important;
    box-shadow: none !important;
}

.h4bs-setting-finder-input:focus {
    border-color: #1778bd !important;
    box-shadow: 0 0 0 2px rgba(23, 120, 189, 0.18) !important;
}

.h4bs-setting-finder-input::-webkit-search-cancel-button {
    display: none;
    -webkit-appearance: none;
}

.h4bs-setting-finder-shortcut {
    min-width: 28px;
    padding: 3px 7px;
    border: 1px solid #c2ccd8;
    border-radius: 4px;
    background: #ffffff;
    color: #526175;
    font: 600 12px/1.4 Consolas, Monaco, monospace;
    text-align: center;
}

.h4bs-setting-finder-clear {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #536175;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
}

.h4bs-setting-finder-clear:hover,
.h4bs-setting-finder-clear:focus-visible {
    background: #e4edf5;
    color: #173a58;
    outline: 2px solid #1778bd;
    outline-offset: 1px;
}

.h4bs-setting-finder-results {
    position: absolute;
    z-index: 60;
    top: calc(100% - 7px);
    right: 10px;
    left: 10px;
    max-height: min(360px, 50vh);
    overflow: auto;
    border: 1px solid #aebaca;
    border-radius: 5px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(22, 39, 58, 0.2);
}

.h4bs-setting-finder-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #e3e8ef;
    background: #ffffff;
    color: #172333;
    text-align: left;
    cursor: pointer;
}

.h4bs-setting-finder-result:last-child {
    border-bottom: 0;
}

.h4bs-setting-finder-result:hover,
.h4bs-setting-finder-result:focus-visible,
.h4bs-setting-finder-result.is-active {
    background: #edf7ff;
    outline: 0;
}

.h4bs-setting-finder-result strong,
.h4bs-setting-finder-result span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.h4bs-setting-finder-result span {
    color: #607087;
    font-size: 11px;
    text-align: right;
}

.h4bs-setting-finder-empty {
    margin: 0;
    padding: 12px;
    color: #617087;
}

.h4bs-field.is-setting-finder-target {
    border-radius: 5px;
    outline: 3px solid rgba(23, 120, 189, 0.28);
    outline-offset: 4px;
}

@media (max-width: 520px) {
    .h4bs-setting-finder {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .h4bs-setting-finder-shortcut {
        display: none;
    }

    .h4bs-setting-finder-result {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .h4bs-setting-finder-result span {
        text-align: left;
    }
}

.h4bs-editor-modal-backdrop {
    background: rgba(4, 9, 17, 0.74);
    backdrop-filter: blur(2px);
}

.h4bs-editor-modal,
.h4bs-navigator-modal,
.h4bs-mini-preview-modal {
    border: 1px solid rgba(73, 108, 148, 0.84);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(21, 36, 57, 0.98), rgba(16, 29, 47, 0.98));
    box-shadow: 0 16px 38px rgba(0, 6, 17, 0.48);
    color: #e1ecfb;
}

.h4bs-editor-modal-header,
.h4bs-navigator-modal-header,
.h4bs-mini-preview-modal-header {
    border-bottom: 1px solid rgba(73, 106, 145, 0.64);
    background: rgba(12, 26, 43, 0.86);
}

.h4bs-editor-modal-footer {
    border-top: 1px solid rgba(73, 106, 145, 0.64);
}

.h4bs-builder-brandbar {
    margin-top: 0;
    padding: 8px 12px;
    border-top: 1px solid rgba(68, 97, 131, 0.54);
    background: rgba(8, 18, 30, 0.86);
    color: #9eb2ca;
}

.h4bs-builder-brandbar a {
    color: #85d8ff;
}

@media (max-width: 1500px) {
    .h4bs-builder-studio {
        grid-template-columns: minmax(0, 1fr) 338px;
    }
}

@media (max-width: 1280px) {
    .h4bs-builder-studio {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .h4bs-builder-studio-header {
        position: relative;
    }
}

@media (max-width: 860px) {
    .h4bs-element-group {
        grid-template-columns: 1fr;
    }
}

/* 1.3.237: familiar three-pane visual-builder workspace. */
body.h4bs-builder-studio-body,
body.admin_page_h4bs-builder-studio {
    background: #e9edf2 !important;
    color: #172333;
}

body.h4bs-has-builder-inspector .h4bs-navigator-modal {
    right: 378px;
    z-index: 100003;
}

.h4bs-builder-studio-wrap {
    --h4ds-bg-0: #e9edf2;
    --h4ds-bg-1: #f4f6f8;
    --h4ds-bg-2: #ffffff;
    --h4ds-surface: #ffffff;
    --h4ds-surface-2: #f6f8fa;
    --h4ds-card: #ffffff;
    --h4ds-card-2: #f7f9fb;
    --h4ds-border: #d5dce5;
    --h4ds-border-strong: #aeb9c7;
    --h4ds-text: #172333;
    --h4ds-muted: #657286;
    --h4ds-brand: #1778bd;
    --h4ds-brand-2: #0f609c;
    --h4ds-accent: #70b83e;
    --h4ds-danger: #b23b48;
    min-height: 100vh;
    background: #e9edf2;
    color: var(--h4ds-text);
}

.h4bs-builder-studio-header {
    min-height: 50px;
    margin: 0;
    padding: 7px 10px;
    border: 0;
    border-bottom: 1px solid #111923;
    border-radius: 0;
    background: #202a36;
    box-shadow: 0 2px 8px rgba(16, 26, 38, 0.24);
    backdrop-filter: none;
}

.h4bs-builder-brand-lockup {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.h4bs-builder-brand-lockup img {
    display: block;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.h4bs-builder-studio-header h1 {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
}

.h4bs-builder-studio-header p {
    max-width: min(40vw, 520px);
    margin: 2px 0 0;
    overflow: hidden;
    color: #bdc8d5;
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h4bs-builder-studio-header-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.h4bs-header-icon-btn {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    border: 1px solid #455262 !important;
    border-radius: 5px;
    background: #2c3745 !important;
    box-shadow: none;
    color: #eef4fa !important;
}

.h4bs-header-icon-btn:hover,
.h4bs-header-icon-btn:focus {
    border-color: #83bce2 !important;
    background: #374556 !important;
    transform: none;
}

.h4bs-header-icon-btn.is-primary {
    border-color: #5ca331 !important;
    background: #70b83e !important;
    color: #10220c !important;
}

.h4bs-builder-studio {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 360px;
    grid-template-rows: minmax(0, calc(100vh - 51px));
    gap: 0;
    min-height: calc(100vh - 51px);
    padding: 0;
    align-items: stretch;
}

.h4bs-builder-studio.is-side-collapsed {
    grid-template-columns: 58px minmax(0, 1fr) 360px;
}

.h4bs-studio-main,
.h4bs-studio-side,
.h4bs-studio-inspector-empty {
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.h4bs-studio-main {
    grid-column: 2;
    grid-row: 1;
    background: #e9edf2;
    border-right: 1px solid #cbd3dd;
    border-left: 1px solid #cbd3dd;
}

.h4bs-studio-side {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    width: auto;
    padding: 0;
    overflow: hidden;
    border-right: 1px solid #cbd3dd;
    background: #ffffff;
    color: #172333;
}

.h4bs-studio-inspector-empty {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    color: #172333;
}

.h4bs-studio-inspector-empty[hidden] {
    display: none !important;
}

.h4bs-inspector-empty-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px;
    border-bottom: 1px solid #d8dee7;
    background: #f7f9fb;
}

.h4bs-inspector-empty-head strong {
    font-size: 13px;
}

.h4bs-inspector-empty-head span {
    color: #778497;
    font-size: 11px;
}

.h4bs-inspector-empty-tabs,
.h4bs-inspector-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #d8dee7;
    background: #ffffff;
}

.h4bs-inspector-empty-tabs span,
.h4bs-inspector-tabs .button {
    min-height: 40px;
    padding: 0 6px !important;
    border: 0 !important;
    border-right: 1px solid #e1e6ed !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #526175 !important;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 37px;
    text-align: center;
}

.h4bs-inspector-empty-tabs span:last-child,
.h4bs-inspector-tabs .button:last-child {
    border-right: 0 !important;
}

.h4bs-inspector-empty-tabs .is-active,
.h4bs-inspector-tabs .button.is-active {
    border-bottom-color: #1778bd !important;
    background: #f7fbff !important;
    color: #0f609c !important;
}

.h4bs-inspector-empty-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px;
    color: #647286;
    text-align: center;
}

.h4bs-inspector-empty-body > .dashicons {
    width: 34px;
    height: 34px;
    color: #8a98aa;
    font-size: 34px;
}

.h4bs-inspector-empty-body strong {
    color: #263548;
    font-size: 14px;
}

.h4bs-inspector-empty-body p {
    max-width: 28em;
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.55;
}

.h4bs-side-panel-head {
    flex: 0 0 auto;
    min-height: 42px;
    margin: 0;
    padding: 7px 8px 7px 12px;
    border-bottom: 1px solid #d8dee7;
    background: #f7f9fb;
}

.h4bs-side-panel-head h2,
.h4bs-studio-side h2 {
    margin: 0;
    color: #172333;
    font-size: 13px;
    letter-spacing: 0;
}

.h4bs-side-head-copy p {
    margin: 2px 0 0;
    color: #728094;
    font-size: 10px;
}

.h4bs-side-toggle {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0 !important;
    border-radius: 4px !important;
}

.h4bs-side-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.h4bs-side-panel-body {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    flex: 1 1 auto;
    gap: 0;
    max-height: none;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.h4bs-side-library-tabs {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    padding: 6px 5px;
    overflow: hidden;
    background: #202a36;
}

.h4bs-side-library-tab {
    display: inline-flex !important;
    width: 58px;
    min-width: 58px;
    height: 52px;
    min-height: 52px;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid transparent !important;
    border-radius: 5px !important;
    background: transparent !important;
    color: #bcc7d4 !important;
    font-size: 9px;
    line-height: 1.1;
    white-space: nowrap;
}

.h4bs-side-library-tab .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
}

.h4bs-side-library-tab:hover,
.h4bs-side-library-tab:focus {
    border-color: #4f5d6e !important;
    background: #303c4a !important;
    color: #ffffff !important;
}

.h4bs-side-library-tab.is-active {
    border-color: #1778bd !important;
    background: #1778bd !important;
    color: #ffffff !important;
}

.h4bs-side-library-panel {
    grid-column: 2;
    grid-row: 1;
    align-content: start;
    gap: 8px;
    min-height: 0;
    padding: 10px;
    overflow: auto;
    background: #ffffff;
}

.h4bs-modal-workflow-note {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    padding: 8px 10px;
    border-top: 1px solid #e0e5ec;
    background: #f7f9fb;
    color: #667589;
    font-size: 10px;
    line-height: 1.4;
}

.h4bs-html-quick-edit {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #a8c8e3;
    border-left: 4px solid #1778bd;
    border-radius: 6px;
    background: #f5faff;
}

.h4bs-html-quick-edit h4,
.h4bs-html-quick-edit p {
    margin: 0;
}

.h4bs-html-quick-edit h4 {
    color: #123a5a;
    font-size: 14px;
}

.h4bs-html-quick-edit-intro,
.h4bs-html-quick-edit-status,
.h4bs-html-quick-edit-warning {
    color: #526175;
    font-size: 12px;
    line-height: 1.5;
}

.h4bs-html-quick-edit-status {
    padding-top: 8px;
    border-top: 1px solid #d6e6f3;
    color: #315c3b;
    font-weight: 600;
}

.h4bs-html-quick-edit-status.is-error,
.h4bs-html-quick-edit-warning {
    color: #9d2f25;
}

.h4bs-html-quick-edit .h4bs-media-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.h4bs-html-quick-edit .h4bs-media-row > input {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
}

.h4bs-html-quick-edit .h4bs-media-row > .button {
    width: 100%;
    min-height: 36px;
    white-space: normal;
}

.h4bs-element-search,
.h4bs-template-search,
.h4bs-site-kit-search,
.h4bs-widget-library input[type="search"],
.h4bs-viewport-select-row select,
.h4bs-field input[type="text"],
.h4bs-field input[type="number"],
.h4bs-field input[type="color"],
.h4bs-field select,
.h4bs-field textarea {
    max-width: 100%;
    border: 1px solid #bac5d2 !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    color: #172333 !important;
    box-shadow: none !important;
}

.h4bs-color-control {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.h4bs-color-control .h4bs-color-swatch {
    width: 42px !important;
    height: 36px !important;
    min-height: 36px;
    padding: 3px !important;
    border: 1px solid #9daaba !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    cursor: pointer;
}

.h4bs-color-control .h4bs-color-hex {
    min-width: 0;
    height: 36px;
    font-family: Consolas, Menlo, monospace;
    text-transform: uppercase;
}

.h4bs-color-control .h4bs-color-hex[aria-invalid="true"] {
    border-color: #c9352b !important;
    box-shadow: 0 0 0 1px #c9352b !important;
}

.h4bs-color-control .h4bs-color-reset {
    min-height: 36px;
    padding-inline: 8px;
}

.h4bs-global-palette-preview {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    min-height: 34px;
    margin: -2px 0 12px;
    padding: 4px;
    border: 1px solid #d8dee7;
    border-radius: 5px;
    background: #ffffff;
}

.h4bs-theme-pack-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 10px;
}

.h4bs-theme-pack-tools .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding-inline: 7px;
    white-space: nowrap;
}

.h4bs-theme-pack-tools .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

@media (max-width: 1160px) {
    .h4bs-theme-pack-tools {
        grid-template-columns: 1fr;
    }
}

.h4bs-global-palette-preview span {
    min-width: 0;
    border: 1px solid rgba(23, 35, 51, 0.16);
    border-radius: 3px;
}

.h4bs-element-group,
.h4bs-content-group,
.h4bs-style-group {
    border: 1px solid #d8dee7;
    border-radius: 5px;
    background: #ffffff;
}

.h4bs-element-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
}

.h4bs-element-group h4,
.h4bs-widget-group h4 {
    color: #5d6c7e;
    letter-spacing: 0;
}

.h4bs-library-tile,
.h4bs-element-filter-btn {
    border: 1px solid #d5dce5 !important;
    border-radius: 5px !important;
    background: #f8fafc !important;
    box-shadow: none;
    color: #243448 !important;
}

.h4bs-library-tile:hover {
    border-color: #6ca9d2 !important;
    background: #f2f8fc !important;
    box-shadow: 0 3px 8px rgba(23, 55, 83, 0.11);
    transform: none;
}

.h4bs-element-group .h4bs-library-tile {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 34px auto;
    gap: 5px;
    min-height: 72px;
    padding: 7px;
    text-align: center;
}

.h4bs-element-group .h4bs-library-thumb {
    width: 100%;
    min-height: 34px;
    border: 0;
    background: transparent;
}

.h4bs-element-group .h4bs-library-body {
    align-content: start;
    min-width: 0;
}

.h4bs-element-group .h4bs-library-body strong {
    overflow-wrap: anywhere;
    color: #243448;
    font-size: 11px;
    line-height: 1.25;
}

.h4bs-element-group .h4bs-library-body span {
    display: none;
}

.h4bs-library-pill {
    border-color: #c4d9e8;
    background: #eaf4fb;
    color: #255d84;
}

.h4bs-studio-toolbar {
    align-items: center;
    flex: 0 0 auto;
    gap: 6px 12px;
    padding: 7px 10px;
    border-bottom: 1px solid #cbd3dd;
    background: #ffffff;
}

.h4bs-studio-device-switch {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.h4bs-viewport-icons {
    gap: 4px;
}

.h4bs-viewport-icon-btn {
    min-height: 28px;
    gap: 4px;
    padding: 3px 7px;
    border: 1px solid #c4cdd8;
    border-radius: 5px;
    background: #f7f9fb;
    color: #314257;
    font-size: 11px;
}

.h4bs-viewport-icon-btn.is-active,
.h4bs-frame-toggle.is-active,
.h4bs-studio-device-switch .button.is-active {
    border-color: #1778bd !important;
    background: #1778bd !important;
    color: #ffffff !important;
}

.h4bs-viewport-select-row,
.h4bs-viewport-frame-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.h4bs-viewport-select-row label,
.h4bs-viewport-frame-label {
    color: #647286;
    font-size: 10px;
}

.h4bs-studio-status {
    flex: 1 1 100%;
    margin: 0;
    color: #667589;
    font-size: 10px;
}

.h4bs-studio-separator {
    margin: 0 5px;
    color: #abb5c1;
}

.h4bs-performance-coach {
    flex: 1 1 100%;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid #d8dee7;
    border-radius: 5px;
    background: #f7f9fb;
    color: #344559;
}

.h4bs-performance-coach-head {
    margin: 0;
    color: #344559;
}

.h4bs-performance-coach-head span {
    color: #667589;
}

.h4bs-performance-coach-tips:empty {
    display: none;
}

.h4bs-studio-preview {
    min-height: 0;
    padding: 0;
    background: #e9edf2;
}

.h4bs-studio-preview > h3 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.h4bs-preview-stage {
    min-height: 0;
    padding: 14px;
    border: 0;
    border-radius: 0;
    background: #dfe4ea;
}

.h4bs-preview-shell {
    border-radius: 5px;
    box-shadow: 0 6px 18px rgba(30, 46, 64, 0.2);
}

.h4bs-preview-canvas,
.h4bs-preview-block {
    border-radius: 4px;
}

.h4bs-preview-block.is-selected {
    border-color: #1778bd;
    box-shadow: 0 0 0 2px rgba(23, 120, 189, 0.35);
}

.h4bs-editor-modal-backdrop {
    display: none !important;
}

.h4bs-editor-modal {
    position: fixed;
    inset: 51px 0 0 auto;
    width: 360px;
    max-height: none;
    border: 0;
    border-left: 1px solid #cbd3dd;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    color: #172333;
    transform: none;
    z-index: 100002;
}

.h4bs-editor-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 10px 0 12px;
    border-bottom: 1px solid #d8dee7;
    background: #f7f9fb;
    color: #172333;
    cursor: default;
}

.h4bs-editor-modal-header > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h4bs-inspector-live-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #435467;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.h4bs-inspector-live-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #19945b;
    content: "";
}

.h4bs-inspector-live-status.is-updating::before {
    background: #d97706;
}

.h4bs-inspector-live-status.is-fallback::before {
    background: #64748b;
}

.h4bs-shortcode-builder {
    gap: 10px;
}

.h4bs-shortcode-builder-head,
.h4bs-shortcode-parameter-row,
.h4bs-shortcode-tag {
    display: flex;
    align-items: center;
    gap: 7px;
}

.h4bs-shortcode-builder-head {
    justify-content: space-between;
    padding: 9px 10px;
    border: 1px solid #cbd3dd;
    background: #f7f9fb;
}

.h4bs-shortcode-builder-head span {
    color: #536579;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.h4bs-shortcode-parameters {
    display: grid;
    gap: 7px;
}

.h4bs-shortcode-tag {
    justify-content: space-between;
    color: #536579;
    font-size: 11px;
}

.h4bs-shortcode-parameter-row {
    grid-template-columns: minmax(86px, 0.75fr) minmax(120px, 1.25fr) 30px;
}

.h4bs-shortcode-parameter-row input {
    min-width: 0;
}

.h4bs-shortcode-parameter-row input.is-invalid {
    border-color: #b42318;
}

.h4bs-shortcode-parameter-row .button-link-delete {
    display: inline-grid;
    width: 30px;
    min-height: 30px;
    place-items: center;
    padding: 0;
}

.h4bs-shortcode-add-parameter {
    justify-self: start;
}

.h4bs-shortcode-suggestions {
    border: 1px solid #cbd3dd;
    background: #fbfcfe;
}

.h4bs-shortcode-suggestions > summary {
    padding: 9px 10px;
    color: #263548;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.h4bs-shortcode-suggestion-search {
    width: calc(100% - 16px);
    margin: 0 8px 8px;
}

.h4bs-shortcode-suggestion-list {
    display: grid;
    max-height: 290px;
    overflow: auto;
    border-top: 1px solid #d8dee7;
}

.h4bs-shortcode-suggestion {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 7px;
    padding: 8px;
    border-bottom: 1px solid #e5eaf0;
}

.h4bs-shortcode-suggestion label {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #435467;
    font-size: 11px;
    font-weight: 600;
}

.h4bs-shortcode-suggestion label code {
    color: #738297;
    font-size: 10px;
    font-weight: 400;
}

.h4bs-shortcode-suggestion input,
.h4bs-shortcode-suggestion select {
    min-width: 0;
}

.h4bs-shortcode-suggestion .button {
    min-height: 30px;
}

.h4bs-shortcode-raw {
    padding-top: 4px;
    border-top: 1px solid #d8dee7;
}

.h4bs-shortcode-raw summary {
    margin-bottom: 7px;
    color: #435467;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.h4bs-shortcode-raw textarea {
    width: 100%;
    font-family: Consolas, Menlo, monospace;
    font-size: 12px;
}

.h4bs-advanced-element-settings {
    display: grid;
    gap: 10px;
}

.h4bs-editor-modal-body {
    min-height: 0;
    padding: 0;
    overflow: auto;
    color: #172333;
}

.h4bs-editor-modal-body .h4bs-inspector-panels {
    padding: 10px;
}

.h4bs-design-context-controls {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    gap: 8px;
    margin: -10px -10px 10px;
    padding: 10px;
    border-bottom: 1px solid #cbd3dd;
    background: #f7f9fb;
    box-shadow: 0 4px 10px rgba(23, 55, 83, 0.06);
}

.h4bs-design-context-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.h4bs-design-context-label {
    color: #647286;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.h4bs-design-segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #bac5d2;
    border-radius: 5px;
    background: #ffffff;
}

.h4bs-design-context-button {
    display: inline-flex;
    min-width: 0;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 6px;
    border: 0;
    border-right: 1px solid #d8dee7;
    background: #ffffff;
    color: #425268;
    font-size: 10px;
    cursor: pointer;
}

.h4bs-design-context-button:last-child {
    border-right: 0;
}

.h4bs-design-context-button .dashicons {
    width: 15px;
    height: 15px;
    font-size: 15px;
    line-height: 15px;
}

.h4bs-design-context-button:hover,
.h4bs-design-context-button:focus {
    background: #edf5fb;
    color: #0f609c;
}

.h4bs-design-context-button.is-active {
    background: #1778bd;
    color: #ffffff;
}

.h4bs-design-context-hint {
    margin: 0;
    color: #667589;
    font-size: 10px;
    line-height: 1.4;
}

.h4bs-design-clear-context {
    justify-self: start;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #b8c4d1;
    border-radius: 5px;
    background: #ffffff;
    color: #34465c;
    font-size: 10px;
    cursor: pointer;
}

.h4bs-design-clear-context:disabled {
    opacity: 0.45;
    cursor: default;
}

.h4bs-field.is-design-inherited {
    padding-left: 7px;
    border-left: 2px solid #9aa8b8;
}

.h4bs-field.has-design-override {
    padding-left: 7px;
    border-left: 2px solid #1778bd;
}

.h4bs-design-override-meta {
    display: flex;
    min-height: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    color: #718095;
    font-size: 9px;
}

.has-design-override .h4bs-design-override-meta {
    color: #0f609c;
}

.h4bs-design-reset-field {
    display: inline-flex;
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #c7d0db;
    border-radius: 4px;
    background: #ffffff;
    color: #526175;
    cursor: pointer;
}

.h4bs-design-reset-field .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
    line-height: 14px;
}

.h4bs-design-reset-field:disabled {
    opacity: 0.35;
    cursor: default;
}

.h4bs-editor-modal-footer {
    padding: 8px 10px;
    border-top: 1px solid #d8dee7;
    background: #f7f9fb;
}

.h4bs-content-group-toggle,
.h4bs-style-group-toggle {
    border-radius: 0;
    background: #f3f6f9;
    color: #263548;
}

.h4bs-navigator-modal,
.h4bs-mini-preview-modal {
    border: 1px solid #bbc5d1;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(24, 39, 56, 0.22);
    color: #172333;
}

.h4bs-navigator-modal-header,
.h4bs-mini-preview-modal-header {
    border-bottom: 1px solid #d8dee7;
    background: #f7f9fb;
}

.h4bs-builder-brandbar {
    display: none;
}

.h4bs-studio-side.is-collapsed {
    width: auto;
    padding: 0;
}

.h4bs-studio-side.is-collapsed .h4bs-side-panel-head {
    justify-content: center;
    padding: 7px 5px;
}

.h4bs-studio-side.is-collapsed .h4bs-side-head-copy,
.h4bs-studio-side.is-collapsed .h4bs-side-panel-body {
    display: none;
}

@media (max-width: 1500px) {
    .h4bs-builder-studio {
        grid-template-columns: 288px minmax(0, 1fr) 330px;
    }

    .h4bs-builder-studio.is-side-collapsed {
        grid-template-columns: 58px minmax(0, 1fr) 330px;
    }

    .h4bs-editor-modal {
        width: 330px;
    }
}

@media (max-width: 1180px) {
    .h4bs-builder-studio {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .h4bs-builder-studio.is-side-collapsed {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .h4bs-studio-inspector-empty {
        display: none;
    }

    .h4bs-editor-modal {
        width: min(360px, 42vw);
        box-shadow: -8px 0 20px rgba(22, 37, 54, 0.16);
    }

    body.h4bs-has-builder-inspector .h4bs-navigator-modal {
        right: calc(min(360px, 42vw) + 16px);
    }
}

/* Compact laptops use a real library drawer so the canvas remains usable. */
@media (max-width: 1180px) and (min-width: 801px) {
    .h4bs-builder-studio,
    .h4bs-builder-studio.is-side-collapsed,
    .h4bs-builder-studio.has-inspector,
    .h4bs-builder-studio.has-inspector.is-side-collapsed {
        grid-template-columns: minmax(0, 1fr) 330px;
        position: relative;
    }

    .h4bs-studio-main {
        grid-column: 1;
    }

    .h4bs-studio-side {
        bottom: 0;
        box-shadow: 10px 0 24px rgba(22, 37, 54, 0.2);
        left: 0;
        max-height: 100%;
        min-height: 0;
        position: absolute;
        top: 0;
        width: min(360px, calc(100vw - 80px));
        z-index: 100003;
    }

    .h4bs-studio-side.is-collapsed {
        border: 1px solid #cbd3dd;
        border-radius: 4px;
        bottom: 10px;
        box-shadow: 0 4px 14px rgba(22, 37, 54, 0.18);
        height: 44px;
        left: 10px;
        min-height: 44px;
        position: fixed;
        top: auto;
        width: 44px;
    }

    .h4bs-studio-side.is-collapsed .h4bs-side-panel-head {
        height: 42px;
        padding: 6px;
    }

    .h4bs-studio-side.is-collapsed .h4bs-side-toggle {
        height: 30px;
        min-height: 30px;
        width: 30px;
    }

    .h4bs-header-command-btn > span:not(.dashicons) {
        display: none;
    }
}

@media (max-width: 800px) {
    .h4bs-builder-studio-header {
        position: sticky;
        flex-wrap: wrap;
    }

    .h4bs-builder-studio-header-actions {
        width: 100%;
    }

    .h4bs-builder-studio {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(540px, calc(100vh - 94px)) auto;
    }

    .h4bs-builder-studio.is-side-collapsed {
        grid-template-columns: 1fr;
    }

    .h4bs-studio-main {
        grid-column: 1;
        grid-row: 1;
        border: 0;
    }

    .h4bs-studio-side {
        grid-column: 1;
        grid-row: 2;
        min-height: 520px;
        border-top: 1px solid #cbd3dd;
    }

    .h4bs-editor-modal {
        inset: 94px 0 0 auto;
        width: min(420px, 100vw);
    }

    body.h4bs-has-builder-inspector .h4bs-navigator-modal {
        inset: 104px 8px auto;
        width: auto;
        max-height: calc(100vh - 112px);
        z-index: 100004;
    }

    .h4bs-studio-device-switch {
        width: 100%;
    }
}

/* Final viewport accounting wins over the legacy Studio dimensions above. */
.h4bs-builder-studio {
    grid-template-rows: minmax(0, calc(100vh - 55px - var(--wp-admin--admin-bar--height, 0px)));
    height: calc(100vh - 55px - var(--wp-admin--admin-bar--height, 0px));
    min-height: 0;
}

.h4bs-context-help {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #155ea8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.h4bs-context-help:hover,
.h4bs-context-help:focus-visible {
    color: #0a3f76;
    text-decoration: underline;
}

.h4bs-context-help:focus-visible {
    border-radius: 3px;
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.h4bs-context-help .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
}

.h4bs-side-head-copy .h4bs-context-help {
    margin-top: 3px;
}

.h4bs-inspector-empty-body > .h4bs-context-help {
    justify-content: center;
    margin-top: 10px;
}

.h4bs-editor-modal-header .h4bs-context-help--compact {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

.h4bs-editor-modal-header > .h4bs-context-help--compact + .button-link {
    margin-left: 2px;
}

.h4bs-navigator-modal-body > p .h4bs-context-help,
.h4bs-mini-preview-modal-body > p .h4bs-context-help {
    margin-top: 2px;
}

.h4bs-builder-help-menu {
    position: relative;
    flex: 0 0 28px;
    margin: 0;
    color: #172333;
}

.h4bs-builder-help-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    list-style: none;
    cursor: pointer;
}

.h4bs-builder-help-menu > summary::-webkit-details-marker {
    display: none;
}

.h4bs-builder-help-menu[open] > summary {
    border-color: #83bce2 !important;
    background: #374556 !important;
}

.h4bs-builder-help-menu > summary:focus-visible {
    outline: 2px solid #9ed2f3;
    outline-offset: 2px;
}

.h4bs-builder-quick-help-panel {
    position: fixed;
    top: 48px;
    right: 10px;
    z-index: 100020;
    width: min(520px, calc(100vw - 20px));
    max-height: calc(100vh - 60px);
    padding: 12px;
    overflow: auto;
    border: 1px solid #b9c5d2;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(17, 35, 55, 0.24);
    color: #172333;
    letter-spacing: 0;
}

.h4bs-builder-quick-help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px 10px;
    border-bottom: 1px solid #d8dee7;
}

.h4bs-builder-quick-help-head strong {
    color: #172333;
    font-size: 14px;
}

.h4bs-builder-quick-help-head a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0f609c;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.h4bs-builder-quick-help-search {
    display: grid;
    gap: 5px;
    padding: 10px 2px 0;
}

.h4bs-builder-quick-help-search-field {
    position: relative;
}

.h4bs-builder-quick-help-search-field > .dashicons-search {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    color: #50637a;
    font-size: 18px;
    line-height: 18px;
    pointer-events: none;
}

.h4bs-builder-quick-help-search input[type="search"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 5px 38px 5px 34px;
    border: 1px solid #aebdcb;
    border-radius: 5px;
    background: #ffffff;
    color: #172333;
    font-size: 13px;
    line-height: 1.4;
}

.h4bs-collection-editor { display:grid; gap:10px; }
.h4bs-collection-editor-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; border:1px solid #c8d7e5; border-radius:6px; }
.h4bs-collection-editor-row legend { grid-column:1/-1; font-weight:700; }
.h4bs-collection-editor-row label { display:grid; gap:3px; }
.h4bs-collection-editor-row textarea { min-height:64px; resize:vertical; }
.h4bs-collection-editor-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:6px; }
.h4bs-collection-preset-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.h4bs-modal-validation { margin:0 0 12px; padding:10px 12px; border-left:4px solid #d63638; background:#fff5f5; color:#2c3338; }
.h4bs-modal-validation ul { margin:.5rem 0 0 1.25rem; list-style:disc; }
@media (max-width:700px) { .h4bs-collection-editor-row { grid-template-columns:1fr; } }

.h4bs-builder-quick-help-search input[type="search"]:focus {
    border-color: #2271b1;
    outline: 2px solid rgba(34, 113, 177, 0.22);
    outline-offset: 1px;
    box-shadow: none;
}

.h4bs-builder-quick-help-search-field [data-h4bs-quick-help-clear] {
    position: absolute;
    top: 3px;
    right: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    color: #50637a;
    cursor: pointer;
}

.h4bs-builder-quick-help-search-field [data-h4bs-quick-help-clear]:hover,
.h4bs-builder-quick-help-search-field [data-h4bs-quick-help-clear]:focus-visible {
    background: #e8f2f9;
    color: #0a4d80;
}

.h4bs-builder-quick-help-search-field [data-h4bs-quick-help-clear]:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

.h4bs-builder-quick-help-status {
    margin: 0;
    color: #50637a;
    font-size: 11px;
    line-height: 1.4;
}

.h4bs-builder-quick-help-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-top: 10px;
}

.h4bs-builder-quick-help-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid #d8e1ea;
    border-radius: 5px;
    background: #f7f9fb;
    color: #263548;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.h4bs-builder-quick-help-links a[hidden],
.h4bs-builder-quick-help-search-field [data-h4bs-quick-help-clear][hidden],
.h4bs-builder-quick-help-empty[hidden] {
    display: none;
}

.h4bs-builder-quick-help-empty {
    margin: 10px 0 0;
    padding: 14px;
    border: 1px dashed #b8c6d4;
    border-radius: 5px;
    background: #f7f9fb;
    color: #50637a;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.h4bs-builder-quick-help-links a:hover,
.h4bs-builder-quick-help-links a:focus-visible,
.h4bs-builder-quick-help-head a:hover,
.h4bs-builder-quick-help-head a:focus-visible {
    border-color: #8ebcda;
    background: #edf7fd;
    color: #0a4d80;
}

.h4bs-builder-quick-help-links a:focus-visible,
.h4bs-builder-quick-help-head a:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.h4bs-builder-quick-help-links .dashicons {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: #1778bd;
    font-size: 18px;
    line-height: 18px;
}

.h4bs-toolbar-help {
    margin-left: 2px;
    white-space: nowrap;
}

.h4bs-performance-coach-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.h4bs-performance-help {
    margin-left: auto;
    white-space: nowrap;
}

.h4bs-related-help-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 10px;
    font-size: 11px;
    line-height: 1.4;
}

.h4bs-related-help-links a {
    color: #155ea8;
    font-weight: 600;
    text-decoration: none;
}

.h4bs-related-help-links a:hover,
.h4bs-related-help-links a:focus-visible {
    color: #0a3f76;
    text-decoration: underline;
}

.h4bs-related-help-links a:focus-visible {
    border-radius: 3px;
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.h4bs-editor-related-help {
    justify-content: flex-start;
    padding: 7px 10px;
    border-top: 1px solid #d8dee7;
    background: #ffffff;
    color: #647286;
}

@media (max-width: 420px) {
    .h4bs-editor-modal-header .h4bs-context-help--compact span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }
}

@media (max-width: 800px) {
    .h4bs-builder-quick-help-panel {
        top: 92px;
        right: 8px;
        width: calc(100vw - 16px);
        max-height: calc(100vh - 104px);
    }

    .h4bs-builder-quick-help-links {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 1.3.347: reclaim canvas space and group secondary workspace controls. */
.h4bs-builder-tools-menu {
    position: relative;
    flex: 0 0 28px;
    margin: 0;
}

.h4bs-builder-tools-menu > summary {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 0;
    list-style: none;
    cursor: pointer;
}

.h4bs-builder-tools-menu > summary::-webkit-details-marker {
    display: none;
}

.h4bs-builder-tools-menu[open] > summary {
    border-color: #83bce2 !important;
    background: #374556 !important;
}

.h4bs-builder-tools-menu > summary:focus-visible {
    outline: 2px solid #9ed2f3;
    outline-offset: 2px;
}

.h4bs-builder-tools-panel {
    position: fixed;
    top: 48px;
    right: 10px;
    z-index: 100021;
    display: grid;
    width: min(270px, calc(100vw - 20px));
    max-height: calc(100vh - 60px);
    gap: 4px;
    padding: 8px;
    overflow: auto;
    border: 1px solid #b9c5d2;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(17, 35, 55, 0.24);
}

.h4bs-builder-tools-panel .h4bs-header-icon-btn {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 38px;
    justify-items: start;
    gap: 8px;
    padding: 6px 9px !important;
    border-color: #d2dae4 !important;
    background: #f7f9fb !important;
    color: #263548 !important;
    text-align: left;
    text-decoration: none;
}

.h4bs-builder-tools-panel .h4bs-header-icon-btn:hover,
.h4bs-builder-tools-panel .h4bs-header-icon-btn:focus-visible {
    border-color: #8ebcda !important;
    background: #edf7fd !important;
    color: #0a4d80 !important;
}

.h4bs-builder-tools-panel .screen-reader-text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
}

.h4bs-builder-studio:not(.has-inspector) {
    grid-template-columns: 300px minmax(0, 1fr);
}

.h4bs-builder-studio:not(.has-inspector).is-side-collapsed {
    grid-template-columns: 58px minmax(0, 1fr);
}

.h4bs-builder-studio:not(.has-inspector) .h4bs-studio-inspector-empty {
    display: none;
}

.h4bs-builder-studio.is-canvas-focus,
.h4bs-builder-studio.is-canvas-focus.is-side-collapsed,
.h4bs-builder-studio.is-canvas-focus.has-inspector {
    grid-template-columns: minmax(0, 1fr);
}

.h4bs-builder-studio.is-canvas-focus .h4bs-studio-main {
    grid-column: 1;
    border-right: 0;
    border-left: 0;
}

.h4bs-builder-studio.is-canvas-focus .h4bs-studio-side,
.h4bs-builder-studio.is-canvas-focus .h4bs-studio-inspector-empty {
    display: none;
}

/* Accurate review is a focused, true-pixel surface. Exact Device is never
 * miniaturized to fit the editor; the viewport scrolls when space is tight. */
.h4bs-builder-studio.is-parity-mode,
.h4bs-builder-studio.is-parity-mode.is-side-collapsed,
.h4bs-builder-studio.is-parity-mode.has-inspector {
    grid-template-columns: minmax(0, 1fr) !important;
}

.h4bs-builder-studio.is-parity-mode .h4bs-studio-main {
    grid-column: 1 !important;
    border-right: 0;
    border-left: 0;
}

.h4bs-builder-studio.is-parity-mode .h4bs-studio-side,
.h4bs-builder-studio.is-parity-mode .h4bs-studio-inspector-empty {
    display: none !important;
}

@media (max-width: 782px) {
    body.h4bs-parity-mode .h4bs-builder-studio-header-actions {
        display: none !important;
    }

    body.h4bs-parity-mode .h4bs-builder-studio-header {
        min-height: 48px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    body.h4bs-parity-mode [data-h4bs-viewport-group]:not(.is-active) {
        display: none !important;
    }
}

.h4bs-builder-studio.is-canvas-focus .h4bs-studio-toolbar {
    min-height: 38px;
    padding: 4px 8px;
}

.h4bs-builder-studio.is-canvas-focus .h4bs-viewport-select-row,
.h4bs-builder-studio.is-canvas-focus .h4bs-viewport-frame-row,
.h4bs-builder-studio.is-canvas-focus .h4bs-studio-status,
.h4bs-builder-studio.is-canvas-focus .h4bs-performance-coach {
    display: none;
}

body.h4bs-canvas-focus .h4bs-builder-studio-header p {
    display: none;
}

.h4bs-performance-coach > summary {
    list-style: none;
    cursor: pointer;
}

.h4bs-performance-coach > summary::-webkit-details-marker {
    display: none;
}

.h4bs-performance-coach > summary::after {
    margin-left: auto;
    color: #647286;
    content: "+";
    font-size: 15px;
    font-weight: 700;
}

.h4bs-performance-coach[open] > summary::after {
    content: "\2212";
}

.h4bs-performance-coach-body {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-top: 6px;
}

.h4bs-performance-coach-body .h4bs-performance-coach-tips {
    flex: 1 1 auto;
}

@media (max-width: 1500px) {
    .h4bs-builder-studio:not(.has-inspector) {
        grid-template-columns: 288px minmax(0, 1fr);
    }

    .h4bs-builder-studio:not(.has-inspector).is-side-collapsed {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .h4bs-builder-studio.is-canvas-focus,
    .h4bs-builder-studio.is-canvas-focus.is-side-collapsed,
    .h4bs-builder-studio.is-canvas-focus.has-inspector {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 800px) {
    .h4bs-builder-tools-panel {
        top: 92px;
        right: 8px;
        width: min(300px, calc(100vw - 16px));
        max-height: calc(100vh - 104px);
    }

    .h4bs-builder-studio:not(.has-inspector),
    .h4bs-builder-studio:not(.has-inspector).is-side-collapsed,
    .h4bs-builder-studio.is-canvas-focus,
    .h4bs-builder-studio.is-canvas-focus.is-side-collapsed,
    .h4bs-builder-studio.is-canvas-focus.has-inspector {
        grid-template-columns: minmax(0, 1fr);
    }

    .h4bs-builder-studio.is-canvas-focus {
        grid-template-rows: minmax(540px, calc(100vh - 94px));
    }

    .h4bs-builder-studio {
        position: relative;
        grid-template-rows: minmax(540px, calc(100vh - 94px));
        overflow: hidden;
    }

    .h4bs-studio-side {
        position: absolute;
        inset: 0 auto 0 0;
        grid-column: 1;
        grid-row: 1;
        z-index: 100003;
        width: min(360px, calc(100vw - 30px));
        min-height: 0;
        max-height: 100%;
        border-top: 0;
        box-shadow: 10px 0 24px rgba(22, 37, 54, 0.2);
    }

    .h4bs-studio-side.is-collapsed {
        position: fixed;
        inset: auto auto 8px 8px;
        width: 44px;
        height: 44px;
        min-height: 44px;
        border: 1px solid #cbd3dd;
        border-radius: 4px;
        box-shadow: 0 4px 14px rgba(22, 37, 54, 0.18);
    }
}

/* 1.3.371: one authoritative responsive shell after all legacy layout layers. */
.h4bs-builder-studio-wrap {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body.admin-bar .h4bs-builder-studio-wrap {
    height: calc(100vh - 32px) !important;
    min-height: 0 !important;
}

.h4bs-builder-studio-header {
    flex: 0 0 auto;
}

.h4bs-studio-main {
    box-sizing: border-box;
}

.h4bs-builder-studio,
.h4bs-builder-studio.is-side-collapsed,
.h4bs-builder-studio.has-inspector,
.h4bs-builder-studio.has-inspector.is-side-collapsed {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
}

@media (min-width: 801px) and (max-width: 1180px) {
    .h4bs-builder-studio,
    .h4bs-builder-studio.is-side-collapsed,
    .h4bs-builder-studio.has-inspector,
    .h4bs-builder-studio.has-inspector.is-side-collapsed,
    .h4bs-builder-studio:not(.has-inspector),
    .h4bs-builder-studio:not(.has-inspector).is-side-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .h4bs-studio-main {
        grid-column: 1;
        width: 100%;
        min-width: 0;
    }

    .h4bs-studio-side {
        bottom: 8px;
        left: 8px;
        top: 8px;
        max-height: calc(100% - 16px);
    }

    .h4bs-studio-side.is-collapsed {
        bottom: 10px;
        left: 10px;
        top: auto;
    }
}

@media (max-width: 800px) {
    .h4bs-builder-studio-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 7px 8px;
    }

    .h4bs-builder-brand-lockup {
        min-height: 36px;
    }

    .h4bs-builder-studio-header-actions {
        display: grid;
        grid-template-columns: repeat(5, minmax(44px, 1fr));
        gap: 4px;
        width: 100%;
        overflow: visible;
    }

    .h4bs-builder-studio-header-actions > :not(.h4bs-page-status-badge) {
        box-sizing: border-box;
        width: 100%;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        margin: 0;
    }

    .h4bs-builder-studio-header-actions > details > summary {
        width: 100%;
        height: 44px;
        min-height: 44px;
    }

    .h4bs-page-status-badge {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .h4bs-header-command-btn {
        padding: 0;
    }

    .h4bs-header-command-btn > span:not(.dashicons) {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .h4bs-builder-studio,
    .h4bs-builder-studio.is-side-collapsed,
    .h4bs-builder-studio.has-inspector,
    .h4bs-builder-studio.has-inspector.is-side-collapsed,
    .h4bs-builder-studio:not(.has-inspector),
    .h4bs-builder-studio:not(.has-inspector).is-side-collapsed,
    .h4bs-builder-studio.is-canvas-focus,
    .h4bs-builder-studio.is-canvas-focus.is-side-collapsed,
    .h4bs-builder-studio.is-canvas-focus.has-inspector {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }

    .h4bs-studio-main {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        min-width: 0;
    }

    .h4bs-editor-modal {
        inset: 142px 0 0 auto;
        max-height: calc(100vh - 142px);
    }

    body.h4bs-has-builder-inspector .h4bs-navigator-modal,
    .h4bs-builder-tools-panel {
        top: 142px;
        max-height: calc(100vh - 150px);
    }

    .h4bs-editor-modal-footer {
        display: grid;
        grid-template-areas:
            "save save"
            "remove cancel";
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 6px;
        padding: 8px 10px;
    }

    .h4bs-editor-modal-footer .button {
        width: 100%;
        min-height: 44px;
        margin: 0 !important;
        white-space: normal;
    }

    .h4bs-editor-modal-footer [data-h4bs-modal-save] {
        grid-area: save;
    }

    .h4bs-editor-modal-footer [data-h4bs-modal-delete] {
        grid-area: remove;
    }

    .h4bs-editor-modal-footer [data-h4bs-modal-cancel] {
        grid-area: cancel;
    }
}

@media (min-width: 601px) and (max-width: 782px) {
    body.admin-bar .h4bs-builder-studio-wrap {
        height: calc(100vh - 46px) !important;
    }
}

@media (max-width: 600px) {
    body.admin-bar .h4bs-builder-studio-wrap {
        height: 100vh !important;
    }
}

/* 1.3.373: canvas-first workspace with a roomy, user-resizable inspector. */
/* 1.3.374: inspector-wide setting finder with keyboard navigation. */
.h4bs-builder-studio-wrap {
    --h4bs-inspector-width: 420px;
}

.h4bs-editor-modal {
    width: min(var(--h4bs-inspector-width), calc(100vw - 1px));
    z-index: 100006;
}

.h4bs-editor-modal-resize {
    position: absolute;
    inset: 0 auto 0 -8px;
    z-index: 2;
    width: 16px;
    border: 0;
    background: transparent;
    cursor: ew-resize;
    touch-action: none;
}

.h4bs-editor-modal-resize > span {
    position: absolute;
    top: 50%;
    left: 6px;
    width: 4px;
    height: 52px;
    border-radius: 3px;
    background: #91a2b5;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
    transform: translateY(-50%);
    transition: background 120ms ease, height 120ms ease;
}

.h4bs-editor-modal-resize:hover > span,
.h4bs-editor-modal-resize:focus-visible > span,
body.h4bs-is-resizing-inspector .h4bs-editor-modal-resize > span {
    height: 72px;
    background: #1778bd;
}

.h4bs-editor-modal-resize:focus-visible {
    outline: 3px solid rgba(23, 120, 189, 0.45);
    outline-offset: -3px;
}

body.h4bs-is-resizing-inspector,
body.h4bs-is-resizing-inspector * {
    cursor: ew-resize !important;
    user-select: none !important;
}

.h4bs-editor-modal-header {
    min-height: 48px;
    grid-template-columns: minmax(0, 1fr) auto auto 40px;
}

.h4bs-editor-modal-header > .button-link[data-h4bs-modal-cancel] {
    display: inline-flex;
    width: 40px;
    min-width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.h4bs-editor-modal-body {
    padding: 14px 16px;
}

.h4bs-editor-modal-body .h4bs-field input[type="text"],
.h4bs-editor-modal-body .h4bs-field input[type="number"],
.h4bs-editor-modal-body .h4bs-field input[type="url"],
.h4bs-editor-modal-body .h4bs-field input[type="email"],
.h4bs-editor-modal-body .h4bs-field select,
.h4bs-editor-modal-body .h4bs-field textarea,
.h4bs-editor-modal-body .button,
.h4bs-editor-modal-footer .button {
    min-height: 40px;
}

@media (min-width: 1181px) {
    .h4bs-builder-studio.has-inspector,
    .h4bs-builder-studio.has-inspector.is-side-collapsed {
        grid-template-columns: 58px minmax(0, 1fr) var(--h4bs-inspector-width);
    }

    .h4bs-builder-studio-header-actions > .h4bs-header-icon-btn,
    .h4bs-builder-studio-header-actions > details > summary.h4bs-header-icon-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }

    .h4bs-builder-studio-header-actions > .h4bs-header-icon-btn .dashicons,
    .h4bs-builder-studio-header-actions > details > summary.h4bs-header-icon-btn .dashicons {
        width: 18px;
        height: 18px;
        font-size: 18px;
        line-height: 18px;
    }
}

@media (min-width: 801px) and (max-width: 1180px) {
    .h4bs-builder-studio.has-inspector,
    .h4bs-builder-studio.has-inspector.is-side-collapsed {
        grid-template-columns: minmax(0, 1fr) var(--h4bs-inspector-width);
    }

    .h4bs-builder-studio.has-inspector .h4bs-studio-main,
    .h4bs-builder-studio.has-inspector.is-side-collapsed .h4bs-studio-main {
        grid-column: 1;
    }

    .h4bs-builder-studio-header-actions > .h4bs-header-icon-btn,
    .h4bs-builder-studio-header-actions > details > summary.h4bs-header-icon-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }
}

@media (max-width: 800px) {
    .h4bs-editor-modal-resize {
        display: none;
    }

    .h4bs-editor-modal {
        width: min(420px, 100vw);
        z-index: 100006;
    }

    .h4bs-editor-modal-header {
        grid-template-columns: minmax(0, 1fr) auto 40px;
    }

    .h4bs-inspector-live-status {
        display: none;
    }
}

/* 1.3.379: readable workspace-fit canvas and task-first page checks. */
.h4bs-studio-toolbar {
    position: relative;
}

.h4bs-preview-settings-disclosure {
    position: relative;
}

.h4bs-preview-settings-disclosure > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    box-sizing: border-box;
    padding: 4px 9px;
    border: 1px solid #c5d2df;
    border-radius: 5px;
    background: #fff;
    color: #263b50;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.h4bs-preview-settings-disclosure > summary::-webkit-details-marker {
    display: none;
}

.h4bs-preview-settings-disclosure > summary::after {
    content: "\25be";
    font-size: 10px;
}

.h4bs-preview-settings-disclosure[open] > summary {
    border-color: #1778bd;
    box-shadow: 0 0 0 1px #1778bd;
}

.h4bs-preview-settings-disclosure[open] > summary::after {
    content: "\25b4";
}

.h4bs-preview-settings-body {
    display: none;
}

.h4bs-preview-settings-disclosure[open] .h4bs-preview-settings-body {
    display: flex;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 90;
    width: min(720px, calc(100vw - 340px));
    flex-wrap: wrap;
    gap: 8px 12px;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(23, 40, 58, 0.2);
}

.h4bs-viewport-control-divider {
    width: 1px;
    height: 24px;
    margin: 0 2px;
    background: #cbd5df;
}

.h4bs-studio-feedback-row {
    display: flex;
    flex: 1 1 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.h4bs-studio-save-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    margin: 0;
    padding: 4px 9px;
    border: 1px solid #b8d8c1;
    border-radius: 5px;
    background: #f3fbf5;
    color: #214d32;
    font-size: 11px;
    line-height: 1.35;
}

.h4bs-studio-save-status .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.h4bs-studio-diagnostics {
    position: relative;
    margin-left: auto;
}

.h4bs-studio-diagnostics > summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    box-sizing: border-box;
    padding: 4px 9px;
    border: 1px solid #c5d2df;
    border-radius: 5px;
    background: #fff;
    color: #263b50;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.h4bs-studio-diagnostics > summary::-webkit-details-marker {
    display: none;
}

.h4bs-studio-diagnostics > summary::after {
    content: "\25be";
    margin-left: 2px;
    font-size: 10px;
}

.h4bs-studio-diagnostics[open] > summary {
    border-color: #1778bd;
    box-shadow: 0 0 0 1px #1778bd;
}

.h4bs-studio-diagnostics[open] > summary::after {
    content: "\25b4";
}

.h4bs-studio-diagnostics-panel {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 100;
    width: min(560px, calc(100vw - 48px));
    max-height: min(70vh, 560px);
    overflow: auto;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(23, 40, 58, 0.2);
}

.h4bs-studio-diagnostics-panel .h4bs-studio-status {
    display: block;
    margin: 0;
    color: #506176;
    font-size: 11px;
    line-height: 1.6;
}

.h4bs-studio-diagnostics-panel .h4bs-performance-coach {
    display: block;
    margin-top: 10px;
    padding: 8px 10px;
}

.h4bs-preview-stage.is-workspace-fit {
    align-items: flex-start;
}

.h4bs-builder-studio.is-canvas-focus .h4bs-studio-feedback-row {
    display: none;
}

@media (min-width: 801px) {
    .h4bs-studio-feedback-row {
        position: absolute;
        right: 10px;
        bottom: 7px;
        width: auto;
        flex: 0 0 auto;
    }
}

@media (max-width: 800px) {
    .h4bs-studio-toolbar {
        gap: 5px;
        padding: 5px 8px;
    }

    .h4bs-studio-device-switch {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        gap: 5px;
    }

    .h4bs-viewport-icons {
        display: flex;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .h4bs-preview-settings-disclosure > summary {
        min-height: 40px;
        padding: 5px 9px;
    }

    .h4bs-preview-settings-disclosure[open] .h4bs-preview-settings-body {
        display: grid;
        right: auto;
        left: 0;
        width: min(360px, calc(100vw - 16px));
        gap: 8px;
    }

    .h4bs-preview-settings-body .h4bs-viewport-select-row,
    .h4bs-preview-settings-body .h4bs-viewport-frame-row {
        flex-wrap: wrap;
    }

    .h4bs-preview-settings-body .h4bs-viewport-select-row select {
        max-width: 210px;
    }

    .h4bs-viewport-control-divider {
        display: none;
    }

    .h4bs-studio-feedback-row {
        grid-column: 1 / -1;
        align-items: stretch;
    }

    .h4bs-studio-save-status,
    .h4bs-studio-diagnostics > summary {
        min-height: 40px;
    }

    .h4bs-studio-diagnostics-panel {
        position: fixed;
        top: 148px;
        right: 8px;
        left: 8px;
        width: auto;
        max-height: calc(100vh - 164px);
    }
}

/* 1.3.384: selected-element actions and contextual insertion. */
.h4bs-selection-bar {
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 6px 12px;
    min-height: 42px;
    box-sizing: border-box;
    padding: 5px 10px;
    border-bottom: 1px solid #cbd3dd;
    background: #f6f9fc;
    color: #263b50;
}

.h4bs-selection-bar[hidden],
.h4bs-selection-inside[hidden],
.h4bs-insert-target[hidden] {
    display: none !important;
}

.h4bs-selection-summary,
.h4bs-selection-controls,
.h4bs-selection-inside {
    display: flex;
    align-items: center;
}

.h4bs-selection-summary {
    min-width: 0;
    gap: 5px;
    font-size: 11px;
    white-space: nowrap;
}

.h4bs-selection-summary .dashicons {
    width: 17px;
    height: 17px;
    color: #1778bd;
    font-size: 17px;
}

.h4bs-selection-summary strong {
    min-width: 0;
    max-width: 260px;
    overflow: hidden;
    color: #172333;
    text-overflow: ellipsis;
}

.h4bs-selection-controls {
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    padding: 1px;
    scrollbar-width: thin;
}

.h4bs-selection-controls .button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 30px;
    box-sizing: border-box;
    margin: 0;
    white-space: nowrap;
}

.h4bs-selection-controls .button .dashicons {
    width: 15px;
    height: 15px;
    font-size: 15px;
}

.h4bs-selection-inside {
    gap: 4px;
}

.h4bs-selection-inside select {
    min-height: 30px;
    max-width: 112px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 11px;
}

.h4bs-selection-icon {
    width: 30px;
    min-width: 30px;
    padding: 0 !important;
}

.h4bs-selection-icon.is-danger {
    border-color: #d8a8a8;
    color: #9c2222;
}

.h4bs-selection-divider {
    flex: 0 0 1px;
    align-self: stretch;
    margin: 2px 3px;
    background: #d2dae3;
}

.h4bs-selection-status {
    grid-column: 1 / -1;
    min-height: 0;
    margin: 0;
    color: #506176;
    font-size: 11px;
    line-height: 1.25;
}

.h4bs-selection-status:empty {
    display: none;
}

.h4bs-insert-target {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    padding: 7px 8px;
    border: 1px solid #9bc7e8;
    border-radius: 4px;
    background: #eef8ff;
    color: #174d73;
    font-size: 11px;
    line-height: 1.35;
}

.h4bs-insert-target .dashicons {
    width: 17px;
    height: 17px;
    font-size: 17px;
}

.h4bs-insert-target .button-link {
    min-height: 30px;
    padding: 3px 5px;
}

.h4bs-builder-studio.is-canvas-focus .h4bs-selection-bar {
    display: none;
}

@media (max-width: 1180px) {
    .h4bs-selection-bar {
        grid-template-columns: minmax(0, 1fr);
    }

    .h4bs-selection-controls {
        justify-content: flex-start;
    }

    .h4bs-selection-status {
        grid-column: 1;
    }
}

@media (max-width: 800px) {
    .h4bs-selection-bar {
        gap: 4px;
        padding: 5px 8px;
    }

    .h4bs-selection-summary {
        min-height: 28px;
    }

    .h4bs-builder-studio .h4bs-selection-controls .button,
    .h4bs-builder-studio .h4bs-selection-inside select,
    .h4bs-builder-studio .h4bs-selection-icon {
        height: 44px !important;
        min-height: 44px !important;
    }

    .h4bs-builder-studio .h4bs-selection-icon {
        width: 44px !important;
        min-width: 44px !important;
    }
}

/* 1.3.386: plain-language Quick Actions. */
body.h4bs-quick-actions-is-open {
    overflow: hidden;
}

.h4bs-quick-actions-modal[hidden],
.h4bs-quick-actions-empty[hidden] {
    display: none !important;
}

.h4bs-quick-actions-modal {
    position: fixed;
    z-index: 100120;
    inset: 0;
    display: grid;
    place-items: start center;
    padding: max(48px, 8vh) 20px 20px;
    background: rgba(11, 22, 34, 0.72);
}

.h4bs-quick-actions-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - max(68px, 8vh) - 20px));
    overflow: hidden;
    border: 1px solid #c5d0db;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(4, 19, 32, 0.34);
    color: #172334;
}

.h4bs-quick-actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px 13px;
    border-bottom: 1px solid #dbe3ea;
}

.h4bs-quick-actions-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #52677b;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.4;
    text-transform: uppercase;
}

.h4bs-quick-actions-header h2 {
    margin: 0;
    color: #142235;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0;
}

.h4bs-quick-actions-close {
    display: inline-grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 4px;
    color: #31455a;
    font-size: 30px;
    line-height: 1;
    text-decoration: none;
}

.h4bs-quick-actions-close:hover,
.h4bs-quick-actions-close:focus-visible {
    background: #eef3f7;
    color: #142235;
}

.h4bs-quick-actions-body {
    min-height: 0;
    overflow: hidden;
    padding: 14px 18px 0;
}

.h4bs-quick-actions-search-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 12px;
    border: 2px solid #9baebf;
    border-radius: 5px;
    background: #fff;
}

.h4bs-quick-actions-search-wrap:focus-within {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.h4bs-quick-actions-search-wrap > .dashicons {
    color: #49647c;
}

.h4bs-quick-actions-search-wrap input[type="search"] {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: #182b3d;
    font-size: 16px;
}

.h4bs-quick-actions-search-wrap kbd,
.h4bs-quick-actions-footer kbd {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    min-height: 22px;
    padding: 1px 5px;
    border: 1px solid #becad5;
    border-bottom-color: #95a5b5;
    border-radius: 3px;
    background: #f6f8fa;
    color: #40566b;
    box-shadow: 0 1px 0 rgba(14, 31, 48, 0.12);
    font: 650 11px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.h4bs-quick-actions-list {
    max-height: min(520px, calc(100vh - 260px));
    margin-top: 12px;
    overflow: auto;
    border-top: 1px solid #e1e7ed;
}

.h4bs-quick-action {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 62px;
    margin: 0;
    padding: 9px 10px;
    border: 0;
    border-bottom: 1px solid #e1e7ed;
    border-radius: 0;
    background: #fff;
    color: #1c3247;
    text-align: left;
    cursor: pointer;
}

.h4bs-quick-action > .dashicons:first-child {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background: #eaf3fa;
    color: #176ba7;
}

.h4bs-quick-action > .dashicons:last-child {
    color: #6a7e91;
}

.h4bs-quick-action-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.h4bs-quick-action-copy strong {
    color: #172b3e;
    font-size: 14px;
    line-height: 1.35;
}

.h4bs-quick-action-copy > span {
    color: #52687c;
    font-size: 12px;
    line-height: 1.4;
}

.h4bs-quick-action:hover,
.h4bs-quick-action:focus-visible,
.h4bs-quick-action.is-active {
    background: #eef6fc;
    outline: 0;
    box-shadow: inset 3px 0 0 #2271b1;
}

.h4bs-quick-action:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    box-shadow: none;
}

.h4bs-quick-actions-empty {
    margin: 14px 0;
    padding: 18px;
    border: 1px dashed #b9c7d4;
    border-radius: 5px;
    background: #f7fafc;
    color: #52687c;
    text-align: center;
}

.h4bs-quick-actions-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    border-top: 1px solid #dbe3ea;
    background: #f7f9fb;
    color: #52677b;
    font-size: 11px;
    line-height: 1.4;
}

.h4bs-quick-actions-footer span:last-child {
    margin-left: auto;
    text-align: right;
}

@media (max-width: 800px) {
    .h4bs-quick-actions-modal {
        place-items: start stretch;
        padding: 6px;
    }

    .h4bs-quick-actions-dialog {
        width: 100%;
        max-height: calc(100vh - 12px);
    }

    .h4bs-quick-actions-header,
    .h4bs-quick-actions-body,
    .h4bs-quick-actions-footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .h4bs-quick-actions-header h2 {
        font-size: 20px;
    }

    .h4bs-quick-actions-list {
        max-height: calc(100vh - 250px);
    }

    .h4bs-quick-action {
        min-height: 68px;
    }

    .h4bs-quick-actions-footer {
        flex-wrap: wrap;
    }

    .h4bs-quick-actions-footer span:last-child {
        flex-basis: 100%;
        margin-left: 0;
        text-align: left;
    }
}

@media (max-width: 1180px) {
    .h4bs-header-command-btn > kbd {
        display: none;
    }
}

/* 1.3.385: guided review and publishing workspace. */
body.h4bs-review-is-open {
    overflow: hidden;
}

.h4bs-review-modal[hidden],
.h4bs-review-dialog [hidden] {
    display: none !important;
}

.h4bs-review-modal {
    position: fixed;
    z-index: 100100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(11, 22, 34, 0.72);
}

.h4bs-review-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid #c9d2dc;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(8, 22, 36, 0.28);
    color: #172334;
}

.h4bs-review-header,
.h4bs-review-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    background: #fff;
}

.h4bs-review-header {
    border-bottom: 1px solid #dbe2e8;
}

.h4bs-review-footer {
    align-items: flex-end;
    border-top: 1px solid #dbe2e8;
}

.h4bs-review-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #4c6074;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
}

.h4bs-review-header h2 {
    margin: 0;
    color: #142235;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 0;
}

.h4bs-review-close {
    display: inline-grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 4px;
    color: #31455a;
    font-size: 30px;
    line-height: 1;
    text-decoration: none;
}

.h4bs-review-close:hover,
.h4bs-review-close:focus-visible {
    background: #eef3f7;
    color: #142235;
}

.h4bs-review-body {
    min-height: 0;
    overflow: auto;
    padding: 22px;
}

.h4bs-review-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 12px;
    padding: 14px 16px;
    border-left: 4px solid #2271b1;
    background: #f3f8fc;
}

.h4bs-review-status {
    grid-row: 1 / 3;
    align-self: center;
    min-width: 82px;
    padding: 5px 8px;
    border: 1px solid #8ca4b8;
    border-radius: 4px;
    background: #fff;
    color: #24435e;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.h4bs-review-summary strong,
.h4bs-review-summary p {
    margin: 0;
}

.h4bs-review-summary strong {
    font-size: 16px;
    line-height: 1.35;
}

.h4bs-review-summary p {
    color: #4c6074;
    line-height: 1.45;
}

.h4bs-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
    gap: 28px;
    margin-top: 22px;
}

.h4bs-review-layout h3 {
    margin: 0 0 10px;
    color: #172334;
    font-size: 16px;
    line-height: 1.35;
}

.h4bs-review-checks ul {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid #dbe2e8;
    list-style: none;
}

.h4bs-review-check {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    margin: 0;
    padding: 12px 2px;
    border-bottom: 1px solid #dbe2e8;
}

.h4bs-review-check .dashicons {
    width: 22px;
    height: 22px;
    font-size: 22px;
}

.h4bs-review-check.is-pass .dashicons {
    color: #13824b;
}

.h4bs-review-check.is-warn .dashicons {
    color: #996800;
}

.h4bs-review-check.is-block .dashicons {
    color: #b32d2e;
}

.h4bs-review-check strong,
.h4bs-review-check small {
    display: block;
}

.h4bs-review-check strong {
    margin-bottom: 2px;
    color: #172334;
    font-size: 13px;
}

.h4bs-review-check small {
    color: #526579;
    font-size: 12px;
    line-height: 1.45;
}

.h4bs-review-devices {
    padding-left: 22px;
    border-left: 1px solid #dbe2e8;
}

.h4bs-review-devices > p {
    margin: 0 0 14px;
    color: #526579;
    line-height: 1.5;
}

.h4bs-review-device-buttons {
    display: grid;
    gap: 8px;
}

.h4bs-review-device-buttons .button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    padding: 7px 12px;
}

.h4bs-review-device-buttons .button.is-reviewed {
    border-color: #13824b;
    background: #effaf4;
    color: #0d6037;
}

.h4bs-review-device-buttons .button.is-reviewed::after {
    margin-left: auto;
    content: "Checked";
    font-size: 11px;
    font-weight: 700;
}

.h4bs-review-action-status {
    flex: 1 1 200px;
    min-height: 20px;
    margin: 0;
    color: #526579;
    font-weight: 600;
    line-height: 1.4;
}

.h4bs-review-action-status.is-success {
    color: #0d6037;
}

.h4bs-review-action-status.is-error {
    color: #b32d2e;
}

.h4bs-review-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.h4bs-review-actions .button {
    min-height: 44px;
    padding: 7px 14px;
}

@media (max-width: 800px) {
    .h4bs-review-modal {
        place-items: stretch;
        padding: 6px;
    }

    .h4bs-review-dialog {
        width: 100%;
        max-height: calc(100vh - 12px);
    }

    .h4bs-review-header,
    .h4bs-review-body,
    .h4bs-review-footer {
        padding: 14px;
    }

    .h4bs-review-header h2 {
        font-size: 20px;
    }

    .h4bs-review-summary,
    .h4bs-review-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .h4bs-review-status {
        grid-row: auto;
        justify-self: start;
    }

    .h4bs-review-layout {
        gap: 20px;
    }

    .h4bs-review-devices {
        padding: 18px 0 0;
        border-top: 1px solid #dbe2e8;
        border-left: 0;
    }

    .h4bs-review-footer {
        display: grid;
        align-items: stretch;
    }

    .h4bs-review-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .h4bs-review-actions .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: auto;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .h4bs-review-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}
.h4bs-actual-page-preview {
    min-height: 44px;
    border-color: #2563eb !important;
    color: #174ea6 !important;
    font-weight: 700;
    white-space: nowrap;
}

.h4bs-actual-page-preview.is-active {
    background: #174ea6 !important;
    color: #fff !important;
}

.h4bs-preview-asset-status {
    max-width: 34rem;
    padding: 8px 12px;
    border: 2px solid #b45309;
    border-radius: 6px;
    background: #fff7ed;
    color: #7c2d12;
    font-weight: 700;
}

/* 1.3.397: usable top-level commands and targets in compact staff workspaces. */
.h4bs-compact-label {
    display: none;
}

.h4bs-builder-studio-header-actions > .h4bs-header-icon-btn,
.h4bs-builder-studio-header-actions > details > summary.h4bs-header-icon-btn,
.h4bs-builder-studio-header-actions > .h4bs-header-command-btn,
.h4bs-viewport-icon-btn,
.h4bs-preview-settings-disclosure > summary,
.h4bs-editor-modal-body .button,
.h4bs-editor-modal-footer .button,
.h4bs-editor-modal-header > .button-link[data-h4bs-modal-cancel] {
    min-height: 44px !important;
}

@media (min-width: 801px) {
    .h4bs-builder-studio-header-actions > .h4bs-header-icon-btn,
    .h4bs-builder-studio-header-actions > details > summary.h4bs-header-icon-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }
}

@media (max-width: 800px) {
    .h4bs-builder-studio-header-actions {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        padding: 1px 0;
    }

    .h4bs-builder-studio-header-actions > :not(.h4bs-page-status-badge) {
        width: 100%;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }

    .h4bs-builder-studio-header-actions > details > summary,
    .h4bs-builder-studio-header-actions > .h4bs-header-icon-btn,
    .h4bs-builder-studio-header-actions > .h4bs-header-command-btn {
        display: inline-flex;
        width: auto;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0 10px;
    }

    .h4bs-builder-studio-header-actions .h4bs-compact-label {
        display: inline;
        white-space: nowrap;
    }

    .h4bs-builder-studio-header-actions .h4bs-header-command-btn > span:not(.dashicons) {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        clip-path: none;
        white-space: nowrap;
        border: 0;
    }

    .h4bs-builder-command-menu,
    .h4bs-builder-command-menu > summary {
        width: 100%;
        min-width: 0;
        height: 44px;
        min-height: 44px;
        margin: 0;
    }

    .h4bs-builder-studio-header-actions > details > summary {
        width: 100% !important;
        min-width: 0;
    }

    .h4bs-builder-studio-header-actions > .h4bs-builder-help-menu,
    .h4bs-builder-studio-header-actions > .h4bs-builder-tools-menu,
    .h4bs-builder-studio-header-actions > .h4bs-builder-command-menu {
        width: 100% !important;
        min-width: 0;
    }

    .h4bs-builder-command-menu {
        position: relative;
    }

    .h4bs-builder-command-menu > summary {
        display: inline-flex;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0 6px !important;
        list-style: none;
        cursor: pointer;
    }

    .h4bs-builder-command-menu > summary::-webkit-details-marker {
        display: none;
    }

    .h4bs-builder-command-menu[open] > summary {
        border-color: #83bce2 !important;
        background: #374556 !important;
    }

    .h4bs-builder-command-menu > summary:focus-visible {
        outline: 3px solid #9ed2f3;
        outline-offset: 2px;
    }

    .h4bs-builder-command-panel {
        position: fixed;
        top: 92px;
        right: 8px;
        z-index: 100022;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(360px, calc(100vw - 16px));
        max-height: calc(100vh - 104px);
        gap: 6px;
        box-sizing: border-box;
        padding: 8px;
        overflow: auto;
        border: 1px solid #b9c5d2;
        border-radius: 6px;
        background: #fff;
        box-shadow: 0 14px 32px rgba(17, 35, 55, 0.24);
    }

    .h4bs-builder-command-menu:not([open]) > .h4bs-builder-command-panel {
        display: none;
    }

    .h4bs-builder-command-panel > .h4bs-header-command-btn,
    .h4bs-builder-command-panel > .h4bs-header-icon-btn {
        display: inline-flex !important;
        width: 100%;
        min-width: 0;
        min-height: 44px !important;
        height: auto;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 7px 9px !important;
        white-space: normal;
        text-align: center;
    }

    .h4bs-builder-command-panel > .h4bs-header-icon-btn {
        border-color: #d2dae4 !important;
        background: #f7f9fb !important;
        color: #263548 !important;
    }

    .h4bs-builder-command-panel .h4bs-compact-label,
    .h4bs-builder-command-panel .screen-reader-text {
        position: static;
        display: inline;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        clip-path: none;
        white-space: normal;
        border: 0;
    }

    .h4bs-builder-command-panel .h4bs-compact-label + .screen-reader-text {
        display: none;
    }

    .h4bs-builder-command-panel kbd {
        display: none;
    }

    .h4bs-viewport-icon-btn,
    .h4bs-preview-settings-disclosure > summary,
    .h4bs-studio-save-status,
    .h4bs-studio-diagnostics > summary {
        min-height: 44px;
    }
}

@media (max-width: 430px) {
    .h4bs-builder-studio-header-actions .h4bs-compact-label {
        font-size: 11px;
    }

    .h4bs-builder-command-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .h4bs-studio-device-switch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .h4bs-viewport-icons {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        overflow: visible;
    }

    .h4bs-viewport-icon-btn,
    .h4bs-actual-page-preview,
    .h4bs-preview-settings-disclosure,
    .h4bs-preview-settings-disclosure > summary {
        width: 100%;
        min-width: 0;
    }

    .h4bs-preview-asset-status {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (min-width: 801px) {
    .h4bs-builder-studio-header-actions {
        overflow: visible;
    }

    .h4bs-builder-command-menu,
    .h4bs-builder-command-panel {
        display: contents;
    }

    .h4bs-builder-command-menu > summary {
        display: none !important;
    }

    .h4bs-builder-command-panel > .h4bs-header-icon-btn,
    .h4bs-builder-command-panel > .h4bs-header-command-btn {
        min-height: 44px !important;
    }

    .h4bs-builder-command-panel > .h4bs-header-icon-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }
}
