/* Guest Content workspace — commercial shell (S0). Tokens only; no gradients on chrome. */

.cms-content-workspace.is-immersive {
    --cms-gc-fg: var(--color-fg, #152028);
    --cms-gc-muted: var(--color-muted, #5a6878);
    --cms-gc-surface: var(--color-surface, #f4f6f8);
    --cms-gc-surface-raised: color-mix(in srgb, var(--cms-gc-surface) 92%, var(--cms-gc-fg) 8%);
    --cms-gc-border: var(--color-border, rgb(21 32 40 / 0.12));
    --cms-gc-accent: var(--color-accent, #009fc4);
    --cms-gc-accent-soft: color-mix(in srgb, var(--cms-gc-accent) 14%, transparent);
    --cms-gc-canvas-bg: color-mix(in srgb, var(--cms-gc-surface) 88%, var(--cms-gc-fg) 4%);
    --cms-gc-radius: 14px;
    --cms-gc-tree-width: 272px;
    --cms-gc-tree-rail: 48px;
    --cms-gc-indent-step: 12px;
    --cms-gc-ease: cubic-bezier(0.22, 1, 0.36, 1);

    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - var(--mud-appbar-height, 64px));
    min-height: 28rem;
    overflow: hidden;
    color: var(--cms-gc-fg);
    background: var(--cms-gc-canvas-bg);
}

body.qiotap-dark-theme .cms-content-workspace.is-immersive,
html.qiotap-dark-theme .cms-content-workspace.is-immersive {
    --cms-gc-fg: var(--color-fg, #f2f5f8);
    --cms-gc-muted: var(--color-muted, #9aa6b2);
    --cms-gc-surface: var(--color-surface, #171d26);
    --cms-gc-surface-raised: color-mix(in srgb, var(--cms-gc-surface) 86%, white 6%);
    --cms-gc-border: var(--color-border, #2a3442);
    --cms-gc-canvas-bg: #0c1118;
    --cms-gc-accent-soft: color-mix(in srgb, var(--cms-gc-accent) 22%, transparent);
}

/* —— Top bar —— */

.cms-gc-topbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 1rem;
    min-height: 3.5rem;
    padding: 0.65rem 1.1rem;
    background: var(--cms-gc-surface);
    border-bottom: 1px solid var(--cms-gc-border);
}

.cms-gc-topbar__lead {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.35rem;
}

.cms-gc-topbar__back.mud-icon-button {
    color: var(--cms-gc-muted);
}

.cms-gc-topbar__titles {
    min-width: 0;
}

.cms-gc-topbar__kicker {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cms-gc-muted);
}

.cms-gc-topbar__title {
    margin: 0.1rem 0 0;
    overflow: hidden;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cms-gc-topbar__subtitle {
    margin: 0.15rem 0 0;
    overflow: hidden;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--cms-gc-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cms-gc-topbar__modes {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 3px;
    background: color-mix(in srgb, var(--cms-gc-fg) 6%, transparent);
    border: 1px solid var(--cms-gc-border);
    border-radius: 999px;
}

.cms-gc-mode {
    appearance: none;
    margin: 0;
    padding: 0.4rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--cms-gc-muted);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition:
        background-color 160ms var(--cms-gc-ease),
        color 160ms var(--cms-gc-ease);
}

.cms-gc-mode:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.cms-gc-mode.is-active {
    background: var(--cms-gc-surface);
    color: var(--cms-gc-fg);
    box-shadow: 0 1px 2px rgb(15 23 32 / 0.08);
}

body.qiotap-dark-theme .cms-gc-mode.is-active {
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

.cms-gc-topbar__meta {
    display: flex;
    flex: 0 1 12rem;
    justify-content: flex-end;
    min-width: 0;
}

.cms-gc-topbar__publish {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    min-width: 0;
    padding: 0 0.5rem;
}

.cms-gc-status {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--cms-gc-border);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--cms-gc-muted);
}

.cms-gc-status[data-status="Published"] {
    color: var(--cms-gc-accent);
    border-color: color-mix(in srgb, var(--cms-gc-accent) 45%, transparent);
    background: var(--cms-gc-accent-soft);
}

.cms-gc-status[data-status="Draft"] {
    color: var(--cms-gc-muted);
}

.cms-gc-topbar__view-hint,
.cms-gc-topbar__edit-badge {
    overflow: hidden;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cms-gc-topbar__view-hint {
    color: var(--cms-gc-muted);
}

.cms-gc-topbar__edit-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: var(--cms-gc-accent-soft);
    color: var(--cms-gc-accent);
}

.cms-gc-alert {
    flex: 0 0 auto;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* —— Body —— */

.cms-gc-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
}

/* —— Tree (opaque) —— */

.cms-gc-tree {
    display: flex;
    flex: 0 0 var(--cms-gc-tree-width);
    flex-direction: column;
    width: var(--cms-gc-tree-width);
    min-width: var(--cms-gc-tree-width);
    background: var(--cms-gc-surface);
    border-right: 1px solid var(--cms-gc-border);
    transition:
        width 180ms var(--cms-gc-ease),
        min-width 180ms var(--cms-gc-ease);
}

.cms-gc-tree.is-collapsed {
    flex-basis: var(--cms-gc-tree-rail);
    width: var(--cms-gc-tree-rail);
    min-width: var(--cms-gc-tree-rail);
}

.cms-gc-tree__chrome {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.45rem;
    border-bottom: 1px solid var(--cms-gc-border);
}

.cms-gc-tree__collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--cms-gc-muted);
    cursor: pointer;
    transition:
        background-color 140ms var(--cms-gc-ease),
        border-color 140ms var(--cms-gc-ease),
        color 140ms var(--cms-gc-ease);
}

.cms-gc-tree__collapse:hover {
    border-color: var(--cms-gc-border);
    background: color-mix(in srgb, var(--cms-gc-fg) 5%, transparent);
    color: var(--cms-gc-fg);
}

.cms-gc-tree__heading {
    flex: 1 1 auto;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cms-gc-muted);
}

.cms-gc-tree__add-root {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: auto;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--cms-gc-muted);
    cursor: pointer;
}

.cms-gc-tree__add-root:hover {
    border-color: var(--cms-gc-border);
    color: var(--cms-gc-accent);
}

.cms-gc-tree__empty {
    padding: 1rem 0.75rem;
    color: var(--cms-gc-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.cms-gc-tree__empty p {
    margin: 0 0 0.75rem;
}

.cms-gc-tree__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0.5rem 0.4rem 1rem;
}

.cms-gc-tree__rail {
    display: flex;
    flex: 1 1 auto;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding-top: 0.75rem;
    border: 0;
    background: transparent;
    color: var(--cms-gc-muted);
    cursor: pointer;
}

.cms-gc-tree__rail:hover {
    color: var(--cms-gc-fg);
}

.cms-gc-tree-children {
    position: relative;
}

.cms-gc-tree-children::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0.25rem;
    left: calc(0.85rem + (var(--cms-gc-depth, 0) * var(--cms-gc-indent-step)));
    width: 1px;
    background: color-mix(in srgb, var(--cms-gc-fg) 10%, transparent);
    pointer-events: none;
}

.cms-gc-tree-row {
    --cms-gc-depth: 0;
    display: flex;
    align-items: center;
    gap: 0.1rem;
    min-height: 2rem;
    margin: 1px 0;
    padding-left: calc(0.15rem + (var(--cms-gc-depth) * var(--cms-gc-indent-step)));
    border-radius: 8px;
    transition: background-color 140ms var(--cms-gc-ease);
}

.cms-gc-tree-row:hover {
    background: color-mix(in srgb, var(--cms-gc-fg) 5%, transparent);
}

.cms-gc-tree-row.is-active {
    background: var(--cms-gc-accent-soft);
    box-shadow: inset 2px 0 0 var(--cms-gc-accent);
}

.cms-gc-tree-row__chevron {
    display: inline-flex;
    flex: 0 0 1.5rem;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--cms-gc-muted);
    cursor: pointer;
}

