:root {
  --bg: #fbf7f1;
  --surface: #ffffff;
  --surface-2: #f3ece2;
  --text: #2b2420;
  --muted: #7a6e64;
  --line: #e8dfd3;
  --accent: #ff7a45;
  --accent-ink: #ffffff;
  --accent-soft: #ffe7dc;
  --link: #d4572a;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .06);
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1714;
    --surface: #26201c;
    --surface-2: #2f2823;
    --text: #f4ede6;
    --muted: #b3a79c;
    --line: #3c342e;
    --accent: #ff8a5b;
    --accent-ink: #1b1714;
    --accent-soft: #4a2d20;
    --link: #ffa27c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Zen Maru Gothic", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
}
a { color: var(--link); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand svg { width: 32px; height: 32px; flex: none; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { white-space: nowrap; color: var(--text); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .95rem; }
.site-nav a:hover { background: var(--surface-2); }

/* トップ */
.hero { padding: 72px 0 48px; text-align: center; }
.hero .eyebrow { display: inline-block; background: var(--accent-soft); color: var(--link); font-weight: 700; font-size: .85rem; padding: 4px 14px; border-radius: 999px; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.35; margin: 18px 0 12px; letter-spacing: .02em; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 34em; }

.section { padding: 40px 0; }
.section-title { font-size: 1.4rem; margin: 0 0 20px; display: flex; align-items: baseline; gap: 12px; }
.section-title small { color: var(--muted); font-size: .85rem; font-weight: 400; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 18px; }
.app-card {
  display: flex; gap: 16px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); text-decoration: none; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.app-card:hover { transform: translateY(-3px); }
.app-card img { width: 76px; height: 76px; border-radius: 18px; flex: none; }
.app-card > div { min-width: 0; }
.app-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.app-card p { margin: 6px 0 10px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; padding: 1px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag.soon { background: var(--accent-soft); color: var(--link); font-weight: 700; }

.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.about div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.about h3 { margin: 0 0 6px; font-size: 1rem; }
.about p { margin: 0; color: var(--muted); font-size: .9rem; }

.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; }
.contact-box p { margin: 0 0 14px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 22px; border-radius: 999px; font-weight: 700; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border: 0;
}
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn.disabled { opacity: .55; pointer-events: none; }

/* アプリのページ */
.app-hero { display: flex; gap: 24px; align-items: center; padding: 48px 0 24px; flex-wrap: wrap; }
.app-hero img { width: 128px; height: 128px; border-radius: 28px; box-shadow: var(--shadow); }
.app-hero h1 { margin: 0; font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.3; }
.app-hero .catch { margin: 6px 0 10px; color: var(--muted); }
.store-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 32px; }
.prose h2 { font-size: 1.15rem; margin: 2em 0 .6em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prose ul { padding-left: 1.3em; }
.link-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.link-list a { display: block; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); }
.link-list a::after { content: "›"; float: right; color: var(--muted); }

/* 文書ページ（規約など） */
.doc { padding-top: 40px; padding-bottom: 24px; }
.doc .app-name { color: var(--muted); margin: 0; font-size: .9rem; }
.doc h1 { font-size: 1.6rem; margin: 4px 0 20px; line-height: 1.4; }
.doc h2 { font-size: 1.05rem; margin: 2em 0 .5em; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.doc .date { color: var(--muted); text-align: right; margin-top: 2.5em; }
table.law { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 14px; overflow: hidden; }
table.law th, table.law td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.law th { width: 34%; background: var(--surface-2); font-weight: 700; }
@media (max-width: 560px) {
  table.law th, table.law td { display: block; width: 100%; }
  table.law th { border-bottom: 0; padding-bottom: 4px; }
}

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
details.faq p { margin: 0 0 14px; color: var(--muted); }

.todo { background: #fff3a8; color: #5a4a00; padding: 0 6px; border-radius: 4px; font-size: .9em; }

/* フッター */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 360px) {
  .app-card { flex-direction: column; }
  .brand svg { width: 28px; height: 28px; }
  .site-nav a:first-child { display: none; }
}
@media (max-width: 560px) {
  .site-nav a { padding: 6px 8px; font-size: .85rem; }
  .brand span { font-size: 1rem; }
  .hero { padding: 48px 0 32px; }
}

/* ジャンルの絞り込み */
.genre-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 8px; }
.genre-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 6px 14px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .9rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  transition: background .15s ease, border-color .15s ease;
}
.genre-chip:hover { border-color: var(--accent); }
.genre-chip span { font-size: .75rem; font-weight: 400; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 8px; }
.genre-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.genre-chip[aria-pressed="true"] span { background: color-mix(in srgb, var(--accent-ink) 25%, transparent); color: var(--accent-ink); }
.genre-desc { margin: 0 0 16px; min-height: 1.8em; color: var(--muted); font-size: .9rem; }
.app-card[hidden] { display: none; }
.tag.genre { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
a.tag.genre { text-decoration: none; }
.contact-box .section-title { justify-content: center; }
.tag.live { background: #d9f5e3; color: #17663a; font-weight: 700; }
