/* =====================================================================
 * style.css — Claude Code 導入オンボーディング・クエスト（MVP）
 * トーン: ドラゴンクエスト風。漆黒の背景 × 白い角丸コマンドウィンドウ枠 ×
 *         白文字。選択は ▶ カーソル、メッセージ送りは明滅する ▼。
 *         本格ドットフォント/サウンドは MVP 対象外（雰囲気で“それっぽさ”を出す）。
 * 設計: class 名は app.js 既存のものを一切変えず、見た目だけ DQ 化。
 * ===================================================================== */

:root {
  /* DQ 配色: 漆黒 × 純白の2色基調（コマンドウィンドウ） */
  --bg-0: #000000;          /* 最背面（フィールドの闇） */
  --bg-1: #000208;          /* ほんのり青みの黒 */
  --win: rgba(10, 14, 26, 0.82);  /* ウィンドウ内（半透明の濃紺＝背景の地図がうっすら透ける） */
  --win-2: #05070f;         /* 一段だけ起きたカード */
  --frame: #ffffff;         /* ウィンドウ枠（白） */
  --line: #ffffff;          /* 枠線（白） */
  --line-soft: #6f7790;     /* 補助の薄枠 */
  --ink: #ffffff;           /* 本文（白） */
  --ink-dim: #d7dcef;       /* 補足文（やや灰） */
  --ink-faint: #8b93b4;     /* さらに薄い */
  --gold: #ffd964;          /* 強調（クリア/宝箱） DQの呪文金 */
  --gold-deep: #e7b73a;
  --accent: #57b9ff;        /* DQの水色（行動・選択） */
  --accent-deep: #2f8fe0;
  --good: #5fe39a;          /* 成功（HP回復の緑） */
  --shadow: 0 0 0 4px #000000, 0 18px 44px rgba(0, 0, 0, 0.7);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 860px;
  /* DQ 風の落ち着いた角丸ゴシック（本格ドットは MVP 対象外＝可読性優先） */
  --font: "Hiragino Maru Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

/* 背面: ドラクエ風 全体マップ（実体は .world-map の SVG・ここは下地の闇） */
body {
  min-height: 100vh;
  background: linear-gradient(180deg, #0a1018, #06080e);
  background-attachment: fixed;
}
/* オーバーワールド地図（最背面・固定・操作を邪魔しない） */
.world-map {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.world-map svg { display: block; width: 100%; height: 100%; }
/* タイル格子＋全体減光＋ビネット（コマンドウィンドウの視認性を確保） */
.world-map::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.10) 0 1px, transparent 1px 22px),
    radial-gradient(130% 105% at 50% 38%, transparent 55%, rgba(6, 12, 22, 0.5) 100%),
    linear-gradient(rgba(8, 14, 24, 0.14), rgba(8, 14, 24, 0.14));
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 18px 84px;
  position: relative;
  z-index: 1;            /* フィールドスライム(z-index:0)より前面＝UIに被らせない */
}

/* ---------- 画面（screen）の出し入れ ---------- */
.screen { display: none; animation: fadeUp 0.4s ease both; }
.screen.is-active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 共通パネル/カード = コマンドウィンドウ ----------
 * DQ の白枠ウィンドウ: 黒地 + 太い白角丸枠 + 内側にわずかな余白の縁。 */
.panel {
  background: rgba(8, 12, 22, 0.52);   /* 大窓は強めに透過＝中央でも地図が見える */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 3px solid var(--frame);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(0, 0, 0, 0.55), inset 0 0 0 3px rgba(255, 255, 255, 0.10);
  padding: 28px 26px;
}

.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold);
  border: 2px solid var(--gold-deep);
  border-radius: 8px;
  padding: 4px 12px;
  margin-bottom: 16px;
  text-shadow: 0 1px 0 #000;
}

