/* Unified account dropdown: profile, billing, settings, help and logout. */
#yap-tool-menu .yap-sidebar-footer>.yap-bottom-settings{display:none!important}
#yap-tool-menu .yap-sidebar-footer #account-toggle{max-width:100%!important;width:100%!important;flex:1 1 100%!important}
#account-panel .yap-profile-home,#account-panel .yap-profile-settings-view{display:none!important}
#account-panel[data-profile-signed="true"]{
 width:min(314px,calc(100vw - 24px))!important;
 max-height:min(76dvh,650px)!important;
 padding:8px!important;
 display:flex!important;flex-direction:column!important;gap:0!important;
 border:1px solid var(--border)!important;
 border-radius:17px!important;
 background:var(--panel)!important;
 box-shadow:0 22px 60px rgba(0,0,0,.22)!important;
 overflow-x:hidden!important;overflow-y:auto!important;
 scrollbar-width:thin;scrollbar-gutter:auto;
}
#account-panel[data-profile-signed="true"] .yap-profile-home:not([hidden]),
#account-panel[data-profile-signed="true"] .yap-profile-settings-view:not([hidden]){display:flex!important;flex-direction:column!important}
#account-panel[data-profile-signed="true"]>.yap-support-menu,
#account-panel[data-profile-signed="true"]>.yap-account-mode,
#account-panel[data-profile-signed="true"]>.yap-account-mode-description,
#account-panel[data-profile-signed="true"]>#account-form,
#account-panel[data-profile-signed="true"]>.yap-access-help{display:none!important}
#account-panel[data-profile-signed="true"] .yap-profile-home{order:0!important;gap:2px!important}
#account-panel[data-profile-signed="true"] .yap-profile-head{display:flex;align-items:center;gap:10px;min-width:0;padding:8px 8px 9px}
#account-panel .yap-profile-avatar-button{position:relative;display:block;flex:0 0 46px!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;border:0!important;padding:0!important;border-radius:50%!important;background:var(--bubble)!important;cursor:pointer}
#account-panel .yap-profile-photo{display:block;width:46px;height:46px;border-radius:50%;object-fit:cover;border:1px solid var(--border);background:var(--bubble)}
#account-panel .yap-profile-camera{position:absolute;bottom:-2px;right:-3px;display:grid;place-items:center;background:var(--accent);border:2px solid var(--panel);color:#182d20;border-radius:50%;font-size:15px;font-weight:800;width:19px;height:19px}
#account-panel .yap-profile-ident{display:flex;flex-direction:column;min-width:0;gap:2px;text-align:left}
#account-panel .yap-profile-ident strong{font-size:13px;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#account-panel .yap-profile-ident span{font-size:11px;opacity:.64;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:195px}
#account-panel .yap-profile-feedback{font-size:11px!important;color:var(--fg);min-height:0;margin:0 8px!important;overflow-wrap:anywhere}
#account-panel .yap-profile-feedback:empty{display:none!important}
#account-panel .yap-profile-action{
 display:flex!important;align-items:center!important;gap:10px!important;
 min-height:42px!important;width:100%!important;max-width:none!important;flex:0 0 auto!important;
 text-align:left!important;padding:8px 10px!important;margin:0!important;
 border:0!important;border-radius:9px!important;
 font:500 12.5px/1.3 system-ui,sans-serif!important;letter-spacing:0!important;
 color:var(--fg)!important;background:transparent!important;cursor:pointer!important;
 box-shadow:none!important
}
#account-panel .yap-profile-action:hover,#account-panel .yap-profile-action:focus-visible{background:var(--bubble)!important}
#account-panel .yap-profile-action-icon{width:19px;min-width:19px;height:19px;display:grid;place-items:center;opacity:.82}
#account-panel .yap-profile-action-icon svg{display:block;width:18px;height:18px}
#account-panel .yap-profile-action-label{flex:1;min-width:0}
#account-panel .yap-profile-action-chevron{opacity:.56;font-size:19px;line-height:1}
#account-panel .yap-profile-divider{height:1px;background:var(--border);opacity:.73;margin:5px 9px}
#account-panel .yap-profile-logout{color:var(--fg)!important}
#account-panel .yap-profile-view-title{display:flex;align-items:center;gap:8px;padding:7px 7px 4px;font-weight:750}
#account-panel .yap-profile-view-title>button{border:0!important;border-radius:8px!important;padding:4px 10px!important;background:transparent!important;color:var(--fg)!important;font-size:22px!important;min-height:32px!important;width:auto!important;cursor:pointer}
#account-panel .yap-profile-view-title>button:hover{background:var(--bubble)!important}
#account-panel .yap-profile-settings-caption{font-size:11px;margin:0 9px 9px!important;opacity:.68}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #account-state{
 order:0!important;font-size:12px!important;font-weight:600!important;margin:7px 9px!important;line-height:1.4!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #cloud-quota{order:1!important;margin:0 6px 9px!important;padding:10px!important;border-radius:10px;background:var(--bubble);font-size:11px}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-account-advanced{order:2!important;margin:2px 2px 8px!important;padding:0 5px!important}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings{
 order:3!important;display:block!important;width:100%!important;padding:0 5px!important;margin:0!important;min-width:0!important;
 border:0!important;background:transparent!important;position:static!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings>summary{
 display:flex!important;align-items:center!important;min-height:41px!important;padding:9px 8px!important;
 font:650 12px/1.4 system-ui!important;border-radius:9px!important;background:transparent!important;color:var(--fg)!important;
 cursor:pointer!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings>.top-actions{
 position:static!important;inset:auto!important;display:flex!important;flex-direction:column!important;
 max-width:100%!important;min-width:0!important;max-height:min(45dvh,380px)!important;overflow:auto!important;
 padding:8px!important;margin:4px 0!important;background:var(--bubble)!important;box-shadow:none!important;
 border:1px solid var(--border)!important;border-radius:11px!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings:not([open])>.top-actions{display:none!important}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings .top-actions *{max-width:100%;box-sizing:border-box}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-memory-settings{
 order:4!important;position:static!important;margin:5px 6px!important;padding:5px 8px!important;
 border:1px solid var(--border)!important;border-radius:10px!important;background:transparent!important;
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-memory-settings>summary{
 font:650 12px/1.4 system-ui!important;padding:9px 2px!important;border-radius:8px!important;cursor:pointer!important;color:var(--fg)!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-memory-settings :is(input,button){max-width:100%;box-sizing:border-box}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-memory-settings label{white-space:normal;min-width:0}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-memory-settings input[type="checkbox"]{width:17px!important;min-width:17px!important;height:17px!important;flex:0 0 17px!important}
#account-panel .yap-profile-home[hidden],#account-panel .yap-profile-settings-view[hidden]{display:none!important}
#account-panel #yap-profile-picture-input[hidden]{display:none!important}
#account-panel .yap-profile-action:focus-visible,#account-panel .yap-profile-avatar-button:focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px!important}
@media(max-width:700px){
 #yap-tool-menu .yap-sidebar-footer #account-panel[data-profile-signed="true"]{
  width:min(300px,calc(100vw - 20px))!important;max-height:min(74dvh,610px)!important;
 }
}

/* Compact settings view repair: neutralize the former footer gear's inherited icon/position. */
#account-panel[data-profile-signed="true"] .yap-profile-settings-view{min-width:0!important;overflow-x:hidden!important;gap:2px!important}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings{
  width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
  flex:0 0 auto!important;float:none!important;clear:both!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings>summary{
  width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;
  gap:8px!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;
  padding:10px 10px!important;text-align:left!important;
  font-size:12px!important;font-weight:650!important;line-height:1.4!important;
  list-style:none!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings>summary::before{
  content:none!important;display:none!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings>summary::after{
  content:"⌄"!important;display:inline-block!important;opacity:.6;flex:0 0 auto;
  margin-left:auto!important;font-size:14px!important;line-height:1!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings[open]>summary::after{transform:rotate(180deg)}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings>summary::-webkit-details-marker{display:none!important}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings>.top-actions{
  position:static!important;width:100%!important;box-sizing:border-box!important;
  max-height:min(35dvh,300px)!important;overflow-x:hidden!important;overflow-y:auto!important;
  margin:3px 0 8px!important;padding:8px!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-menu-settings>.top-actions :is(label,button,select,input,a){
  flex-shrink:0;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important
}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-account-advanced,
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #yap-memory-settings{width:calc(100% - 12px)!important;min-width:0!important;box-sizing:border-box!important}
#account-panel[data-profile-signed="true"] .yap-profile-settings-photo{order:5!important;margin:5px 5px 2px!important;width:calc(100% - 10px)!important}
#account-panel[data-profile-signed="true"] .yap-profile-home .yap-profile-avatar-button .yap-profile-camera{display:grid!important}
#account-panel[data-profile-signed="true"] .yap-profile-home{padding-bottom:3px!important}
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #account-state,
#account-panel[data-profile-signed="true"] .yap-profile-settings-view #cloud-quota{overflow-wrap:anywhere!important;word-break:normal!important}


/* 2026-11-12: readable, neutral Settings groups. Keep existing control IDs and handlers. */
body > #account-panel[data-profile-signed="true"] {
 width:min(366px,calc(100vw - 24px))!important;
 background:#f2f3f5!important;color:#25292d!important;
 border-color:#d7dce1!important;backdrop-filter:none!important;
 box-shadow:0 16px 48px #171c2430!important;
}
body > #account-panel[data-profile-signed="true"] .yap-profile-settings-view {
 padding:6px 3px 8px!important;gap:2px!important;color:#25292d!important;
}
body > #account-panel[data-profile-signed="true"] .yap-profile-view-title {
 padding:10px 12px 5px!important;font-size:15px!important;color:inherit!important;
}
body > #account-panel[data-profile-signed="true"] .yap-profile-settings-caption {
 margin:0 13px 12px!important;color:#5d6570!important;opacity:1!important;
 font-size:12px!important;line-height:1.45!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group {
 display:flex;flex-direction:column;gap:4px;flex:none;
 margin:0 5px 9px;padding:11px 12px;
 border:1px solid #dfe3e7;border-radius:12px;
 background:#fafbfc;color:#25292d;min-width:0;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group[hidden]{display:none!important}
body > #account-panel[data-profile-signed="true"] .yap-settings-group>h3 {
 margin:0!important;padding:0!important;color:#22282e!important;
 font:700 13px/1.4 system-ui,sans-serif!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group-hint {
 margin:0 0 3px!important;font:400 11px/1.5 system-ui,sans-serif!important;
 color:#66707a!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(#account-state,#cloud-quota) {
 order:initial!important;display:block;min-width:0;
 padding:7px 0!important;margin:0!important;background:transparent!important;
 font:400 12px/1.5 system-ui,sans-serif!important;color:inherit!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #cloud-quota {
 padding:7px 9px!important;border:1px solid #dfe3e7;border-radius:9px;
 background:#f1f3f5!important;color:#47515d!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings {
 order:initial!important;width:100%!important;max-width:100%!important;
 margin:0!important;padding:0!important;border:0!important;background:transparent!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(#yap-menu-settings>summary,#yap-account-advanced>summary,#yap-memory-settings>summary,#yap-growth-consent>summary) {
 min-height:40px!important;padding:9px 10px!important;
 border:1px solid transparent!important;border-radius:9px!important;
 background:transparent!important;color:#303941!important;
 font:550 12px/1.4 system-ui,sans-serif!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(#yap-menu-settings>summary,#yap-account-advanced>summary,#yap-memory-settings>summary,#yap-growth-consent>summary):hover {
 background:#edf0f3!important;border-color:#e1e4e8!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(#yap-account-advanced,#yap-memory-settings,#yap-growth-consent) {
 order:initial!important;position:static!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
 margin:0!important;padding:0!important;border:0!important;background:transparent!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions {
 position:static!important;width:100%!important;max-height:none!important;
 padding:5px!important;margin:4px 0!important;overflow:visible!important;
 border:1px solid #e1e5e9!important;border-radius:10px!important;
 background:#f4f5f7!important;box-shadow:none!important;color:#2a333c!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions>* {
 box-sizing:border-box!important;width:100%!important;max-width:100%!important;
 margin:0!important;border-radius:8px!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions :is(a,button,select) {
 color:#27323c!important;background:#f8f9fa!important;
 border:1px solid #e0e4e8!important;
 box-shadow:none!important;min-height:38px!important;
 font:500 12px/1.4 system-ui,sans-serif!important;
 text-decoration:none!important;white-space:normal!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions :is(a,button):hover {
 background:#eceff2!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions #yap-location-controls {
 background:transparent!important;border:0!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions #yap-location-controls>summary {
 color:#27323c!important;background:#f8f9fa!important;
 border:1px solid #e0e4e8!important;border-radius:8px!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions .yap-location-options {
 position:static!important;max-height:220px!important;overflow:auto!important;
 background:#fff!important;color:#27323c!important;border-color:#dce2e6!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(.yap-profile-action,#yap-growth-consent button) {
 color:#27323c!important;background:transparent!important;box-shadow:none!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group .yap-profile-action:hover {background:#edf0f3!important}
body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(label,p,small) {line-height:1.5!important}
body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(input,select,textarea) {accent-color:#28734f}
body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(button,summary,a,input,select):focus-visible {
 outline:2px solid #28734f!important;outline-offset:2px!important;
}
@media(max-width:700px){
 body > #account-panel[data-profile-signed="true"] {width:min(366px,calc(100vw - 18px))!important}
 body > #account-panel[data-profile-signed="true"] .yap-settings-group {padding:10px!important;margin:0 3px 7px!important}
}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] {
 background:#24282d!important;color:#f1f3f5!important;border-color:#46505b!important;
}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-profile-settings-view,
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group {
 color:#f1f3f5!important;
}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group {
 background:#2d3339!important;border-color:#48515a!important;
}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group>h3 {color:#f6f7f8!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] :is(.yap-profile-settings-caption,.yap-settings-group-hint) {color:#b8c2cc!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(#yap-menu-settings>summary,#yap-account-advanced>summary,#yap-memory-settings>summary,#yap-growth-consent>summary) {color:#f0f3f5!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions {background:#262c31!important;border-color:#48515a!important;color:#f1f3f5!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group #yap-menu-settings>.top-actions :is(a,button,select,#yap-location-controls>summary) {background:#323940!important;border-color:#4f5963!important;color:#f1f3f5!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(#cloud-quota,.yap-location-options) {background:#343c44!important;color:#f1f3f5!important;border-color:#49525c!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(.yap-profile-action,#yap-growth-consent button) {color:#f0f3f5!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group :is(summary,button):hover {background:#404951!important}

body > #account-panel[data-profile-signed="true"]{max-width:min(366px,calc(100vw - 24px))!important}
body > #account-panel[data-profile-signed="true"] .yap-settings-group .yap-account-usage{border-top:0!important;margin-top:0!important;padding:8px 1px 2px!important;color:inherit!important;font-size:12px!important}
body > #account-panel[data-profile-signed="true"] .yap-settings-group .yap-usage-pill{background:#f1f3f5!important;color:#26313b!important;border:1px solid #d7dce1!important;border-radius:10px!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group .yap-usage-pill{background:#343c44!important;color:#fff!important;border-color:#49525c!important}

/* Avoid overlapping the composer, and keep Plans and Privacy in their own sections. */
body > #account-panel[data-profile-signed="true"]{bottom:max(106px,calc(97px + env(safe-area-inset-bottom)))!important}
body > #account-panel[data-profile-signed="true"] .yap-settings-group .yap-profile-setting-link{
 display:flex!important;align-items:center!important;justify-content:flex-start!important;
 min-height:40px!important;padding:9px 10px!important;margin:3px 0!important;
 width:100%!important;box-sizing:border-box!important;text-decoration:none!important;
 color:#29333d!important;background:#f1f3f5!important;
 border:1px solid #dfe3e7!important;border-radius:9px!important;
 font:550 12px/1.45 system-ui,sans-serif!important;box-shadow:none!important;
}
body > #account-panel[data-profile-signed="true"] .yap-settings-group .yap-profile-setting-link:hover{background:#e8edf1!important}
html[data-theme="dark"] body > #account-panel[data-profile-signed="true"] .yap-settings-group .yap-profile-setting-link{background:#343c44!important;color:#fff!important;border-color:#49525c!important}

/* Reserve composer clearance even when later account-layout CSS loads. */
html body > #account-panel[data-profile-signed="true"]{bottom:max(152px,calc(144px + env(safe-area-inset-bottom)))!important}
