/* =========================================================
   自作Webゲームコレクション — style.css
   白を基調としたライトテーマ。色はすべて :root のトークンで管理。
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-raised: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --border: #e3e6eb;
  --border-strong: #c5cbd5;
  --text: #16181d;
  --text-muted: #474e5c;
  --text-faint: #646b78;
  --primary: #1d5bd8;
  --primary-strong: #1446ad;
  --play: #0b7d4d;
  --play-hover: #086640;
  --play-text: #ffffff;
  --focus: #1d5bd8;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 6px 18px rgb(16 24 40 / 0.06);
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', 'Yu Gothic', Meiryo,
    system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  line-break: strict;
}

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

a {
  color: var(--primary);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--primary-strong);
}

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow {
  max-width: 820px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--focus);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
  color: #ffffff;
}

/* 広告の有無で切り替える文言（site.js が html[data-ads.txt] を設定。JS なしでは「広告なし」の文言を表示） */
[data-ads-on] {
  display: none;
}
html[data-ads='on'] [data-ads-on] {
  display: block;
}
html[data-ads='on'] [data-ads-off] {
  display: none;
}

/* =========================================================
   ヘッダー
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.brand .logo {
  flex-shrink: 0;
}
.brand:hover {
  color: var(--text);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.brand__name {
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
}
.brand__sub {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}
.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.site-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: currentColor;
  border-radius: 2px;
  content: '';
  transition: transform 0.2s ease;
}
.nav-toggle__bar {
  top: 50%;
  margin-top: -1px;
}
.nav-toggle__bar::before {
  top: -6px;
}
.nav-toggle__bar::after {
  top: 6px;
}
.is-open .nav-toggle__bar {
  background: transparent;
}
.is-open .nav-toggle__bar::before {
  transform: translateY(6px) rotate(45deg);
}
.is-open .nav-toggle__bar::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 767px) {
  .brand__sub {
    display: none;
  }
  /* JS なし：メニューをヘッダー下に横並びで常時表示 */
  .site-header:not(.js-nav) .site-header__inner {
    flex-wrap: wrap;
    padding-block: 8px;
  }
  .site-header:not(.js-nav) .site-nav {
    width: 100%;
    overflow-x: auto;
  }
  /* JS あり：ハンバーガーで開閉 */
  .js-nav .nav-toggle {
    display: inline-block;
    flex-shrink: 0;
  }
  .js-nav .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px var(--gutter) 16px;
  }
  .js-nav.is-open .site-nav {
    display: block;
  }
  .js-nav .site-nav ul {
    flex-direction: column;
  }
  .js-nav .site-nav a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
}

/* =========================================================
   共通パーツ
   ========================================================= */
.section {
  padding-block: clamp(48px, 8vw, 88px);
}
.section + .section {
  border-top: 1px solid var(--border);
}
.section__head {
  margin-bottom: 28px;
}
.section__eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.section__title {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  font-weight: 800;
}
.section__lead {
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 0;
  max-width: 60ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
/* 「今すぐ遊ぶ」— サイト内で唯一の緑の塗りボタン。広告と区別できるよう常に同じ見た目 */
.btn--play {
  background: var(--play);
  color: var(--play-text);
}
.btn--play:hover {
  background: var(--play-hover);
  color: var(--play-text);
}
.btn__icon {
  width: 1.05em;
  height: 1.05em;
}
.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--secondary:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn--lg {
  min-height: 56px;
  padding-inline: 30px;
  font-size: 1.06rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* =========================================================
   ヒーロー
   ========================================================= */
.hero {
  padding-block: clamp(40px, 8vw, 96px) clamp(40px, 7vw, 80px);
  background: radial-gradient(ellipse 60% 70% at 85% 30%, rgb(29 91 216 / 0.07), transparent 70%), var(--bg);
}
.hero__inner {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
  }
}
.hero__eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.hero__title {
  font-size: clamp(2rem, 6vw, 3.3rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0;
}
.hero__title .nb {
  display: inline-block;
}
.hero__lead {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 36em;
}
.hero__actions {
  margin-top: 28px;
}
.hero__cta {
  border-color: var(--text);
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 32px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.hero__stats dt {
  font-size: 0.78rem;
  color: var(--text-faint);
}
.hero__stats dd {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}
.hero__stats strong {
  font-size: 1.8rem;
  margin-right: 2px;
}
.hero__visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-bottom: 22px;
}
.hero__tile {
  aspect-ratio: 1200 / 630;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--accent);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.hero__tile:nth-child(even) {
  transform: translateY(22px);
}
.hero__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   ゲームカード
   ========================================================= */
.game-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.noscript-list {
  margin: 0;
  padding-left: 1.3em;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
/* ゲームごとのアクセントカラーの帯 */
.game-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent);
  z-index: 1;
}
.game-card__media {
  display: block;
  aspect-ratio: 1200 / 630;
  background: var(--surface-2);
  overflow: hidden;
}
.game-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.game-card:hover .game-card__media img {
  transform: scale(1.03);
}
.game-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 20px 22px;
  flex: 1;
}
.game-card__title {
  font-size: 1.28rem;
  font-weight: 800;
}
.game-card__title a {
  color: var(--text);
  text-decoration: none;
}
.game-card__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}
.game-card__summary {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin: 0;
}
.game-card__points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
}
.game-card__points li {
  position: relative;
  padding-left: 18px;
}
.game-card__points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.game-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.game-card__actions > * {
  flex: 1 1 140px;
}

