:root {
  --bg: #fff;
  --text: #111;
  --muted: #666;
  --faint: #999;
  --border: #e8e8e8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --code-bg: #f5f5f5;
  --tag-blue-bg: #eff6ff;
  --tag-blue: #2563eb;
  --tag-purple-bg: #f3f0ff;
  --tag-purple: #6d28d9;
  --tag-pink-bg: #fdf2f8;
  --tag-pink: #be185d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --text: #eee;
    --muted: #888;
    --faint: #555;
    --border: #262626;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --code-bg: #1a1a1a;
    --tag-blue-bg: #172554;
    --tag-blue: #93c5fd;
    --tag-purple-bg: #1e1338;
    --tag-purple: #c4b5fd;
    --tag-pink-bg: #2a0e1e;
    --tag-pink: #f9a8d4;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-gutter: stable; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Nav ── */

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 52px;
}

nav .left {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav .left a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

nav .left img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

nav .left .sep {
  color: var(--faint);
  font-weight: 300;
  font-size: 18px;
}

nav .right {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav .right a {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.1s, background 0.1s;
}

nav .right a:hover {
  color: var(--text);
  background: var(--code-bg);
}

nav .right a.appstore-badge:hover {
  background: #000 !important;
  color: #fff !important;
  opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
  nav .right a.appstore-badge:hover {
    background: #fff !important;
    color: #000 !important;
  }
}

nav .right a.active {
  color: var(--text);
  text-shadow: 0 0 0.01px var(--text), 0 0 0.01px var(--text);
}

@media (max-width: 600px) {
  nav { height: auto; flex-direction: column; align-items: stretch; padding: 10px 20px; gap: 4px; }
  nav .left { font-size: 13px; width: 100%; }
  nav .right { gap: 0; }
  nav .right a { font-size: 12px; padding: 4px 8px; }
  nav .right a:first-child { padding-left: 0; }
}

@media (max-width: 768px) {
  .intro p { font-size: 13px; }
}

/* ── Page shell ── */

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

main.wide {
  max-width: 800px;
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--faint);
}

footer a {
  color: var(--muted);
  margin-left: 16px;
}

footer a:hover { color: var(--text); }

@media (max-width: 600px) {
  footer { flex-direction: column; gap: 12px; text-align: center; }
  footer a { margin: 0 8px; }
}

/* ── Landing: intro ── */

.intro {
  margin-bottom: 40px;
}

.intro .intro-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .intro .intro-header { justify-content: center; }
  .intro { text-align: center; }
}

.intro img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}

.intro h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.intro p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

/* ── App Store Badge ── */

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #000;
  color: #fff;
  padding: 1px 8px 1px 5px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.15s;
  margin-left: 8px;
}

nav .left .appstore-badge,
nav .right .appstore-badge { color: #fff !important; background: #000; padding: 2px 8px 2px 5px; border-radius: 5px; }
nav .left .appstore-badge:hover,
nav .right .appstore-badge:hover { color: #fff !important; opacity: 0.8; }

.ab-icon::before {
  content: "\f8ff";
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1;
}

.ab-text { font-size: 12px; font-weight: 600; }
.ab-small { display: none; }

@media (prefers-color-scheme: dark) {
  nav .left .appstore-badge,
  nav .right .appstore-badge,
  .appstore-badge { background: #fff !important; color: #000 !important; }
  nav .left .appstore-badge:hover,
  nav .right .appstore-badge:hover,
  .appstore-badge:hover { color: #000 !important; }
}

nav .appstore-badge.mobile-only { display: none; }

@media (max-width: 600px) {
  nav .right .appstore-badge { display: none; }
  nav .appstore-badge.mobile-only { display: inline-flex; margin-left: auto; }
}

.intro .btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.15s, color 0.15s;
}

.intro .btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 500px) {
  .intro { flex-direction: column; text-align: center; }
}

/* ── Landing: features ── */

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
  margin-bottom: 48px;
}

@media (max-width: 500px) {
  .features { grid-template-columns: 1fr; gap: 24px; }
}

.features .f .icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.features .f h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.features .f p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Content pages ── */

main h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

main .sub {
  color: var(--faint);
  font-size: 13px;
  margin-bottom: 40px;
}

main h2 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

main p {
  color: var(--muted);
  margin-bottom: 12px;
}

main ul {
  color: var(--muted);
  padding-left: 20px;
  margin-bottom: 12px;
}

main li {
  margin-bottom: 6px;
  font-size: 14px;
}

main li::marker { color: var(--faint); }

/* ── FAQ ── */

.faq {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 16px 18px;
}

.faq h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.faq p {
  font-size: 13px;
  margin-bottom: 6px;
}

.faq p:last-child { margin-bottom: 0; }

.faq ul { margin-bottom: 0; }
.faq li { font-size: 13px; margin-bottom: 3px; }

/* ── Roadmap ── */

.roadmap-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.roadmap-item .ri-body h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.roadmap-item .ri-body p {
  font-size: 12px;
  margin-bottom: 0;
  line-height: 1.45;
}

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-next { background: var(--tag-blue-bg); color: var(--tag-blue); }
.tag-planned { background: var(--tag-purple-bg); color: var(--tag-purple); }
.tag-exploring { background: var(--tag-pink-bg); color: var(--tag-pink); }

/* ── Changelog ── */

.version {
  font-size: 15px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
}

.version .date {
  font-weight: 400;
  color: var(--faint);
}

/* ── Hub page ── */

.hub-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.hub-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.app-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  transition: border-color 0.15s;
}

.app-link:hover {
  border-color: var(--accent);
  color: var(--text);
}

.app-link img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.app-link h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.app-link p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ── Screenshots ── */

.screenshots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 32px 0;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.screenshots img {
  height: 480px;
  width: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .screenshots img { height: 400px; }
}
