#viewerProfileEditor{width:min(92vw,410px);max-height:85dvh;box-sizing:border-box;padding:22px;border:0;border-radius:18px;background:#fff;color:#293b34;overflow:auto;box-shadow:0 12px 60px #0003;font:14px/1.6 system-ui,sans-serif}#viewerProfileEditor::backdrop{background:#0006}#viewerProfileEditor header,#viewerProfileEditor footer,.profile-preview{display:flex;align-items:center;justify-content:space-between;gap:10px}#viewerProfileEditor h2{margin:0;font-size:20px}#viewerProfileEditor button,.profile-upload{border:1px solid #dce5dd;background:#f7faf7;color:#314c3c;border-radius:9px;padding:9px 12px;font:inherit;cursor:pointer;transition:background .12s,transform .12s}#viewerProfileEditor button:active,.profile-upload:active{transform:scale(.96);background:#dcebdc}#viewerProfileEditor button:focus-visible,#viewerProfileEditor input:focus-visible{outline:2px solid #48785c;outline-offset:2px}#viewerProfileEditor button:disabled{opacity:.6;cursor:wait}.profile-intro{color:#718077;margin:10px 0 15px}[data-anonymous]{background:#f6f0df;color:#746139;padding:10px;border-radius:8px;font-size:12px}.profile-preview{justify-content:flex-start;margin:16px 0}.profile-preview img{width:60px;height:60px;border-radius:50%;object-fit:cover}.profile-upload{position:relative;overflow:hidden}.profile-upload input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.profile-nickname{display:block;font-weight:600}.profile-nickname input{display:block;width:100%;box-sizing:border-box;border:1px solid #cfd9d0;border-radius:8px;padding:11px;font:inherit;margin:6px 0 10px}.profile-name-options{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:15px}#viewerProfileEditor .profile-name-options button{padding:4px 9px;font-size:12px}.profile-avatar-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:12px 0}#viewerProfileEditor .profile-avatar-grid button{padding:2px;border-radius:50%;aspect-ratio:1}.profile-avatar-grid img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:50%}#viewerProfileEditor [aria-pressed=true]{outline:3px solid #3b7950}#viewerProfileEditor details{margin:12px 0}#viewerProfileEditor details a{font-size:11px;color:#657e6b}#viewerProfileEditor .profile-wechat{width:100%;background:#edf8ed}#viewerProfileEditor [data-message]{font-size:12px;min-height:20px;color:#3c744c}#viewerProfileEditor [data-message].error{color:#af3434;background:#fff0ed;padding:8px;border-radius:6px}#viewerProfileEditor footer{justify-content:flex-end}#viewerProfileEditor .profile-save{background:#3d7353;color:white;border-color:#3d7353}.profile-edit-entry{border:0;background:none;color:#4d775b;font-size:12px;padding:5px 0;cursor:pointer}.profile-edit-entry:active{background:#e2efe4}@media(max-width:360px){#viewerProfileEditor{padding:16px}.profile-avatar-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.profile-preview{gap:6px}.profile-preview button,.profile-upload{font-size:12px!important}}

/* Compact first-speech sheet; advanced choices expand only on request. */
#viewerProfileEditor{width:min(92vw,360px);max-height:82dvh;padding:18px}#viewerProfileEditor h2{font-size:18px}#viewerProfileEditor .profile-wechat{margin-top:14px;background:#348453;color:#fff;border-color:#348453;min-height:44px;font-weight:600}.profile-intro{font-size:12px;margin:7px 0 12px}.profile-secondary-label{font-size:13px;color:#718077;border-top:1px solid #ecf0ec;padding-top:10px}.profile-preview{margin:10px 0;gap:12px}.profile-preview img{width:48px;height:48px}.profile-preview [data-random]{flex:1;min-height:44px}.profile-nickname input{padding:9px;margin-bottom:8px}.profile-more summary{cursor:pointer;padding:5px 0;color:#54725c}.profile-more .profile-upload{display:block;margin:8px 0;text-align:center}.profile-name-options{margin:8px 0}.profile-library-count{font-size:12px;margin:8px 0 0;color:#718077}#viewerProfileEditor [data-message]{margin:8px 0;min-height:0}#viewerProfileEditor footer button{min-height:44px}#viewerProfileEditor [data-anonymous]{margin:8px 0;padding:8px;line-height:1.5}.profile-avatar-grid{grid-template-columns:repeat(5,minmax(0,1fr))}

#viewerProfileEditor footer{position:sticky;bottom:0;background:white;padding-top:6px}

@media(max-width:480px){#viewerProfileEditor input{font-size:16px}}

/* The original watch stylesheet positions all header/footer elements absolutely. */
#viewerProfileEditor .profile-editor-form{display:block;min-width:0}
#viewerProfileEditor .profile-editor-form>header{position:static;inset:auto;flex-wrap:nowrap;min-width:0;margin:0}
#viewerProfileEditor .profile-editor-form>header h2{min-width:0;line-height:1.4;overflow-wrap:anywhere}
#viewerProfileEditor .profile-editor-form>header [data-close]{flex:none;min-width:44px;min-height:44px}
#viewerProfileEditor .profile-editor-form>footer{left:auto;right:auto;bottom:0;flex-wrap:wrap}