.cms-gc-tree-row__chevron:disabled {
    cursor: default;
    opacity: 0;
    pointer-events: none;
}

.cms-gc-tree-row__main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.4rem 0.2rem 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cms-gc-tree-row__icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--cms-gc-muted);
}

.cms-gc-tree-row.is-active .cms-gc-tree-row__icon {
    color: var(--cms-gc-accent);
}

.cms-gc-tree-row__title {
    overflow: hidden;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cms-gc-tree-row.is-active .cms-gc-tree-row__title {
    font-weight: 600;
}

.cms-gc-tree-row__actions {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.05rem;
    padding-right: 0.2rem;
}

.cms-gc-tree-row:hover .cms-gc-tree-row__actions,
.cms-gc-tree-row.is-active .cms-gc-tree-row__actions {
    display: inline-flex;
}

.cms-gc-tree-row__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--cms-gc-muted);
    cursor: pointer;
}

.cms-gc-tree-row__action:hover {
    color: var(--cms-gc-accent);
    background: color-mix(in srgb, var(--cms-gc-fg) 6%, transparent);
}

.cms-gc-tree-row__action.is-danger:hover {
    color: var(--color-danger, #c62828);
}

/* —— Canvas —— */

.cms-gc-canvas {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    background: transparent;
}

.cms-gc-canvas__header {
    flex: 0 0 auto;
    padding: 1.25rem 1.75rem 0.75rem;
}

.cms-gc-canvas__crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    font-size: 0.75rem;
    color: var(--cms-gc-muted);
}

