:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --wrap: 960px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --text: #e8e8ea;
    --muted: #9aa1ac;
    --border: #2a2f3a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  padding-top: 28px;
  padding-bottom: 28px;
}
.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand span { color: var(--muted); font-weight: 600; }
.tagline { margin: 6px 0 0; color: var(--muted); }

/* Layout */
main.wrap { padding-top: 32px; padding-bottom: 48px; }
.intro p { color: var(--muted); max-width: 60ch; }
.group { margin-top: 36px; }
.group-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 14px;
}

/* Grid + tiles */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
}
.tile-emoji { font-size: 2rem; line-height: 1; }
.tile h2 { margin: 4px 0 0; font-size: 1.15rem; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile-cta { margin-top: auto; padding-top: 6px; font-size: 0.9rem; font-weight: 600; color: var(--accent); }

.tile-status {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.status-live { color: #0a7d33; border-color: #0a7d33; }
.status-building { color: #b45309; border-color: #b45309; }
@media (prefers-color-scheme: dark) {
  .status-live { color: #4ade80; border-color: #4ade80; }
  .status-building { color: #fbbf24; border-color: #fbbf24; }
}

/* Detail */
.detail { max-width: 720px; }
.back {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back:hover { color: var(--text); }
.detail-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--accent);
}
.detail-emoji { font-size: 3rem; line-height: 1; }
.detail-header h1 { margin: 8px 0 4px; font-size: 1.9rem; letter-spacing: -0.02em; }
.detail-tagline { margin: 0; color: var(--muted); font-size: 1.05rem; }
.detail-actions { margin: 24px 0; }
.button {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.button-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border);
  font-weight: 600;
}
.detail-about p { margin: 0 0 14px; }
.detail-features { margin-top: 28px; }
.detail-features h2 { font-size: 1.1rem; margin: 0 0 10px; }
.detail-features ul { margin: 0; padding-left: 20px; }
.detail-features li { margin: 6px 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-footer .wrap { padding-top: 20px; padding-bottom: 20px; }
.site-footer p { margin: 0; color: var(--muted); font-size: 0.9rem; }
