/* rapl.jp 共通のスタイル (www.rapl.jp に合わせた白い地) */
:root {
  --bg: #ffffff;
  --panel: #f1f6e8; /* ごく薄い緑 (背景の縞・フッターと同じ系統) */
  --line: #dce6cb;
  --text: #3c3c3c;
  --muted: #7d7a72;
  --green: #568619; /* フッター・見出しの線 (背景の縞と同じ系統で、白い文字が読める濃さ) */
  --accent: #568619; /* いつもの色は緑 (--green と同じ)。作品ページなどは「ページの色」で上書きする */
  /* 白い地の上の文字用に、ページの色を少し濃くしたもの */
  --accent-text: color-mix(in srgb, var(--accent) 72%, #000);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.8;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ヘッダーとフッター */
.site-header,
.site-footer {
  border-color: var(--line);
  border-style: solid;
  border-width: 0;
}

.site-header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap; /* 狭い画面ではリンクを 2 行目に */
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 16px;
}

.brand {
  white-space: nowrap;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.site-header nav a {
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
}

.site-footer {
  margin-top: 64px;
  font-size: 13px;
  color: #fff;
  background: var(--green);
}

.site-footer .inner {
  padding: 24px 16px 40px;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.site-footer a {
  color: #fff;
}

.inner {
  width: min(100%, 880px);
  margin: 0 auto;
}

main.inner {
  padding: 32px 16px 0;
}

/* 文章のページ (プライバシーポリシー・サポート) */
.doc h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

/* 大見出しの下に、短く太い緑の線を添える (トップの月ごとの絵は除く) */
.doc h1:not(.main-visual)::after {
  content: "";
  display: block;
  width: 32px;
  height: 4px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--green);
}

.doc h2 {
  margin: 40px 0 8px;
  padding-bottom: 6px;
  font-size: 19px;
  border-bottom: 1px solid #c2d3a4; /* ほかの線 (--line) より半段濃い緑 */
}

.doc h3 {
  margin: 28px 0 4px;
  font-size: 16px;
}

.doc p,
.doc li {
  color: #4a4a4a;
}

.doc .meta {
  color: var(--muted);
  font-size: 14px;
}

.doc .box {
  margin: 16px 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--panel);
}

.doc .box p {
  margin: 0;
}

/* よくある質問 */
.faq details {
  margin: 10px 0;
  border-radius: 12px;
  background: var(--panel);
}

.faq summary {
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
}

.faq details > div {
  padding: 0 18px 14px;
}

.faq details p {
  margin: 0 0 8px;
}

/* 作品の一覧・紹介 */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  text-align: center;
}

.hero .bg {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 70%;
  image-rendering: pixelated;
}

.hero .logo {
  position: absolute;
  left: 50%;
  top: 7%;
  width: min(64%, 420px);
  transform: translateX(-50%);
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.hero .edition {
  position: absolute;
  left: 50%;
  top: 64%;
  transform: translateX(-50%);
  margin: 0;
  font-size: clamp(14px, 3vw, 22px);
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000, 0 2px 8px rgba(0, 0, 0, 0.6);
}

.lead {
  font-size: 17px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
}

.badge.accent {
  background: var(--accent);
  color: #fff;
}

.chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.chapters li {
  padding: 10px;
  border-radius: 14px;
  background: var(--panel);
  text-align: center;
}

.chapters img {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.chapters .name {
  display: block;
  margin-top: 6px;
  font-weight: 700;
}

.chapters .sub {
  display: block;
  font-size: 13px;
  color: var(--accent-text);
}

.games {
  display: grid;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.game-card img {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  flex: none;
}

.game-card .title {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.game-card .desc {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.store-soon {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
}

/* 明るいタイトル (エレメンタルストーリーズ: 白い空に景色の帯とロゴ。1 ドット = 横幅の 1/240) */
.hero.light {
  --dot: calc(min(100vw - 32px, 880px) / 240);
  height: calc(var(--dot) * 154);
  background: linear-gradient(180deg, #a9d8ff 0%, #ffffff 45%, #ffffff 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero.light .strip {
  position: absolute;
  left: 0;
  top: calc(var(--dot) * 60);
  width: 100%;
  image-rendering: pixelated;
}

.hero.light .logo {
  left: calc(var(--dot) * 24);
  top: calc(var(--dot) * 12);
  width: calc(var(--dot) * 175);
  transform: none;
  filter: none;
}

.hero.light .edition {
  left: auto;
  right: calc(var(--dot) * 20);
  top: calc(var(--dot) * 128); /* ロゴの縁取りと重ならないよう少しあける */
  bottom: auto;
  transform: none;
}

/* お問い合わせ: フォームメーラーの埋め込み。フォーム自身が中に余白を持っているので、
   枠や余白は付けず、列の端から端まで使う (本文の左右の余白 16px を打ち消す) */
.form-embed {
  margin: 24px -16px;
  color: #222;
  overflow-x: auto;
}

.form-embed a {
  color: #0a58ca;
}

/* メカ夫・烈: 宇宙が背景なので、黒地の真ん中にタイトルの絵を置く */
.hero.space {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  background: #000;
}

.hero.space .bg {
  width: auto;
  height: min(52vw, 360px);
  aspect-ratio: auto;
  object-fit: contain;
  image-rendering: pixelated;
}

/* スタンプの紹介ページ */
.stamp-set {
  margin-top: 48px;
}

.stamp-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stamp-head img {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 19px;
}

.stamp-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
}

.stamp-head .meta {
  margin: 2px 0 0;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.stamp-grid img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.store-links a {
  padding: 10px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

/* LINE のボタンは LINE の緑 */
.store-links a.store-line {
  background: #06c755;
  color: #fff;
}

/* App Store は Apple 公式のバッジをそのまま出す (高さ 40px 以上・まわりに余白、が決まり) */
.store-links a.store-badge {
  padding: 0;
  background: none;
  line-height: 0;
}

.store-links a.store-badge img {
  display: block;
  width: auto;
  height: 44px;
}

/* Google Play のバッジは画像のまわりに透明の余白があるので、見える高さを App Store のバッジ (44px) にそろえる */
.store-links a.store-badge.play img {
  height: 60px;
  margin: -8px 0;
}

.store-links .store-soon {
  margin-top: 0;
}