.cms-gc-canvas__crumb-sep {
    opacity: 0.55;
}

.cms-gc-canvas__crumb-item.is-current {
    color: var(--cms-gc-fg);
    font-weight: 600;
}

button.cms-gc-canvas__crumb-item.is-link {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cms-gc-muted);
    font: inherit;
    font-size: inherit;
    cursor: pointer;
}

button.cms-gc-canvas__crumb-item.is-link:hover {
    color: var(--cms-gc-accent);
}

.cms-gc-canvas__heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.65rem;
}

.cms-gc-canvas__addbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.cms-gc-canvas__addbar-label {
    margin-right: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cms-gc-muted);
}

.cms-gc-add-chip {
    appearance: none;
    margin: 0;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--cms-gc-border);
    border-radius: 999px;
    background: var(--cms-gc-surface);
    color: var(--cms-gc-fg);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color 140ms var(--cms-gc-ease),
        background-color 140ms var(--cms-gc-ease);
}

.cms-gc-add-chip:hover {
    border-color: color-mix(in srgb, var(--cms-gc-accent) 45%, var(--cms-gc-border));
    background: var(--cms-gc-accent-soft);
}

.cms-gc-canvas__kind {
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--cms-gc-border);
    border-radius: 999px;
    background: var(--cms-gc-surface);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cms-gc-muted);
}

.cms-gc-canvas__heading {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.cms-gc-canvas__stage {
    position: relative;
    flex: 1 1 auto;
    padding: 0.5rem 1.75rem 2rem;
}

.cms-gc-canvas__empty {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    max-width: 28rem;
    margin: auto;
    padding: 3rem 1.5rem;
    text-align: center;
}

.cms-gc-canvas__empty-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cms-gc-muted);
}

.cms-gc-canvas__empty-title {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.cms-gc-canvas__empty-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--cms-gc-muted);
}

.cms-gc-preview-card {
    max-width: 44rem;
    padding: 1.35rem 1.4rem 1.5rem;
    border: 1px solid var(--cms-gc-border);
    border-radius: var(--cms-gc-radius);
    background: var(--cms-gc-surface);
}

.cms-gc-preview-card__label {
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cms-gc-muted);
}

.cms-gc-preview-card__title {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.cms-gc-preview-card__text {
    margin: 0 0 1.15rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--cms-gc-muted);
}

.cms-gc-preview-ghost-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 3.25rem;
    gap: 0.65rem;
}

.cms-gc-ghost {
    display: block;
    border: 1px dashed color-mix(in srgb, var(--cms-gc-fg) 16%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--cms-gc-fg) 4%, transparent);
}

.cms-gc-ghost--1x1 {
    grid-column: span 1;
    grid-row: span 1;
}

.cms-gc-ghost--2x1 {
    grid-column: span 2;
    grid-row: span 1;
}

.cms-gc-ghost--1x2 {
    grid-column: span 1;
    grid-row: span 2;
}

.cms-gc-ghost--2x2 {
    grid-column: span 2;
    grid-row: span 2;
}

.cms-gc-preview-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.cms-gc-ghost-line {
    display: block;
    height: 0.65rem;
    border-radius: 4px;
    background: color-mix(in srgb, var(--cms-gc-fg) 8%, transparent);
}

.cms-gc-ghost-line--title {
    width: 42%;
    height: 0.9rem;
}

.cms-gc-ghost-line:nth-child(2) {
    width: 100%;
}

.cms-gc-ghost-line:nth-child(3) {
    width: 78%;
}

.cms-gc-ghost-tile {
    display: block;
    width: 11rem;
    height: 2.75rem;
    margin-top: 0.35rem;
    border: 1px solid var(--cms-gc-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--cms-gc-fg) 4%, transparent);
}

/* —— S1 Bento (dashboard card chrome, no gradients) —— */

