/* ============================================================
   base.css — サイト全体の共通スタイル
   全ページで <link rel="stylesheet" href="/css/base.css"> を読み込むこと
   （common.css を読み込むゲームページは @import 経由で自動適用）
   ============================================================ */

/* ── Base font size ── */
:root {
  --base-font-size: 125%;  /* 1rem = 20px（シニア向け拡大） */
}

html {
  font-size: var(--base-font-size);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Color tokens (dark = default) ── */
:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --border: #2a2a50;
  --text: #e8e8f0;
  --text-sub: #8888aa;
  --accent: #a0c4ff;
}

html[data-theme="light"] {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-sub: #64748b;
  --accent: #2563eb;
}

/* ── Body base ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Top toolbar (share + theme) ── */
.top-toolbar {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 500;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Share buttons (X / Threads) ── */
.share-btn {
  display: inline-block;
  border-radius: 20px;
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-family: inherit;
  text-decoration: none;
  color: #fff;
  border: none;
  cursor: pointer;
}
.share-btn-x       { background: #000; }
.share-btn-threads { background: #1a1a1a; }

/* ── Theme toggle ── */
#theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}

/* ── PC block overlay ── */
.pc-block {
  display: none;
  position: fixed;
  inset: 0;
  background: #0f0f1a;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 32px;
  font-family: inherit;
}
.pc-block-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e8e8f0;
}
.pc-block-desc {
  font-size: 0.95rem;
  color: #8888aa;
  line-height: 1.7;
}
.pc-block-dismiss {
  margin-top: 12px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid #8888aa;
  border-radius: 12px;
  color: #8888aa;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.pc-block-dismiss:hover {
  border-color: #a78bfa;
  color: #a78bfa;
}