h1, h2 { line-height: 1.4; margin: 0 0 10px; text-shadow: 0 2px 0 #000; }
h1 { font-size: 26px; }
h2 { font-size: 21px; }
.lead { color: var(--ink-dim); margin: 0 0 22px; }

/* ---------- ボタン = コマンド選択（黒地・白枠・▶カーソル） ---------- */
.btn {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  background: var(--win);
  border: 2px solid var(--frame);
  border-radius: 10px;
  padding: 13px 22px 13px 30px;
  position: relative;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(255, 255, 255, 0.12), 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.08s ease, box-shadow 0.08s ease, color 0.12s ease;
  text-shadow: 0 1px 0 #000;
}
/* ▶ 選択カーソル（DQ の手/矢印） */
.btn::before {
  content: "▶";
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--gold);
  opacity: 0;
  transition: opacity 0.12s ease, left 0.12s ease;
}
.btn:hover::before, .btn:focus-visible::before { opacity: 1; left: 13px; }
.btn:hover { color: #fff; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #000, 0 2px 0 rgba(255, 255, 255, 0.12); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled::before { display: none; }

/* アクセント（水色枠）＝物語を進める強コマンド */
.btn-accent {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(87, 185, 255, 0.18), 0 6px 16px rgba(0, 0, 0, 0.5);
}
.btn-ghost {
  color: var(--ink-dim);
  border: 2px solid var(--line-soft);
  box-shadow: none;
  font-weight: 600;
}
.btn-ghost::before { color: var(--accent); }
.btn-ghost:active { transform: translateY(1px); }
.btn-block { width: 100%; }

/* ---------- 入力 = 名前を きめる ウィンドウ ---------- */
.field {
  width: 100%;
  font-family: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--win);
  border: 2px solid var(--frame);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: inset 0 0 0 2px #000;
}
.field::placeholder { color: var(--ink-faint); }
.field:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* =====================================================================
 * 画面別
 * ===================================================================== */

/* ---- 名前入力 ---- */
.name-screen .panel { text-align: center; max-width: 560px; margin: 8vh auto 0; }
.crest {
  font-size: 54px;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 10px rgba(255, 217, 100, 0.35));
}

/* ---- クエストマップ = ぼうけんの しょ / 行き先メニュー ---- */
.map-head { text-align: center; margin-bottom: 22px; }
.player-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--win); border: 2px solid var(--line-soft);
  border-radius: 8px; padding: 6px 16px; color: var(--ink-dim); font-size: 14px;
  box-shadow: inset 0 0 0 2px #000;
}
.player-tag b { color: var(--gold); }

.quest-list { display: grid; gap: 10px; }
/* 各ステージ = コマンドウィンドウの1行（左に ▶ カーソル枠） */
.quest-node {
  display: flex; align-items: center; gap: 16px;
  background: var(--win); border: 2px solid var(--frame);
  border-radius: var(--radius-sm); padding: 14px 18px 14px 34px;
  cursor: pointer; position: relative;
  box-shadow: inset 0 0 0 2px #000;
  transition: transform 0.1s ease, border-color 0.15s ease, color 0.15s ease;
}
.quest-node::before {
  content: "▶";
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--gold); opacity: 0; transition: opacity 0.12s ease, left 0.12s ease;
}
.quest-node:hover::before { opacity: 1; left: 14px; }
.quest-node:hover { border-color: var(--gold); }
.quest-node.locked { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.5); }
.quest-node.locked::before { display: none; }
.quest-node.cleared { border-color: var(--line-soft); }
.quest-node.current { border-color: var(--accent); }
.quest-node.current::before { opacity: 1; left: 14px; color: var(--accent); animation: cursorBob 0.9s steps(2) infinite; }
.quest-node.locked:hover { transform: none; border-color: var(--line-soft); }

@keyframes cursorBob { 0%, 100% { left: 14px; } 50% { left: 9px; } }

.node-badge {
  flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 8px;
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
  background: var(--win); border: 2px solid var(--line-soft); color: var(--ink-dim);
  box-shadow: inset 0 0 0 1px #000;
}
.quest-node.cleared .node-badge { color: var(--gold); border-color: var(--gold-deep); text-shadow: 0 0 8px rgba(255, 217, 100, 0.5); }
.quest-node.current .node-badge { color: var(--accent); border-color: var(--accent); }
.node-main { flex: 1 1 auto; min-width: 0; }
.node-name { font-weight: 700; }
.node-sub { font-size: 13px; color: var(--ink-faint); }
.node-state { flex: 0 0 auto; font-size: 13px; color: var(--ink-faint); }
.node-state.done { color: var(--gold); }
.node-state.go { color: var(--accent); font-weight: 700; }

/* ---- ステージ共通ヘッダー ---- */
.stage-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.stage-head .stage-no {
  font-size: 12px; letter-spacing: 0.18em; color: var(--gold);
}
.stage-head h2 { margin: 0; flex: 1 1 auto; min-width: 200px; }
.head-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.head-player { font-size: 13px; color: var(--ink-dim); }
.head-player b { color: var(--gold); }

