/* ==========================================================================
   共通デザインシステム
   サイト全体で使い回すCSS。カラートークン→ベース→レイアウト→部品の順。
   ========================================================================== */

/* --- デザイントークン ------------------------------------------------ */
:root {
  /* 明るい背景 ＋ 黒文字。ブランドの紫 × 金はそ���まま活かす */
  --c-bg: #f5f3fc;
  --c-bg-soft: #ffffff;
  --c-surface: #ffffff;
  --c-surface-2: #efe9fb;
  --c-border: rgba(90, 56, 168, 0.18);
  --c-text: #171320;          /* ほぼ黒。本文の基本色 */
  --c-text-dim: #5f5875;      /* 補助テキスト（濃いめのグレー） */
  --c-primary: #7a45f0;
  --c-primary-dark: #5f2ed6;
  --c-accent: #ffcf3d;
  --c-accent-2: #b57d00;
  --c-pink: #e0449a;
  --c-danger: #d92f68;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --shadow-s: 0 2px 10px rgba(60, 30, 120, 0.08);
  --shadow-m: 0 14px 34px rgba(60, 30, 120, 0.14);

  --wrap: 1120px;
  --nav-h: 64px;
}

/* --- リセット / ベース ---------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
  /* 明るいページに、うっすら紫／金のにじみを乗せる */
  background-color: var(--c-bg);
  background-image:
    repeating-linear-gradient(45deg, rgba(122, 69, 240, 0.035) 0 2px, transparent 2px 46px),
    repeating-linear-gradient(-45deg, rgba(122, 69, 240, 0.035) 0 2px, transparent 2px 46px),
    radial-gradient(960px 560px at 6% -12%, rgba(155, 120, 245, 0.20) 0%, transparent 62%),
    radial-gradient(800px 500px at 98% 2%, rgba(255, 180, 120, 0.18) 0%, transparent 58%),
    radial-gradient(900px 640px at 74% 108%, rgba(255, 207, 61, 0.16) 0%, transparent 60%);
  background-attachment: fixed, fixed, fixed, fixed, fixed;
  color: var(--c-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.9rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

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

.page { padding: 40px 0 72px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--c-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--c-surface);
  border: 1px solid rgba(255, 207, 61, 0.55);
  box-shadow: 0 3px 12px rgba(122, 69, 240, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--c-text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}
.nav a:hover { background: var(--c-surface-2); color: var(--c-text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--c-primary); color: #fff; }

.nav-toggle {
  display: none;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  border-radius: var(--radius-s);
  font-size: 1.2rem;
  width: 44px;
  height: 40px;
  cursor: pointer;
}

/* --- 共通部品 -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-s); }
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--accent { background: var(--c-accent); color: #2b1500; }
.btn--ghost { background: transparent; border-color: var(--c-border); color: var(--c-text); }
.btn--ghost:hover { background: var(--c-surface-2); }
.btn--danger { background: transparent; border-color: rgba(255, 95, 143, 0.5); color: var(--c-danger); }
.btn--danger:hover { background: rgba(255, 95, 143, 0.14); }
.btn--sm { padding: 7px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
}

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(122, 69, 240, 0.10);
  color: #5f2ed6;
  border: 1px solid rgba(122, 69, 240, 0.30);
}
.badge--draft { background: rgba(255, 180, 67, 0.20); color: #8a5b00; border-color: rgba(190, 130, 0, 0.42); }
/* AIが生成した記事であることを示すタグ */
.badge--ai { background: rgba(16, 170, 115, 0.12); color: #0b6b4a; border-color: rgba(16, 170, 115, 0.38); }
.chip--ai { border-color: rgba(16, 170, 115, 0.45); color: #0b6b4a; }
.chip--ai:hover { background: rgba(16, 170, 115, 0.12); color: #0b6b4a; }
.chip--ai[aria-pressed="true"] { background: #159a6e; color: #fff; border-color: #159a6e; }

/* AI生成チェックボックス（投稿フォーム） */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--c-text);
  line-height: 1.5;
}
.check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--c-primary);
  cursor: pointer;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.section-title h2 { margin: 0; }
.section-title p { margin: 0; color: var(--c-text-dim); font-size: 0.9rem; }

.muted { color: var(--c-text-dim); }
.small { font-size: 0.85rem; }
.mt-24 { margin-top: 24px; }

/* --- フォーム -------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field .hint { font-size: 0.78rem; color: var(--c-text-dim); font-weight: 400; }

.input,
.select,
.textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  color: var(--c-text);
  font: inherit;
  font-size: 0.95rem;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(108, 124, 255, 0.2);
}
.textarea { min-height: 200px; resize: vertical; line-height: 1.7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* --- 記事一覧 -------------------------------------------------------- */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
/* hidden 属性を必ず効かせる。
   display:grid / flex を指定した要素は hidden 属性（UAの display:none）に
   勝ってしまい、隠したつもりでも表示されたままになるため。 */
[hidden] { display: none !important; }
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s;
}
.post-card:hover { transform: translateY(-3px); border-color: rgba(108, 124, 255, 0.5); }
.post-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--c-text-dim);
  margin-bottom: 8px;
}
.post-card h3 { margin: 0 0 8px; }
.post-card h3 a { color: var(--c-text); }
.post-card h3 a:hover { color: var(--c-primary); text-decoration: none; }
.post-card__excerpt {
  color: var(--c-text-dim);
  font-size: 0.9rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__foot {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- 記事本文 -------------------------------------------------------- */
.article__head { margin-bottom: 24px; }
.article__body {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-m);
  padding: 28px;
}
/* 本文（リッチテキスト）。書式・書体をそのまま反映する */
.article__body p { margin: 0 0 1em; white-space: normal; }
.article__body > :last-child { margin-bottom: 0; }
.article__body h1, .article__body h2, .article__body h3,
.article__body h4, .article__body h5, .article__body h6 { margin: 1.3em 0 0.5em; }
.article__body h1 { font-size: 1.55rem; }
.article__body h2 { font-size: 1.32rem; }
.article__body h3 { font-size: 1.15rem; }
.article__body ul, .article__body ol { margin: 0 0 1em; padding-left: 1.5em; }
.article__body li { margin-bottom: 0.3em; }
.article__body blockquote {
  margin: 0 0 1em;
  padding: 0.5em 1em;
  border-left: 4px solid var(--c-primary);
  background: rgba(122, 69, 240, 0.06);
  border-radius: 0 8px 8px 0;
  color: var(--c-text-dim);
}
.article__body a { color: var(--c-primary); text-decoration: underline; }
.article__body img { max-width: 100%; height: auto; border-radius: 10px; margin: 0.4em 0; }
.article__body hr { border: none; border-top: 1px solid var(--c-border); margin: 1.5em 0; }
.article__body pre {
  background: rgba(90, 56, 168, 0.07);
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
}
.article__body code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  background: rgba(90, 56, 168, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.92em;
}
.article__body table { border-collapse: collapse; margin: 0 0 1em; }
.article__body th, .article__body td { border: 1px solid var(--c-border); padding: 6px 10px; }
.article__cover {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-m);
  margin-bottom: 22px;
}

