* { 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% 20%, #ffffff 0%, #fafafa 60%, #f3f3f1 100%);
  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 5s ease-in-out infinite;
}

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

.steam {
  stroke: #b0a89c;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  opacity: 0;
  animation: steam 2.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom center;
}
.steam.s1 { animation-delay: 0s; }
.steam.s2 { animation-delay: 0.55s; }
.steam.s3 { animation-delay: 1.1s; }

@keyframes steam {
  0%   { opacity: 0; transform: translateY(8px) scale(0.9); }
  25%  { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-16px) scale(1.05); }
}

.brand {
  font-size: 2.75rem;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0;
}

.brewing-headline {
  font-size: 1.1rem;
  color: #666;
  margin-top: 0.5rem;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}

.dots {
  display: inline-flex;
  gap: 0.05rem;
  margin-left: 0.15rem;
}
.dots i {
  font-style: normal;
  display: inline-block;
  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.35; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.brewing-sub {
  max-width: 360px;
  margin: 1.1rem auto 2rem;
  color: #888;
  font-size: 0.95rem;
  line-height: 1.55;
}

.invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1a1a1a;
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.invite-btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.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: #b3b3b3;
  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; }
