/* Profile-only regions. User CSS remains inside the existing script-disabled iframe. */
.pw-panel{padding:18px;background:var(--panel);border:1px solid var(--border,var(--line));border-radius:var(--radius,14px);color:var(--ink,var(--text));min-width:0}
.pw-panel header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.pw-panel h2{font-size:16px;margin:0}.pw-panel header button{border:0;padding:4px;min-width:36px;min-height:36px;color:var(--muted)}
.pw-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:10px}.pw-person{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:0;border:0;background:none;color:inherit;cursor:pointer}.pw-person>span:last-child{font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-person .avatar{width:42px;height:42px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:var(--hover,var(--hover-bg));font-size:16px;margin:0;flex-shrink:0}.pw-person img{width:100%;height:100%;object-fit:cover}
.pw-space{display:flex;align-items:center;gap:10px;padding:10px 0;color:inherit;text-decoration:none}.pw-space>img,.pw-space>svg{width:36px;height:36px;object-fit:cover;border-radius:8px;flex-shrink:0}.pw-space>span{min-width:0;flex:1}.pw-space strong{font-size:13px;display:block}.pw-space small{display:block;font-size:11px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}.pw-space>svg:last-child{width:14px}.pw-view-all{display:block;width:100%;text-align:center;margin-top:16px;border:0;border-top:1px solid var(--border,var(--line));padding:12px 0 0;font-size:12px;color:var(--link,var(--accent))}
.pw-regions{display:flex;flex-direction:column;gap:var(--gap,16px)}.pw-inline-hotdogs{display:grid;gap:var(--gap,16px)}body[data-pw-sidebar=true] .pw-inline-hotdogs{display:none}.pw-hamburgers{min-width:0}.pw-main-widget{height:auto;min-height:0}.pw-main-widget .profile-posts{grid-template-columns:1fr}.pw-empty{padding:16px;color:var(--muted);font-size:14px;line-height:1.6}.pw-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;padding:var(--padding,18px)}.pw-gallery button{padding:0;border:0;overflow:hidden;aspect-ratio:1;border-radius:var(--radius,12px);cursor:pointer}.pw-gallery img{width:100%;height:100%;object-fit:cover;display:block}.pw-more{display:block;margin:12px auto 18px;min-height:44px}.profile-stats button{background:transparent;border:0;padding:0;min-height:44px;font-size:inherit;color:inherit}.profile-stats button:hover{text-decoration:underline}
.pw-panel button:focus-visible,.pw-panel a:focus-visible,.pw-person:focus-visible,.pw-main-widget button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html[data-context-kind=profile-widgets] .rightbar>:not(.search):not(#profile-hotdogs){display:none}#profile-hotdogs{display:grid;gap:16px;margin-top:20px}
.pw-list-dialog{width:min(580px,calc(100% - 32px));max-height:85dvh;background:var(--panel);color:var(--text);padding:22px;overflow:auto}.pw-dialog-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;position:sticky;top:-22px;background:var(--panel);padding:12px 0;z-index:1}.pw-dialog-header h2{font-size:20px;margin:0}.pw-dialog-header p{font-size:12px;color:var(--muted);margin:8px 0 0}.pw-dialog-header .icon-btn{min-width:44px;min-height:44px}.pw-list-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line)}.pw-list-tabs button{padding:12px;min-height:44px;border-bottom:2px solid transparent;font-size:13px}.pw-list-tabs [aria-selected=true]{color:var(--accent);border-color:var(--accent)}.pw-list-dialog input{font-size:16px}.pw-list-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line);min-width:0}.pw-list-row>.pw-person{flex-direction:row;flex:1;justify-content:flex-start;text-align:left}.pw-list-row .pw-person>span:last-child{font-size:14px;white-space:normal}.pw-person-meta{font-size:11px;color:var(--muted)}.pw-list-row .secondary-btn{flex-shrink:0;min-height:44px}.pw-list-row>div:first-child{min-width:0;flex:1}.pw-list-row p{font-size:13px;color:var(--muted);line-height:1.5}.pw-list-row strong{font-size:14px;overflow-wrap:anywhere}.pw-list-row small{font-size:11px;color:var(--muted)}
.pw-editor-region{margin:20px 0}.pw-editor-region h3{font-size:13px!important;line-height:1.6}.pw-order-list{display:grid;gap:8px}.pw-order-item{display:grid;grid-template-columns:32px minmax(0,1fr);gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--input-bg)}.pw-order-item strong{font-size:13px}.pw-order-item small,.pw-add-widgets small{display:block;font-size:11px;color:var(--muted);line-height:1.5;margin-top:5px}.pw-order-actions{display:flex;gap:6px;grid-column:1/-1;justify-content:flex-end}.pw-order-actions button{min-height:36px;min-width:36px;border:1px solid var(--line);border-radius:6px}.pw-drag-handle{touch-action:none;cursor:grab;min-height:44px!important;font-size:24px;color:var(--muted);padding:0}.pw-dragging{opacity:.6}.pw-drop-target{border-color:var(--accent);box-shadow:inset 0 3px 0 var(--accent);background:var(--accent-wash)}.pw-add-widgets{display:grid;gap:8px;margin-top:12px}.pw-add-widgets button{display:block;text-align:left;width:100%;min-height:44px}.pw-readonly-preview{width:min(1280px,calc(100% - 24px));max-height:95dvh;padding:12px;background:var(--bg)}.pw-readonly-preview>.secondary-btn{position:sticky;top:0;background:var(--panel);z-index:2;margin:0 0 12px;min-height:44px}
@media(max-width:700px){.pw-inline-hotdogs{grid-template-columns:1fr}.pw-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.pw-panel button,.pw-order-actions button{min-height:44px}.pw-list-dialog{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:100dvh;margin:0;border:0;border-radius:0;padding:16px 16px calc(24px + env(safe-area-inset-bottom));overflow:auto}.pw-dialog-header{top:-16px;padding-top:max(12px,env(safe-area-inset-top))}.pw-list-row{flex-wrap:wrap}.pw-person-meta{order:3;padding-left:54px;width:100%;margin-top:-12px}.pw-readonly-preview{width:100%;max-height:100dvh}}
@media(prefers-reduced-motion:reduce){.pw-order-item{transition:none}}

.profile-header+.pw-regions{margin-top:var(--gap,16px)}

/* The trusted editor previews the same two regions without exposing user CSS globally. */
body[data-pw-preview=desktop] .profile-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:var(--gap,16px);align-items:start}
body[data-pw-preview=desktop] .profile-header{grid-column:1;grid-row:1}
body[data-pw-preview=desktop] .pw-regions{display:contents}
body[data-pw-preview=desktop] .pw-inline-hotdogs{display:grid;grid-column:2;grid-row:1 / span 2}
body[data-pw-preview=desktop] .pw-hamburgers,body[data-pw-preview=desktop] .profile-widget-grid{grid-column:1;grid-row:2}
.studio-canvas .designer-preview-viewport.desktop .personal-profile-frame.pw-desktop-preview{min-width:900px}