/* --- ヒーロー -------------------------------------------------------- */
.hero { padding: 64px 0 24px; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.hero__title { margin-bottom: 16px; }
.hero__title span {
  background: linear-gradient(100deg, var(--c-primary), var(--c-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead { font-size: 1.03rem; color: var(--c-text-dim); max-width: 46ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
/* --- サイトの顔（運営イラスト：プロフィールカード・ロゴ・フッター） ----- */
.profile-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
}
.profile-strip img {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  border-radius: 22px;
  object-fit: cover;
  border: 2px solid rgba(255, 210, 74, 0.5);
  box-shadow: 0 8px 20px rgba(90, 40, 180, 0.18);
}
.profile-strip__body { min-width: 0; }
.profile-strip h3 { margin: 0 0 4px; }
.profile-strip p { margin: 0; color: var(--c-text-dim); font-size: 0.9rem; }
.profile-strip__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.site-footer__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 210, 74, 0.45);
  box-shadow: 0 0 12px rgba(122, 69, 240, 0.28);
}

/* --- 特徴カード ------------------------------------------------------ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature { padding: 24px; }
.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
  background: rgba(155, 108, 255, 0.18);
  color: #d9c7ff;
}
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--c-text-dim); font-size: 0.9rem; margin: 0; }

/* --- ツールバー / 検索 ---------------------------------------------- */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px;
  margin-bottom: 22px;
}
.toolbar .input { flex: 1 1 220px; }
.toolbar .select { flex: 0 0 auto; width: auto; min-width: 150px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-dim);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { background: var(--c-surface-2); color: var(--c-text); }
.chip[aria-pressed="true"] { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* --- ボードゲーム「エイトワールド」 ------------------------------- */
.game-help { font-size: 0.88rem; color: var(--c-text-dim); }
.game-help kbd {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--c-text);
}

/* 遊び方（ボタンで開閉） */
.howto-toggle summary {
  cursor: pointer;
  list-style: none;
}
.howto-toggle summary::-webkit-details-marker { display: none; }
.howto-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-s);
  user-select: none;
}
.howto-toggle__btn:hover { background: var(--c-primary-dark); }
.howto-toggle summary:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.howto-toggle[open] .howto-toggle__btn::after { content: "（閉じる）"; font-weight: 600; font-size: 0.82rem; opacity: 0.85; }
.howto-toggle__body { margin-top: 18px; }