/* =========================================================
   作品紹介（各ゲームの詳細）
   ========================================================= */
.details-list {
  display: grid;
  gap: 32px;
}
.detail {
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 40px);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.detail__hero {
  display: grid;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 900px) {
  .detail__hero {
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
  }
}
.detail__media {
  aspect-ratio: 1200 / 630;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.detail__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail__title {
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  font-weight: 900;
  margin-top: 12px;
}
.detail__catch {
  font-weight: 700;
  margin: 4px 0 0;
}
.detail__play {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 18px;
}
.detail__url {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.6;
}
.detail__url span {
  word-break: break-all;
}
.detail__meta {
  display: grid;
  gap: 6px;
  margin: 20px 0 0;
  padding: 14px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.detail__meta div {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 12px;
}
.detail__meta dt {
  color: var(--text-faint);
}
.detail__meta dd {
  margin: 0;
}
.detail__content {
  max-width: 820px;
}
.detail__content > section {
  margin-top: 36px;
}
.detail__content > section > p {
  color: var(--text-muted);
}
.detail__h {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}
.feature {
  padding: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature h5 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 56px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 900;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  line-height: 1;
}
.controls {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }
}
.controls__group {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.controls__group h5 {
  font-size: 0.95rem;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.controls__group ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.94rem;
}
.detail__note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-faint) !important;
}
.recommend {
  margin: 0;
  padding-left: 1.3em;
}
.recommend li {
  margin-bottom: 4px;
}
.faq {
  display: grid;
  gap: 10px;
}
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.faq summary {
  cursor: pointer;
  padding: 13px 18px;
  font-weight: 700;
  min-height: 48px;
}
.faq details p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--text-muted);
}
.detail__back {
  margin: 28px 0 0;
  font-weight: 700;
  font-size: 0.94rem;
}

/* =========================================================
   このサイトについて・プライバシーポリシー
   ========================================================= */
.prose h3 {
  font-size: 1.15rem;
  margin: 2.2em 0 0.7em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--border);
}
.prose .section__head + h3,
.prose .section__head + p {
  margin-top: 0;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
  margin: 0 0 1em;
}
.prose li {
  margin-bottom: 0.35em;
}
.prose .note {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.info {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.info div {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 12px;
  padding: 12px 16px;
}
.info div + div {
  border-top: 1px solid var(--border);
}
.info dt {
  color: var(--text-faint);
  font-size: 0.92rem;
}
.info dd {
  margin: 0;
}
@media (max-width: 479px) {
  .info div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* =========================================================
   広告枠（AdSense 有効時のみ表示）
   「広告」ラベル付き・前後に余白を取り、ゲームのボタンと区別する
   ========================================================= */
.ad {
  margin-block: 56px 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.ad__label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}
/* 読み込みの前後で大きくずれないよう高さを確保する */
.ad__box {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad__box > ins {
  width: 100%;
}
@media (min-width: 768px) {
  .ad__box {
    min-height: 250px;
  }
}
/* 配信される広告がなかった場合は枠ごと閉じる */
.ad:has(ins[data-ad-status='unfilled']) {
  display: none;
}

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  font-size: 0.92rem;
}
.site-footer__grid {
  display: grid;
  gap: 32px;
  padding-block: 48px 32px;
}
@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.footer-brand {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  margin-bottom: 10px;
}
.site-footer__about p {
  color: var(--text-muted);
  margin-bottom: 0.8em;
}
.site-footer__note {
  font-size: 0.85rem;
}
.site-footer__heading {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li a {
  display: inline-block;
  padding: 5px 0;
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer li a:hover {
  color: var(--text);
  text-decoration: underline;
}
.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: 18px 28px;
  color: var(--text-faint);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
