/* ==========================================================================
   ポカジャン攻略サイト - 共通スタイル
   テーマ：さくらラベンダー（パステル）
   ========================================================================== */

:root {
  /* ベースカラー（さくらラベンダーのパステルテーマ） */
  --bg: #fff8fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fdeff7;
  --border: #f0d9ea;
  --border-soft: #f6e6f1;

  --text-primary: #4a3b5c;
  --text-secondary: #7c6690;
  --text-muted: #a899bb;

  /* パステルアクセント（背景・アイコン・グラデーション用の淡い色） */
  --accent-purple: #c4b5fd;
  --accent-pink: #f9a8d4;
  --accent-gold: #ffd9a0;
  --accent-green: #a8e6cf;
  --accent-red: #ffb3ba;

  /* 濃色バリエーション（文字・リンク・バッジなど、視認性が必要な箇所用） */
  --accent-purple-strong: #8b5cf6;
  --accent-pink-strong: #ec4899;
  --accent-gold-strong: #d97706;
  --accent-green-strong: #059669;
  --accent-red-strong: #e11d48;

  --gradient-hero: linear-gradient(135deg, #fdeaf5 0%, #f6f1ff 55%, #eafaf3 100%);
  --gradient-accent: linear-gradient(90deg, var(--accent-pink) 0%, var(--accent-purple) 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 4px 18px rgba(196, 158, 197, 0.16);
  --shadow-hover: 0 10px 26px rgba(196, 181, 253, 0.35);

  --max-width: 1080px;
  --font-sans: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景の装飾（淡いパステルの光だまり） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 15%, rgba(249, 168, 212, 0.16), transparent 40%),
    radial-gradient(circle at 88% 8%, rgba(196, 181, 253, 0.16), transparent 45%),
    radial-gradient(circle at 50% 95%, rgba(168, 230, 207, 0.14), transparent 50%);
}

a {
  color: var(--accent-purple-strong);
  text-decoration: none;
}
a:hover {
  color: var(--accent-pink-strong);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 251, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  min-width: 0;
}
.brand:hover {
  color: var(--text-primary);
}
.brand .brand-mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient-accent);
  font-size: 1.05rem;
  box-shadow: 0 2px 10px rgba(196, 181, 253, 0.45);
}
.brand small {
  display: block;
  font-size: 0.63rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 4px;
}
.main-nav a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  min-height: 40px;
}
.main-nav a:hover {
  background: var(--bg-card-hover);
  color: var(--accent-pink-strong);
}
.main-nav a.active {
  color: var(--accent-purple-strong);
  background: rgba(196, 181, 253, 0.16);
}

.nav-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 2px;
    display: none;
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav a {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 8px;
    min-height: 48px;
    font-size: 0.95rem;
  }
}

/* ---------- ヒーロー ---------- */
.hero {
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--border-soft);
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.hero .suit-deco {
  position: absolute;
  font-size: 9rem;
  opacity: 0.1;
  user-select: none;
  pointer-events: none;
}
.hero .suit-deco.s1 { top: -20px; right: -10px; transform: rotate(15deg); }
.hero .suit-deco.s2 { bottom: -40px; left: -20px; transform: rotate(-20deg); font-size: 7rem; }

@media (max-width: 600px) {
  .hero { padding: 40px 0 34px; }
  .hero .suit-deco { font-size: 6rem; }
  .hero .suit-deco.s2 { font-size: 4.5rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-gold-strong);
  background: #fff3e0;
  border: 1px solid #ffe2b3;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.65rem, 6vw, 3rem);
  margin: 0 0 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.35;
  background: linear-gradient(90deg, var(--text-primary) 25%, var(--accent-purple-strong) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 0 26px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 46px;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--gradient-accent);
  color: #4a2d4f;
  box-shadow: var(--shadow-hover);
}
.btn-primary:hover {
  color: #4a2d4f;
}
.btn-ghost {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* ---------- セクション共通 ---------- */
.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-soft);
}
.section:last-of-type {
  border-bottom: none;
}
@media (max-width: 600px) {
  .section { padding: 36px 0; }
}
.section-head {
  margin-bottom: 28px;
}
.section-head .tag {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-pink-strong);
  text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  margin: 8px 0 10px;
  font-weight: 800;
  line-height: 1.4;
}
.section-head p {
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0;
}