/* 進捗バー = けいけんち / HPゲージ風 */
.progress-wrap { width: 100%; margin: 4px 0 22px; }
.progress-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-faint); margin-bottom: 6px;
}
.progress-track {
  height: 12px; background: var(--win); border: 2px solid var(--frame);
  border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px #000;
}
.progress-fill {
  height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--gold) 0, var(--gold) 8px, var(--gold-deep) 8px, var(--gold-deep) 12px);
  transition: width 0.5s ease;
}

/* 得られるもの = たからばこ バッジ */
.reward-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--win);
  border: 2px solid var(--gold-deep);
  color: var(--gold);
  border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 700;
  margin-bottom: 16px; box-shadow: inset 0 0 0 1px #000;
  text-shadow: 0 1px 0 #000;
}

/* リード = メッセージウィンドウ（左に水色の縁取り＋DQの▼送りカーソル） */
.stage-intro {
  color: var(--ink-dim);
  background: var(--win);
  border: 2px solid var(--line-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 12px 30px 16px 16px; margin: 0 0 22px;
  box-shadow: inset 0 0 0 1px #000;
  position: relative;
}
.stage-intro::after {
  content: "▼";
  position: absolute; right: 12px; bottom: 8px;
  color: var(--gold); font-size: 12px;
  animation: blink 1s steps(1) infinite;
}

/* ① 音声依頼 / ② チェック ブロック */
.step-block { margin-bottom: 18px; }
.step-label {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; margin-bottom: 8px;
}
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: var(--win); color: var(--accent); border: 2px solid var(--accent);
}
.step-num.alt { color: var(--gold); border-color: var(--gold-deep); }

/* 音声依頼 = じゅもん を となえる ウィンドウ。
 * コピーボタンは本文の“下”に右寄せで置く（本文へ重ねない＝長文・複数行でも全文表示）。
 * 子要素: [.mic ラベル] → [本文テキストノード] → [.copy-btn] の縦並び。 */
.say-box {
  background: var(--win);
  border: 2px solid var(--frame);
  border-radius: 10px;
  padding: 16px 18px 14px;
  font-size: 18px;
  white-space: pre-wrap;
  word-break: break-word;          /* 長い URL/連続文字でもはみ出さない */
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  box-shadow: inset 0 0 0 2px #000;
}
.say-box .mic { color: var(--accent); font-size: 13px; display: block; margin: 0; }

