:root {
  --bg: #0b1020;
  --bg-grad-1: #4f46e5;
  --bg-grad-2: #7c3aed;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.62);
  --accent: #4f46e5;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(120% 120% at 50% 0%, var(--bg-grad-2) 0%, var(--bg-grad-1) 35%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  /* respect the iPhone notch / home indicator */
  padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 24px);
}

.card {
  width: 100%;
  max-width: 360px;
  text-align: center;
  padding: 32px 24px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 32px;
  border-radius: 18px;
  background: #fff;
  color: var(--accent);
}

.logo.small {
  width: 40px;
  height: 40px;
  margin: 0;
  font-size: 20px;
  border-radius: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

#sign-in,
#user-button {
  display: flex;
  justify-content: center;
}

h1 {
  margin: 0 0 4px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0 0 24px;
  color: var(--muted);
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  transition: transform 0.06s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.97); filter: brightness(1.1); }

.count {
  margin: 16px 0 0;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.mode {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.hint {
  max-width: 360px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.hint p { margin: 0; }
.hint strong { color: var(--text); }

/* Hide the install hint once launched as a standalone app */
@media (display-mode: standalone) {
  .hint { display: none; }
}
