* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  line-height: 1.6;
  padding: 3rem 1rem 4rem;
}

main {
  max-width: 640px;
  margin: 0 auto;
}

header {
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  color: #666;
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.version-box {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.label {
  color: #666;
  font-size: 0.875rem;
}

.version {
  font-weight: 600;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  color: #111;
}

.date {
  color: #999;
  font-size: 0.875rem;
  margin-left: auto;
}

.download-btn {
  display: inline-block;
  background: #1a1a1a;
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.15s ease;
}

.download-btn:hover {
  background: #333;
}

.download-btn[aria-disabled="true"] {
  background: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

.size {
  color: #999;
  font-size: 0.875rem;
  margin-left: 0.75rem;
}

section {
  margin-top: 2.5rem;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
  color: #333;
}

ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

code {
  background: #f1f1f1;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.copy-url {
  background: #f1f1f1;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
  border: 1px dashed #c7c7c7;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.copy-url:hover {
  background: #e7e7e7;
  border-color: #9ca3af;
}

.copy-url.copied {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.note {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: #fef9e7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #92400e;
}

footer {
  margin-top: 4rem;
  color: #999;
  font-size: 0.85rem;
  text-align: center;
}

/* ── Admin link, top-right corner ────────────────────────────────────── */

.admin-corner {
  position: fixed;
  top: 0.9rem;
  right: 1.1rem;
  font-size: 0.78rem;
  color: #b3b3b3;
  text-decoration: none;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.admin-corner:hover { color: #1a1a1a; background: rgba(0,0,0,0.04); }

/* ── Brewing landing ─────────────────────────────────────────────────── */

body.brewing-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 18%, #ffffff 0%, #fafafa 55%, #f4f1f1 100%);
  color: #0f0f0f;
  padding: 0;
}

.brewing-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 2rem;
}

.brewing-art {
  margin-bottom: 1.5rem;
  animation: gentle-bob 4.5s ease-in-out infinite;
  filter: drop-shadow(0 6px 16px rgba(185, 28, 28, 0.18));
}

@keyframes gentle-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.bookmark {
  /* Brand bookmark — kept solid; the play-tri inside carries the motion. */
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: bookmark-breathe 4.5s ease-in-out infinite;
}
@keyframes bookmark-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.015); }
}

.play-tri {
  /* Scale around the triangle's centroid (≈ 33% / 50% of its bbox) so the
     visual center stays put as it pulses, instead of drifting toward the tip. */
  transform-box: fill-box;
  transform-origin: 33.33% 50%;
  animation: play-pulse 1.8s ease-in-out infinite;
}
@keyframes play-pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(0.86); opacity: 0.78; }
}

.brand {
  font-family: Geist, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 2.75rem;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: #0f0f0f;
  margin: 0;
}
.brand-accent { color: #B91C1C; }

.brewing-headline {
  font-size: 1.05rem;
  color: #606060;
  margin-top: 0.4rem;
  margin-bottom: 1.1rem;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.01em;
}

/* Version pill — kept invisible until /version.json fetches successfully, so
   late beta releases can't show a placeholder version to the user. */
.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.9rem;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: #525252;
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 999px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}
.version-pill.visible { opacity: 1; visibility: visible; }

.version-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #DC2626;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55);
  animation: live-pulse 2.2s ease-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.version-sep { color: #c0a8a8; }

.dots {
  display: inline-flex;
  gap: 0.1rem;
  margin-left: 0.25rem;
}
.dots i {
  font-style: normal;
  display: inline-block;
  color: #DC2626;
  animation: dot-bounce 1.4s ease-in-out infinite;
  transform-origin: center;
}
.dots i:nth-child(1) { animation-delay: 0s; }
.dots i:nth-child(2) { animation-delay: 0.18s; }
.dots i:nth-child(3) { animation-delay: 0.36s; }

@keyframes dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, #DC2626 0%, #B91C1C 100%);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(185, 28, 28, 0.25), 0 0 0 1px rgba(185, 28, 28, 0.08);
}
.invite-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(185, 28, 28, 0.3), 0 0 0 1px rgba(185, 28, 28, 0.12);
}
.invite-btn:active {
  transform: translateY(0);
  filter: brightness(0.96);
}
.invite-btn .arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}
.invite-btn:hover .arrow { transform: translateX(3px); }

.brewing-footer {
  text-align: center;
  padding: 1.5rem;
  color: #909090;
  font-size: 0.8rem;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

/* ── Gate (signed-out / not-invited / loading) on /downloads.html ────── */

.gate {
  max-width: 420px;
  margin: 4rem auto 1rem;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 2rem 1.75rem;
}
.gate h1 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}
.gate .tagline { color: #666; margin-bottom: 1.4rem; font-size: 0.95rem; }
.gate .muted { color: #888; }
.gate code { font-size: 0.85em; }
.gate-foot {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.7;
}
.gate-foot a { color: #0b6bcb; text-decoration: none; }
.gate-foot a:hover { text-decoration: underline; }

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #d1d5db;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.google-btn:hover { background: #f5f5f5; border-color: #9ca3af; }
.google-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.signed-as {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.25rem;
}
.signed-as code { font-size: 0.85em; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #0b6bcb;
  font-size: inherit;
  text-decoration: underline;
  font-family: inherit;
}
.link-btn:hover { color: #0a5aab; }

.spinner {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid #d1d5db;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 0.35rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
