:root {
  --bg: #ffffff;
  --ink: #1d2124;
  --sub: #4a5257;
  --mute: #6b7378;
  --line: #dde3e6;
  --soft: #f3f6f6;
  --accent: #2c7d67;
  --mint: #2a8a70;
  --mint-dark: #1c624f;
  --pink: #ffd3e2;
  --cream: #f2fbf7;
  --cream2: #cfe9de;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121516;
    --ink: #ebeff0;
    --sub: #bcc5c9;
    --mute: #98a2a7;
    --line: #2a3134;
    --soft: #1a1f21;
    --accent: #8fd6bf;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.8 "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.round { font-family: "M PLUS Rounded 1c", "Zen Kaku Gothic New", sans-serif; }
[id] { scroll-margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 15px; line-height: 1.3; text-align: center; text-decoration: none;
}

/* 状態タグ */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1.5; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.tag.live { background: #dcefff; color: #0d4f8b; }
.tag.review { background: #fff0cc; color: #7a5200; }
.tag.test { background: #ddf3e4; color: #1d6b3a; }
.tag.soon { background: #eceef1; color: #4a525c; }
@media (prefers-color-scheme: dark) {
  .tag.live { background: #17344f; color: #a9d4ff; }
  .tag.review { background: #3d3112; color: #ffd98a; }
  .tag.test { background: #173a25; color: #9fe0b5; }
  .tag.soon { background: #2a2f36; color: #c7cdd4; }
}

/* ヘッダー */
header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.logo { font-family: "M PLUS Rounded 1c", sans-serif; font-weight: 800; font-size: 20px; letter-spacing: 0.04em; color: var(--ink); text-decoration: none; }
header.top nav { display: flex; gap: 4px; }
header.top nav a { color: var(--sub); text-decoration: none; font-size: 15px; padding: 10px; border-radius: 8px; white-space: nowrap; }
header.top nav a:hover { background: var(--soft); color: var(--ink); }
@media (max-width: 560px) { header.top nav .pc { display: none; } }

/* はじめに + 目次 */
.intro { padding: 36px 0 40px; }
.intro h1 { font-family: "M PLUS Rounded 1c", sans-serif; font-weight: 800; font-size: clamp(24px, 4.4vw, 34px); line-height: 1.45; margin: 0; }
.intro .lead { color: var(--sub); margin: 12px 0 0; max-width: 40em; }
.toc-h { font-size: 14px; font-weight: 700; color: var(--mute); margin: 28px 0 10px; letter-spacing: 0.05em; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.toc a {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 12px 8px 8px;
  border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--bg);
}
.toc a:hover { border-color: var(--c, var(--accent)); box-shadow: inset 4px 0 0 var(--c, var(--accent)); }
.toc img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.toc b { display: block; font-size: 15px; line-height: 1.35; }
.toc small { display: block; font-size: 12.5px; color: var(--mute); line-height: 1.4; }
@media (max-width: 900px) { .toc { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .toc { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* いちおしアプリ（StudyLog） */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px 0 64px;
  background:
    radial-gradient(1100px 520px at 80% 25%, #3fa88a 0%, rgba(63, 168, 138, 0) 60%),
    linear-gradient(180deg, var(--mint), var(--mint-dark));
}
.hero .grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; position: relative; }
.hero .badge { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--mint-dark); background: var(--pink); border-radius: 999px; padding: 3px 14px; }
.hero .name { display: flex; align-items: center; gap: 16px; margin: 18px 0 0; }
.hero .name img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); flex: none; }
.hero .name h2 { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 800; }
.hero .name p { margin: 2px 0 0; font-size: 15px; color: var(--cream2); }
.hero .tags { margin-top: 16px; }
.hero .copy { font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; line-height: 1.5; margin: 22px 0 12px; }
.hero .copy em { font-style: normal; color: var(--pink); }
.hero .lead { color: var(--cream); margin: 0; max-width: 32em; }
.hero ul.points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.hero ul.points li { position: relative; padding-left: 22px; font-size: 15px; color: var(--cream); line-height: 1.7; }
.hero ul.points li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--pink)); }
.hero .btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.hero .btn.fill { background: #fff; color: var(--mint-dark); }
.hero .btn.fill:hover { background: var(--pink); }
.hero .btn.ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.55); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }
.hero .shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.hero .shots img { border-radius: 16px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); }
.hero .shots img:nth-child(2) { transform: translateY(-22px); }
@media (max-width: 820px) {
  .hero { padding: 40px 0 56px; }
  .hero .grid { grid-template-columns: 1fr; gap: 32px; }
  .hero .shots { max-width: 460px; padding-top: 22px; }
}
@media (max-width: 560px) { .hero .btns .btn { width: 100%; } }

/* セクション */
section.block { padding: 56px 0; }
.sec-h { margin: 0 0 24px; }
.sec-h h2 { font-family: "M PLUS Rounded 1c", sans-serif; font-size: 26px; font-weight: 800; margin: 0; line-height: 1.4; }
.sec-h p { margin: 6px 0 0; color: var(--sub); font-size: 15px; }

/* アプリカード */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.card .pic { aspect-ratio: 9 / 13; overflow: hidden; background: var(--c); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card .t { display: flex; align-items: center; gap: 10px; }
.card .t img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.card h3 { font-size: 18px; margin: 0; line-height: 1.3; }
.card .k { font-size: 13.5px; color: var(--mute); margin: 2px 0 0; line-height: 1.45; }
.card .d { font-size: 15px; color: var(--sub); margin: 10px 0 0; line-height: 1.75; flex: 1; }
.card .acts { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 16px; }
.card .btn { width: 100%; min-height: 46px; font-size: 14.5px; padding: 0 14px; }
.card .btn.fill { background: var(--c); color: #fff; }
.card .btn.fill:hover { filter: brightness(1.08); }
.card .btn.line { color: var(--ink); border: 1.5px solid var(--line); background: var(--bg); }
.card .btn.line:hover { border-color: var(--c); }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card { display: grid; grid-template-columns: 112px 1fr; }
  .card .pic { aspect-ratio: auto; height: 100%; min-height: 200px; }
  .card .body { padding: 14px; }
  .card .acts { grid-column: 1 / -1; padding: 14px; border-top: 1px solid var(--line); }
}

/* 機能一覧（詳細ページ） */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.features li { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); font-size: 15px; color: var(--sub); }
.features b { display: block; color: var(--ink); font-size: 16.5px; margin-bottom: 4px; }
.features li::before { content: ""; display: block; width: 28px; height: 6px; border-radius: 99px; background: var(--c, var(--accent)); margin-bottom: 12px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.gallery { display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 12px; scroll-snap-type: x mandatory; }
.gallery img { width: 220px; flex: none; border-radius: 16px; border: 1px solid var(--line); scroll-snap-align: start; }

.soft { background: var(--soft); }

/* フッター */
footer.site { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--mute); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
footer.site a { color: var(--sub); }

/* アプリ名は途中で折り返さない */
.toc b, .hero .name h1, .hero .name h2, .card h3, .logo { overflow-wrap: normal; word-break: keep-all; }

/* カードが1枚だけのとき（横長） */
.cards.one { grid-template-columns: 1fr; max-width: 720px; }
.cards.one .card { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 1fr auto; }
.cards.one .pic { grid-row: 1 / 3; aspect-ratio: auto; height: 100%; min-height: 320px; }
.cards.one .acts { grid-column: 2; flex-direction: row; flex-wrap: wrap; }
.cards.one .acts .btn { width: auto; flex: 1 1 180px; }
@media (max-width: 560px) {
  .cards.one .card { grid-template-columns: 112px 1fr; grid-template-rows: auto; }
  .cards.one .pic { grid-row: auto; min-height: 200px; }
  .cards.one .acts { grid-column: 1 / -1; flex-direction: column; }
  .cards.one .acts .btn { width: 100%; flex: none; }
}
