.pac-auth-screen,
.pac-account-dialog {
  --pa-paper: #f6f6f0;
  --pa-surface: #fcfcf8;
  --pa-ink: #202e24;
  --pa-subtle: #586658;
  --pa-stroke: #daddd2;
  --pa-strong-stroke: #b6beb1;
  --pa-accent: #345c45;
  --pa-on-accent: #fff;
  --pa-error: #a34233;
  color: var(--pa-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  text-align: left;
}

html[data-theme="dark"] :is(.pac-auth-screen,.pac-account-dialog) {
  color-scheme: dark;
  --pa-paper: #19211b;
  --pa-surface: #232c24;
  --pa-ink: #edf0e7;
  --pa-subtle: #b5c2b2;
  --pa-stroke: #3e4b40;
  --pa-strong-stroke: #647361;
  --pa-accent: #a8d3b1;
  --pa-on-accent: #18271c;
  --pa-error: #ffb5a6;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .pac-auth-screen {
    color-scheme: dark;
    --pa-paper: #19211b;
    --pa-surface: #232c24;
    --pa-ink: #edf0e7;
    --pa-subtle: #b5c2b2;
    --pa-stroke: #3e4b40;
    --pa-strong-stroke: #647361;
    --pa-accent: #a8d3b1;
    --pa-on-accent: #18271c;
    --pa-error: #ffb5a6;
  }
}

.pac-auth-screen *, .pac-account-dialog * { box-sizing: border-box; }
.pac-auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 0;
  margin: 0;
  max-width: none;
  background: var(--pa-paper);
}
.pac-auth-header {
  position: static;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--pa-stroke);
  background: var(--pa-surface);
  color: var(--pa-subtle);
  font-size: 13px;
}
.pac-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-right: 16px;
  border-right: 1px solid var(--pa-stroke);
  color: var(--pa-ink);
  font-size: 22px;
  font-weight: 740;
  letter-spacing: -.06em;
  line-height: 1;
}
.pac-auth-mark {
  display: block;
  width: 20px;
  height: 20px;
  background: var(--pa-accent);
  border-radius: 5px 10px 5px 10px;
}
.pac-auth-stage {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vh, 68px) 16px;
}
.pac-auth-card, .pac-account-dialog {
  box-sizing: border-box;
  border: 1px solid var(--pa-stroke);
  border-radius: 18px;
  background: var(--pa-surface);
}
.pac-auth-footer {
  position: static;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 12px 18px;
  background: transparent;
  color: var(--pa-subtle);
  font-size: 11px;
}
.pac-auth-footer a { color: inherit; text-decoration: none; }
.pac-auth-footer a:hover { text-decoration: underline; }
.pac-auth-card {
  width: min(100%, 418px);
  padding: clamp(24px, 4vw, 38px);
}
.pac-auth-card h1, .pac-account-dialog h2 {
  margin: 0;
  color: var(--pa-ink);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.25;
}
.pac-auth-card h1 { font-size: 28px; margin-bottom: 25px; }
.pac-auth-form { margin: 0; display: block; }
.pac-auth-fields { display: grid; gap: 15px; }
.pac-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--pa-ink);
  font-size: 13px;
  font-weight: 600;
}
.pac-auth-field input, .pac-auth-field textarea {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 43px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--pa-strong-stroke);
  border-radius: 8px;
  color: var(--pa-ink);
  background: var(--pa-surface);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
}
.pac-auth-field textarea { min-height: 82px; resize: vertical; }
.pac-auth-field small { color: var(--pa-subtle); font-size: 12px; font-weight: 400; }
:is(.pac-auth-screen,.pac-account-dialog) button { font-family: inherit; cursor: pointer; }
:is(.pac-auth-screen,.pac-account-dialog) button:disabled { opacity: .6; cursor: progress; }
:is(.pac-auth-screen,.pac-account-dialog) :is(input,button,textarea):focus-visible {
  outline: 2px solid var(--pa-accent);
  outline-offset: 2px;
}
.pac-auth-error { margin: 12px 0 0; color: var(--pa-error); font-size: 13px; }
.pac-auth-error:empty { display: none; }
button.pac-auth-primary {
  min-height: 43px;
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--pa-accent);
  color: var(--pa-on-accent);
  font-size: 14px;
  font-weight: 600;
}
.pac-auth-card .pac-auth-primary { margin-top: 22px; width: 100%; }
.pac-auth-primary:enabled:hover { filter: brightness(.93); }
.pac-auth-other {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 16px 0 0;
  color: var(--pa-subtle);
  font-size: 13px;
}
.pac-auth-other button, .pac-auth-logout {
  border: 0;
  padding: 5px;
  border-radius: 4px;
  background: transparent;
  color: var(--pa-accent);
  font-size: inherit;
  font-weight: 600;
}
.pac-auth-other button:hover, .pac-auth-logout:hover { text-decoration: underline; }
.pac-account-dialog {
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  margin: auto;
  overflow: auto;
}
.pac-account-dialog:not([open]) { display: none; }
.pac-account-dialog::backdrop { background: rgb(20 32 24 / 36%); }
.pac-account-heading, .pac-account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pac-account-heading { align-items: flex-start; margin-bottom: 22px; }
.pac-account-heading h2 { font-size: 22px; }
.pac-account-username { margin: 4px 0 0; color: var(--pa-subtle); font-size: 13px; }
.pac-account-close {
  width: 34px; height: 34px;
  border: 1px solid var(--pa-stroke); border-radius: 50%;
  background: transparent; color: var(--pa-subtle);
  font-size: 22px; line-height: 1;
}
.pac-account-actions { border-top: 1px solid var(--pa-stroke); padding-top: 16px; margin-top: 22px; }
.pac-auth-logout { font-size: 14px; }
.pac-account-invite { margin-top: 16px; }
.pac-account-invite [hidden] { display: none; }
.pac-invite-create, .pac-invite-copy {
  border: 1px solid var(--pa-stroke);
  border-radius: 7px;
  padding: 6px 10px;
  background: transparent;
  color: var(--pa-accent);
  font-size: 13px;
  font-weight: 600;
}
.pac-invite-create:hover, .pac-invite-copy:hover { border-color: var(--pa-accent); }
.pac-invite-result { display: flex; align-items: end; gap: 8px; }
.pac-invite-result .pac-auth-field { min-width: 0; flex: 1; }
.pac-invite-result .pac-invite-copy { min-height: 43px; }
.pac-invite-status { margin: 5px 0 0; color: var(--pa-subtle); font-size: 12px; }
.pac-invite-status:empty { display: none; }
@media (max-width: 520px) {
  .pac-auth-header { min-height: 58px; }
  .pac-auth-stage { align-items: flex-start; padding-top: 6vh; }
  .pac-auth-field input, .pac-auth-field textarea { font-size: 16px; }
}
