/* Creator-controlled frames; source order is the reading and mobile order. */
.profile-layout-flow{display:flex!important;flex-wrap:wrap;align-items:flex-start;gap:16px;min-width:0;max-width:100%}
.profile-layout-flow>.profile-layout-block{box-sizing:border-box;flex:0 0 calc((100% + 16px)*var(--block-width,100)/100 - 16px);width:calc((100% + 16px)*var(--block-width,100)/100 - 16px);max-width:100%;min-width:0;margin:0!important;align-self:flex-start}
.profile-column-pair{flex:0 0 100%;width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.profile-column-stack{display:flex;flex-direction:column;gap:16px;min-width:0}
.profile-column-stack>.profile-layout-block{width:100%;max-width:100%;margin:0!important}
.creator-profile-section-preview-list[data-mobile=true] .profile-column-pair{grid-template-columns:minmax(0,1fr)}
@media(max-width:700px){.profile-column-pair{grid-template-columns:minmax(0,1fr)}}
.profile-layout-block{position:relative;box-sizing:border-box;min-height:var(--block-min-height,0);padding:var(--block-padding,16px)!important;border-radius:var(--block-radius,14px)!important;text-align:var(--block-align,left);overflow-wrap:anywhere}
.profile-layout-block[data-frame=glow]{border:1px solid var(--ui-color-primary)!important;box-shadow:0 0 18px color-mix(in srgb,var(--ui-color-primary) 22%,transparent),inset 0 0 12px color-mix(in srgb,var(--ui-color-primary) 6%,transparent)}
.profile-layout-block[data-frame=none]{border-color:transparent!important;box-shadow:none!important;background:transparent!important}
.profile-layout-flow>.profile-section-category-title,.creator-canvas-toolbar{flex:0 0 100%;box-sizing:border-box}
.profile-entry-picker{display:block!important}
.profile-entry-picker>.profile-layout-block{width:100%;max-width:100%;margin-top:14px}
.profile-entry-picker>[hidden]{display:none!important}
.profile-entry-buttons,.creator-canvas-toolbar,.creator-canvas-tools{display:flex;flex-wrap:wrap;gap:8px}
.profile-entry-buttons button,.profile-content-button,.creator-canvas-toolbar button,.creator-canvas-tools button,.creator-canvas-resize{font:inherit;font-size:.85rem;font-weight:700;cursor:pointer;min-height:36px;padding:8px 12px;border:1px solid var(--ui-color-border);border-radius:10px;color:var(--ui-color-text);background:var(--ui-color-surface)}
.profile-entry-buttons button[aria-selected=true],.profile-content-button{color:var(--ui-color-on-primary);background:var(--ui-color-primary);border-color:var(--ui-color-primary)}
.profile-entry-buttons button:focus-visible,.creator-canvas-block button:focus-visible,.creator-canvas-toolbar button:focus-visible{outline:2px solid var(--ui-color-primary);outline-offset:3px}
.creator-canvas-toolbar button:disabled{opacity:.45;cursor:default}
.creator-canvas-hint{flex:0 0 100%;margin:0;color:var(--ui-color-muted);font-size:.85rem;line-height:1.45}
.creator-canvas-tools{position:relative;z-index:1;grid-column:1/-1;margin-bottom:12px;padding-bottom:8px;border-bottom:1px dashed var(--ui-color-border);text-align:left}
.creator-canvas-tools button:first-child{cursor:grab}
.creator-canvas-placement{flex:0 0 100%;display:flex;flex-wrap:wrap;gap:8px;padding:12px;border:1px solid var(--ui-color-primary);border-radius:10px;background:var(--ui-color-surface)}
.creator-canvas-placement[hidden]{display:none}
.creator-canvas-placement label{display:flex;flex:1 1 100%;flex-wrap:wrap;gap:8px;align-items:center}
.creator-canvas-placement select{min-width:0;max-width:100%;padding:8px;color:var(--ui-color-text);background:var(--ui-color-surface);border:1px solid var(--ui-color-border);border-radius:8px}
.creator-canvas-block{padding-bottom:max(44px,var(--block-padding,16px))!important}
.creator-canvas-block:focus-within{outline:1px solid var(--ui-color-primary);outline-offset:3px}
.creator-canvas-block[data-drop-side=left]{box-shadow:inset 6px 0 0 var(--ui-color-primary),0 0 18px var(--ui-color-primary-soft)!important}
.creator-canvas-block[data-drop-side=right]{box-shadow:inset -6px 0 0 var(--ui-color-primary),0 0 18px var(--ui-color-primary-soft)!important}
.creator-canvas-resize{position:absolute;right:4px;bottom:4px;cursor:nwse-resize;touch-action:none;min-width:36px}
.creator-layout-settings{padding:12px;border:1px solid var(--ui-color-border);border-radius:12px}
.creator-layout-settings>summary{cursor:pointer;font-weight:800;color:var(--ui-color-primary)}
.creator-layout-settings>label{margin-top:12px}
.creator-layout-settings>small{display:block;margin-top:12px;color:var(--ui-color-muted);line-height:1.5}
.creator-profile-sections-layout{grid-template-columns:minmax(280px,.7fr) minmax(0,1.3fr)}
.creator-profile-sections-preview{max-height:85vh;overflow:auto}
.creator-profile-section-preview-list[data-mobile=true]{max-width:390px;margin-inline:auto}
.creator-profile-section-preview-list[data-mobile=true] .profile-layout-block{flex-basis:100%;width:100%;min-height:0}
.creator-profile-section-preview-list[data-mobile=true] .profile-section-image-left,.creator-profile-section-preview-list[data-mobile=true] .profile-section-image-right{grid-template-columns:1fr}
@media(max-width:900px){.creator-profile-sections-layout{grid-template-columns:1fr}.creator-profile-sections-preview{max-height:none}}
@media(max-width:700px){.profile-layout-flow>.profile-layout-block{flex-basis:100%;width:100%;min-height:0}.profile-layout-block{max-width:100%}.creator-canvas-resize{display:none}}

/* Keep the editor and live preview inside their own grid tracks. */
.creator-profile-sections-layout{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
.creator-profile-section-list,.creator-profile-sections-preview{min-width:0}
.creator-profile-section-list,.creator-section-category,.creator-section-card,.creator-section-nested-list{grid-template-columns:minmax(0,1fr)}
.creator-section-category-manager,.creator-section-category-head{flex-wrap:wrap;min-width:0}
.creator-section-category-manager input,.creator-section-category-head input{flex:1 1 180px;min-width:0;max-width:100%}
.creator-section-category-manager select{flex:1 1 170px;min-width:0;max-width:100%}
.creator-section-category-manager button,.creator-section-category-head button{max-width:100%;white-space:normal}
.creator-section-category-add{display:flex;flex-wrap:wrap;align-items:end}
.creator-section-category-add-label{flex:0 0 100%}
.creator-section-category-add select{flex:1 1 180px;min-width:0;max-width:100%}
.creator-section-category-add button{flex:1 1 auto;max-width:100%;white-space:normal}
.creator-section-nested-tools{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr))}
.creator-section-card input,.creator-section-card textarea,.creator-section-card select{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:900px){.creator-profile-sections-layout{grid-template-columns:minmax(0,1fr)}}