/* ---------- カードグリッド（トップページのナビカード） ---------- */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.nav-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.nav-card-head {
  padding-right: 64px;
}
.nav-card .go {
  position: absolute;
  top: 22px;
  right: 22px;
}
.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-purple);
}
.nav-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-card .icon {
  flex-shrink: 0;
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fdeaf5, #f2edff);
}
.nav-card h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--text-primary);
}
.nav-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-grow: 1;
}
.nav-card .go {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-gold-strong);
}

/* ---------- 汎用カード / ボックス ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 22px;
  box-shadow: var(--shadow-card);
}
.card + .card {
  margin-top: 16px;
}
.card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

@media (max-width: 600px) {
  .grid-2, .nav-grid {
    grid-template-columns: 1fr;
  }
  /* 短文カードが並ぶ grid-3 は、スマホでも2列にして縦幅を抑える */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .grid-3 .card {
    padding: 14px 12px;
  }
  .grid-3 .card h3 {
    font-size: 0.92rem;
  }
  .grid-3 .card p {
    font-size: 0.8rem;
  }
}
@media (max-width: 420px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* プレイ画像ギャラリー（トップページ「ポカジャンとは」など） */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .gallery-grid .img-placeholder {
    padding: 12px 10px;
    min-height: 90px;
  }
  .gallery-grid .ph-icon {
    font-size: 1.3rem;
  }
  .gallery-grid .ph-label {
    font-size: 0.72rem;
  }
  .gallery-grid .ph-desc {
    display: none;
  }
}

/* 画像プレースホルダー2枚を横並びのまま維持したい場所（トップページのカード見本など）用 */
.grid-tight {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 600px) {
  .grid-tight {
    gap: 10px;
  }
  .grid-tight .img-placeholder {
    padding: 12px 10px;
    min-height: 90px;
  }
  .grid-tight .ph-icon {
    font-size: 1.3rem;
  }
  .grid-tight .ph-label {
    font-size: 0.74rem;
  }
  .grid-tight .ph-desc {
    display: none;
  }
}

/* ---------- ステップリスト（ルール説明用） ---------- */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-list li {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #4a2d4f;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
}
.step-body h4 {
  margin: 2px 0 6px;
  font-size: 1rem;
}
.step-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ---------- テーブル ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 0.92rem;
}
thead th {
  background: #fdf2f8;
  color: var(--accent-pink-strong);
  text-align: left;
  padding: 12px 16px;
  font-weight: 800;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover td {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
/* スマホの画面幅に収めたい表用（横スクロールさせない） */
.table-compact table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.table-compact th,
.table-compact td {
  white-space: normal;
  word-break: break-word;
  padding: 10px 8px;
  font-size: 0.82rem;
}
@media (max-width: 480px) {
  .table-compact th,
  .table-compact td {
    padding: 8px 5px;
    font-size: 0.74rem;
  }
}

td.num, th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  font-weight: 700;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e6faf1;
  color: var(--accent-green-strong);
  border: 1px solid #c3f0dd;
}
.badge.gold {
  background: #fff3e0;
  color: var(--accent-gold-strong);
  border-color: #ffe2b3;
}
.badge.pink {
  background: #fdeef6;
  color: var(--accent-pink-strong);
  border-color: #fcd9ea;
}

/* ---------- Tips / 注意ボックス ---------- */
.callout {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border: 1px solid;
  font-size: 0.92rem;
  display: flex;
  gap: 12px;
}
.callout .emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.callout p {
  margin: 0;
  color: var(--text-secondary);
}
.callout strong {
  color: var(--text-primary);
}
.callout.tip {
  background: #eafaf1;
  border-color: #c9f0dd;
}
.callout.warn {
  background: #fff0ec;
  border-color: #ffd9cc;
}
.callout.info {
  background: #f4f0ff;
  border-color: #e3daff;
}

/* ---------- 画像プレースホルダー ---------- */
.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  width: 100%;
  min-height: 160px;
  padding: 22px 18px;
  border: 2px dashed var(--accent-purple);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fdf4fa, #f6f2ff);
  color: var(--text-secondary);
}
.img-placeholder .ph-icon {
  font-size: 1.9rem;
  opacity: 0.8;
}
.img-placeholder .ph-label {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--accent-purple-strong);
}
.img-placeholder .ph-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.6;
}
.img-placeholder.ratio-16-9 { aspect-ratio: 16 / 9; }
.img-placeholder.ratio-1-1 { aspect-ratio: 1 / 1; max-width: 280px; margin: 0 auto; }
.img-placeholder.ratio-4-3 { aspect-ratio: 4 / 3; }