.cms-gc-bento {
    --cms-gc-bento-cell: clamp(9.25rem, 14vw, 11.5rem);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: var(--cms-gc-bento-cell);
    gap: 0.85rem;
    max-width: 56rem;
}

.cms-gc-bento__empty {
    grid-column: 1 / -1;
    padding: 2rem 1.25rem;
    border: 1px dashed color-mix(in srgb, var(--cms-gc-fg) 16%, transparent);
    border-radius: 20px;
    background: var(--cms-gc-surface);
    text-align: center;
}

.cms-gc-bento__empty-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.cms-gc-bento__empty-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--cms-gc-muted);
}

.cms-gc-bento-tile {
    position: relative;
    min-width: 0;
    min-height: 0;
    border-radius: 20px;
}

.cms-gc-bento-tile--1x1 {
    grid-column: span 1;
    grid-row: span 1;
}

.cms-gc-bento-tile--2x1 {
    grid-column: span 2;
    grid-row: span 1;
}

.cms-gc-bento-tile--1x2 {
    grid-column: span 1;
    grid-row: span 2;
}

.cms-gc-bento-tile--2x2 {
    grid-column: span 2;
    grid-row: span 2;
}

.cms-gc-bento-tile__hit {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cms-gc-bento-tile__inner {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    min-height: 100%;
    padding: 1.25rem 1.3rem 1.15rem;
    border: 1px solid var(--cms-gc-border);
    border-radius: 20px;
    background: var(--cms-gc-surface);
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 35%, transparent);
    overflow: hidden;
    transition:
        border-color 180ms var(--cms-gc-ease),
        transform 180ms var(--cms-gc-ease),
        box-shadow 180ms var(--cms-gc-ease),
        background-color 180ms var(--cms-gc-ease);
}

body.qiotap-dark-theme .cms-gc-bento-tile__inner,
html.qiotap-dark-theme .cms-gc-bento-tile__inner {
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 8%, transparent);
}

.cms-gc-bento-tile.is-view .cms-gc-bento-tile__hit:hover .cms-gc-bento-tile__inner,
.cms-gc-bento-tile.is-view .cms-gc-bento-tile__hit:focus-visible .cms-gc-bento-tile__inner {
    border-color: color-mix(in srgb, var(--cms-gc-accent) 42%, var(--cms-gc-border));
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, white 40%, transparent),
        0 12px 28px -16px rgb(15 23 32 / 0.28);
}

.cms-gc-bento-tile.is-selected .cms-gc-bento-tile__inner,
.cms-gc-bento-tile.is-edit.is-selected .cms-gc-bento-tile__inner {
    border-color: var(--cms-gc-accent);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, white 35%, transparent),
        0 0 0 2px var(--cms-gc-accent-soft);
}

.cms-gc-bento-tile__label {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: auto;
    padding: 0.2rem 0.55rem;
    border: 1px solid color-mix(in srgb, var(--cms-gc-fg) 12%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--cms-gc-fg) 4%, transparent);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cms-gc-muted);
}

.cms-gc-bento-tile__title {
    display: block;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.cms-gc-bento-tile--1x1 .cms-gc-bento-tile__title {
    font-size: clamp(0.98rem, 1.4vw, 1.15rem);
}

.cms-gc-bento-tile__text {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--cms-gc-muted);
}

.cms-gc-bento-tile__chrome {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    display: inline-flex;
    gap: 0.25rem;
}

.cms-gc-bento-tile__chrome-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--cms-gc-border);
    border-radius: 8px;
    background: var(--cms-gc-surface);
    color: var(--cms-gc-muted);
    cursor: pointer;
    transition:
        color 140ms var(--cms-gc-ease),
        border-color 140ms var(--cms-gc-ease),
        background-color 140ms var(--cms-gc-ease);
}

.cms-gc-bento-tile__chrome-btn:hover {
    color: var(--cms-gc-fg);
    border-color: color-mix(in srgb, var(--cms-gc-fg) 22%, transparent);
}