.copy-btn {
  /* 本文の下に右寄せ（重ねない）。DQ の「コマンド」風の小ボタン。 */
  align-self: flex-end;
  flex: 0 0 auto;
  margin-top: 2px;
  font-size: 12px; padding: 6px 14px; border-radius: 6px;
  background: var(--win); color: var(--ink-dim);
  border: 2px solid var(--line-soft); cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.copy-btn::before { content: "📋 "; }
.copy-btn:hover { color: var(--ink); border-color: var(--gold); }
.copy-btn.copied { color: var(--good); border-color: var(--good); }
.copy-btn.copied::before { content: "✓ "; }

@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
/* チェック文も同様に縦並び＝本文を全文表示してから下に右寄せコピーボタン */
.check-item {
  background: var(--win);
  border: 2px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  box-shadow: inset 0 0 0 1px #000;
}

.stage-note {
  font-size: 13px; color: var(--ink-faint);
  margin: 4px 0 22px; padding-left: 6px;
}

.stage-foot { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stage-foot .btn { flex: 0 0 auto; }
.foot-back { color: var(--ink-faint); font-size: 14px; background: none; border: none; cursor: pointer; font-family: inherit; }
.foot-back:hover { color: var(--ink-dim); }

/* ---- 目標選択（ステージ1）= コマンドメニュー ---- */
.goal-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px;
}
.goal-card {
  text-align: left; cursor: pointer;
  background: var(--win); border: 2px solid var(--frame);
  border-radius: 10px; padding: 14px 16px 14px 30px;
  position: relative;
  box-shadow: inset 0 0 0 2px #000;
  font-family: inherit; color: var(--ink);
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.goal-card::before {
  content: "▶";
  position: absolute; left: 11px; top: 18px;
  font-size: 12px; color: var(--gold); opacity: 0; transition: opacity 0.12s ease;
}
.goal-card:hover::before { opacity: 0.6; }
.goal-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.goal-card.selected { border-color: var(--gold); box-shadow: inset 0 0 0 2px #000, 0 0 0 2px var(--gold); }
.goal-card.selected::before { opacity: 1; }
.goal-card .g-icon { font-size: 22px; }
.goal-card .g-title { font-weight: 700; margin: 6px 0 4px; }
.goal-card .g-outcome { font-size: 13px; color: var(--ink-dim); }

/* ---- クリア演出オーバーレイ = レベルアップ！ ---- */
.fx-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: none; place-items: center;
  background: rgba(0, 0, 0, 0.9);
}
.fx-overlay.show { display: grid; animation: fadeUp 0.3s ease both; }
.fx-card {
  text-align: center; padding: 30px 34px; max-width: 440px;
  background: var(--win);
  border: 3px solid var(--gold); border-radius: 16px;
  box-shadow: var(--shadow), inset 0 0 0 2px #000, 0 0 30px rgba(255, 217, 100, 0.25);
}
.fx-burst { font-size: 56px; animation: pop 0.5s ease both; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.fx-title { font-size: 22px; font-weight: 800; color: var(--gold); margin: 10px 0 6px; text-shadow: 0 2px 0 #000, 0 0 14px rgba(255, 217, 100, 0.5); }
.fx-reward { color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.fx-line { color: var(--ink-dim); font-size: 14px; margin-bottom: 22px; }

/* ---- Congratulations（全画面）= ゆうしゃの しょうり ---- */
.congrats-screen { text-align: center; }
.congrats-screen .panel {
  padding: 48px 26px 26px; position: relative; min-height: 60vh;
  display: flex; flex-direction: column; align-items: center;
  border-color: var(--gold); box-shadow: var(--shadow), inset 0 0 0 2px #000, 0 0 36px rgba(255, 217, 100, 0.18);
}
.congrats-crown { font-size: 72px; animation: pop 0.6s ease both; filter: drop-shadow(0 0 16px rgba(255, 217, 100, 0.5)); }
.congrats-title { font-size: 30px; font-weight: 800; color: var(--gold); margin: 14px 0 8px; letter-spacing: 0.06em; text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 217, 100, 0.45); }
.congrats-sub { color: var(--ink-dim); margin-bottom: 28px; }
.reward-wall { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.reward-wall .reward-badge { margin: 0; }

/* 右下の控えめな「次の冒険」（flexで下端へ送る＝バッジと被らない・オーナー指定で右寄せ） */
.next-adv-btn {
  margin-top: auto; align-self: flex-end;
  margin-bottom: 0;
  position: relative;
  font-size: 14px; color: var(--ink-faint);
  background: var(--win); border: 2px solid var(--line-soft);
  border-radius: 8px; padding: 9px 16px 9px 26px; cursor: pointer; font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.next-adv-btn::before {
  content: "▶"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--accent); opacity: 0; transition: opacity 0.12s ease;
}
.next-adv-btn:hover::before { opacity: 1; }
.next-adv-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---- 自動化できることカード → To be continued ---- */
.next-screen .lead { text-align: center; }
.next-grid { display: grid; gap: 14px; margin: 22px 0; }
.next-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--win); border: 2px solid var(--frame);
  border-radius: 10px; padding: 16px 18px;
  box-shadow: inset 0 0 0 2px #000;
}
.next-card .n-icon { font-size: 26px; flex: 0 0 auto; }
.next-card .n-art-wrap { flex: 0 0 auto; width: 74px; display: grid; place-items: center; }
.next-card .n-art { display: block; width: 100%; height: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); }
.next-card .n-title { font-weight: 700; }
.next-card .n-desc { font-size: 13px; color: var(--ink-dim); }
.next-tail { text-align: center; color: var(--gold); font-weight: 700; margin: 8px 0 26px; text-shadow: 0 1px 0 #000; }
.tbc {
  text-align: center; font-size: 22px; letter-spacing: 0.12em;
  color: var(--ink-dim); font-style: italic;
  padding: 28px 0 8px; border-top: 2px solid var(--line-soft);
}
.tbc-note { text-align: center; font-size: 13px; color: var(--ink-faint); }

/* ---- レスポンシブ（画面共有前提） ---- */
@media (max-width: 600px) {
  h1 { font-size: 22px; }
  h2 { font-size: 19px; }
  .panel { padding: 22px 16px; }
  .goal-grid { grid-template-columns: 1fr; }
  .say-box { font-size: 16px; }
  .stage-head h2 { min-width: 100%; }
}

/* 画面共有で見やすい大きめ表示の余地（広い画面） */
@media (min-width: 1100px) {
  :root { --maxw: 940px; }
}

/* =====================================================================
 * スライム・マスコット & ドラクエ風の遊び心（SVG自作・画像/サウンドなし）
 * ===================================================================== */
.slime {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
  animation: slimeBob 2.6s ease-in-out infinite;
}
@keyframes slimeBob {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-4px) scaleY(0.97); }
}

/* 案内役メッセージ行（スライム＋セリフ窓＝DQの会話ウィンドウ風） */
.npc-row { display: flex; gap: 12px; align-items: flex-end; margin: 0 0 22px; }
.npc-slime { flex: 0 0 auto; width: 58px; align-self: flex-end; }
.npc-row .stage-intro { flex: 1 1 auto; margin: 0; }
/* 吹き出しのしっぽ（スライム側を指す三角） */
.npc-row .stage-intro::before {
  content: ""; position: absolute; left: -10px; top: 18px;
  border-width: 7px 10px 7px 0; border-style: solid;
  border-color: transparent var(--accent) transparent transparent;
}

/* 各画面のスライム配置 */
.map-slime { width: 74px; margin: 2px auto 8px; }
.crest-slime { width: 100px; margin: 0 auto 14px; font-size: 0; }
.congrats-slime { width: 84px; margin: 12px auto 4px; }
.fx-slime { width: 88px; margin: 0 auto 4px; }
.fx-slime .slime { animation: slimeBob 1.6s ease-in-out infinite; }

/* レベルアップ表記（クリア演出） */
.fx-level {
  color: var(--accent); font-weight: 800; font-size: 15px;
  margin: 2px 0 8px; text-shadow: 0 1px 0 #000;
}

/* 称号バッジ（Congratulations） */
.congrats-badge {
  display: inline-block; margin: 4px 0 16px; padding: 6px 16px;
  border: 2px solid var(--gold-deep); border-radius: 8px; color: var(--gold);
  font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1px #000;
  text-shadow: 0 1px 0 #000;
}

/* フィールドをのそのそ歩くスライム（背景の遊び心・操作を邪魔しない） */
.field-slime {
  position: fixed; left: -70px; bottom: 12px; width: 52px;
  z-index: 0; pointer-events: none; opacity: 0.72;
  animation: slimeWalk 26s linear infinite;
}
.field-slime .slime { animation: slimeHop 0.85s ease-in-out infinite; }
@keyframes slimeWalk {
  0% { transform: translateX(0); }
  38% { transform: translateX(calc(100vw + 140px)); }
  100% { transform: translateX(calc(100vw + 140px)); }
}
@keyframes slimeHop {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-7px) scaleY(0.93); }
}

