:root{--site-bg:var(--bg);--site-surface:var(--surface);--site-raised:var(--raised);--site-line:var(--line);--site-text:var(--text);--site-muted:var(--muted);--site-accent:var(--cyan);--site-accent-hover:var(--cyan-hover);--site-button-ink:var(--light-button-ink,#071419);--site-font-body:var(--font-body)}
body.profile-theme-active{background-color:var(--profile-page);background-image:var(--profile-background-image);background-size:var(--profile-background-size);background-repeat:var(--profile-background-repeat);background-position:center top;background-attachment:var(--profile-background-attachment)}
#live-profile.has-profile-theme{color:var(--text);font-family:var(--font-body)}
#live-profile.has-profile-theme h1,#live-profile.has-profile-theme h2,#live-profile.has-profile-theme h3{color:var(--profile-heading);font-family:var(--font-display)}
#live-profile.has-profile-theme a:not(.button){color:var(--profile-link)}
#live-profile.has-profile-theme .profile-layout-section>.layout-section-content>.profile-small-section,
#live-profile.has-profile-theme .profile-about,
#live-profile.has-profile-theme .legacy-profile-panels>section,
#live-profile.has-profile-theme .legacy-profile-panels>.profile-panel,
#live-profile.has-profile-theme .legacy-profile-panels>.event-comments-panel,
#live-profile.has-profile-theme .friends-customization>.profile-panel{background:var(--surface);border:var(--profile-border-width) var(--profile-border-style) var(--line);border-radius:var(--profile-radius);box-shadow:var(--profile-shadow)}
#live-profile.has-profile-theme .profile-about-stats img{filter:var(--profile-points-filter)}
#live-profile.has-profile-theme .profile-about-heading h2{color:var(--profile-heading)}
/* Editing controls retain the website palette so every theme can be changed. */
#live-profile .profile-actions,#live-profile .profile-layout-editor,#live-profile .layout-section-tools,#live-profile .layout-save-bar,#live-profile .profile-editor{
  --bg:var(--site-bg);--surface:var(--site-surface);--raised:var(--site-raised);--line:var(--site-line);--text:var(--site-text);--muted:var(--site-muted);--cyan:var(--site-accent);--cyan-hover:var(--site-accent-hover);--light-bg:var(--site-bg);--light-panel:var(--site-surface);--light-raised:var(--site-raised);--light-line:var(--site-line);--light-text:var(--site-text);--light-muted:var(--site-muted);--light-accent:var(--site-accent);--light-button-ink:var(--site-button-ink);color:var(--site-text);font-family:var(--site-font-body)
}
#live-profile.has-profile-theme .profile-editor h2,#live-profile.has-profile-theme .profile-editor h3,#live-profile.has-profile-theme .profile-layout-editor h2{color:var(--site-text);font-family:Rajdhani,"Segoe UI",sans-serif}
#live-profile.has-profile-theme .profile-actions{padding:10px;border:1px solid var(--site-line);border-radius:8px;background:var(--site-surface)}
#live-profile.has-profile-theme .profile-actions a:not(.button){color:var(--site-accent)}
#live-profile .profile-actions:empty{display:none}
#live-profile.profile-gradient-border .profile-grid :is(.profile-small-section,.profile-about,.legacy-profile-panels>section,.legacy-profile-panels>.profile-panel,.friends-customization){background:var(--profile-panel-fill);border-color:transparent}
#live-profile.profile-gradient-border .profile-grid :is(.event-comment-form,.event-comment-list>article){background:var(--profile-raised-fill);border-color:transparent}
#live-profile.profile-gradient-border .profile-grid :is(.profile-small-section,.profile-about,.legacy-profile-panels>section,.legacy-profile-panels>.profile-panel,.friends-customization,.event-comment-form,.event-comment-list>article){position:relative;border-width:var(--profile-border-width)}
#live-profile.profile-gradient-border .profile-grid :is(.profile-small-section,.profile-about,.legacy-profile-panels>section,.legacy-profile-panels>.profile-panel,.friends-customization,.event-comment-form,.event-comment-list>article)::after{content:"";position:absolute;inset:calc(0px - var(--profile-border-width));box-sizing:border-box;z-index:1;padding:var(--profile-border-width);border-radius:inherit;background:var(--profile-border-gradient);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;pointer-events:none}
#live-profile.profile-gradient-border .profile-about{overflow:visible}
#live-profile.profile-gradient-border .profile-about-heading{border-radius:max(0px,calc(var(--profile-radius) - var(--profile-border-width))) max(0px,calc(var(--profile-radius) - var(--profile-border-width))) 0 0}
#live-profile.profile-gradient-border .friends-customization{overflow:visible;border-radius:var(--profile-radius)}
#live-profile.profile-gradient-border .friends-customization>.profile-panel{border:0;border-radius:0;background:transparent;box-shadow:none}
#live-profile.profile-gradient-accent .profile-grid :is(.button.primary,.event-comment-form-actions button[type=submit],.profile-events-tabs .active){background:var(--profile-accent-gradient);color:var(--light-button-ink);border-color:var(--cyan)}
@supports(background-clip:text){
  #live-profile.profile-gradient-text .profile-grid :is(p,li,td,th,dt,dd,.event-comment-body):not(:where(form *,.profile-editor *,.top-friends-editor *)){background-image:var(--profile-text-gradient);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}
  #live-profile.profile-gradient-heading :is(.profile-title h1,.profile-grid h2,.profile-grid h3):not(:where(form *,.profile-editor *,.top-friends-editor *)){width:fit-content;max-width:100%;background-image:var(--profile-heading-gradient);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}
  #live-profile.profile-gradient-muted .profile-grid :is(.muted,.form-hint,.rating-count,.event-comment-meta,.profile-about-presence):not(:where(form *,.profile-editor *,.top-friends-editor *)){background-image:var(--profile-muted-gradient);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}
  #live-profile.profile-gradient-link .profile-grid a:not(.button):not(:where(form *,.profile-editor *,.top-friends-editor *)){background-image:var(--profile-link-gradient);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}
  #live-profile.has-profile-theme :is(input,textarea,select,button,.button,.profile-actions,.layout-section-tools,.profile-editor,.top-friends-editor){-webkit-text-fill-color:currentColor}
  #live-profile.has-profile-theme .profile-grid a:not(.button){-webkit-text-fill-color:currentColor}
  #live-profile.profile-gradient-link .profile-grid a:not(.button):not(:where(form *,.profile-editor *,.top-friends-editor *)){-webkit-text-fill-color:transparent}
  #live-profile:is(.profile-gradient-text,.profile-gradient-heading,.profile-gradient-muted,.profile-gradient-link) svg{color:var(--cyan);-webkit-text-fill-color:currentColor}
}
.profile-theme-editor{width:min(1240px,calc(100% - 80px));margin:32px auto 0;padding:26px;border:1px solid var(--cyan);border-radius:12px;background:var(--surface);color:var(--text)}
.theme-editor-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.theme-editor-heading h2{font-size:30px;margin-bottom:10px}
.theme-editor-heading p{font-size:13px;max-width:70ch}
.theme-editor-heading .badge{flex-shrink:0;color:var(--cyan)}
.theme-presets{border:0;border-top:1px solid var(--line);display:flex;gap:10px;flex-wrap:wrap;margin:24px 0;padding:15px 0 0}
.theme-presets legend{font-size:13px;font-weight:600;padding-right:12px}
.theme-presets button{padding:9px 13px;border:1px solid var(--line);border-left:4px solid var(--preset-color,var(--cyan));border-radius:6px;background:var(--raised);font-size:12px}
.theme-presets button:hover{border-color:var(--cyan)}
.theme-control-group{border-top:1px solid var(--line);padding:15px 0}
.theme-control-group summary{cursor:pointer;font-size:13px;font-weight:650;color:var(--text)}
.theme-control-group[open] summary{margin-bottom:20px}
.theme-color-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 26px}
.theme-color{font-size:12px;font-weight:500;margin:0}
.theme-color>span{display:flex;align-items:center;gap:12px;margin-top:6px}
.theme-color input{width:46px;min-height:32px;height:32px;padding:3px;border-radius:5px;cursor:pointer;flex-shrink:0}
.theme-color output{font-size:11px;color:var(--muted);font-family:"Courier New",monospace}
.theme-font-grid,.theme-background-grid,.theme-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 26px;margin-top:22px}
.theme-control-group label{font-size:12px;margin:0;font-weight:500;min-width:0}
.theme-control-group input:not([type=color]),.theme-control-group select{margin-top:7px}
.theme-control-group select{width:100%;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px;min-height:42px;padding:9px 12px}
.theme-background-grid{margin-bottom:14px}
.theme-wide{grid-column:1/-1}
.theme-gradient{min-width:0;margin:0;padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--raised)}
.theme-gradient legend{padding:0 8px;font-size:13px;font-weight:600}
.theme-gradient-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 26px;margin-top:18px}
.theme-gradient>.form-hint{margin-top:12px}
.theme-role-gradients{margin-top:24px}
.theme-role-gradients>.theme-check{margin-top:14px}
.theme-check{display:flex;align-items:center;gap:10px;grid-column:1/-1}
.theme-check input{margin:0!important;flex-shrink:0}
.theme-range>span{display:flex;align-items:center;gap:12px}
.theme-range input{padding:0;min-height:30px;accent-color:var(--cyan)}
.theme-range output{font-size:11px;color:var(--muted);white-space:nowrap;min-width:36px}
.theme-editor-status{font-size:12px;margin-top:12px;white-space:pre-line}
.theme-save-bar{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:86;display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--cyan);box-shadow:0 8px 32px #0005;border-radius:10px;padding:12px 16px;max-width:calc(100vw - 28px)}
.theme-save-bar>span{font-size:11px;color:var(--muted)}
.theme-save-bar .button{flex-shrink:0}
.is-theme-editing{padding-bottom:140px!important}
.profile-theme-feedback{width:min(1240px,calc(100% - 80px));margin:20px auto;padding:14px 18px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:12px}
@media(max-width:1150px){.profile-theme-editor,.profile-theme-feedback{width:calc(100% - 56px)}}
@media(max-width:760px){.profile-theme-editor{padding:18px}.theme-editor-heading{flex-wrap:wrap}.theme-color-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.theme-font-grid,.theme-background-grid,.theme-panel-grid{gap:16px}.theme-save-bar{width:calc(100vw - 28px);padding:10px;gap:8px;justify-content:flex-end;flex-wrap:wrap}.theme-save-bar>span{width:100%;text-align:center}}
@media(max-width:720px){.profile-theme-editor,.profile-theme-feedback{width:calc(100% - 36px)}}
@media(max-width:400px){.theme-font-grid,.theme-background-grid,.theme-panel-grid,.theme-gradient-grid{grid-template-columns:1fr}.theme-presets{gap:8px}.theme-presets button{padding:8px 9px;font-size:11px}}
