#profile-studio{max-width:1120px;margin:auto;color:var(--ink)}
#profile-studio [hidden]{display:none!important}
.studio-header{background:var(--surface);border:1px solid var(--line);border-radius:20px;overflow:hidden;margin-bottom:18px}
.studio-identity{display:flex;align-items:center;gap:14px;padding:16px 18px;background:var(--surface)}
.studio-avatar{width:56px;height:56px;flex-shrink:0;display:grid;place-items:center;overflow:hidden;background:linear-gradient(120deg,var(--profile-a),var(--profile-b));font-size:26px}.studio-avatar.shape-round{border-radius:50%}.studio-avatar.shape-soft{border-radius:16px}.studio-avatar img{width:100%;height:100%;object-fit:cover}
.studio-identity h1{font-size:25px;margin:0;overflow-wrap:anywhere}.studio-identity p{margin:2px 0 0;color:var(--muted);font-size:14px}.studio-profile-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.studio-profile-actions #profile-friend,.studio-profile-actions .profile-friend{margin:0;padding:0;border:0}
.studio-toolbar{position:sticky;top:76px;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 10px;margin:0 0 18px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 5px 16px #30364f08}
.studio-toolbar-actions{display:flex;align-items:center;gap:4px}.studio-toolbar-divider{height:24px;width:1px;background:var(--line);margin:0 5px}#studio-status{font-size:12px;color:var(--muted);padding:0 8px;white-space:nowrap}
#profile-studio .studio-icon-button{display:inline-flex;justify-content:center;align-items:center;width:44px;height:44px;min-height:44px;flex-shrink:0;padding:0;border:0;border-radius:12px;box-shadow:none;background:transparent;color:inherit;transform:none;cursor:pointer}
#profile-studio .studio-icon-button:hover:not(:disabled){background:var(--wash);box-shadow:none;transform:none}#profile-studio .studio-icon-button[aria-pressed=true]{background:var(--wash);color:var(--link)}#profile-studio .studio-icon-button:disabled{opacity:.32;cursor:default}
#profile-studio .studio-icon-button .ui-icon{width:23px;height:23px}#profile-studio #studio-publish:not(:disabled){background:linear-gradient(115deg,var(--profile-a),var(--profile-b))}
#profile-studio button:focus-visible,#profile-studio summary:focus-visible{outline:2px solid var(--link);outline-offset:3px}
.studio-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.studio-widget{position:relative;min-width:0;margin:0;border:1px solid var(--line);border-radius:20px;background:var(--surface);overflow:hidden;isolation:isolate;transition:box-shadow .16s}
.studio-widget[data-width=full]{grid-column:1/-1}.studio-card-content{padding:22px}.studio-card-content h2,.studio-widget .guestbook-heading h2{font-size:25px;margin:0 0 14px;line-height:1.25}.studio-card-content p{overflow-wrap:anywhere;margin-bottom:0}
.studio-header-cover{height:140px;border:0;border-radius:0;position:relative}.studio-header-cover[data-size=compact]{height:90px}.studio-header-cover[data-size=tall]{height:210px}
#profile-studio #studio-cover-edit{position:absolute;right:10px;top:10px;z-index:1;background:var(--surface);box-shadow:0 2px 8px #30364f10}.studio-header-cover::after{pointer-events:none}
.studio-widget .guestbook{margin:0;padding:22px;border:0;border-radius:0;box-shadow:none}.studio-widget[data-width=half] .guestbook-notes{grid-template-columns:1fr}.studio-widget .profile-interests ul{display:flex;flex-wrap:wrap}.studio-widget .profile-interests li{font-size:14px}
.studio-widget-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 10px 0 22px;min-height:56px}.studio-widget-heading h2{font-size:25px;line-height:1.2;margin:0}
.is-editing .studio-card-content>h2,.is-editing .studio-widget .guestbook-heading{display:none}.is-editing .studio-card-content,.is-editing .studio-widget .guestbook{padding-top:10px}
.is-editing .studio-widget{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}.is-editing .studio-widget-body{pointer-events:none}.is-editing .studio-widget-body img{-webkit-user-drag:none}.is-editing .studio-widget:hover{box-shadow:0 3px 14px #30364f0a}
#profile-studio .studio-add{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:88px;padding:18px;border:2px dashed var(--line);border-radius:20px;background:transparent;color:var(--ink);box-shadow:none;font-size:20px;font-weight:600;transform:none}
#profile-studio .studio-add:hover{background:var(--wash);border-color:var(--link)}.studio-add .ui-icon{width:27px;height:27px}
.studio-widget.is-dragging{opacity:.24;outline:2px dashed var(--link);outline-offset:3px}.is-dragging-widget{cursor:grabbing!important}.studio-drag-ghost{position:fixed!important;top:0;left:0;z-index:1000;pointer-events:none;opacity:.95;box-shadow:0 18px 44px #30364f33!important;overflow:hidden;will-change:transform;cursor:grabbing}
.studio-dialog{box-sizing:border-box;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 48px);margin:auto;padding:0;border:1px solid var(--line);border-radius:22px;background:var(--surface);color:var(--ink);box-shadow:0 18px 70px #30364f30;overflow:auto;overscroll-behavior:contain;font:inherit}
.studio-dialog::backdrop{background:#24203850;backdrop-filter:blur(3px)}.studio-dialog>header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--surface);z-index:1;padding:12px 12px 10px 20px;border-bottom:1px solid var(--line)}.studio-dialog h2{font-size:25px;line-height:1.2;margin:0}#studio-dialog-body{padding:12px 16px 18px}
.studio-menu-actions{display:grid;gap:3px}.studio-menu-actions button,.studio-history button{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:10px;border:0;border-radius:12px;background:transparent;box-shadow:none;color:inherit;font:inherit;text-align:left;transform:none}.studio-menu-actions button:hover:not(:disabled),.studio-history button:hover{background:var(--wash);box-shadow:none;transform:none}.studio-menu-actions .ui-icon{width:22px;height:22px}.studio-menu-order{border-top:1px solid var(--line);padding-top:8px}
.studio-dialog fieldset{border:0;padding:12px 4px;margin:8px 0}.studio-dialog legend{font-size:15px;font-weight:600;padding:0}.studio-segments{display:flex;padding:4px;gap:4px;background:var(--wash);border-radius:13px}.studio-segments button{flex:1;min-height:42px;padding:8px;border:0;border-radius:10px;background:transparent;color:inherit;box-shadow:none;font:inherit;font-size:14px;transform:none}.studio-segments button[aria-pressed=true]{background:var(--surface);box-shadow:0 1px 5px #30364f10}.studio-help{font-size:12px;color:var(--muted);margin:7px 0 0}
.studio-library{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:6px 0}.studio-library button{display:flex;flex-direction:column;justify-content:flex-start;gap:5px;min-height:128px;padding:14px 8px;border:1px solid var(--line);border-radius:16px;background:var(--wash);box-shadow:none;color:inherit;font:inherit;transform:none}.studio-library strong{font-size:18px}.studio-library button>span:last-child{font-size:12px;color:var(--muted)}.studio-library-icon .ui-icon{width:26px;height:26px;margin-bottom:6px}.studio-library button:disabled{opacity:.45;cursor:default}.studio-dialog-empty{padding:18px 4px;color:var(--muted);margin:0}.studio-history{margin-top:16px;border-top:1px solid var(--line);padding-top:14px;font-size:14px}.studio-history summary{cursor:pointer;min-height:36px;list-style:revert;padding:4px}
.studio-error:empty{display:none}.studio-error{position:sticky;bottom:90px;z-index:16;padding:12px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);font-size:14px}.studio-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:700px){.studio-header{border-radius:17px;margin-bottom:14px}.studio-identity{padding:12px;gap:10px;flex-wrap:wrap}.studio-avatar{width:44px;height:44px}.studio-identity h1{font-size:23px}.studio-identity p{font-size:13px}.studio-profile-actions{gap:3px}.studio-profile-actions>a{font-size:13px;padding:8px}.studio-profile-actions button{padding:8px 12px;min-height:44px}.studio-identity:has(#profile-friend) .studio-profile-actions{width:100%;margin:0}.studio-toolbar{top:64px;padding:6px 8px;gap:0;flex-direction:column;margin-bottom:16px;border-radius:16px}.studio-toolbar-actions{width:100%;justify-content:space-between;gap:0}.studio-toolbar-divider{margin:0 2px}#studio-status{font-size:11px;line-height:1.3;padding:0 0 4px}.studio-grid{grid-template-columns:minmax(0,1fr);gap:16px}.studio-widget[data-width=half]{grid-column:1}.studio-widget{border-radius:18px}.studio-card-content,.studio-widget .guestbook{padding:18px}.studio-widget-heading{padding-left:18px}.studio-widget-heading h2,.studio-card-content h2,.studio-widget .guestbook-heading h2{font-size:25px}.studio-header-cover{height:105px}.studio-header-cover[data-size=compact]{height:72px}.studio-header-cover[data-size=tall]{height:160px}.studio-dialog{width:100%;max-width:none;max-height:80dvh;max-height:80svh;margin:auto 0 0;border-radius:24px 24px 0 0;border-width:1px 0 0;padding-bottom:env(safe-area-inset-bottom)}#studio-dialog-body{padding:12px 18px 22px}.studio-active .profile-footnote{margin-top:18px}.studio-grid .studio-add{min-height:88px}.studio-dialog::backdrop{backdrop-filter:blur(2px)}}
@media(prefers-reduced-motion:reduce){.studio-widget{transition:none}.studio-drag-ghost{will-change:auto}}
/* Reusable widget content */
.widget-markdown{font-size:16px;line-height:1.65;overflow-wrap:anywhere}.widget-markdown>:first-child{margin-top:0}.widget-markdown>:last-child{margin-bottom:0}.widget-markdown p{margin:0 0 12px}.widget-markdown h1{font-size:29px}.widget-markdown h2{font-size:25px}.widget-markdown h3{font-size:21px}.widget-markdown h4,.widget-markdown h5,.widget-markdown h6{font-size:18px}.widget-markdown :is(h1,h2,h3,h4,h5,h6){margin:20px 0 10px;line-height:1.25}.widget-markdown ul,.widget-markdown ol{padding-left:24px;margin:10px 0 16px}.widget-markdown li{margin:4px 0}.widget-markdown blockquote{border-left:3px solid var(--profile-b);padding:6px 16px;margin:14px 0;color:var(--muted)}.widget-markdown hr{border:0;border-top:1px solid var(--line);margin:20px 0}.widget-markdown pre{overflow:auto;max-width:100%;background:var(--wash);padding:14px;border-radius:12px;font-size:13px;line-height:1.5}.widget-markdown code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.87em;background:var(--wash);border-radius:4px;padding:2px 4px}.widget-markdown pre code{padding:0;background:none}.widget-markdown table{display:block;max-width:100%;overflow:auto;border-collapse:collapse;font-size:14px}.widget-markdown td,.widget-markdown th{border:1px solid var(--line);padding:8px 10px}.widget-markdown a{text-decoration:underline;text-underline-offset:3px;color:var(--link)}
.widget-pill{display:inline-block;vertical-align:baseline;border:1px solid color-mix(in srgb,var(--profile-a) 55%,var(--line));background:linear-gradient(115deg,color-mix(in srgb,var(--profile-a) 24%,var(--surface)),color-mix(in srgb,var(--profile-b) 24%,var(--surface)));border-radius:999px;padding:3px 12px;margin:3px 3px 3px 0;font-size:14px;line-height:1.5;color:var(--ink);max-width:100%;overflow-wrap:anywhere}
.widget-images{display:grid;gap:14px;min-width:0}.widget-images.layout-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.widget-images:has(figure:only-child){grid-template-columns:1fr}.widget-images figure{margin:0;min-width:0}.widget-images figcaption{font-size:14px;line-height:1.4;margin:8px 0 0;overflow-wrap:anywhere;color:var(--muted)}
#profile-studio .widget-photo{display:block;width:100%;padding:0;min-height:0;border:0;border-radius:12px;overflow:hidden;background:var(--wash);box-shadow:none;transform:none;line-height:0;cursor:zoom-in}#profile-studio .widget-photo:hover{transform:none;box-shadow:none}.widget-photo img{display:block;width:100%;height:auto;max-height:640px;object-fit:contain}.widget-images.fit-cover img{aspect-ratio:1;object-fit:cover}.widget-images.layout-grid.fit-contain img{aspect-ratio:1;object-fit:contain}.studio-content-preview .widget-photo{pointer-events:none}.studio-template-heading{font-size:17px;margin:20px 0 8px}
.studio-content-editor{width:min(820px,calc(100vw - 40px));height:min(850px,90dvh);max-height:90dvh;overflow:hidden}.studio-content-editor[open]{display:flex;flex-direction:column}.studio-content-editor>header{flex-shrink:0;padding:12px 18px}.studio-content-editor>header>button{min-height:44px;padding:8px 18px;font-size:15px}#studio-editor-body{overflow:auto;overscroll-behavior:contain;padding:0 22px 22px;flex:1;min-height:0}#studio-editor-status{flex-shrink:0;border-top:1px solid var(--line);padding:10px 20px;margin:0;font-size:12px;color:var(--muted)}
.studio-editor-tabs{display:flex;align-items:center;gap:4px;position:sticky;top:0;background:var(--surface);z-index:2;padding:12px 0;margin-bottom:8px}.studio-editor-tabs>span{flex:1}.studio-editor-tabs button{min-height:42px;padding:8px 14px;border:0;background:transparent;box-shadow:none;color:inherit;font:inherit;font-size:15px;border-radius:12px;transform:none}.studio-editor-tabs button[aria-pressed=true]{background:var(--wash);font-weight:600}.studio-editor-tabs .ui-icon{width:22px;height:22px}.studio-title-field{display:block;margin-bottom:16px;font-size:14px}.studio-title-field input{display:block;width:100%;margin-top:6px;font-size:19px}.studio-format-tools{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 8px}.studio-format-tools button{font:inherit;font-size:14px;min-width:40px;min-height:40px;padding:6px 12px;border:0;background:var(--wash);box-shadow:none;color:inherit;transform:none}
#studio-markdown-source{display:block;width:100%;min-height:320px;min-height:42dvh;resize:vertical;line-height:1.6;font:16px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;padding:16px;border-radius:14px}.studio-markdown-help{font-size:13px;color:var(--muted);margin-top:14px}.studio-markdown-help summary{cursor:pointer;min-height:40px;padding:10px 0;list-style:revert}.studio-markdown-help pre{white-space:pre-wrap;line-height:1.7;background:var(--wash);padding:14px;border-radius:12px;font-size:13px}.studio-content-preview{border:1px solid var(--line);border-radius:18px;margin:4px 0 18px;overflow:hidden;background:var(--surface)}.studio-content-preview .studio-card-content>h2{display:block}.studio-image-settings{display:flex;gap:14px;margin-bottom:18px}.studio-image-settings label{flex:1;min-width:0;font-size:14px}.studio-image-settings select{width:100%;margin-top:6px;font:inherit;min-height:44px}.studio-image-item{display:grid;grid-template-columns:110px minmax(0,1fr);gap:14px;padding:16px 0;border-top:1px solid var(--line)}.studio-image-item>img{width:110px;height:110px;object-fit:contain;background:var(--wash);border-radius:12px}.studio-image-item label{display:block;font-size:13px;margin-bottom:10px}.studio-image-item input{width:100%;margin-top:4px;font-size:16px}.studio-photo-actions{display:flex;gap:4px}.studio-photo-actions button{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:40px;padding:6px 10px;background:transparent;box-shadow:none;border:0;color:inherit;font:inherit;font-size:13px;transform:none}.studio-upload-row{display:flex;align-items:center;gap:14px;padding-top:16px}.studio-upload-row button{display:flex;align-items:center;gap:8px;min-height:46px;font-size:15px}.studio-upload-row span{font-size:13px;color:var(--muted)}#studio-upload-error,#studio-editor-error{font-size:14px;color:var(--ink)}#studio-editor-error:empty{display:none}
@media(max-width:700px){.studio-content-editor{inset:0;margin:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding-bottom:env(safe-area-inset-bottom)}.studio-content-editor>header{padding:12px 16px}.studio-content-editor>header h2{font-size:24px}#studio-editor-body{padding:0 16px 20px}.studio-image-item{grid-template-columns:80px minmax(0,1fr);gap:12px}.studio-image-item>img{width:80px;height:80px}.widget-images{gap:10px}.studio-widget[data-width=half] .widget-images.layout-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Swipeable galleries use native scrolling so vertical page scroll stays natural. */
.widget-carousel{min-width:0}.widget-images.layout-carousel{display:flex;position:relative;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;align-items:start}.widget-images.layout-carousel::-webkit-scrollbar{display:none}.widget-images.layout-carousel>figure{flex:0 0 100%;scroll-snap-align:start;scroll-snap-stop:always}.widget-images.layout-carousel .widget-photo img{aspect-ratio:4/3;max-height:560px}.widget-images.layout-carousel.fit-cover .widget-photo img{aspect-ratio:1}.widget-carousel-controls{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px}#profile-studio .widget-carousel-controls button{display:grid;place-items:center;flex-shrink:0;min-height:44px;min-width:28px;padding:0;border:0;background:transparent;box-shadow:none;color:inherit;transform:none}#profile-studio .widget-carousel-controls>[data-carousel-step]{width:44px;border-radius:12px;background:var(--wash)}.widget-carousel-controls [aria-disabled=true]{opacity:.3;cursor:default}.widget-carousel-dots{display:flex;justify-content:center;flex-wrap:wrap;gap:0;min-width:0}.widget-carousel-dots span{display:block;width:6px;height:6px;border-radius:99px;background:var(--muted);opacity:.35;transition:width .2s,opacity .2s}.widget-carousel-dots [aria-current=true] span{width:18px;opacity:1;background:var(--link)}.widget-carousel-controls .ui-icon{width:22px;height:22px}
@keyframes studio-press{0%{transform:scale(1)}45%{transform:scale(.986)}100%{transform:scale(.96)}}
@keyframes studio-lift{0%{scale:.96;rotate:0deg}45%{scale:1.075;rotate:-1.8deg}72%{scale:1.02;rotate:1.7deg}100%{scale:1.04;rotate:1deg}}
.is-editing .studio-widget.is-pressing{animation:studio-press 320ms ease-out both;box-shadow:0 1px 4px #30364f12}.studio-drag-ghost{animation:studio-lift 460ms ease-out both;transform-origin:50% 35%}
@media(prefers-reduced-motion:reduce){.is-editing .studio-widget.is-pressing,.studio-drag-ghost{animation:none}.widget-carousel-dots span{transition:none}}
/* Appearance stays scoped to the profile canvas and its content cards. */
#profile-studio.has-page-appearance{padding:16px;border-radius:24px;background-color:var(--studio-page);background-image:var(--studio-pattern,none)}
[data-page-pattern=dots]{--studio-pattern:radial-gradient(color-mix(in srgb,var(--line) 70%,transparent) 1px,transparent 1px);background-size:16px 16px}
[data-page-pattern=grid]{--studio-pattern:linear-gradient(color-mix(in srgb,var(--line) 50%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--line) 50%,transparent) 1px,transparent 1px);background-size:24px 24px}
[data-page-pattern=none]{--studio-pattern:none}
#profile-studio .studio-widget,#profile-studio .studio-header,.appearance-sample,#studio-content-preview{background:var(--card-bg,var(--surface));border:var(--card-border-width,1px) var(--card-border-style,solid) var(--card-border,var(--line));border-radius:var(--card-radius,20px);box-shadow:var(--card-shadow,none);color:var(--ink)}
#profile-studio .studio-identity{background:var(--card-bg,var(--surface))}.studio-stickers{position:absolute;inset:0;pointer-events:none;z-index:3;overflow:hidden;border-radius:inherit}.studio-sticker{position:absolute;display:grid;place-items:center;width:var(--sticker-size);height:var(--sticker-size);max-width:100%;max-height:100%;left:clamp(calc(var(--sticker-size)/2),calc(var(--sticker-x) + var(--sticker-dx)),calc(100% - var(--sticker-size)/2));top:clamp(calc(var(--sticker-size)/2),calc(var(--sticker-y) + var(--sticker-dy)),calc(100% - var(--sticker-size)/2));transform:translate(-50%,-50%) rotate(var(--sticker-rotation));filter:drop-shadow(0 2px 2px #30273718)}.studio-sticker .ui-icon,.studio-sticker img{width:100%;height:100%;object-fit:contain}.studio-sticker svg{fill:currentColor}.studio-content-preview{position:relative}
.appearance-dialog{width:min(560px,calc(100vw - 32px));max-height:90dvh}.appearance-panel fieldset{display:grid;gap:14px;margin:18px 0;padding:14px 0;border-top:1px solid var(--line)}.appearance-panel legend{font-size:19px;font-weight:600}.appearance-panel label{display:block;font-size:14px}.appearance-panel select{display:block;min-height:44px;width:100%;font:inherit;margin-top:5px}.appearance-color>span{display:flex;align-items:center;gap:10px}.appearance-color select{flex:1}.appearance-color input[type=color]{flex:0 0 46px;width:46px;height:44px;min-height:44px;margin-top:5px;padding:5px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.appearance-range output{float:right;font-variant-numeric:tabular-nums;color:var(--muted)}.appearance-range input{display:block;width:100%;margin:8px 0 0;min-height:32px}.appearance-preview{position:sticky;top:0;z-index:4;padding:18px;background-color:var(--studio-page);background-image:var(--studio-pattern,none);border-radius:16px;max-height:230px;overflow:auto;border:1px solid var(--line)}.appearance-sample{position:relative;min-height:130px;overflow:hidden;padding:18px}.appearance-sample>.studio-card-content{padding:0!important}.appearance-sample h2{margin:0 0 8px;font-size:23px}.appearance-sample p{margin:6px 0 12px}.appearance-sample.appearance-cover{height:160px;background:linear-gradient(120deg,var(--profile-a),var(--profile-b));display:grid;place-items:center}.appearance-cover>span{font-size:22px;color:var(--ink)}.appearance-icon-picker{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin:12px 0}.appearance-icon-picker button,.appearance-sticker-list button{display:grid;place-items:center;min-width:0;min-height:48px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--wash);color:inherit;box-shadow:none;transform:none}.appearance-icon-picker .ui-icon{width:30px;height:30px}.appearance-sticker-list{display:flex;gap:8px;flex-wrap:wrap}.appearance-sticker-list button{width:48px;height:48px}.appearance-sticker-list button[aria-pressed=true]{outline:2px solid var(--link);outline-offset:1px}.appearance-sticker-list .ui-icon,.appearance-sticker-list img{width:30px;height:30px;object-fit:contain}.appearance-panel details>summary{min-height:44px;padding:10px 0;cursor:pointer}.appearance-panel [data-sticker-controls]{display:grid;gap:14px}.appearance-save-status{position:sticky;bottom:-18px;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;background:var(--surface);border-top:1px solid var(--line);font-size:12px}.appearance-save-status button{min-height:44px}.appearance-panel [data-sticker-error]:empty{display:none}
@media(max-width:700px){#profile-studio.has-page-appearance{padding:10px;border-radius:18px}.appearance-dialog{width:100%;max-height:90dvh;border-radius:24px 24px 0 0}.appearance-preview{max-height:190px;padding:12px}#studio-toolbar .studio-icon-button{flex:1;min-width:0;width:auto}.appearance-icon-picker{grid-template-columns:repeat(6,minmax(0,1fr))}}
#profile-studio.has-page-appearance .profile-footnote,#profile-studio.has-page-appearance .profile-footnote a{color:var(--studio-page-ink)}
#profile-studio.has-page-appearance #studio-add{color:var(--studio-page-ink)}
/* Fit the rotated sticker inside its anchor region, including short mobile covers. */
.studio-sticker{--sticker-fitted:var(--sticker-size);--sticker-half:calc(var(--sticker-fitted)*var(--sticker-factor)/2);width:var(--sticker-fitted);height:var(--sticker-fitted);left:clamp(var(--sticker-half),calc(var(--sticker-x) + var(--sticker-dx)),calc(100% - var(--sticker-half)));top:clamp(var(--sticker-half),calc(var(--sticker-y) + var(--sticker-dy)),calc(100% - var(--sticker-half)))}
@supports(width:1cqw){.studio-stickers{container-type:size}.studio-sticker{--sticker-fitted:min(var(--sticker-size),calc(100cqw / var(--sticker-factor)),calc(100cqh / var(--sticker-factor)))}}
.appearance-sample .studio-card-content>h2{display:block}
/* Dedicated sticker workspace: the content stays still while stickers move. */
.sticker-editor-dialog{width:min(900px,calc(100vw - 32px));height:min(900px,94dvh);max-height:94dvh}.sticker-editor-dialog #studio-dialog-body{padding:16px 20px 22px}.sticker-editor-dialog .appearance-preview{position:relative;max-height:60dvh;min-height:220px;padding:24px;overflow:auto}.sticker-editor-dialog .appearance-sample{min-height:180px;overflow:visible}.sticker-editor-dialog .appearance-cover{min-height:0}.sticker-canvas .studio-stickers{overflow:visible;pointer-events:none}.sticker-canvas .studio-sticker{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab;border-radius:8px}.sticker-canvas .studio-sticker>svg,.sticker-canvas .studio-sticker>img{pointer-events:none;-webkit-user-drag:none}.sticker-canvas .studio-sticker.is-selected{outline:2px solid var(--link);outline-offset:5px}.sticker-canvas .studio-sticker:focus-visible{outline:3px solid var(--link);outline-offset:5px}.sticker-resize-handle{position:absolute;bottom:-15px;right:-15px;width:32px;height:32px;padding:6px;display:grid;place-items:center;border:2px solid var(--link);border-radius:50%;background:var(--surface);color:var(--link);box-shadow:0 2px 8px #30273726;cursor:nwse-resize;touch-action:none}.sticker-resize-handle .ui-icon{width:18px;height:18px}.is-sticker-dragging .studio-sticker{cursor:grabbing}.sticker-fine-controls{margin-top:10px}.sticker-fine-controls[open]{display:grid;gap:12px}.sticker-tools{margin-top:8px!important}.sticker-editor-dialog .appearance-icon-picker{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(min-width:760px){.sticker-editor-dialog .appearance-panel{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px}.sticker-editor-dialog .appearance-preview{grid-column:1;grid-row:1/4;align-self:start;position:sticky;top:0}.sticker-editor-dialog .appearance-panel>.studio-help,.sticker-editor-dialog .sticker-tools{grid-column:2}.sticker-editor-dialog .appearance-save-status{grid-column:1/-1}.sticker-editor-dialog .appearance-icon-picker{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.sticker-editor-dialog{inset:0;margin:0;width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}.sticker-editor-dialog #studio-dialog-body{padding:12px 16px 24px}.sticker-editor-dialog .appearance-preview{max-height:52dvh;min-height:200px;padding:20px}.sticker-editor-dialog .appearance-save-status{bottom:0}.sticker-editor-dialog .appearance-sample{padding:18px}}
.sticker-editor-dialog [data-add-sticker]{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}.sticker-editor-dialog [data-add-sticker] svg{pointer-events:none}

/* Custom colors belong to widget content, never the editor controls. */
#profile-studio .studio-widget.has-profile-buttons .studio-widget-body button:not(.widget-photo):not([data-carousel-step]):not([data-carousel-index]):not(.content-dropdown button),#profile-studio .studio-widget.has-profile-buttons .studio-widget-body .button-link,.appearance-sample.has-profile-buttons button:not(.widget-photo):not([data-carousel-step]):not([data-carousel-index]):not(.content-dropdown button),.appearance-sample.has-profile-buttons .button-link,#studio-content-preview.has-profile-buttons button:not(.widget-photo):not([data-carousel-step]):not([data-carousel-index]):not(.content-dropdown button),#studio-content-preview.has-profile-buttons .button-link{background:var(--profile-button-bg);color:var(--profile-button-ink)}

/* Media uses the profile palette; dot hit areas stay transparent. */
#profile-studio .studio-widget .studio-widget-body .widget-photo,#profile-studio .appearance-sample .widget-photo,#studio-content-preview .widget-photo{background:linear-gradient(120deg,color-mix(in srgb,var(--profile-a) 30%,var(--surface)),color-mix(in srgb,var(--profile-b) 30%,var(--surface)))}
#profile-studio .studio-widget .studio-widget-body [data-carousel-step],#profile-studio .appearance-sample [data-carousel-step],#studio-content-preview [data-carousel-step]{background:var(--profile-button-bg);color:var(--profile-button-ink)}
#profile-studio .widget-carousel-dots [aria-current=true] span{background:var(--ink)}

.studio-banner-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;border-radius:inherit}.studio-banner-preview{position:relative;height:140px;overflow:hidden;border-radius:16px;margin-bottom:16px;background:linear-gradient(120deg,var(--profile-a),var(--profile-b))}#studio-cover-edit{z-index:4}.appearance-cover:has(.studio-banner-image)>span{display:none}

.profile-cover.has-banner-image::after{display:none}#profile-studio #studio-cover-edit{z-index:4}

/* Filled profile header actions share the profile's button palette. */
#profile-studio .studio-header .studio-profile-actions :is(button,.button-link):not(.quiet-button){background:var(--profile-button-bg);color:var(--profile-button-ink)}

/* Responsive sticker sizing and explicit editor device previews. */
.studio-sticker{--sticker-size:var(--sticker-base-size);--sticker-x:var(--sticker-base-x);--sticker-y:var(--sticker-base-y);--sticker-dx:var(--sticker-base-dx);--sticker-dy:var(--sticker-base-dy)}
@media(max-width:700px){.studio-sticker{--sticker-size:var(--sticker-phone-size);--sticker-x:var(--sticker-phone-x);--sticker-y:var(--sticker-phone-y);--sticker-dx:var(--sticker-phone-dx);--sticker-dy:var(--sticker-phone-dy)}}
.sticker-canvas[data-device=desktop] .studio-sticker{--sticker-size:var(--sticker-base-size);--sticker-x:var(--sticker-base-x);--sticker-y:var(--sticker-base-y);--sticker-dx:var(--sticker-base-dx);--sticker-dy:var(--sticker-base-dy)}
.sticker-canvas[data-device=phone] .studio-sticker{--sticker-size:var(--sticker-phone-size);--sticker-x:var(--sticker-phone-x);--sticker-y:var(--sticker-phone-y);--sticker-dx:var(--sticker-phone-dx);--sticker-dy:var(--sticker-phone-dy)}
.sticker-device-switch{display:flex;gap:8px;align-items:center;flex-wrap:wrap;grid-column:1/-1}.sticker-device-switch button{background:var(--surface);color:var(--ink);box-shadow:none}.sticker-device-switch button[aria-pressed=true]{background:var(--wash);outline:2px solid var(--line)}.sticker-device-switch span{font-size:12px;color:var(--muted)}.sticker-editor-dialog .appearance-panel{display:block}.sticker-editor-dialog .appearance-preview{position:relative;margin-top:14px;max-width:100%;overflow:auto;padding:20px}.sticker-editor-dialog .sticker-canvas{max-width:none;min-height:0;flex-shrink:0;box-sizing:border-box;padding:0;margin:0}.sticker-editor-dialog .sticker-canvas .studio-card-content{padding:22px!important}.sticker-editor-dialog .sticker-canvas[data-device=phone] .studio-card-content{padding:18px!important}.sticker-editor-dialog .sticker-canvas h2{font-size:25px;line-height:1.25;margin:0 0 14px}.sticker-editor-dialog .sticker-canvas p{margin-top:1em;margin-bottom:0}.sticker-option{display:flex!important;align-items:center;gap:8px}.sticker-option input{min-height:0;width:18px;height:18px}.sticker-editor-dialog .appearance-cover{overflow:hidden}
