/* ============================================================================
   Account sheet.
   ============================================================================ */

.acct {
  position: absolute;
  inset: 0;
  z-index: var(--z-sheet);
  display: grid;
  place-items: center;
  padding: var(--s-4);
}

.acct[hidden] { display: none; }

.acct-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}

.acct.is-open .acct-backdrop { opacity: 1; }

.acct-card {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  background: var(--c-surface);
  border: var(--border-hairline);
  border-radius: var(--r-xl);
  padding: var(--s-6) var(--s-5) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);

  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-spring);
}

.acct.is-open .acct-card { opacity: 1; transform: scale(1); }

.acct-x {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  width: 30px;
  height: 30px;
  min-height: 0;
  min-width: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  color: var(--c-text-muted);
}

/* --- signed out --- */

.acct-hero { display: flex; flex-direction: column; gap: var(--s-2); }

.acct-title {
  font-size: var(--t-title-2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-heading);
}

.acct-sub { font-size: var(--t-subhead); color: var(--c-text-muted); line-height: var(--lh-body); }

/* Google's mark on its own surface — their brand rules, and it reads as a
   real sign-in button rather than one of ours. */
.acct-google {
  height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  border-radius: var(--r-md);
  background: #fff;
  color: #1f1f1f;
  font-size: var(--t-callout);
  font-weight: var(--fw-semibold);
}

.acct-google:active { opacity: 0.85; }

.acct-note {
  font-size: var(--t-footnote);
  color: var(--c-text-faint);
  line-height: var(--lh-body);
}

.acct-note strong { color: var(--c-gold); font-weight: var(--fw-semibold); }

/* --- signed in --- */

.acct-head { display: flex; align-items: center; gap: var(--s-3); }

.acct-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: var(--c-raised);
  border: var(--border-hairline);
  font-size: var(--t-callout);
  font-weight: var(--fw-bold);
}

.acct-who { display: flex; flex-direction: column; min-width: 0; }

.acct-name {
  font-size: var(--t-callout);
  font-weight: var(--fw-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-mail {
  font-size: var(--t-footnote);
  color: var(--c-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-credits {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--s-2);
  align-items: baseline;
  padding: var(--s-4);
  border: var(--border-gold);
  border-radius: var(--r-lg);
  background: var(--c-gold-wash);
}

.acct-credit-num {
  font-family: var(--font-num);
  font-size: var(--t-title-1);
  font-weight: var(--fw-bold);
  color: var(--c-gold);
  line-height: 1;
}

.acct-credit-label {
  font-size: var(--t-footnote);
  color: var(--c-gold-dim);
  font-weight: var(--fw-semibold);
}

.acct-credit-hint {
  grid-column: 1 / -1;
  margin-top: var(--s-2);
  font-size: var(--t-caption);
  color: var(--c-text-muted);
}

.acct-status {
  font-size: var(--t-footnote);
  color: var(--c-text-muted);
  padding: var(--s-3);
  border: var(--border-hairline);
  border-radius: var(--r-md);
  line-height: var(--lh-body);
}

.acct-status.is-ok { color: var(--c-success); border-color: rgba(92, 192, 141, 0.4); }

.acct-out {
  height: var(--tap-min);
  border-radius: var(--r-md);
  border: var(--border-hairline);
  color: var(--c-text-muted);
  font-size: var(--t-callout);
  font-weight: var(--fw-semibold);
}

.acct-out:active { opacity: 0.7; }