/* A compact, interactive map complements the full live preview. */
.creator-page-overview{flex:0 0 100%;min-width:0;padding:12px;border:1px solid var(--ui-color-border);border-radius:14px;background:var(--ui-color-surface-subtle)}
.creator-page-overview>summary{font-weight:800;cursor:pointer;color:var(--ui-color-text)}
.creator-page-overview-hint{margin:8px 0;color:var(--ui-color-muted);font-size:.75rem;line-height:1.4}
.creator-page-overview-page{max-width:420px;margin:10px auto 0;padding:9px;border:1px solid var(--ui-color-border);border-radius:12px;background:var(--ui-color-surface)}
.creator-page-overview-page[data-mobile=true]{max-width:200px}
.creator-page-overview-header{padding:9px;border-radius:8px;color:var(--ui-color-on-primary);background:var(--ui-color-primary);font-size:.72rem;font-weight:800}
.creator-page-overview-group{margin-top:10px;min-width:0}.creator-page-overview-group>strong{display:block;margin:0 0 5px;color:var(--ui-color-text);font-size:.72rem}
.creator-page-overview-blocks,.creator-page-overview-children{display:flex;flex-wrap:wrap;gap:4px;min-width:0}
.creator-page-overview-block{display:flex;flex-wrap:wrap;align-items:center;gap:3px;box-sizing:border-box;flex:0 0 calc((100% + 4px)*var(--overview-width,100)/100 - 4px);min-width:0;max-width:100%;padding:4px;border:1px solid var(--ui-color-border);border-radius:6px;background:var(--ui-color-surface-subtle)}
.creator-page-overview-page[data-mobile=true] .creator-page-overview-blocks>.creator-page-overview-block{flex-basis:100%}
.creator-page-overview-select,.creator-page-overview-actions button{min-height:26px;padding:3px 5px;border:1px solid var(--ui-color-border);border-radius:5px;color:var(--ui-color-text);background:var(--ui-color-surface);font:inherit;font-size:.68rem;cursor:pointer}
.creator-page-overview-select{flex:1 1 45px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;cursor:grab}
.creator-page-overview-actions{display:flex;gap:2px}.creator-page-overview-actions button:disabled{opacity:.35;cursor:default}
.creator-page-overview-block>small,.creator-page-overview-children>small{flex:0 0 100%;color:var(--ui-color-muted);font-size:.62rem}
.creator-page-overview-children{flex:0 0 100%;padding:3px;border-left:2px solid var(--ui-color-primary)}
.creator-page-overview button:focus-visible,.creator-page-overview>summary:focus-visible{outline:2px solid var(--ui-color-primary);outline-offset:2px}

