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

:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --border: #d2d2d7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --radius: 12px;
  --max-width: 800px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --border: #38383a;
    --text: #f5f5f7;
    --text-secondary: #98989d;
    --accent: #2997ff;
    --accent-hover: #47a6ff;
  }
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Header ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.2px;
}
.header-logo:hover {
  text-decoration: none;
}
nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
nav a {
  font-size: 14px;
  color: var(--text-secondary);
}
nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── ハンバーガーボタン（モバイル用） ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}
.nav-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
}
.lang-switch {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}
.lang-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  line-height: 1.6;
}
.lang-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ── Page wrapper ── */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Hero (top page) ── */
.top-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--border);
}
.top-hero h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.top-hero p {
  font-size: 19px;
  color: var(--text-secondary);
}

/* ── Apps list ── */
.apps-section {
  padding: 56px 0;
}
.apps-section h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.app-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s;
}
.app-card:hover {
  background: var(--border);
  text-decoration: none;
}
.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
  object-fit: contain;
}
.app-info {
  flex: 1;
  min-width: 0;
}
.app-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 3px;
}
.app-info p {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.app-updated {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  color: var(--text-secondary);
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.badge.macos { color: #6e6e73; }
.badge.ios   { color: #6e6e73; }
.arrow {
  color: var(--text-secondary);
  font-size: 18px;
}

/* ── App hero (individual page) ── */
.app-hero {
  padding: 64px 0 52px;
  border-bottom: 1px solid var(--border);
}
.app-hero-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.app-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
  flex-shrink: 0;
}
.app-hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}
.app-hero .tagline {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.btn {
  display: inline-block;
  padding: 11px 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s;
  text-decoration: none;
}
.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  margin-left: 10px;
}
.btn-ghost:hover {
  background: var(--surface);
}
.app-hero-sub {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Section ── */
.section {
  padding: 52px 0;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature-icon {
  font-size: 24px;
  margin-bottom: 10px;
}
.feature-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}
.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── How steps ── */
.how-steps {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.how-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 24px;
  background: var(--surface);
}
.how-step + .how-step {
  border-top: 1px solid var(--border);
}
.step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-step h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}
.how-step p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Screenshots ── */
.screenshots {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.screenshot-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.screenshot-desc h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.screenshot-desc p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.screenshot-pair {
  display: flex;
  gap: 12px;
}
.screenshot-watch {
  height: 180px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.screenshot-iphone {
  height: 480px;
  width: auto;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.screenshot-mac {
  height: 240px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  flex-shrink: 0;
}

/* ── Requirements ── */
.req-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.req-list li {
  display: flex;
  justify-content: space-between;
  padding: 13px 20px;
  font-size: 14px;
  background: var(--surface);
}
.req-list li + li {
  border-top: 1px solid var(--border);
}
.req-list .label {
  color: var(--text-secondary);
}

/* ── Privacy prose ── */
.prose {
  padding: 64px 0;
}
.prose h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 6px;
}
.prose .updated {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 48px;
}
.prose h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 36px 0 10px;
}
.prose p, .prose ul {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.prose ul {
  padding-left: 22px;
  margin-top: 6px;
}
.prose ul li { margin-bottom: 4px; }

/* ── Mockup ── */
.mockup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mockup-bar {
  height: 34px;
  background: var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 7px;
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.35;
}
.mockup-body {
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
}
.menu-item.active {
  background: var(--accent);
  color: #fff;
}
.menu-item .shortcut {
  margin-left: auto;
  opacity: 0.6;
  font-size: 11px;
  font-family: monospace;
}
.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}
.menubar-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  font-size: 12px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.menubar-badge {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
}

/* ── Footer ── */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 18px;
}
.footer-links a {
  color: var(--text-secondary);
}
.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 600px) {
  .top-hero { padding: 48px 0 36px; }
  .top-hero h1 { font-size: 30px; }
  .top-hero p { font-size: 16px; }
  .app-hero { padding: 40px 0 36px; }
  .app-hero h1 { font-size: 30px; }
  .app-hero .tagline { font-size: 17px; }
  .section { padding: 36px 0; }
  .section-title { font-size: 23px; }
  .btn-ghost { display: none; }

  /* ハンバーガーメニュー */
  .nav-toggle { display: block; }
  nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 12px;
    z-index: 100;
  }
  nav.open { display: flex; }
  nav a {
    font-size: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  nav a:last-of-type { border-bottom: none; }
  .lang-switch { margin-left: 0; margin-top: 8px; }
  header { position: relative; }

  /* アプリカード説明文の折り返し */
  .app-info p {
    white-space: normal;
  }
  .app-card {
    padding: 16px;
    gap: 14px;
  }

  /* スクリーンショットをビューポート幅に収める */
  .screenshot-iphone {
    height: auto;
    width: 100%;
    max-width: 280px;
  }
  .screenshot-mac {
    height: auto;
    width: 100%;
  }
  .screenshot-watch {
    height: auto;
    width: 120px;
  }
  .screenshot-pair {
    flex-direction: column;
    align-items: flex-start;
  }

  /* フッター */
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