/* コマンド選択の手応え（音の代わりに視覚で「ピコッ」） */
.btn::after {
  content: ""; position: absolute; inset: -3px; border-radius: 12px;
  pointer-events: none; opacity: 0;
}
.btn:active::after { animation: pico 0.4s ease-out; }
@keyframes pico {
  0% { opacity: 0.9; box-shadow: 0 0 0 0 rgba(255, 217, 100, 0.55); }
  100% { opacity: 0; box-shadow: 0 0 0 12px rgba(255, 217, 100, 0); }
}

/* 両サイドの守り手＝魔法使い（広い画面の余白に立つ） */
.side-char {
  position: fixed; bottom: 48px; width: 116px; z-index: 0;
  pointer-events: none; opacity: 0.9; display: none;
  animation: floatBob 4.2s ease-in-out infinite;
}
.side-char .mage { display: block; width: 100%; height: auto; filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.6)); }
.side-left { left: 22px; }
.side-right { right: 22px; }
.side-right .mage { transform: scaleX(-1); }
.side-char .orb-glow { animation: orbPulse 2.4s ease-in-out infinite; }
@keyframes floatBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes orbPulse { 0%, 100% { opacity: 0.16; } 50% { opacity: 0.5; } }
/* 余白が十分にある広い画面でのみ表示（パネルに被らせない） */
@media (min-width: 1240px) { .side-char { display: block; } }

/* 動きを抑えたいユーザーへの配慮 */
@media (prefers-reduced-motion: reduce) {
  .slime, .fx-slime .slime, .field-slime, .field-slime .slime,
  .quest-node.current::before, .side-char, .side-char .orb-glow,
  body::before { animation: none; }
}
