/* Auth splash + account menu shared */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(28,26,23,0.05) 1px, transparent 0);
  background-size: 22px 22px;
}
.auth-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 36px 36px 28px;
  box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.auth-mark {
  width: 32px; height: 32px; border-radius: 5px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 19px;
}
.auth-brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.auth-brand-name em { font-style: italic; color: var(--accent); font-weight: 500; }
.auth-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.auth-sub {
  margin: 6px 0 24px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-submit { margin-top: 8px; padding: 12px 14px; font-size: 15px; justify-content: center; }
.auth-err {
  color: var(--bad);
  background: oklch(0.96 0.04 25);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.auth-err-hint { color: var(--ink-2); }
.auth-err-link {
  background: transparent; border: 0;
  color: var(--accent); font-family: var(--sans); font-size: 13px;
  font-weight: 500; cursor: pointer; padding: 0;
}
.auth-err-link:hover { text-decoration: underline; }
.auth-toggle {
  margin-top: 22px;
  font-size: 14px;
  color: var(--ink-2);
  text-align: center;
}
.auth-toggle button {
  background: transparent; border: 0; color: var(--accent);
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  cursor: pointer; padding: 0;
}
.auth-toggle button:hover { text-decoration: underline; }

.auth-or {
  display: flex; align-items: center;
  margin: 18px 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.auth-or::before, .auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.auth-or span { padding: 0 12px; }

.auth-guest { width: 100%; justify-content: center; padding: 11px 14px; }
.auth-guest-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  font-family: var(--mono);
  line-height: 1.5;
}
.auth-foot {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
}
.auth-foot code {
  background: var(--paper-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

/* Tiny global loading curtain */
.app-loading {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: var(--paper);
  z-index: 200;
}
.app-loading-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.app-loading-spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--rule);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* sync indicator */
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.sync-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3);
}
.sync-pill.saving .dot { background: oklch(0.72 0.16 80); animation: pulse 0.9s ease-in-out infinite; }
.sync-pill.error .dot { background: var(--bad); }
.sync-pill.saved .dot { background: oklch(0.58 0.13 145); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
