#account-entry {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--accent, #963d36);
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
}
#account-entry:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
html.auth-open { overflow: hidden; scrollbar-gutter: stable; }
#auth-dialog {
  color-scheme: light;
  width: min(420px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line, #d6d8d6);
  border-top: 3px solid var(--red, #963d36);
  border-radius: 4px;
  background: var(--paper, #f8f8f6);
  color: var(--ink, #26302e);
  box-shadow: 0 16px 64px #17221e30;
  overflow: auto;
}
#auth-dialog::backdrop { background: #18211d66; }
.auth-heading {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; gap: 16px; padding: 8px 16px 8px 24px;
  background: var(--paper, #f8f8f6); border-bottom: 1px solid var(--line, #d6d8d6);
}
#auth-title { font: 14px/1.5 var(--serif, "SimSun", serif); }
#auth-close {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 2px;
  color: var(--muted, #747b78); background: transparent; cursor: pointer;
}
#auth-close:hover { color: var(--red, #963d36); background: var(--red-soft, #f5eaea); }
#auth-close svg { width: 19px; height: 19px; }
#auth-close:focus-visible, #auth-retry:focus-visible { outline: 2px solid var(--red, #963d36); outline-offset: 2px; }
#auth-loading { margin: 18px 24px; font-size: 13px; color: var(--muted, #747b78); }
#auth-retry { margin: 0 24px 16px; }
#auth-frame { display: block; width: 100%; height: 480px; max-height: calc(100dvh - 82px); border: 0; background: var(--paper, #f8f8f6); }
#auth-dialog[data-policy="true"] { width: min(640px, calc(100% - 24px)); height: min(80dvh, 800px); overflow: hidden; }
#auth-dialog[data-policy="true"] .auth-heading { display: none; }
#auth-dialog[data-policy="true"] #auth-content { height: 100%; }
#auth-dialog[data-policy="true"] #auth-frame { height: 100% !important; max-height: none; }
