.head-actions { display: flex; align-items: center; gap: 9px; min-width: 0; }
.account-link, #account-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 22px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 650;
  white-space: nowrap;
}
.account-link { color: #fffef9; background: var(--blue); text-decoration: none; }
.account-link .icon { width: 16px; height: 16px; }
.account-link:focus-visible, #account-toggle:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.account-link[hidden], #account-session[hidden], #account-panel[hidden] { display: none; }
#account-session { position: relative; min-width: 0; }
#account-toggle {
  max-width: min(24vw, 175px);
  color: #314c43;
  background: #eff1e8;
  border-color: #ced3c7;
}
#account-toggle::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #497357; }
#account-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.account-chevron { width: 13px; height: 13px; }
#account-toggle[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
#account-panel {
  position: absolute;
  z-index: 2;
  inset-inline-end: 0;
  top: calc(100% + 7px);
  width: min(180px, calc(100vw - 24px));
  padding: 5px;
  border: 1px solid #cec8b7;
  border-radius: 11px;
  background: #fffaf0;
  box-shadow: 0 2px 0 #ddd8c8, 0 8px 22px #332d1721;
  transform-origin: top right;
}
#account-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  text-align: start;
  font-size: 14px;
  font-weight: 600;
}
#account-logout .icon { width: 17px; height: 17px; color: var(--blue); }
#account-logout:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
#account-logout:is(:disabled, [aria-disabled="true"]) { color: var(--muted); cursor: default; }
#account-feedback { margin: 0; padding: 4px 12px 8px; color: #675440; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
#account-feedback:empty { display: none; }
@media (hover: hover) and (pointer: fine) {
  .account-link:hover { background: #193ba9; }
  #account-toggle:hover { background: #e6ebdd; }
  #account-logout:enabled:not([aria-disabled="true"]):hover { background: #f2ecdf; }
}
@media (prefers-reduced-motion: no-preference) {
  .account-chevron { transition: transform 160ms var(--ease-out); }
  #account-panel:not([hidden]) { animation: account-disclose 160ms var(--ease-out); }
  @keyframes account-disclose {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to { opacity: 1; transform: none; }
  }
  .account-link { transition: transform 150ms var(--ease-out), background-color 150ms ease; }
  .account-link:active { transform: translateY(1px); }
  html[data-ticket-arrival][data-motion="playing"] .desk .ticket {
    transform-origin: 50% 44%;
    animation: ticket-arrives 580ms var(--ease-out) backwards;
  }
  @keyframes ticket-arrives {
    from { opacity: .45; transform: perspective(1200px) translateY(10px) rotateX(-8deg) rotateZ(.6deg); }
    to { opacity: 1; transform: perspective(1200px) translateY(0) rotateX(0) rotateZ(0); }
  }
}
@media (max-width: 620px) {
  .head-actions { gap: 6px; }
  .account-link, #account-toggle { min-height: 36px; font-size: 12px; padding: 7px 10px; }
  #account-toggle { gap: 4px; }
}
@media (pointer: coarse) {
  #account-toggle { min-height: 44px; }
}
@media (max-width: 350px) {
  #account-toggle { padding-inline: 7px; }
  #account-toggle::before { display: none; }
}
@media (max-width: 390px) {
  .head-actions .help-link { min-width: 36px; padding-inline: 8px; }
  .head-actions .help-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* Hold the account chip’s footprint until the outgoing masthead fades. */
#account-login.account-leaving { visibility: hidden; width: var(--depart-account-width); }
