.account-popover-menu a,
.account-popover-menu form button { gap: 10px; }
.account-popover-menu svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: #a6adc8; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; transition: stroke .14s ease,filter .14s ease; }
.account-popover-menu a:hover svg,.account-popover-menu form button:hover svg { stroke: var(--accent-2); filter: drop-shadow(0 0 4px rgba(148,226,213,.28)); }
.account-popover-menu .menu-warning svg { stroke: var(--danger); }
.account-popover-menu form button:hover svg { stroke: var(--accent-peach); }

.global-translation{position:relative;flex-shrink:0;margin:0}
.translation-menu-trigger{position:relative;width:40px;height:40px;display:grid;place-items:center;list-style:none;border:1px solid rgba(203,166,247,.2);border-radius:12px;background:linear-gradient(145deg,#242237,#181925);color:#d7cdfa;cursor:pointer;box-shadow:inset 0 1px rgba(255,255,255,.04);transition:.16s ease}
.translation-menu-trigger::-webkit-details-marker{display:none}
.translation-menu-trigger:hover,.global-translation[open] .translation-menu-trigger{border-color:rgba(203,166,247,.52);background:#29253e;color:#fff;transform:translateY(-1px)}
.translation-menu-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.translation-symbol{width:25px;height:25px;display:grid;place-items:center}.translation-symbol svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.translation-symbol svg path:first-child{stroke:#94e2d5}
.translation-active-dot{position:absolute;right:4px;top:4px;width:7px;height:7px;border:2px solid #1c1b29;border-radius:50%;background:#94e2d5;box-sizing:content-box}
.translation-menu-panel{position:absolute;z-index:90;right:0;top:calc(100% + 10px);width:min(330px,calc(100vw - 24px));padding:10px;border:1px solid rgba(203,166,247,.2);border-radius:16px;background:#1b1b2a;box-shadow:0 22px 55px rgba(5,5,12,.55),inset 0 1px rgba(255,255,255,.035)}
.translation-menu-heading{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 8px 13px;border-bottom:1px solid rgba(205,214,244,.09)}
.translation-menu-heading>span:nth-child(2){display:flex;min-width:0;flex-direction:column;gap:2px}
.translation-menu-heading strong{font-size:13px;color:#e2e5f4}.translation-menu-heading small{font-size:10px;color:#858ba2}
.translation-menu-mark{width:36px;height:36px;display:grid;place-items:center;border:1px solid rgba(148,226,213,.2);border-radius:11px;background:rgba(148,226,213,.08);color:#94e2d5}.translation-menu-mark svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.translation-locale{padding:4px 7px;border:1px solid rgba(205,214,244,.1);border-radius:7px;background:#13131f;color:#aaa4c7;font-size:9px;font-weight:850;letter-spacing:.08em}
.translation-setting{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:14px;align-items:center;margin-top:7px;padding:11px 9px;border-radius:11px;cursor:pointer}.translation-setting:hover{background:rgba(205,214,244,.035)}
.translation-setting>span:first-child{display:flex;flex-direction:column;gap:3px}.translation-setting strong{font-size:12px;color:#d8dbea}.translation-setting small{font-size:10px;line-height:1.35;color:#7f859a}
.translation-setting input{position:relative;z-index:2;grid-column:2;grid-row:1;width:40px;height:23px;margin:0;justify-self:end;opacity:.001;cursor:pointer}
.translation-switch{position:relative;grid-column:2;grid-row:1;width:40px;height:23px;justify-self:end;border:1px solid #45465a;border-radius:999px;background:#292a39;transition:.18s ease}
.translation-switch:after{content:"";position:absolute;left:3px;top:3px;width:15px;height:15px;border-radius:50%;background:#9699aa;box-shadow:0 1px 3px rgba(0,0,0,.4);transition:.18s ease}
.translation-setting input:checked+.translation-switch{border-color:#6bc2ac;background:#327d6b}.translation-setting input:checked+.translation-switch:after{transform:translateX(17px);background:#ecfff9}
.translation-setting input:focus-visible+.translation-switch{outline:2px solid var(--accent);outline-offset:3px}.translation-setting input:disabled+.translation-switch{opacity:.55}
.translation-settings-link{display:block;margin-top:4px;padding:9px;border-radius:9px;color:#a99be1;font-size:10px;text-align:center}.translation-settings-link:hover{background:rgba(203,166,247,.06);color:#d8ceff}
@media(max-width:680px){.translation-menu-panel{position:fixed;top:68px;right:10px}.translation-menu-trigger{width:38px;height:38px;border-radius:11px}}

.translation-toggle.icon-button svg { fill: none; }
.translation-toggle{position:relative;overflow:visible!important}
.translation-state-badge{position:absolute;right:-5px;top:-7px;z-index:2;width:16px;height:16px;display:grid;place-items:center;border:2px solid #1e1e2e;border-radius:6px;background:#245f56;color:#dffff7;box-shadow:0 2px 6px rgba(0,0,0,.32)}.translation-state-badge svg{width:10px!important;height:10px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round;stroke-linejoin:round}

/* Keep account controls at their intrinsic size, including inside narrow headers. */
.topbar .compact-account{flex:0 0 auto;gap:8px}
.topbar .translation-menu-trigger,
.topbar .muxi-indicator,
.topbar .header-create,
.topbar .notification-button,
.topbar .account-chip{height:40px;min-height:40px;border:1px solid var(--hairline);border-radius:12px;background:transparent;box-shadow:none;transition:background .15s ease,border-color .15s ease,color .15s ease}
.topbar .account-chip{display:flex;align-items:center;gap:8px;width:auto;max-width:none;padding:4px 8px 4px 4px}
.topbar .account-avatar{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;aspect-ratio:1;border-radius:50%;background:#7865e9;color:white;font:700 14px/1 system-ui}
.topbar .account-name{display:none}
.topbar .account-chevron{display:block;flex:0 0 16px;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.topbar .translation-menu-trigger:hover,
.topbar .global-translation[open] .translation-menu-trigger,
.topbar .muxi-indicator:hover,
.topbar .header-create:hover,
.topbar .notification-button:hover,
.topbar .account-chip:hover{border-color:#3b4555;background:var(--surface-2,#232630);color:var(--text,#dce0ed);transform:none}
.topbar .muxi-indicator{padding:0 11px}
.topbar .header-create{display:inline-flex;align-items:center;gap:7px;padding:0 12px;color:var(--text,#dce0ed);font:650 14px/1.2 system-ui;white-space:nowrap}
.header-create svg{width:23px;height:23px;flex:0 0 23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
@media(max-width:680px){.topbar .header-create{padding:0 7px}.header-create span{display:none}.topbar .account-chevron{display:none}.topbar .account-chip{padding:4px}}

.topbar .brand{display:inline-flex;align-items:baseline;align-self:center;height:auto;line-height:1;gap:0;padding:0;transform:none}
.topbar .brand-mark,.topbar .brand-name{line-height:1;font-size:inherit;font-weight:800}
.topbar .brand-mark{font-family:inherit;letter-spacing:-.06em}
.topbar .brand-name{display:inline;letter-spacing:-.02em}
@media(max-width:380px){.topbar .brand{font-size:20px}.topbar .compact-account{gap:3px}}

.translation-toggle[data-translation-toggle]{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:32px;height:32px;padding:5px 8px;flex-shrink:0}
.translation-toggle[data-translation-toggle]>svg{order:-1;width:19px;height:19px;flex:0 0 19px}
.translation-state-label{font:600 10px/1.2 system-ui;white-space:nowrap}
.translation-toggle[aria-pressed="true"]{color:#94e2d5;border-color:#365b54;background:rgba(148,226,213,.07)}
.translation-toggle[aria-pressed="false"]{color:var(--muted);background:transparent}
.translation-state-badge[hidden],.translated-copy [hidden]{display:none!important}
