/* Shared theme selection. All existing accent surfaces use the palette tokens. */
:root{color-scheme:dark}
.themePickerSheet{max-width:460px;max-height:88vh;max-height:88dvh;display:flex;flex-direction:column;overflow:hidden}.themePickerSheet h3{margin:0}.themePickerSheet>p{line-height:1.45}.themePickerSheet>.row,.themePickerSheet>p{flex:none}
#themePickerOptions{display:grid;gap:8px;margin-top:18px;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 3px 6px;scrollbar-width:thin;scrollbar-color:#34404b transparent}
.themeOption{display:flex;align-items:center;gap:15px;width:100%;min-height:76px;padding:14px 16px;border:1px solid #242424;border-radius:16px;background:#090909;color:#eee;text-align:left;font:inherit;cursor:pointer}
.themeOption.on{border-color:var(--a);background:#101010}.themeOption:focus-visible{outline:1px solid var(--a);outline-offset:2px}
.themeSwatch{position:relative;flex:none;width:36px;height:36px;border-radius:50%;background:var(--theme-preview);box-shadow:0 0 24px -5px var(--theme-preview)}
.themeOptionCopy{flex:1;min-width:0}.themeOptionCopy b{display:block;font-size:15px}.themeOptionCopy small{display:block;margin-top:5px;color:#929292;font-size:11px}.themeOptionCheck{visibility:hidden;color:var(--a);font-size:19px}.themeOption.on .themeOptionCheck{visibility:visible}
#themePickerStatus{min-height:17px;margin-bottom:0}#profileThemeName{color:var(--a)}
@media(prefers-reduced-motion:reduce){.themeOption,.themeSwatch{transition:none}}

/* Graphite: charcoal surfaces, restrained silver light and monochrome artwork. */
:root[data-theme="graphite"]{
 --bg:#020202;--p:#080808;--p2:#101010;--line:#252525;
 --hub-page-background:radial-gradient(ellipse at 50% -12%,#181818 0,transparent 28%),#020202;
 --hub-top-fade:linear-gradient(#020202 70%,transparent);
 --hub-home-icon-filter:grayscale(1);
 --aihub-glass-surface-bg:rgba(12,12,12,.86);
 --glass-popover-selected-bg:rgba(255,255,255,.045);
}
:root[data-theme="graphite"] .card{background:linear-gradient(160deg,#101010,#060606);border-color:#242424}
:root[data-theme="graphite"] .bal,:root[data-theme="graphite"] .backBtn{background:#080808;border-color:#292929}
:root[data-theme="graphite"] .themeSwatch{background:linear-gradient(135deg,#eee,#6b6b6b);box-shadow:0 0 20px -8px #ddd}
:root[data-theme="graphite"] .themeOption:not([data-theme-option="graphite"]) .themeSwatch{background:var(--theme-preview);box-shadow:0 0 24px -5px var(--theme-preview)}

/* Springfield: sunny yellow, sky blue and bubblegum pink, with cartoon outlines. */
:root[data-theme="springfield"]{
 --bg:#070b10;--p:#0c1420;--p2:#122236;--line:#244863;
 --hub-page-background:radial-gradient(ellipse at 22% -8%,#23567780 0,transparent 34%),radial-gradient(ellipse at 95% 8%,#ec79a51c 0,transparent 24%),#070b10;
 --hub-top-fade:linear-gradient(#070b10 70%,transparent);
 --hub-home-icon-filter:hue-rotate(18deg) saturate(1.12);
 --aihub-glass-surface-bg:rgba(10,20,31,.9);
 --glass-popover-selected-bg:rgba(104,204,255,.1);
}
:root[data-theme="springfield"] .card{background:linear-gradient(160deg,#122236,#0b121d);border:2px solid #080b10;box-shadow:3px 3px 0 #244863}
:root[data-theme="springfield"] .brand span{box-shadow:2px 2px 0 #ec79a5}
:root[data-theme="springfield"] .bal,:root[data-theme="springfield"] .backBtn{background:#0c1723;border-color:#68ccff66}
:root[data-theme="springfield"] .btn.primary{border:2px solid #080b10;box-shadow:3px 3px 0 #ec79a5;color:#111}
:root[data-theme="springfield"] .themeOption.on{background:#0c1723;box-shadow:3px 3px 0 #68ccff;border-width:2px}
.themeOption[data-theme-option="springfield"] .themeSwatch{background:conic-gradient(#ffd928 0 60%,#68ccff 60% 80%,#ec79a5 80%);box-shadow:0 0 24px -5px #ffd928}
:root[data-theme="graphite"] .themeOption[data-theme-option="springfield"] .themeSwatch{background:conic-gradient(#ffd928 0 60%,#68ccff 60% 80%,#ec79a5 80%)}
:root[data-theme="springfield"] #home .tileFooter b{text-shadow:1px 2px 0 #000}
:root[data-theme="springfield"] .themeOptionCopy small{color:#b5cadb}
:root[data-theme="springfield"] #home .homeChoice{border:2px solid #05080c!important;border-radius:14px;box-shadow:3px 3px 0 #386b8f!important}
:root[data-theme="springfield"] #home .tileFooter{background:linear-gradient(transparent,#142a3f);padding:12px 9px 10px}
:root[data-theme="springfield"] #home .homeChoice:nth-child(3n) {box-shadow:3px 3px 0 #92506b!important}

/* Nebula: obsidian glass, aurora edges and a mint/violet light system. */
:root:is([data-theme="nebula"],[data-theme="pulsar"]){
 --bg:#030609;--p:#080d12;--p2:#10171e;--line:#243039;--t:#edf6f8;--m:#9aaeb6;
 --a2:#bda5ff;
 --hub-page-background:radial-gradient(ellipse at 15% -12%,#86f5dd1c 0,transparent 34%),radial-gradient(ellipse at 96% 4%,#bda5ff17 0,transparent 30%),#030609;
 --hub-top-fade:linear-gradient(#030609 65%,#030609cc 82%,transparent);
 --hub-home-icon-filter:hue-rotate(142deg) saturate(.8);
 --aihub-glass-surface-bg:rgba(9,15,22,.88);
 --glass-popover-selected-bg:rgba(134,245,221,.08);
 --nebula-surface:radial-gradient(ellipse at 0 0,#86f5dd0a,transparent 60%),linear-gradient(150deg,#10171d,#070b10 75%);
 --nebula-edge:inset 0 1px 0 #d5fff016,inset 0 -1px 0 #bda5ff09;
}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) :is(.card,.modelchoice,.chatModelCard,.profileSettingsCard,.profileAuthorCard){background:var(--nebula-surface);border-color:#253039;box-shadow:var(--nebula-edge)}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) :is(.bal,.backBtn){background:#0b1119;border-color:#33434e;box-shadow:inset 0 1px 0 #e4fff312}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) .brand span{background-color:var(--a);background-image:linear-gradient(115deg,#b2ffe8,#86f5dd 60%,#bda5ff);box-shadow:0 3px 18px #86f5dd14}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) .btn.primary:not(:disabled){background-color:var(--a);background-image:linear-gradient(115deg,#b2ffe8,#86f5dd 65%,#bda5ff);color:#071114;box-shadow:inset 0 1px 0 #ffffff60,0 4px 22px #86f5dd12}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) .btn:not(.primary){background:#0d141b;border-color:#2b3843;color:#d9e6ed}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) :is(.field,#form textarea,#form input:not([type="checkbox"]):not([type="range"]),#form select){background:#050a0e;border-color:#263840;color:#edf6f8}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) :is(.field,#form textarea)::placeholder{color:#748892}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) body.musicCreateActive #create #form,
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #create .createCheckout{background:var(--nebula-surface)!important;box-shadow:var(--nebula-edge)!important}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #home .homeChoice{border:1px solid #273940!important;background:#080d12!important;box-shadow:var(--nebula-edge)!important;border-radius:18px}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #home .homeChoice:nth-child(even){border-color:#343046!important}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #home .tileFooter{background:linear-gradient(transparent,#080d12);padding-top:13px}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #home :is(.homeDeveloper,.homeOther) .tilePaper>img{filter:hue-rotate(218deg) saturate(.7)}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #home :is(.homeDeveloper,.homeOther) .tileArrow{stroke:#bda5ff}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #home .tileFooter b{letter-spacing:0;color:#edf6f8}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) .bottom.paperNav{background:#030609f5!important}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) .bottom.paperNav button.on{filter:drop-shadow(0 0 7px #86f5dd30)}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) :is(.modal,.attachmentSheet,.chatDrawerPanel,.workPromptDialog,.radioDialog){background:var(--nebula-surface);border-color:#34404b;box-shadow:var(--nebula-edge),0 24px 80px #0009}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) .themeOption{background:#090e14;border-color:#29333d}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) .themeOption.on{background:linear-gradient(115deg,#86f5dd0d,#bda5ff0b);border-color:var(--a);box-shadow:var(--nebula-edge)}
.themeOption[data-theme-option="nebula"] .themeSwatch,
:root[data-theme="graphite"] .themeOption[data-theme-option="nebula"] .themeSwatch{background:linear-gradient(130deg,#b2ffe8,#86f5dd 48%,#bda5ff);box-shadow:0 0 24px -6px #86f5dd}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #chat .chatModelPanel .chatModelPickerButton,
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #chat .composeInputWrap{background:var(--nebula-surface)!important;box-shadow:var(--nebula-edge)}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) body.chatActive .top{background:var(--hub-top-fade)!important}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #create :is(.imagePromptCard,.imageModelSelect,.imageSettings){background:var(--nebula-surface)!important;box-shadow:var(--nebula-edge)!important}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #create :is(.imageWorkspacePrompt,.imageSettings .field){background:#050a0e!important;border-color:#263840!important;color:#edf6f8}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) .msg.user{background:linear-gradient(125deg,var(--theme-message-start,#b2ffe8),var(--a));color:#071114}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #works .work,
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #works .workTrack,
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #social :is(.socialCard,.socialComposer,.socialConversation){background:var(--nebula-surface);border-color:#253039;box-shadow:var(--nebula-edge)}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #social .socialBubble.mine{background:#172b30;color:#e2fff7}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #radio .radioLight::before{background:radial-gradient(ellipse at 42% 42%,#86f5ddd0 0%,#38b9a46b 24%,transparent 58%),radial-gradient(ellipse at 76% 28%,#bda5ff80 0%,transparent 42%),radial-gradient(ellipse at 22% 66%,#5e67dd55 0%,transparent 43%)}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #radio .radioLight::after{background:radial-gradient(ellipse at 65% 35%,#c6b7ffb0 0%,#8470eb6b 25%,transparent 62%)}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #radio .radioCover{box-shadow:0 0 0 1px #e2fff018,0 14px 50px #0006}
:root:is([data-theme="nebula"],[data-theme="pulsar"]) #radio .radioProgress span{background:linear-gradient(90deg,#86f5dd,#bda5ff)}
@media(hover:hover){
 :root:is([data-theme="nebula"],[data-theme="pulsar"]) #home .homeChoice:hover{border-color:#86f5dd66!important}
 :root:is([data-theme="nebula"],[data-theme="pulsar"]) .btn.primary:not(:disabled):hover{box-shadow:inset 0 1px 0 #ffffff70,0 4px 28px #86f5dd24}
}

/* Pulsar: liquid light, iridium edges, and a restrained spatial response. */
:root[data-theme="pulsar"]{
 --bg:#050508;--p:#0b0b13;--p2:#161421;--line:#3d354f;--t:#f2f0fa;--m:#aca6be;
 --a2:#b08bff;--theme-message-start:#f0ffb5;
 --hub-page-background:radial-gradient(ellipse at 18% -6%,#b08bff28 0,transparent 35%),radial-gradient(ellipse at 95% 10%,#e3ff7812 0,transparent 30%),#050508;
 --hub-top-fade:linear-gradient(#050508 65%,#050508cf 82%,transparent);
 --hub-home-icon-filter:hue-rotate(36deg) saturate(.85);
 --aihub-glass-surface-bg:rgba(15,12,24,.92);
 --glass-popover-selected-bg:rgba(227,255,120,.08);
 --nebula-surface:radial-gradient(ellipse at 4% 0,#b08bff14,transparent 65%),linear-gradient(145deg,#151320,#090910 80%);
 --nebula-edge:inset 0 1px 0 #e7dbff24,inset 0 -1px 0 #e3ff7810;
}
:root[data-theme="pulsar"] body{isolation:isolate}
:root[data-theme="pulsar"] body::before{content:"";position:fixed;inset:-8%;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 20% 30%,#a37aff14 0,transparent 38%),radial-gradient(ellipse at 80% 70%,#e3ff780a 0,transparent 38%);animation:pulsarAtmosphere 18s ease-in-out infinite alternate}
:root[data-theme="pulsar"] :is(.brand span,.btn.primary:not(:disabled)){background-color:var(--a);background-image:linear-gradient(115deg,#f0ffb5,#e3ff78 65%,#9cf9df);color:#101207;box-shadow:inset 0 1px 0 #fff8,0 6px 30px #e3ff7814}
:root[data-theme="pulsar"] #home .homeChoice{border:1px solid transparent!important;background:linear-gradient(#0b0b12,#080810) padding-box,linear-gradient(135deg,#b08bff80,#e3ff7840 48%,#79eaff38) border-box!important;box-shadow:inset 0 1px 0 #ffffff10,0 8px 30px #0003!important;transform:perspective(800px) rotateX(var(--pulsar-rx,0deg)) rotateY(var(--pulsar-ry,0deg));transition:transform .22s ease,border-color .2s ease;border-radius:20px}
:root[data-theme="pulsar"] #home .homeChoice:nth-child(even){border-color:transparent!important}
:root[data-theme="pulsar"] #home .homeChoice::after{content:"";display:block!important;position:absolute;inset:0;z-index:3;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at var(--pulsar-x,70%) var(--pulsar-y,12%),#ddd1ff18 0,transparent 48%);mix-blend-mode:screen}
:root[data-theme="pulsar"] #home .homeChoice::before{content:"";display:block!important;position:absolute;top:0;left:10%;right:10%;height:1px;z-index:4;pointer-events:none;background:linear-gradient(90deg,transparent,#efe6ff90,#e3ff7860,transparent);opacity:.65}
:root[data-theme="pulsar"] #home .tilePaper>img{animation:pulsarSculpture 9s ease-in-out infinite alternate;transform-origin:50% 65%}
:root[data-theme="pulsar"] #home .homeMusic .tilePaper>img{animation-delay:-4s;filter:hue-rotate(168deg) saturate(.85)}
:root[data-theme="pulsar"] #home :is(.homeDeveloper,.homeOther) .tilePaper>img{filter:hue-rotate(235deg) saturate(.75);animation-delay:-2s}
:root[data-theme="pulsar"] #home .tileFooter{background:linear-gradient(transparent,#080810);padding:15px 12px 12px}
:root[data-theme="pulsar"] #home .tileFooter b{font-weight:750;letter-spacing:-.02em;color:#f2f0fa}
:root[data-theme="pulsar"] #home .tileArrow{color:var(--a);stroke:currentColor;border-radius:50%;width:19px;height:19px;padding:3px;background:#e3ff780c}
:root[data-theme="pulsar"] #home :is(.homeDeveloper,.homeOther) .tileArrow{stroke:#c6aaff;background:#b08bff14}
:root[data-theme="pulsar"] :is(.card,.modelchoice,.profileSettingsCard,.chatModelCard){border-color:#393046}
:root[data-theme="pulsar"] :is(.bal,.backBtn){background:#0f0c17;border-color:#51435b;box-shadow:inset 0 1px 0 #e7dbff18}
:root[data-theme="pulsar"] .btn:not(.primary){background:#100e18;border-color:#3e344e;color:#e6e0f1}
:root[data-theme="pulsar"] :is(.field,#form textarea,#form input:not([type="checkbox"]):not([type="range"]),#form select){background:#08070e;border-color:#3a3046;color:#f2f0fa}
:root[data-theme="pulsar"] #create :is(.imageWorkspacePrompt,.imageSettings .field){background:#08070e!important;border-color:#3a3046!important;color:#f2f0fa}
:root[data-theme="pulsar"] #works :is(.work,.workTrack),:root[data-theme="pulsar"] #social :is(.socialCard,.socialComposer,.socialConversation){border-color:#393046}
:root[data-theme="pulsar"] .themeOption{background:#100d18;border-color:#393046}
:root[data-theme="pulsar"] .themeOption.on{background:linear-gradient(115deg,#e3ff7810,#b08bff14);border-color:var(--a)}
.themeOption[data-theme-option="pulsar"] .themeSwatch,
:root[data-theme="graphite"] .themeOption[data-theme-option="pulsar"] .themeSwatch{background:conic-gradient(from 40deg,#e3ff78,#79eaff,#b08bff,#e3ff78);box-shadow:0 0 24px -6px #b08bff}
:root[data-theme="pulsar"] .bottom.paperNav{background:#050508f5!important}
:root[data-theme="pulsar"] .bottom.paperNav button.on{filter:drop-shadow(0 0 9px #e3ff7840)}
:root[data-theme="pulsar"] #social .socialBubble.mine{background:#2d263b;color:#f2eaff}
:root[data-theme="pulsar"] #radio .radioLight::before{background:radial-gradient(ellipse at 42% 42%,#b08bffd0 0%,#7639cb6b 24%,transparent 58%),radial-gradient(ellipse at 76% 28%,#e3ff7880 0%,transparent 42%),radial-gradient(ellipse at 22% 66%,#79eaff55 0%,transparent 43%)}
:root[data-theme="pulsar"] #radio .radioLight::after{background:radial-gradient(ellipse at 65% 35%,#f0ffb5b0 0%,#a8c2436b 25%,transparent 62%)}
:root[data-theme="pulsar"] #radio .radioProgress span{background:linear-gradient(90deg,#b08bff,#e3ff78)}
:root[data-theme="pulsar"] #radio .radioCover{box-shadow:0 0 0 1px #dfc8ff30,0 14px 50px #0007}
@keyframes pulsarAtmosphere{from{transform:translate3d(-2%,-1%,0) rotate(-3deg)}to{transform:translate3d(2%,2%,0) rotate(3deg)}}
@keyframes pulsarSculpture{from{transform:translateY(0) scale(1)}to{transform:translateY(-3px) scale(1.025)}}
@media(hover:hover){:root[data-theme="pulsar"] #home .homeChoice:not(:disabled):hover{border-color:#d5c2ff50!important;box-shadow:inset 0 1px 0 #ffffff18,0 10px 38px #b08bff14!important}}
@media(prefers-reduced-motion:reduce){:root[data-theme="pulsar"] body::before,:root[data-theme="pulsar"] #home .tilePaper>img{animation:none}:root[data-theme="pulsar"] #home .homeChoice{transform:none;transition:none}}
:root[data-theme="pulsar"] body:not(.homeActive)::before{animation-play-state:paused}


/* Red: a vivid scarlet accent against charcoal, without pink tint. */
:root[data-theme="red"]{
 --bg:#030202;--p:#0b0909;--p2:#141011;--line:#302426;
 --hub-page-background:radial-gradient(ellipse at 50% -12%,#e522321a,transparent 32%),#030202;
 --hub-top-fade:linear-gradient(#030202 70%,#030202cc 85%,transparent);
 --hub-home-icon-filter:hue-rotate(325deg) saturate(1.2);
 --aihub-glass-surface-bg:rgba(14,9,10,.9);
 --glass-popover-selected-bg:rgba(229,34,50,.09);
}
:root[data-theme="red"] :is(.brand span,.btn.primary:not(:disabled)){color:#fff}
.themeOption[data-theme-option="red"] .themeSwatch{background:#e52232;box-shadow:0 0 24px -5px #e52232}