.creator-page-overview-image{flex:0 0 100%;width:100%;height:42px;object-fit:cover;border-radius:4px}
.creator-page-overview-excerpt{flex:0 0 100%;margin:1px 0;color:var(--ui-color-muted);font-size:.6rem;line-height:1.3;overflow-wrap:anywhere}

/* Explicit row starts keep paired blocks together after earlier narrow blocks. */
.profile-layout-break{flex:0 0 100%;height:0;min-height:0;margin-block:-8px;pointer-events:none}
.creator-page-overview .profile-layout-break{margin-block:-2px}
.creator-page-overview-block[data-drop-side=left]{box-shadow:inset 5px 0 0 var(--ui-color-primary),0 0 12px var(--ui-color-primary-soft)}
.creator-page-overview-block[data-drop-side=right]{box-shadow:inset -5px 0 0 var(--ui-color-primary),0 0 12px var(--ui-color-primary-soft)}
.creator-profile-section-preview-list[data-mobile=true] .profile-layout-break,.creator-page-overview-page[data-mobile=true] .profile-layout-break{display:none}
@media(max-width:700px){.profile-layout-break{display:none}}

.creator-section-card .creator-layout-row-start{display:flex;align-items:center;gap:8px;text-transform:none;letter-spacing:normal}
.creator-section-card .creator-layout-row-start input{width:auto;min-width:0}

/* Keep layout saving accessible while the creator scrolls the preview. */
.creator-canvas-toolbar{position:sticky;top:0;z-index:5;padding:10px;background:var(--ui-color-surface);border:1px solid var(--ui-color-border);border-radius:12px}
.creator-canvas-toolbar .creator-canvas-save,.creator-page-overview-save{font:inherit;font-size:.85rem;font-weight:700;cursor:pointer;min-height:36px;padding:8px 12px;border:1px solid var(--ui-color-primary);border-radius:10px;color:var(--ui-color-on-primary);background:var(--ui-color-primary)}
.creator-page-overview-save{margin-top:10px}
.creator-page-overview-save:focus-visible{outline:2px solid var(--ui-color-primary);outline-offset:3px}
.creator-canvas-save-status{flex:0 0 100%;font-size:.8rem;color:var(--ui-color-text)}
.creator-canvas-save-status:empty{display:none}
