/*
  amnz.jp 共通スタイル
  - 全ページ共通。ページ固有のCSSファイルは作らず、ここに追記する。
  - 色・余白は :root の変数で管理する。
  - モバイルファースト（360px幅を下限として確認）。
*/

/* ========== 変数 ========== */
:root {
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-text: #1f2933;
  --color-text-muted: #4a5664;
  --color-border: #dde3ea;
  --color-link: #0b5cad;
  --color-link-hover: #084785;
  --color-focus: #f59e0b;

  /* PLAYボタン（最も目立たせる導線） */
  --color-play: #c2410c;
  --color-play-hover: #9a3412;

  /* ステータスバッジ */
  --color-status-live-bg: #dcfce7;
  --color-status-live-text: #14532d;
  --color-status-dev-bg: #fef3c7;
  --color-status-dev-text: #78350f;
  --color-status-soon-bg: #e5e7eb;
  --color-status-soon-text: #374151;

  --radius: 14px;
  --radius-small: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.08), 0 10px 24px rgba(15, 23, 42, 0.1);

  --container: 1080px;
  --container-narrow: 760px;
  --gutter: 16px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

/* ========== ベース ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem; /* 16px */
  line-height: 1.75;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding-bottom: 56px;
}

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

a {
  color: var(--color-link);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-link-hover);
}

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

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.375rem;
}