/* ---------- 実画像スロット（.img-placeholder と同じ比率クラスを共用） ---------- */
.shot {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  background: #eee;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shot.ratio-16-9 { aspect-ratio: 16 / 9; }
.shot.ratio-4-3 { aspect-ratio: 4 / 3; }

/* ---------- 広告スロット ----------
   忍者AdMax の広告タグを js/script.js から差し込むための枠。
   PC/スマホでサイズが異なるため、JS側で画面幅を見て対応するタグだけを読み込む。 */
.ad-slot {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@media (min-width: 768px) {
  .ad-slot {
    min-height: 90px;
  }
}

/* ---------- 目次 (TOC) ---------- */
.toc {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}
.toc .toc-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-purple-strong);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.toc ol {
  margin: 0;
  padding-left: 1.2em;
  columns: 2;
  column-gap: 30px;
  font-size: 0.9rem;
}
.toc li {
  margin-bottom: 8px;
  break-inside: avoid;
}
@media (max-width: 600px) {
  .toc ol { columns: 1; }
}

/* ---------- ページヒーロー（下層ページ） ---------- */
.page-hero {
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--border-soft);
  padding: 38px 0 32px;
}
.page-hero .tag {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-pink-strong);
  text-transform: uppercase;
}
.page-hero h1 {
  font-size: clamp(1.45rem, 5vw, 2.3rem);
  margin: 8px 0 10px;
  font-weight: 900;
  line-height: 1.4;
  color: var(--text-primary);
}
.page-hero p {
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0;
}
.breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--accent-purple-strong);
}

/* ---------- フッター ---------- */
.site-footer {
  padding: 36px 0 26px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-soft);
}
.site-footer .foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}
@media (max-width: 700px) {
  .site-footer .foot-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}
.site-footer h4 {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.site-footer a:hover {
  color: var(--accent-purple-strong);
}
.site-footer .disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
}
.site-footer .copyright {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- ユーティリティ ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.small { font-size: 0.85rem; color: var(--text-muted); }

.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* タップ領域が広く取れるよう、モバイルではリンク行間を少し広げる */
@media (max-width: 480px) {
  body { line-height: 1.7; }
  .section-head h2 { line-height: 1.45; }
}

/* ---------- モバイルでの縦幅圧縮 ----------
   スマホ表示ではスクロール量を減らすため、余白・行間を全体的にタイトにする。 */
@media (max-width: 600px) {
  body {
    line-height: 1.65;
  }

  .hero {
    padding: 28px 0 24px;
  }
  .hero p.lead {
    margin: 0 0 18px;
  }
  .hero .img-placeholder {
    margin-top: 18px !important;
  }

  .page-hero {
    padding: 26px 0 22px;
  }

  .section {
    padding: 26px 0;
  }
  .section-head {
    margin-bottom: 18px;
  }
  .section-head h2 {
    margin: 6px 0 8px;
  }

  .toc {
    padding: 12px 16px;
    margin-bottom: 22px;
  }
  .toc .toc-title {
    margin-bottom: 6px;
  }
  .toc li {
    margin-bottom: 5px;
  }

  .card {
    padding: 16px 16px;
  }
  .card + .card {
    margin-top: 10px;
  }
  .card h3 {
    margin-bottom: 6px;
  }

  .grid-2, .grid-3, .nav-grid {
    gap: 10px;
  }

  .step-list {
    gap: 10px;
  }
  .step-list li {
    padding: 13px 14px;
    gap: 12px;
  }
  .step-body h4 {
    margin: 0 0 4px;
  }

  .callout {
    padding: 12px 14px;
    gap: 10px;
  }

  .img-placeholder {
    min-height: 110px;
    padding: 16px 14px;
    gap: 5px;
  }
  .img-placeholder .ph-icon {
    font-size: 1.5rem;
  }

  .table-wrap {
    margin-top: 4px;
  }
  thead th, tbody td {
    padding: 10px 12px;
  }

  .nav-card {
    padding: 18px 18px;
  }
  .nav-card .go {
    top: 18px;
    right: 18px;
  }

  /* 見出し直後の余白も詰める */
  h1, h2, h3, h4 {
    margin-top: 0;
  }
  [id] {
    scroll-margin-top: 66px;
  }
}
