.password-control{position:relative;display:flex;align-items:center;width:100%}.password-control input{width:100%;padding-right:46px!important}.password-eye{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:38px;height:38px;display:grid;place-items:center;border:0;background:transparent;color:var(--rose,#a7254f);border-radius:10px}.password-eye svg{width:21px;height:21px}.password-eye[aria-pressed=true]{background:var(--rose-soft,#faedf3)}
.chat{position:relative}.latest-arrow{position:absolute;right:22px;bottom:110px;width:43px;height:43px;border:1px solid var(--line,#eadce2);border-radius:50%;background:white;color:var(--rose,#a7254f);box-shadow:0 3px 14px #41273520;z-index:6;display:grid;place-items:center}.latest-arrow[hidden]{display:none}.latest-arrow svg{width:22px;height:22px}
.sound-settings{margin:12px 0;padding:14px;border:1px solid var(--line,#eadce2);border-radius:14px}.sound-settings summary{cursor:pointer;font-weight:600;color:var(--rose,#a7254f)}.sound-settings label{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0;font-size:13px}.sound-settings select{border:1px solid var(--line,#eadce2);border-radius:8px;padding:7px;background:white;min-width:130px}.sound-settings p{margin:8px 0 0}
.voice-note-button{flex-shrink:0;width:35px!important;min-width:35px!important;color:var(--rose,#a7254f)}.voice-note-button svg{width:22px;height:22px}.voice-panel{display:flex;align-items:center;gap:8px;background:var(--rose-soft,#faedf3);border-radius:14px;padding:10px;margin-bottom:8px;color:var(--rose,#a7254f)}.voice-panel[hidden]{display:none}.voice-panel span{flex:1;font-size:13px}.voice-panel button,.outbox-actions button{border:0;border-radius:8px;padding:7px 10px;background:white;color:var(--rose,#a7254f);font-size:12px}.outbox-actions{display:flex;gap:6px;margin-top:6px}.pending-status{margin-left:4px}.message-media audio,.attachment-thumb audio{width:min(270px,65vw);height:42px}.media-thumbnail{display:block;max-width:180px;max-height:130px;border-radius:10px;margin-bottom:6px;filter:blur(.5px)}.media-pending button{display:flex;flex-direction:column;gap:6px;max-width:220px}.upload-cancel{margin-left:8px;border:0;color:var(--rose,#a7254f);background:transparent;text-decoration:underline}.web-offline-note{font-size:12px;color:var(--muted,#927c86)}
html.studio-green .voice-panel{background:#e8f2eb;color:#185c43}html.studio-green .password-eye,html.studio-green .latest-arrow,html.studio-green .voice-note-button,html.studio-green .sound-settings summary,html.studio-green .outbox-actions button,html.studio-green .upload-cancel{color:#185c43}html.studio-green .sound-settings{border-color:#d7e2da}html.studio-green .password-eye[aria-pressed=true]{background:#e8f2eb}
@media(max-width:720px){.latest-arrow{right:18px;bottom:95px}.voice-note-button{width:30px!important;min-width:30px!important}.voice-panel{margin:0 10px 5px}}
.sound-settings label{flex-wrap:wrap}.sound-settings select{min-width:110px;flex:1}.sound-settings .text-button{font-size:11px;padding:4px}
.sound-filename{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--muted,#927c86)}
.outbox-error{display:block;max-width:260px;margin-top:5px;line-height:1.4;color:inherit;opacity:.85;font-size:11px}
.media-dialog{position:relative;padding:56px 16px 16px;max-height:calc(var(--visible-height,100dvh) - 28px);overflow:auto;box-sizing:border-box;border-radius:22px}.media-dialog>#close-media,.profile-photo-viewer>button{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:36px;height:36px;min-width:36px;padding:8px;margin:0;border:1px solid var(--line,#eadce2);border-radius:12px;background:var(--rose-soft,#faedf3);color:var(--rose,#a7254f);box-shadow:none!important;line-height:1;cursor:pointer}.media-dialog>#close-media svg,.profile-photo-viewer>button svg{width:20px;height:20px}.media-dialog>#close-media:focus:not(:focus-visible),.profile-photo-viewer>button:focus:not(:focus-visible){outline:none}.media-dialog>#close-media:focus-visible,.profile-photo-viewer>button:focus-visible{outline:2px solid var(--rose,#a7254f);outline-offset:2px}#media-viewer>img{display:block;margin:auto;width:auto;max-width:100%;max-height:calc(var(--visible-height,100dvh) - 160px);object-fit:contain;border-radius:12px}#media-caption{overflow-wrap:anywhere;margin:12px 0 0;font-size:12px;text-align:center}.profile-photo-viewer{padding:58px 16px 16px;box-sizing:border-box}.profile-photo-viewer>img{max-height:calc(var(--visible-height,100dvh) - 130px)}.profile-photo-viewer.is-basic{padding:46px 0 0;max-height:none;overflow:visible}.profile-photo-viewer.is-basic>button{top:0;right:0;width:34px;height:34px;min-width:34px;padding:7px;border-radius:50%;background:white}
.avatar{position:relative;overflow:visible;isolation:isolate}.avatar>img{display:block;border-radius:50%;object-fit:cover}.avatar::after{display:none}.avatar.online::after{display:block;content:'';position:absolute;width:9px;height:9px;right:0;bottom:0;transform:translate(7%,7%);border:2px solid white;border-radius:50%;box-sizing:content-box;background:#279565;z-index:2;box-shadow:0 0 0 1px #00000008}.contact .avatar.online::after{width:10px;height:10px}.message-avatar.online::after{width:6px;height:6px;border-width:1.5px}html.studio-green .avatar.online::after{background:#279565}html.studio-green .media-dialog>#close-media,html.studio-green .profile-photo-viewer>button{background:#e8f2eb;border-color:#d7e2da;color:#185c43}
.conversation{position:relative}

/* Live microphone waveform; no audio is played back while recording. */
.messages{scroll-behavior:auto!important}
.voice-panel{display:flex;flex-direction:column;gap:9px;padding:14px 12px 10px;min-width:0;border:1px solid var(--line,#eadce2)}
.voice-meter-row{display:flex;align-items:center;gap:9px;width:100%;min-width:0}
.voice-record-dot{flex:0 0 7px!important;width:7px;height:7px;border-radius:50%;background:currentColor}
.voice-duration{font-size:15px;line-height:22px;font-variant-numeric:tabular-nums;min-width:37px}
.voice-waveform{display:block;flex:1;min-width:0;height:44px;width:0;max-width:100%;opacity:.9}
.voice-record-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}
.voice-panel .voice-record-label{font-size:11px;flex:1;text-align:center;color:var(--muted,#927c86);line-height:1.3}
.voice-panel button{display:flex;align-items:center;gap:5px;min-height:39px;padding:7px 9px;border-radius:11px;font-size:12px;line-height:1.2;color:inherit}
.voice-panel button span{flex:none;font-size:12px}
.voice-panel button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.voice-panel .voice-finish{background:var(--rose,#a7254f);color:white}
.composer-wrap.is-recording #composer{display:none}
html.studio-green .voice-panel .voice-finish{background:#185c43;color:#fff}
html.studio-green .voice-panel .voice-discard{color:#185c43}
@media(max-width:720px){.voice-panel{margin:0;gap:6px}.voice-panel .voice-record-label{font-size:10px}.voice-panel button{padding:7px 8px}}

/* Compact per-contact sound controls, including the Studio palette. */
.sound-settings{margin:12px 0 0;padding:0;border:1px solid var(--line,#eadce2);border-radius:16px;background:#fff;overflow:hidden}
.sound-settings>summary{display:flex;align-items:center;gap:10px;padding:15px 14px;list-style:none;font-size:14px;line-height:20px;font-weight:650}
.sound-settings>summary::-webkit-details-marker,.tone-picker>summary::-webkit-details-marker{display:none}
.sound-settings>summary>svg{flex:0 0 19px;width:19px;height:19px}
.sound-settings>summary>span:first-of-type{flex:1}
.sound-chevron{display:block;flex:0 0 7px;width:7px;height:7px;border-bottom:1.5px solid currentColor;border-right:1.5px solid currentColor;transform:rotate(45deg);margin:-4px 3px 0 4px;opacity:.65}
.sound-settings[open]>summary>.sound-chevron,.tone-picker[open]>summary>.sound-chevron{transform:rotate(225deg);margin-top:4px}
.sound-row{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:6px 8px;padding:0 14px 13px;align-items:start;min-width:0}
.sound-row-label{grid-column:1/-1;font-size:12px;line-height:18px;color:var(--muted,#927c86)}
.tone-picker{min-width:0;border:1px solid var(--line,#eadce2);border-radius:11px;background:#fcf8fa;overflow:hidden}
.tone-picker>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:39px;padding:9px 11px;list-style:none;cursor:pointer;font-size:13px;line-height:20px;color:var(--ink,#462d37)}
.tone-selected{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tone-options{max-height:176px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;border-top:1px solid var(--line,#eadce2);padding:4px;background:#fff}
.sound-settings .tone-option{display:flex;align-items:center;justify-content:space-between;width:100%;padding:9px 10px;min-height:36px;background:transparent;color:var(--ink,#462d37);text-align:left;border:0;border-radius:7px;font-size:13px;line-height:18px}
.sound-settings .tone-option[aria-pressed=true]{background:var(--rose-soft,#faedf3);color:var(--rose,#a7254f);font-weight:650}
.tone-option[aria-pressed=true]::after{content:'✓';font-size:14px}
.sound-settings .tone-option:hover{background:#f8f4f6}
.sound-settings .tone-preview{display:grid;place-items:center;width:38px;min-width:38px;height:40px;padding:9px;border:1px solid var(--line,#eadce2);border-radius:11px;background:#fff;color:var(--rose,#a7254f)}
.sound-settings .tone-preview svg{width:18px;height:18px}
.sound-settings .tone-preview[aria-pressed=true]{background:var(--rose-soft,#faedf3)}
.sound-settings input[type=file],.sound-settings select[hidden],.sound-settings .sound-filename[hidden]{display:none!important}
.sound-settings .sound-note{margin:0;padding:1px 14px 10px;font-size:11px!important;line-height:1.5}
.sound-settings .sound-gallery-link{display:block;padding:0 14px 14px;font-size:12px;font-weight:550;color:var(--rose,#a7254f);text-decoration:none}
.sound-settings .sound-gallery-link:hover{text-decoration:underline}
html.studio-green .tone-picker{background:#f5faf7;border-color:#d8e9e0}
html.studio-green .sound-settings .tone-preview,html.studio-green .sound-settings .sound-gallery-link{color:#185c43}
html.studio-green .sound-settings .tone-option[aria-pressed=true],html.studio-green .sound-settings .tone-preview[aria-pressed=true]{background:#e7f4ed;color:#185c43}
html.studio-green .sound-settings .tone-option:hover{background:#f1f8f4}

/* Password reveal is a compact action inside the field, never a form-wide button. */
.password-control{position:relative;display:block;width:100%;min-width:0;margin-top:7px}
.password-control>input[data-eye]{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0!important;padding-right:48px!important}
html body .password-control>button.password-eye{position:absolute!important;inset:auto 3px auto auto!important;top:50%!important;transform:translateY(-50%)!important;display:grid!important;place-items:center!important;box-sizing:border-box!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important;margin:0!important;padding:8px!important;border:0!important;border-radius:9px!important;float:none!important;background:transparent!important;box-shadow:none!important;line-height:1!important;z-index:1}
html body .password-control>button.password-eye>svg{display:block;width:20px;height:20px;margin:0;pointer-events:none}
html body .password-control>button.password-eye:focus-visible{outline:2px solid currentColor;outline-offset:-3px}

#login-dialog #forgot-password.forgot-link{display:block;width:fit-content;max-width:100%;min-height:40px;margin:9px auto 0;padding:9px 4px;border:0;border-radius:0;background:transparent!important;box-shadow:none!important;font-size:13px;font-weight:500;text-align:center;line-height:22px}
#login-dialog #forgot-password.forgot-link:hover{text-decoration:underline;background:transparent!important}
#login-dialog #forgot-password.forgot-link[hidden]{display:none!important}