/* 遊び方・コマ図鑑のボタン行 */
.howto-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.howto-toggle__btn--alt {
  background: var(--c-surface);
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
}
.howto-toggle__btn--alt:hover { background: rgba(122, 69, 240, 0.10); }
.howto-toggle__btn[aria-expanded="true"]::after { content: "（閉じる）"; font-weight: 600; font-size: 0.82rem; opacity: 0.75; }

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
.setup-panel { padding: 20px; }

/* コマ選択のカード */
.piece-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.piece-option {
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--c-border);
  background: var(--c-bg-soft);
  color: var(--c-text);
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.piece-option:hover { transform: translateY(-2px); border-color: rgba(255, 210, 74, 0.55); }
.piece-option[aria-pressed="true"] {
  border-color: var(--c-accent);
  background: rgba(255, 210, 74, 0.12);
  box-shadow: 0 0 0 2px rgba(255, 210, 74, 0.28) inset;
}
.piece-option:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.piece-option__top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.piece-option__emoji { font-size: 1.3rem; }
.piece-option__num {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--c-text-dim);
  font-weight: 600;
}
.piece-option__stats { display: grid; gap: 3px; font-size: 0.74rem; color: var(--c-text-dim); }
.piece-option__stats span { display: flex; justify-content: space-between; gap: 8px; }
.piece-option__stats b { color: var(--c-text); font-weight: 700; }
.piece-option__ability {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--c-border);
  font-size: 0.72rem;
  color: #8a5b00;
  line-height: 1.5;
}

