.account-role-editor{box-sizing:border-box;width:1120px;max-width:calc(100vw - 64px);height:calc(100dvh - 64px);max-height:900px;padding:0;border:0;border-radius:32px;background:#1e1e1e;color:#fff;font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden}
.account-role-editor::backdrop{background:rgba(0,0,0,.7);backdrop-filter:blur(8px)}
.account-role-editor *{box-sizing:border-box}.account-role-editor button,.account-role-editor input,.account-role-editor textarea{font:inherit;color:inherit}.account-role-editor button{display:inline-flex;align-items:center;justify-content:center;gap:4px;cursor:pointer;border:1px solid #ffffff1f;border-radius:24px;background:transparent;padding:7px 14px;white-space:nowrap;line-height:16px;font-size:12px}.account-role-editor button:hover:not(:disabled){background:#ffffff14}.account-role-editor button:disabled{opacity:.3;cursor:default}.account-role-editor svg{width:16px;height:16px;flex:none}.account-role-editor header{height:76px;padding:20px 24px;display:flex;align-items:flex-start;justify-content:space-between}.account-role-editor h2{font-size:16px;line-height:24px;margin:0;font-weight:600}.account-role-editor .ar-close{width:30px;height:30px;padding:0;border:0;background:#ffffff14;margin-top:-2px;margin-right:-6px}.account-role-editor .ar-body{display:grid;grid-template-columns:minmax(0,1fr) 276px;gap:20px;padding:0 24px 20px 20px;height:calc(100% - 144px);overflow:auto}.ar-left{display:flex;flex-direction:column;min-height:440px;min-width:0;border-radius:32px;padding:12px;background:#090909}.ar-gallery{flex:1;display:flex;flex-direction:column;min-height:170px;position:relative}.ar-main-image{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:100px;overflow:hidden}.ar-main-image>svg{width:60px;height:60px;color:#ffffff1a}.ar-main-image>img{max-height:100%;max-width:100%;object-fit:contain;position:absolute;inset:0;margin:auto}.ar-image-actions{position:absolute;top:8px;right:8px;display:flex;gap:4px;opacity:0}.ar-main-image:hover .ar-image-actions{opacity:1}.ar-image-actions button{background:#222!important;padding:6px!important}.ar-thumbnails{display:flex;gap:8px;min-height:0;overflow:auto}.ar-thumbnails:empty{height:20px}.ar-thumbnails button{position:relative;width:56px;height:56px;border-radius:8px;padding:0;flex:none;overflow:hidden}.ar-thumbnails button[aria-pressed=true]{border-color:#fff}.ar-thumbnails img{width:100%;height:100%;object-fit:cover}.ar-thumbnails span{position:absolute;bottom:0;left:0;right:0;background:#0009;font-size:10px;line-height:16px}.ar-image-controls{display:flex;align-items:center;gap:8px;padding:12px 0}.ar-image-controls span{font-size:10px;color:#ffffff80}.ar-image-controls button:nth-child(n+2){background:#ffffff14;border:0}.ar-prompt{border-radius:24px;background:#1e1e1e;padding:12px;position:relative}.ar-prompt>textarea{width:100%;height:192px;min-height:192px;resize:none;border:1px solid #ffffff33;border-radius:16px;background:transparent;padding:8px;line-height:21px;outline:none}.ar-prompt>textarea::placeholder{color:#ffffff59}.ar-prompt-controls{display:flex;gap:8px;align-items:center;margin-top:8px}.ar-prompt-controls>button,.ar-prompt-controls .ar-style-wrap>button,.ar-reference>button:first-child{background:#ffffff14;padding:7px 14px}.ar-prompt-controls img{width:16px;height:16px;border-radius:50%;object-fit:cover}.ar-prompt-controls .grow{flex:1}.ar-style-wrap{position:relative}.ar-style-wrap>button>svg{width:12px;transform:rotate(90deg)}.ar-style-menu{position:absolute;bottom:42px;left:0;width:216px;max-height:330px;overflow:auto;background:#292929;border:1px solid #ffffff14;border-radius:16px;padding:6px;z-index:5;box-shadow:0 10px 30px #0008}.ar-style-menu[hidden]{display:none}.ar-style-menu button{display:flex;justify-content:flex-start;width:100%;border:0;border-radius:8px;padding:8px;gap:8px}.ar-style-menu img{width:32px;height:32px;border-radius:6px}.ar-style-menu [aria-selected=true]{background:#ffffff14}.ar-reference{position:relative}.ar-reference>button[aria-label]{position:absolute;right:-4px;top:-7px;width:16px;height:16px;border:0;background:#555;padding:0}.ar-reference>button[aria-label] svg{width:10px;height:10px}.ar-metadata{display:flex;flex-direction:column;gap:20px;min-width:0}.ar-metadata>div>label{display:block;font-size:12px;line-height:16px;color:#ffffff80;margin-bottom:6px}.ar-metadata input:not([type=radio]){height:36px;width:100%;border:1px solid #ffffff33;border-radius:32px;background:#ffffff14;padding:4px 12px;outline:none}.ar-metadata p{color:#ffffff80;font-size:12px;line-height:20px;margin:6px 0 0}.ar-metadata [role=radiogroup]{display:flex;flex-direction:column;gap:12px}.ar-metadata [role=radiogroup] label{display:flex;gap:12px;align-items:center;cursor:pointer;line-height:20px}.ar-metadata input[type=radio]{appearance:none;width:16px;height:16px;background:#ffffff29;border-radius:50%;margin:0;border:0}.ar-metadata input[type=radio]:checked{background:transparent;border:3px solid white}.ar-voice-prompt{padding:12px;border:1px solid #ffffff1f;border-radius:24px;background:#ffffff0a}.ar-voice-prompt textarea{width:100%;height:96px;border:1px solid #ffffff33;border-radius:16px;background:#ffffff14;padding:12px;font-size:14px;line-height:21px;resize:none;outline:none}.ar-voice-prompt small{display:block;font-size:12px;color:#ffffff80;margin-top:6px}.ar-voice{margin-top:6px}.ar-upload-audio{width:100%;height:70px;border-radius:24px!important;background:#ffffff0a!important}.ar-audio{display:flex;align-items:center;background:#ffffff0a;border:1px solid #ffffff1f;border-radius:24px;padding:10px;gap:4px}.ar-audio audio{min-width:0;width:100%;height:40px}.ar-audio button{padding:4px}.account-role-editor footer{display:flex;gap:8px;justify-content:flex-end;align-items:center;height:68px;border-top:1px solid #ffffff0a;padding:16px 24px}.account-role-editor footer button{min-width:72px;height:36px}.account-role-editor .ar-save{background:white;color:#111;border:0}.account-role-editor .ar-save:disabled{background:#ffffff14;color:#ffffff80;opacity:.5}.ar-error{position:absolute;bottom:72px;left:24px;right:24px;background:#522e2e;border-radius:8px;padding:8px 12px;font-size:12px;z-index:6}.ar-error[hidden]{display:none}.ar-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#0009;color:#ddd;font-size:12px}.account-role-editor input[hidden]{display:none}
@media(max-width:700px){.account-role-editor{max-width:calc(100vw - 16px);height:calc(100dvh - 64px)}.account-role-editor .ar-body{display:flex;flex-direction:column;padding:0 20px 20px;height:calc(100% - 184px)}.ar-left{min-height:360px;flex:none}.ar-gallery{min-height:40px}.ar-main-image{min-height:40px}.ar-prompt-controls{flex-wrap:wrap}.ar-prompt-controls .grow{display:none}.ar-metadata{flex:none}.account-role-editor footer{height:108px;flex-direction:column}.account-role-editor footer button{width:100%}.ar-error{bottom:112px}.ar-style-menu{max-width:calc(100vw - 80px)}}
.account-role-editor .ar-main-image{--xyq-node-placeholder-fill:rgba(255,255,255,.10)}
.account-role-editor .ar-metadata input[type=radio]{padding:0;min-width:16px;min-height:16px;max-width:16px;max-height:16px;flex:none;box-shadow:none}
/* Measured source dialog layout: 1120 × min(768, viewport − 64). */
.account-role-editor{height:768px;max-height:calc(100dvh - 64px)}
.account-role-editor[open]{display:flex;flex-direction:column}
.account-role-editor header{height:56px;flex:none;padding:20px 24px 12px}
.account-role-editor .ar-body{height:auto;flex:1;min-height:0;padding:20px;grid-template-columns:minmax(0,1fr) 280px;overflow:hidden}
.ar-metadata{overflow:auto;padding-right:4px;gap:24px}
.account-role-editor footer{flex:none}
@media(max-width:700px){.account-role-editor{max-width:calc(100vw - 24px);height:768px;max-height:calc(100dvh - 24px)}.account-role-editor .ar-body{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:calc((100% - 20px)/2 + 12px) calc((100% - 20px)/2 - 12px);gap:20px;overflow:hidden auto}.ar-left{min-height:0;overflow:hidden}.ar-gallery{min-height:0;flex:1}.ar-main-image{min-height:0}.ar-metadata{min-height:0;overflow:auto}.account-role-editor footer{height:113px}.ar-prompt-controls{flex-wrap:wrap}.account-role-editor .ar-close{position:absolute;right:22px;top:18px}}
.account-role-editor .ar-main-image>svg{width:80px;height:80px;color:#fff}
.account-role-editor .ar-metadata label{font-weight:400}
.account-role-editor .ar-metadata textarea{display:block}
/* Source style picker: four 3:4 cover tiles, 320px scrolling grid. */
.account-role-editor .ar-style-wrap>button>svg{width:14px;height:14px;transform:none}
.account-role-editor .ar-style-menu{width:480px;max-width:none;max-height:none;bottom:40px;padding:12px;border:0;border-radius:24px;overflow:visible;background:#1c1c1c;box-shadow:0 0 0 1px #ffffff1f,0 10px 30px #0008}
.ar-style-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-height:320px;overflow:auto}
.account-role-editor .ar-style-menu button{position:relative;display:block;width:100%;aspect-ratio:3/4;padding:0;border:2px outset #ffffff1f;border-radius:20px;background:#6b6b6b;overflow:visible}
.account-role-editor .ar-style-menu img{position:absolute;inset:0;width:100%;height:100%;border-radius:0;object-fit:cover}
.account-role-editor .ar-style-menu button span{position:absolute;bottom:0;left:0;right:0;padding:24px 4px 6px;background:linear-gradient(transparent,#000b);font-size:12px;text-align:center;color:#fff;white-space:nowrap}
.account-role-editor .ar-style-menu button[aria-selected=true]{outline:4px solid #9362ff;outline-offset:-4px}
.account-role-editor .ar-style-menu button:hover{outline:2px solid #ffffff80;outline-offset:-2px}
.ar-audio-panel{border:1px solid #ffffff1f;border-radius:24px;background:#ffffff0a;overflow:hidden}
.account-role-editor .ar-audio{display:flex;align-items:center;background:#0a0a0a;border:0;border-radius:24px;padding:12px;gap:8px}
.ar-audio audio{display:none}
.account-role-editor .ar-audio button{width:24px;height:24px;padding:0;flex:none;background:#ffffff14}
.account-role-editor .ar-audio button svg{width:12px;height:12px}
.ar-audio-progress{display:flex;flex-direction:column;flex:1;min-width:0;gap:8px;font-size:13px;line-height:1.4}
.ar-audio-progress>span:first-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ar-audio-time{font-size:13px;line-height:19.5px;color:#ffffff80}
.account-role-editor .ar-audio-progress input[type=range]{appearance:none;width:100%;height:4px;min-height:4px;margin:0;padding:0;border:0;border-radius:99px;background:linear-gradient(to right,#fff var(--progress,0%),#ffffff14 var(--progress,0%));cursor:pointer}
.ar-audio-progress input::-webkit-slider-thumb{appearance:none;width:14px;height:14px;border-radius:50%;border:1px solid #ffffff80;background:#1c1c1c}
.ar-audio-actions{padding:12px 0}
.account-role-editor .ar-upload-audio{height:44px;width:100%;border:0;background:transparent!important;font-size:13px}
.account-role-editor .ar-upload-audio:hover:not(:disabled){background:#ffffff0a!important}
.ar-existing-voice{margin-top:12px;font-size:12px;color:#ffffff80}
.ar-existing-voice label{display:flex;align-items:center;gap:12px;padding:12px 0;font-size:14px;color:#fff}
.account-role-editor{-webkit-font-smoothing:antialiased}
.account-role-editor button{font-weight:500}
.account-role-editor .ar-close{width:32px;height:32px;margin-top:-4px}
.account-role-editor .ar-metadata>div>label{font-weight:500}
.account-role-editor .ar-metadata p{line-height:19.5px}
.account-role-editor .ar-metadata>div:first-child p{line-height:16px}
.account-role-editor .ar-voice-prompt textarea{font-size:13px;line-height:19.5px}
.account-role-editor textarea::placeholder{color:#ffffff59}
.account-role-editor .ar-image-controls button{height:32px}
.account-role-editor .ar-image-controls button:nth-child(3){min-width:62px}
.account-role-editor .ar-prompt>textarea{display:block}
.ar-style-grid::-webkit-scrollbar{width:0}
.account-role-editor .ar-style-menu button[aria-selected=true]{outline:none}
.account-role-editor .ar-style-menu button[aria-selected=true]::after{content:'';position:absolute;inset:0;border:4px solid #9362ff;border-radius:20px;pointer-events:none}
.ar-prompt-controls{margin-top:12px;justify-content:space-between;gap:12px}
.ar-prompt-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ar-prompt-tools>button{background:#ffffff14}
.ar-prompt-tools img{width:16px;height:16px;border-radius:50%;object-fit:cover}
.account-role-editor .ar-prompt>textarea:focus{border-color:transparent}
@media(max-width:700px){.ar-prompt{margin-top:12px;flex-shrink:0}.ar-gallery{height:0;flex-basis:0}.ar-prompt-tools{gap:12px}.ar-prompt-controls{gap:12px}.ar-metadata::-webkit-scrollbar{width:0}}
.account-role-editor textarea:focus{box-shadow:none}
.account-role-editor .ar-prompt>textarea:focus-visible{box-shadow:none;outline:none}
.account-role-editor .ar-generate:not(:disabled){background:#fff;color:#111;border-color:transparent}
.ar-audio-actions{height:68px;padding:0}
.account-role-editor .ar-image-controls button:nth-child(2){backdrop-filter:blur(24px)}
@media(max-width:700px){.ar-prompt{position:static}}
.account-role-editor .ar-prompt>textarea:focus{border-color:#ffffff33!important}
.account-role-editor .ar-prompt>textarea:focus-visible{border-color:transparent!important}
@media(max-width:700px){.ar-gallery{position:static}.ar-image-controls{transform:translateY(20px)}}
@media(max-width:700px){.ar-gallery{gap:12px}.ar-thumbnails:empty{height:8px;flex-shrink:0}.ar-image-controls{transform:none;padding:0;flex-shrink:0}}
.account-role-editor .ar-image-controls button:disabled{opacity:1;color:#ffffff33;background:#ffffff0a;border:1px solid #ffffff0a}
/* Account roles use the source's compact six-column material cards. */
.ac-resource-roles .ac-resource-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.ac-resource-roles .ac-resource-item>button:first-child{border:1px solid transparent;border-radius:16px;gap:4px;background:transparent;font-weight:500}
.ac-resource-roles .ac-resource-item>button:first-child:hover{background:transparent}
.ac-resource-roles .ac-resource-item>button:first-child>span:first-child{aspect-ratio:auto;display:block;box-sizing:border-box;border:0;padding:8px;border-radius:16px;background:#ffffff0a}
.ac-resource-roles .ac-role-cover{width:100%;aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:8px}
.ac-resource-roles .ac-resource-item img{width:auto;height:auto;max-width:100%;max-height:100%;border-radius:8px;object-fit:contain}
.ac-resource-roles .ac-resource-item [aria-pressed=true]>span:first-child{box-shadow:inset 0 0 0 2px #fff}
.ac-resource-roles .ac-resource-item>button>span:last-child{padding-top:6px;line-height:16.8px;font-weight:500}
.ac-resource-roles .ac-role-check{position:absolute;left:12px;top:12px;width:16px;height:16px;border-radius:5px;display:grid;place-items:center;box-sizing:border-box;border:1px solid #ffffff33;background:#0008;opacity:0}
.ac-resource-roles .ac-resource-item:hover .ac-role-check,.ac-resource-roles [aria-pressed=true] .ac-role-check{opacity:1}
.ac-resource-roles [aria-pressed=true] .ac-role-check{background:#fff;color:#111;border-color:#ffffff80}
.ac-resource-roles .ac-role-check svg{width:14px;height:14px}
.ac-resource-roles .ac-resource-item .ac-resource-preview{right:8px;top:8px;bottom:auto;width:18px;height:18px;padding:0;background:#ffffff14;color:#111;border:0;display:grid;place-items:center}
.ac-resource-roles .ac-resource-preview svg{width:12px;height:12px}
@media(max-width:700px){.ac-resource-roles .ac-resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* The observed preview grows when images exist; the prompt then starts at 96px. */
.account-role-editor .ar-left{gap:12px;min-height:0}
.account-role-editor .ar-gallery{gap:12px;min-height:0}
.account-role-editor .ar-main-image{min-height:0}
.account-role-editor .ar-thumbnails{padding:4px;flex-shrink:0}
.account-role-editor .ar-thumbnails:empty{height:8px}
.account-role-editor .ar-thumbnails button{width:64px;height:64px;border-radius:12px;border:1px solid transparent}
.account-role-editor .ar-thumbnails button[aria-pressed=true]{border:2px solid white}
.account-role-editor .ar-thumbnails span{background:white;color:#111;line-height:12px;font-size:10px}
.account-role-editor .ar-image-controls{padding:0;flex-shrink:0}
.account-role-editor .ar-image-controls button:nth-child(3):not(:disabled){background:transparent}
.account-role-editor[data-has-images=true] .ar-prompt>textarea{height:96px;min-height:96px;max-height:160px;field-sizing:content}
.account-role-editor .ar-main-image>img{height:100%;width:auto;aspect-ratio:3/4;max-height:426px;max-width:min(100%,320px);object-fit:contain;background:#ffffff0a;border-radius:16px}
.account-role-editor .ar-image-actions{opacity:1;right:4px;top:4px;gap:8px}
.account-role-editor .ar-image-actions button{width:32px;height:32px;border-radius:50%;padding:0!important}
.account-role-editor .ar-image-actions svg{width:14px;height:14px}
.ar-audio-progress>span:first-child{font-weight:500}
.ar-audio-time{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}
@media(max-width:700px){.account-role-editor .ar-prompt{margin-top:0}}
.account-role-editor[data-has-images=true] .ar-prompt>textarea{height:auto}
.account-role-editor .ar-metadata::-webkit-scrollbar{width:0}