.cms-gc-bento-tile__chrome-btn.is-danger:hover {
    color: var(--mud-palette-error, #b71c1c);
    border-color: color-mix(in srgb, var(--mud-palette-error, #b71c1c) 35%, var(--cms-gc-border));
}

.cms-gc-bento-tile.is-static .cms-gc-bento-tile__hit:disabled {
    cursor: default;
    opacity: 1;
}

.cms-gc-bento-tile.is-static .cms-gc-bento-tile__hit:hover .cms-gc-bento-tile__inner,
.cms-gc-bento-tile.is-static .cms-gc-bento-tile__hit:focus-visible .cms-gc-bento-tile__inner {
    transform: none;
    border-color: var(--cms-gc-border);
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 35%, transparent);
}

/* —— S2 Page stack (guest-faithful vertical blocks) —— */

.cms-gc-page-stack {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    max-width: 40rem;
    padding-bottom: 1.5rem;
}

.cms-gc-page-stack__empty {
    padding: 2rem 1.25rem;
    border: 1px dashed color-mix(in srgb, var(--cms-gc-fg) 16%, transparent);
    border-radius: 16px;
    background: var(--cms-gc-surface);
    text-align: center;
}

.cms-gc-page-stack__empty-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.cms-gc-page-stack__empty-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--cms-gc-muted);
}

.cms-gc-block {
    position: relative;
    min-width: 0;
}

.cms-gc-block__body {
    min-width: 0;
}

.cms-gc-block.is-edit .cms-gc-block__body {
    cursor: pointer;
    border-radius: 12px;
    outline: 1px solid transparent;
    transition: outline-color 140ms var(--cms-gc-ease);
}

.cms-gc-block.is-selected .cms-gc-block__body {
    outline-color: var(--cms-gc-accent);
    outline-offset: 3px;
}

.cms-gc-block__chrome {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
    display: inline-flex;
    gap: 0.25rem;
}

.cms-gc-block-text__title {
    margin: 0 0 0.45rem;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.cms-gc-block-text__body {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: color-mix(in srgb, var(--cms-gc-fg) 88%, var(--cms-gc-muted));
}

.cms-gc-block-media {
    margin: 0;
}

.cms-gc-block-media__img,
.cms-gc-block-media__video {
    display: block;
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--cms-gc-border);
    background: var(--cms-gc-surface);
}

.cms-gc-block-media__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 11rem;
    border: 1px solid var(--cms-gc-border);
    border-radius: 14px;
    background: var(--cms-gc-surface);
    color: var(--cms-gc-muted);
}

.cms-gc-block-media__placeholder.is-video {
    min-height: 12.5rem;
}

.cms-gc-block-media__caption {
    margin: 0.45rem 0 0;
    font-size: 0.8125rem;
    color: var(--cms-gc-muted);
}

.cms-gc-action-tile {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    margin: 0;
    padding: 0.75rem 0.95rem;
    border: 1px solid var(--cms-gc-border);
    border-radius: 14px;
    background: var(--cms-gc-surface);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 160ms var(--cms-gc-ease),
        transform 160ms var(--cms-gc-ease);
}

.cms-gc-page-stack.is-view .cms-gc-action-tile:hover {
    border-color: color-mix(in srgb, var(--cms-gc-accent) 40%, var(--cms-gc-border));
    transform: translateY(-1px);
}

.cms-gc-action-tile--pdf {
    width: min(100%, 22rem);
    align-items: stretch;
}

.cms-gc-action-tile__preview {
    display: inline-flex;
    flex: 0 0 3rem;
    align-items: center;
    justify-content: center;
    width: 3rem;
    min-height: 3rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--cms-gc-fg) 5%, transparent);
    color: var(--cms-gc-accent);
    overflow: hidden;
}

.cms-gc-action-tile__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cms-gc-action-tile__icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--cms-gc-accent);
}

.cms-gc-action-tile__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.15rem;
}

.cms-gc-action-tile__title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.cms-gc-action-tile__sub {
    font-size: 0.75rem;
    color: var(--cms-gc-muted);
}

.cms-gc-bento-tile.is-static .cms-gc-bento-tile__hit:disabled {
    cursor: default;
}

@media (max-width: 860px) {
    .cms-gc-topbar {
        flex-wrap: wrap;
    }

    .cms-gc-topbar__meta {
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .cms-gc-tree:not(.is-collapsed) {
        --cms-gc-tree-width: min(240px, 42vw);
    }

    .cms-gc-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        --cms-gc-bento-cell: 8.5rem;
    }

    .cms-gc-preview-ghost-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .cms-gc-bento {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(7.5rem, auto);
    }

    .cms-gc-bento-tile--1x1,
    .cms-gc-bento-tile--2x1,
    .cms-gc-bento-tile--1x2,
    .cms-gc-bento-tile--2x2 {
        grid-column: 1;
        grid-row: auto;
        min-height: 7.5rem;
    }
}