/* 盤面 */
/* 盤面のまわりは草原 */
.board-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 16px;
  border-radius: var(--radius-m);
  background-color: #6fa348;
  background-image:
    radial-gradient(130% 90% at 50% -10%, rgba(255, 255, 255, 0.35), transparent 60%),
    repeating-linear-gradient(115deg, rgba(52, 102, 34, 0.55) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #7fb257 0%, #639a41 100%);
  border: 1px solid #4d7a33;
  box-shadow: inset 0 0 46px rgba(20, 50, 10, 0.35), var(--shadow-s);
}
/* 盤面そのものは、土っぽいテクスチャの薄いベージュ */
.board {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 0;
  padding: 7px;
  border-radius: 12px;
  background-color: #e8d7b6;
  background-image:
    repeating-linear-gradient(0deg, rgba(150, 120, 78, 0.10) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(150, 120, 78, 0.08) 0 1px, transparent 1px 6px),
    radial-gradient(60% 60% at 30% 25%, rgba(255, 250, 235, 0.55), transparent 70%),
    radial-gradient(55% 55% at 80% 85%, rgba(150, 118, 70, 0.22), transparent 70%);
  box-shadow:
    inset 0 0 0 2px rgba(120, 92, 52, 0.35),
    inset 0 0 26px rgba(120, 92, 52, 0.28),
    0 8px 20px rgba(40, 30, 10, 0.22);
}
.cell {
  position: relative;
  border-radius: 3px;
  background: transparent;
  border: none;
  box-shadow: inset 0 0 0 1px rgba(120, 92, 52, 0.20);
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s, box-shadow 0.12s;
  font: inherit;
}
.cell--p1 { background: rgba(240, 200, 60, 0.32); box-shadow: inset 0 0 0 2px rgba(210, 160, 0, 0.6); }
.cell--p2 { background: rgba(255, 120, 190, 0.26); box-shadow: inset 0 0 0 2px rgba(205, 70, 150, 0.55); }
.cell.is-move { background: rgba(120, 180, 70, 0.5); box-shadow: inset 0 0 0 2px rgba(70, 130, 30, 0.85); }
.cell.is-attack { background: rgba(230, 70, 70, 0.42); box-shadow: inset 0 0 0 2px rgba(190, 30, 30, 0.9); }
.cell.is-heal { background: rgba(60, 185, 120, 0.42); box-shadow: inset 0 0 0 2px rgba(20, 140, 80, 0.9); }
.cell.is-target { box-shadow: inset 0 0 0 3px #ffffff; }
.cell:hover { background: rgba(60, 40, 10, 0.10); }

/* コマ：既定は「角の丸い正方形のアウトライン」＋背景透過 */
.token {
  --ring: #7a5a28;
  width: 86%;
  height: 86%;
  display: grid;
  place-items: center;
  border-radius: 8px;
  position: relative;
  color: rgba(120, 90, 40, 0.9);
}
.token .ew-art { width: 76%; height: 76%; display: block; }
.token--p1 { --ring: #d8a000; color: rgba(146, 100, 0, 0.95); }
.token--p2 { --ring: #c93d92; color: rgba(155, 35, 112, 0.95); }
/* 動かせるコマは今までどおり塗りつぶしの表示 */
.token.is-active {
  width: 92%;
  height: 92%;
  color: #2c1a05;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
}
.token--p1.is-active { background: linear-gradient(150deg, #ffd24a, #ff9e2e); }
.token--p2.is-active { background: linear-gradient(150deg, #ff8ac2, #b07cff); }
.token.is-active .ew-art { width: 82%; height: 82%; }
.token.is-active.is-selected { outline: 3px solid #fff; outline-offset: -3px; }
/* 動かせないコマは、角丸の正方形アウトラインだけ */
.token.is-idle { background: transparent; box-shadow: inset 0 0 0 2.5px var(--ring); }
.token.is-done { opacity: 0.55; }
.token.is-controlled { outline: 3px dashed #fff; outline-offset: -3px; }
.token__hp {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 999px;
  background: #fff;
  color: #d61f4a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
  white-space: nowrap;
}

/* フェイズ表示・ログ */
.turn-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--radius-s);
  border: 1px solid var(--c-border);
  background: var(--c-bg-soft);
  margin-bottom: 16px;
}
.turn-banner strong { font-size: 1rem; }
.turn-banner--p1 { border-color: rgba(255, 210, 74, 0.5); }
.turn-banner--p2 { border-color: rgba(255, 107, 181, 0.5); }

.info-list { list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--c-border);
}
.info-list li:last-child { border-bottom: none; }
.info-list .label { color: var(--c-text-dim); }
.info-list .value { font-weight: 700; text-align: right; }

.reserve-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.reserve-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-bg-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  font-size: 0.82rem;
}
.log-list li {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--c-text-dim);
  border-left: 3px solid var(--c-border);
  margin-bottom: 4px;
  background: rgba(90, 56, 168, 0.05);
}
.log-list li.is-p1 { border-left-color: var(--c-accent); }
.log-list li.is-p2 { border-left-color: var(--c-pink); }
.log-list li.is-sys { border-left-color: var(--c-primary); color: var(--c-text); }

/* --- モード選択の設定エリア ------------------------------------------ */
.mode-setup {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--c-border);
}

/* --- 部屋情報バー（オンライン対戦） ---------------------------------- */
.room-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-color: rgba(155, 108, 255, 0.45);
  background: linear-gradient(140deg, var(--c-surface-2), var(--c-surface));
}
.room-bar__info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.room-bar__code {
  font-size: 1.4rem;
  letter-spacing: 0.25em;
  color: var(--c-accent);
}

/* --- 行動パネル（攻撃・回復・スキル） -------------------------------- */
.action-panel {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-s);
  border: 1px dashed var(--c-border);
  background: rgba(90, 56, 168, 0.05);
  display: grid;
  gap: 8px;
}
.action-panel__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-text-dim);
  letter-spacing: 0.04em;
}
.action-panel__row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip--skill {
  border-color: rgba(190, 130, 0, 0.5);
  color: #7a5200;
  background: rgba(255, 207, 61, 0.16);
}
.chip--skill:hover { background: rgba(255, 207, 61, 0.3); color: #5f3f00; }

/* --- コマのイラスト（ノート風・線画） -------------------------------- */
.ew-art { display: block; width: 100%; height: 100%; }
.piece-option__art {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  color: #7a5a28;
}
.piece-option__art .ew-art { width: 100%; height: 100%; }
.chip-art {
  display: inline-flex;
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  margin-right: 3px;
  color: currentColor;
}
.chip-art .ew-art { width: 20px; height: 20px; }
.reserve-chip .chip-art { color: #7a5a28; }

/* --- コイントスのアニメーション ------------------------------------ */
.coin-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 138px;
  margin: 4px 0 14px;
  perspective: 700px;
}
.coin-coin {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: #6b4a00;
  background: radial-gradient(circle at 35% 30%, #ffe79a, #f0c02e 65%, #c99a00);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), inset 0 0 0 4px rgba(255, 255, 255, 0.35);
  transform-style: preserve-3d;
  user-select: none;
}
.coin-coin.is-tossing { animation: coin-flip 1.15s cubic-bezier(0.32, 0.06, 0.32, 1) both; }
@keyframes coin-flip {
  0% { transform: rotateY(0deg) translateY(0) scale(1); }
  28% { transform: rotateY(540deg) translateY(-52px) scale(1.08); }
  58% { transform: rotateY(1060deg) translateY(-26px) scale(1.02); }
  100% { transform: rotateY(1440deg) translateY(0) scale(1); }
}
.coin-coin.is-result { animation: coin-pop 0.5s ease; }
@keyframes coin-pop {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.coin-coin.is-head { background: radial-gradient(circle at 35% 30%, #fff6cf, #ffd54a 65%, #d9a400); }
.coin-coin.is-tail { background: radial-gradient(circle at 35% 30%, #efe6ff, #c9b4ff 65%, #9a7ae0); color: #3a2a66; }
.coin-coin.is-blank { color: #7b6218; }

/* --- コマのポップアップ（ステータス・スキル） ---------------------- */
.piece-pop-stage {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  background: rgba(30, 16, 60, 0.45);
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.piece-pop-stage.is-open { display: block; }
.piece-pop {
  width: 100%;
  max-width: 440px;
  margin: 24px auto;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 6px solid var(--c-primary);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-m);
  overflow: hidden;
  animation: pop-in 0.18s ease;
}
.piece-pop--p1 { border-top-color: #e0a800; }
.piece-pop--p2 { border-top-color: #c93d92; }
@keyframes pop-in {
  from { transform: translateY(12px) scale(0.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.piece-pop__head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: var(--c-surface-2);
}
.piece-pop__art {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  border-radius: 12px;
  background: #fffdf6;
  border: 1px solid var(--c-border);
  display: grid;
  place-items: center;
  color: #7a5a28;
}
.piece-pop__art .ew-art { width: 82%; height: 82%; }
.piece-pop__title { margin: 0 0 2px; font-size: 1.15rem; }
.piece-pop__sub { margin: 0; font-size: 0.82rem; color: var(--c-text-dim); }
.piece-pop__body { padding: 16px 18px 20px; }
.piece-pop__section { margin-top: 14px; }
.piece-pop__section h4 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--c-text-dim);
  letter-spacing: 0.04em;
}
.piece-pop__skill {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(122, 69, 240, 0.07);
  border: 1px solid var(--c-border);
  font-size: 0.86rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}
.piece-pop__skill strong { color: var(--c-primary); }
.piece-pop__actions { padding: 0 18px 18px; }
.piece-pop__close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.piece-pop-stage .piece-pop { position: relative; }

/* --- コマ図鑑（全15種の一覧ポップアップ） --------------------------- */
.piece-pop-stage--wide { padding: 24px 16px; z-index: 110; }
.piece-pop--wide { max-width: 900px; }
.piece-pop__list {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-height: min(64vh, 620px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.piece-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--c-border);
  background: var(--c-bg-soft);
  color: var(--c-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.piece-card:hover { transform: translateY(-2px); border-color: var(--c-primary); background: rgba(122, 69, 240, 0.06); }
.piece-card:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.piece-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}
.piece-card__art {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  background: #fffdf6;
  border: 1px solid var(--c-border);
  display: grid;
  place-items: center;
  color: #7a5a28;
}
.piece-card__art .ew-art { width: 84%; height: 84%; }
.piece-card__name { min-width: 0; line-height: 1.2; }
.piece-card__name small { display: block; font-size: 0.66rem; color: var(--c-text-dim); font-weight: 600; }
.piece-card__stats {
  display: flex;
  gap: 4px 12px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--c-text-dim);
}
.piece-card__stats b { color: var(--c-text); font-weight: 700; }
.piece-card__ability { font-size: 0.74rem; color: #8a5b00; line-height: 1.5; }
.piece-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.piece-card__tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(122, 69, 240, 0.12);
  color: var(--c-primary);
}
.piece-card__tag--hidden { background: rgba(217, 47, 104, 0.12); color: #b0154f; }

/* --- 状態表示 -------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 54px 20px;
  color: var(--c-text-dim);
}
.empty__icon { font-size: 2.4rem; margin-bottom: 10px; }
.status {
  padding: 10px 14px;
  border-radius: var(--radius-s);
  font-size: 0.88rem;
  margin-bottom: 14px;
  display: none;
}
.status--on { display: block; }
.status--ok { background: rgba(255, 207, 61, 0.22); border: 1px solid rgba(190, 130, 0, 0.42); color: #7a5200; }
.status--err { background: rgba(217, 47, 104, 0.10); border: 1px solid rgba(217, 47, 104, 0.38); color: #9c1246; }

/* --- モーダル -------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: rgba(30, 16, 60, 0.55);
  padding: 24px 16px;
  overflow-y: auto;
}
.modal.is-open { display: block; }
.modal__box {
  max-width: 860px;
  margin: 24px auto;
  padding: 26px;
  border-radius: var(--radius-l);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-m);
}
.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.modal__head h2 { margin: 0; font-size: 1.25rem; }
.modal__close {
  background: transparent;
  border: none;
  color: var(--c-text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.modal__close:hover { background: var(--c-surface-2); color: var(--c-text); }
.modal__box--wide { max-width: 980px; }

/* --- リッチテキストエディタ ------------------------------------------ */
.rte-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  background: var(--c-surface-2);
}
.rte-group { display: flex; gap: 4px; align-items: center; }
.rte-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--c-border); }
.rte-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--c-border);
  border-radius: 7px;
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.rte-btn:hover { background: var(--c-bg); border-color: var(--c-primary); }
.rte-btn.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.rte-select {
  height: 34px;
  border: 1px solid var(--c-border);
  border-radius: 7px;
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  font-size: 0.82rem;
  padding: 0 6px;
  cursor: pointer;
}
.rte-select--font { min-width: 150px; }
.rte-select--size { min-width: 76px; }
.rte-select--block { min-width: 104px; }
.rte-color {
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--c-border);
  border-radius: 7px;
  background: var(--c-surface);
  cursor: pointer;
}
.rte-editor {
  width: 100%;
  min-height: 260px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.rte-editor:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(122, 69, 240, 0.16); }
.rte-editor:empty::before { content: attr(data-placeholder); color: var(--c-text-dim); opacity: 0.7; }
.rte-editor p { margin: 0 0 1em; }
.rte-editor h1, .rte-editor h2, .rte-editor h3 { margin: 0.8em 0 0.4em; }
.rte-editor ul, .rte-editor ol { margin: 0 0 1em; padding-left: 1.5em; }
.rte-editor blockquote {
  margin: 0 0 1em; padding: 0.4em 0.9em;
  border-left: 4px solid var(--c-primary);
  background: rgba(122, 69, 240, 0.06);
  color: var(--c-text-dim);
}
.rte-editor a { color: var(--c-primary); text-decoration: underline; }
.rte-editor img { max-width: 100%; height: auto; border-radius: 8px; }
.rte-editor hr { border: none; border-top: 1px solid var(--c-border); margin: 1.2em 0; }

/* ==========================================================================
   記事の全文ページ（blog.html?post=...）
   一覧＋モーダルと違い、1記事が1ページとして存在する（検索・シェア用）
   ========================================================================== */
.article { max-width: 760px; }
.article__back { margin: 0 0 14px; font-size: 0.9rem; }
.article h1 { margin-bottom: 10px; }
.article__cover {
  width: 100%;
  height: auto;
  border-radius: var(--radius-m);
  border: 1px solid var(--c-border);
  margin: 4px 0 18px;
}
.article__body {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
  padding: 26px 30px;
  overflow-wrap: break-word;
}
.article__foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* ==========================================================================
   スマホでの投稿を楽にする調整
   （以前はツールバーが縦5段に折り返し、ボタンが34pxで小さく押しにくかった）
   ========================================================================== */
@media (max-width: 680px) {
  /* モーダルの余白を詰めて、記事を書く場所を広く取る */
  .modal { padding: 10px 8px; }
  .modal__box { padding: 16px 14px; margin: 10px auto; border-radius: var(--radius-m); }
  .modal__head { margin-bottom: 12px; }

  /* ツールバーを1行に収め、横にスクロールできるようにする（縦5段の折り返しを解消） */
  .rte-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 6px;
    gap: 5px;
  }
  .rte-bar .rte-group { flex: 0 0 auto; }
  /* 指で押しやすい大きさ（44px 目安）に広げる */
  .rte-btn { min-width: 44px; height: 44px; font-size: 1rem; }
  .rte-select { height: 44px; font-size: 0.9rem; }
  .rte-select--font { min-width: 132px; }
  .rte-select--size { min-width: 68px; }
  .rte-select--block { min-width: 92px; }
  .rte-color { width: 44px; height: 44px; }

  /* 本文エリアを広く・読みやすく */
  .rte-editor { min-height: 46vh; max-height: none; font-size: 1rem; padding: 12px; }

  /* 入力欄も指で押しやすく（16px 未満だとiPhoneで画面が拡大されてしまう） */
  .input, .select, textarea { font-size: 16px; }
  .input, .select { min-height: 44px; }
  .btn { min-height: 44px; }
  .chip-row { gap: 8px; }
  .chip { min-height: 40px; }

  /* 下書き状態がひと目で分かるように、保存ボタンを大きく固定表示 */
  .modal .form-actions { position: sticky; bottom: 0; background: var(--c-surface); padding: 10px 0 6px; }
  .modal .form-actions .btn { flex: 1 1 auto; }
}

/* ツールバーのホバー説明（どんな機能かを表示） */
.rte-bar [data-tip] { position: relative; }
.rte-bar [data-tip]:hover::after,
.rte-bar [data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 30;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 10px;
  border-radius: 8px;
  background: #241a3a;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: var(--shadow-m);
  pointer-events: none;
}
.rte-bar [data-tip]:hover::before,
.rte-bar [data-tip]:focus-visible::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  z-index: 30;
  border: 5px solid transparent;
  border-top-color: #241a3a;
  pointer-events: none;
}

/* タグ候補（新規投稿フォーム） */
.tag-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-suggest:empty { display: none; }
.tag-suggest__label { font-size: 0.78rem; color: var(--c-text-dim); align-self: center; margin-right: 2px; }
.tag-pill {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-dim);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.tag-pill:hover { border-color: var(--c-primary); color: var(--c-primary); }
.tag-pill[aria-pressed="true"] { background: rgba(122, 69, 240, 0.12); border-color: var(--c-primary); color: var(--c-primary); }

/* --- YouTubeチャンネル宣伝 ------------------------------------------- */
.btn--yt { background: #ff0033; color: #fff; box-shadow: var(--shadow-s); }
.btn--yt:hover { background: #d90029; }
.yt-badge { background: rgba(255, 0, 51, 0.10); color: #c00a33; border-color: rgba(255, 0, 51, 0.35); }

.yt-promo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px 30px;
}
.yt-promo__intro { min-width: 0; }
.yt-promo__intro h2,
.yt-promo__intro h3 { margin: 10px 0 12px; font-size: 1.3rem; }
.yt-promo__desc { color: var(--c-text-dim); font-size: 0.95rem; margin-bottom: 20px; }

.yt-embed { min-width: 0; }
.yt-embed__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: #120818;
  box-shadow: var(--shadow-m);
}
.yt-embed iframe,
.yt-embed__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.yt-embed__cover { display: block; }
.yt-embed__cover img { width: 100%; height: 100%; object-fit: cover; }
.yt-embed__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 12px;
  background: #ff0033;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: background 0.18s, transform 0.18s;
}
.yt-embed__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -11px 0 0 -6px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.yt-embed__cover:hover .yt-embed__play { background: #d90029; transform: scale(1.06); }

/* 読み物ページ下などの横長バナー */
.yt-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  margin-top: 26px;
}
.yt-strip__art {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #ff0033;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(255, 0, 51, 0.28);
}
.yt-strip__body { flex: 1 1 260px; min-width: 0; }
.yt-strip__body strong { display: block; margin-bottom: 2px; }
.yt-strip__body p { margin: 0; color: var(--c-text-dim); font-size: 0.88rem; }
.yt-strip__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- ホーム：ゲーム / ブログ 誘導カード ------------------------------- */
.promo-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: center;
  padding: 26px 30px;
}
.promo-card__art {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-m);
  display: grid;
  place-items: center;
  font-size: 3.4rem;
  background: linear-gradient(140deg, rgba(122, 69, 240, 0.16), rgba(255, 207, 61, 0.28));
}
.promo-card__body { min-width: 0; }
.promo-card__body h3 { margin: 0 0 8px; font-size: 1.25rem; }
.promo-card__desc { color: var(--c-text-dim); font-size: 0.95rem; margin: 0 0 18px; }
.promo-card__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- ホーム：背景にアイコンイラストを固定表示 ------------------------- */
body.home {
  background-image:
    linear-gradient(rgba(245, 243, 252, 0.90), rgba(245, 243, 252, 0.94)),
    url("../images/site-icon.jpg");
  background-repeat: no-repeat, no-repeat;
  background-position: center center, right -60px bottom -40px;
  background-size: cover, min(760px, 60vw);
  background-attachment: fixed, fixed;
}
@media (max-width: 700px) {
  .promo-card { grid-template-columns: 1fr; text-align: left; }
  .promo-card__art { width: 96px; height: 96px; font-size: 2.4rem; }
  body.home { background-size: cover, min(420px, 92vw); background-position: center center, center bottom -30px; }
}

/* --- ノート引用（エイトワールドの遊び方） --------------------------- */
.note-quote {
  margin: 0 0 18px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--c-primary);
}
.note-quote h3 { margin: 8px 0 10px; font-size: 1.05rem; }
.note-quote p { margin: 0 0 8px; }
.note-quote__order { line-height: 1.9; font-weight: 700; }
.note-quote > ul,
.note-quote > ol { color: var(--c-text); }
.yt-embed__note { margin: 8px 0 0; }

/* --- フッター -------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 32px 0 40px;
  margin-top: 40px;
  color: var(--c-text-dim);
  font-size: 0.88rem;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- レスポンシブ ---------------------------------------------------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .setup-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .yt-promo { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 680px) {
  .profile-strip { flex-direction: column; text-align: center; gap: 14px; }
  .profile-strip__tags { justify-content: center; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--c-bg-soft);
    border-bottom: 1px solid var(--c-border);
    padding: 10px 16px 16px;
    gap: 4px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: var(--radius-s); }
  .site-header__inner { position: relative; }

  .page { padding: 26px 0 56px; }
  .hero { padding: 34px 0 12px; }
  .post-list { grid-template-columns: 1fr; }
  .article__body { padding: 20px; }
  .toolbar { padding: 12px; }
  .toolbar .select { width: 100%; }
  .dpad { display: grid; }
  .board { max-width: 100%; }
  .board-wrap { padding: 8px; }
  .piece-picker { grid-template-columns: 1fr 1fr; }
  .turn-banner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .btn { padding: 12px 20px; }
}