h3 {
  font-size: 1.25rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

/* ========== レイアウト ========== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.page {
  padding-top: 32px;
}

.section {
  margin-top: 40px;
}

.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 16px;
}

.section__header h2 {
  margin: 0;
}

.section__more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 8px;
}

/* ========== ヘッダー ========== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 12px;
  min-height: 64px;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--color-text);
  text-decoration: none;
  padding: 8px 0;
}

.site-logo:hover {
  color: var(--color-link);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-small);
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--color-bg);
  color: var(--color-link);
}

.site-nav a[aria-current="page"] {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ========== フッター ========== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 24px 0 32px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
}

.copyright {
  margin: 0;
  padding: 0 8px;
  color: var(--color-text-muted);
}

/* ========== トップページ導入文 ========== */
.intro {
  padding: 32px 0 8px;
}

.intro__title {
  font-size: 1.625rem;
  margin-bottom: 12px;
}

.intro__text {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ========== ボタン ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn--play {
  background: var(--color-play);
  color: #ffffff;
}

.btn--play:hover {
  background: var(--color-play-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ▶ アイコン（装飾） */
.btn--play::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 11px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.btn--large {
  min-height: 56px;
  padding: 12px 32px;
  font-size: 1.25rem;
}

.btn--secondary {
  background: var(--color-surface);
  border-color: var(--color-link);
  color: var(--color-link);
}

.btn--secondary:hover {
  background: #eaf2fb;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ========== ステータスバッジ ========== */
.status {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.status--live {
  background: var(--color-status-live-bg);
  color: var(--color-status-live-text);
}

.status--dev {
  background: var(--color-status-dev-bg);
  color: var(--color-status-dev-text);
}

.status--soon {
  background: var(--color-status-soon-bg);
  color: var(--color-status-soon-text);
}

/* ========== ゲームカード ========== */
.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.game-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.game-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

.game-card__title {
  font-size: 1.375rem;
  margin: 0;
}

/* カード全体をクリック可能にする（タイトルのリンクを広げる） */
.game-card__link {
  color: var(--color-text);
  text-decoration: none;
}

.game-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.game-card:hover .game-card__link {
  color: var(--color-link);
  text-decoration: underline;
}

.game-card__link:focus-visible {
  outline: none;
}

.game-card__link:focus-visible::after {
  outline: 3px solid var(--color-focus);
  outline-offset: -3px;
  border-radius: var(--radius);
}

.game-card__subtitle {
  margin: 0 0 8px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.game-card__desc {
  margin: 0 0 16px;
}

.game-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.game-card__more {
  color: var(--color-link);
  font-weight: 600;
}

/* カード内のPLAYボタンはカード全体リンクより手前に出す */
.game-card .btn {
  position: relative;
  z-index: 2;
}

/* ========== サムネイル / キービジュアル ========== */
/*
  実画像がないゲームは .game-thumb--<slug> のプレースホルダーを使う。
  実画像に差し替える場合は <img class="game-thumb" ...> に置き換える。
*/
.game-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  overflow: hidden;
  background: #e2e8f0;
  color: #1f2933;
}

.game-thumb__title {
  position: relative;
  z-index: 1;
  padding: 0 16px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

.game-thumb::before,
.game-thumb::after {
  content: "";
  position: absolute;
}

/* Pengnacode プレースホルダー：水色＋円 */
.game-thumb--pengnacode {
  background: #cfe8f7;
  color: #0c3b5c;
}

.game-thumb--pengnacode::before {
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #a9d5f0;
  right: -10%;
  bottom: -30%;
}

.game-thumb--pengnacode::after {
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.7;
  left: 8%;
  top: 12%;
}

/* Dominosa プレースホルダー：薄緑＋四角 */
.game-thumb--dominosa {
  background: #d8f0dc;
  color: #14532d;
}

.game-thumb--dominosa::before {
  width: 22%;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  background: #b4e1bd;
  left: 7%;
  bottom: 14%;
  transform: rotate(-8deg);
}

.game-thumb--dominosa::after {
  width: 11%;
  aspect-ratio: 1 / 2;
  border-radius: 10px;
  background: #ffffff;
  opacity: 0.75;
  right: 10%;
  top: 12%;
}

/* Map プレースホルダー：薄黄＋格子 */
.game-thumb--map {
  background-color: #fbefc9;
  background-image:
    linear-gradient(rgba(120, 83, 9, 0.12) 2px, transparent 2px),
    linear-gradient(90deg, rgba(120, 83, 9, 0.12) 2px, transparent 2px);
  background-size: 40px 40px;
  color: #5c3d06;
}

.game-thumb--map::before {
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50% 50% 50% 0;
  background: #f4c95d;
  transform: rotate(-45deg);
  right: 12%;
  top: 14%;
}

/* ========== パンくず ========== */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--color-text-muted);
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--color-border);
}

/* ========== ゲーム詳細 ========== */
.game-detail__header {
  margin-bottom: 20px;
}

.game-detail__title {
  font-size: 2rem;
  margin: 0;
}

.game-detail__subtitle {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.game-visual {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.game-visual .game-thumb__title {
  font-size: 2.25rem;
}

.game-detail__lead {
  font-size: 1.125rem;
  margin-bottom: 24px;
}

/* PLAYボタン領域 */
.play-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 20px;
  margin-bottom: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.play-area__notice {
  margin: 0;
}

.play-area__note {
  margin: 0;
  color: var(--color-text-muted);
}

.game-section {
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
}

.game-section > :last-child {
  margin-bottom: 0;
}

/* 対応環境 */
.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.platform-list li {
  padding: 4px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-weight: 600;
}

.feature-list {
  padding-left: 1.25em;
}

.feature-list li + li {
  margin-top: 4px;
}

/* 更新履歴 */
.game-updates dl {
  margin: 0;
}

.game-updates dt {
  font-weight: 700;
}

.game-updates dd {
  margin: 0 0 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  font-weight: 600;
}

/* ========== 汎用テキストページ（About / Privacy / Contact） ========== */
.prose h2 {
  margin-top: 36px;
}

.prose h3 {
  margin-top: 24px;
  font-size: 1.125rem;
}

.prose ul {
  padding-left: 1.25em;
}

.note {
  color: var(--color-text-muted);
}

.notice-box {
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-link);
  border-radius: var(--radius-small);
}

.notice-box > :last-child {
  margin-bottom: 0;
}

/* ========== 404 ========== */
.not-found {
  padding: 64px 0;
  text-align: center;
}

.not-found__code {
  margin: 0;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-border);
  line-height: 1;
}

.not-found .btn-group {
  justify-content: center;
  margin-top: 24px;
}

/* ========== PC向け調整 ========== */
@media (min-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .intro {
    padding-top: 48px;
  }

  .intro__title {
    font-size: 2rem;
  }

  .game-detail__title {
    font-size: 2.5rem;
  }

  .page {
    padding-top: 40px;
  }
}

/* ========== 動きを減らす設定 ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .game-card:hover,
  .btn--play:hover {
    transform: none;
  }
}
