@charset "utf-8";
/* 脳年齢テスト（記憶力・空間認識）専用。
   ★セレクタは必ず #baWrap で始める。素の要素セレクタを書くと
     ヘッダー・サイドバー・フッターまで巻き込む（CLAUDE.md B-13）。
   ★クラスだけで書く（id は #baWrap 以外に使わない）。 */

#baWrap { margin: 0; }

#baWrap .ba-card { margin: 0 0 14px; padding: 14px; border: 1px solid #d5dbe3; border-radius: 6px; background: #fff; }
#baWrap .ba-h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: #1e3a5f; }
#baWrap .ba-lead { margin: 0 0 10px; font-size: 14px; line-height: 1.9; color: #333; }
#baWrap .ba-note { margin: 10px 0 0; font-size: 13px; line-height: 1.8; color: #555; }

/* 注意の帯 */
#baWrap .ba-warnline { margin: 10px 0 0; padding: 8px 10px; border-left: 3px solid #d08a00; background: #fff8e8; font-size: 13px; line-height: 1.8; color: #333; }

/* ボタン */
#baWrap .ba-btnrow { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* ★.lowerCommon .btn_form は float:left。包みを flex にしてあるので無視されるが、
     詳細度の勝ち負けが変わっても崩れないように明示しておく（CLAUDE.md btn-float-check）。 */
#baWrap .ba-btnrow .btn_form { float: none; margin: 0; }
#baWrap .ba-btn { cursor: pointer; }
#baWrap .ba-btn-sub,
#baWrap .ba-btn-prac { padding: 0 16px; height: 40px; border: 1px solid #1e3a5f; border-radius: 4px; background: #fff; color: #1e3a5f; font-size: 14px; font-weight: 700; }
#baWrap .ba-btn:hover { opacity: .88; }
/* ★押した手応えを必ず出す。おぼえている最中は画面が静かなので、
     反応が無いと「押せていない」と読まれる（mosquito-tone で実際に言われた）。 */
#baWrap .ba-btn:active { transform: translateY(1px); }
/* ★使えないボタンを「薄くするだけ」にしない。白い字と重なって消えて見える。 */
#baWrap .ba-btn-sub:disabled,
#baWrap .ba-btn-prac:disabled { border-color: #aaa; background: #e6e6e6; color: #666; cursor: default; }

/* ★display を自分で指定した要素は、ブラウザ既定の [hidden]{display:none} に
     詳細度で勝ってしまう。hidden を立てたのに出たままになる（CLAUDE.md hidden-loses-to-display）。 */
#baWrap [hidden] { display: none !important; }

/* 進みぐあい */
#baWrap .ba-state { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #1e3a5f; }
#baWrap .ba-bar { display: block; height: 8px; border-radius: 4px; background: #e3e8ef; overflow: hidden; }
#baWrap .ba-bar-in { display: block; width: 0; height: 100%; background: #23ac38; transition: width .2s linear; }

/* おぼえる／答えるの共通のマス */
#baWrap .ba-grid { margin: 14px auto 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 320px; }
#baWrap .ba-slot { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border: 2px dashed #c3ccd8; border-radius: 6px; background: #fafbfc; }
#baWrap .ba-slot-btn { cursor: pointer; border-style: solid; border-color: #1e3a5f; }
#baWrap .ba-slot-btn:disabled { border-color: #ccc; background: #f0f0f0; cursor: default; }
#baWrap .ba-slot-btn:not(:disabled):hover { background: #eef4ff; }
#baWrap .ba-slot-btn:not(:disabled):active { transform: translateY(1px); }
#baWrap .ba-slot .ba-x { font-size: 22px; color: #9aa6b4; }
/* ★図形はボタンの中にあるので、クリックを素通りさせる（target が svg になると拾い損ねる） */
#baWrap .ba-slot svg,
#baWrap .ba-sh svg { width: 60%; height: 60%; pointer-events: none; }

#baWrap .ba-stagewrap { margin: 0; }
#baWrap .ba-stagemsg { margin: 12px 0 0; font-size: 15px; font-weight: 700; text-align: center; color: #1e3a5f; }
#baWrap .ba-count { margin: 10px 0 0; font-size: 14px; text-align: center; color: #555; }

/* 色・形の選びどころ */
#baWrap .ba-answer { margin: 0; }
#baWrap .ba-pick { margin: 12px 0 0; }
#baWrap .ba-pickrow { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
#baWrap .ba-picklab { flex: 0 0 2.5em; font-size: 14px; font-weight: 700; color: #1e3a5f; }
#baWrap .ba-picks { display: flex; flex-wrap: wrap; gap: 8px; }
#baWrap .ba-pickhint { font-size: 13px; color: #666; }
#baWrap .ba-sw { width: 44px; height: 44px; border: 2px solid #cfd6df; border-radius: 6px; cursor: pointer; }
#baWrap .ba-sh { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid #cfd6df; border-radius: 6px; background: #fff; cursor: pointer; }
#baWrap .ba-sw.is-on,
#baWrap .ba-sh.is-on { border-color: #23ac38; box-shadow: 0 0 0 2px rgba(35, 172, 56, .35); }
#baWrap .ba-sw:active,
#baWrap .ba-sh:active { transform: translateY(1px); }
#baWrap .ba-sel { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: #1e3a5f; min-height: 1.6em; }

/* 結果 */
#baWrap .ba-hero { margin: 0 0 10px; padding: 14px; border: 2px solid #1e3a5f; border-radius: 6px; background: #f3f7fc; text-align: center; }
#baWrap .ba-hero-lab { display: block; font-size: 13px; color: #555; }
#baWrap .ba-hero-val { display: block; margin: 4px 0 0; font-size: 30px; font-weight: 700; line-height: 1.3; color: #1e3a5f; }
#baWrap .ba-repeat { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid #d08a00; background: #fff8e8; font-size: 13px; line-height: 1.8; color: #333; }
#baWrap .ba-rows { margin: 0; }
#baWrap .ba-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 7px 0; border-bottom: 1px dotted #d5dbe3; font-size: 14px; }
#baWrap .ba-row-lab { flex: 1 1 14em; color: #333; }
#baWrap .ba-row-val { flex: 0 0 auto; font-weight: 700; color: #1e3a5f; }
#baWrap .ba-row-age { flex: 0 0 auto; font-size: 13px; color: #666; }
#baWrap .ba-disc { margin: 12px 0 0; padding: 10px; border: 1px solid #e0c48a; border-radius: 4px; background: #fdf9f0; font-size: 13px; line-height: 1.9; color: #333; }
#baWrap .ba-src { margin: 10px 0 0; font-size: 12px; line-height: 1.8; color: #666; }
#baWrap .ba-pracmsg { margin: 12px 0 0; font-size: 14px; line-height: 1.9; color: #333; }

/* 知らせ */
#baWrap .ba-msg { margin: 10px 0 0; padding: 8px 10px; border-radius: 4px; font-size: 14px; line-height: 1.8; }
#baWrap .ba-msg-ng { border-left: 3px solid #c0392b; background: #fdecea; color: #333; }

@media screen and (max-width: 480px) {
	#baWrap .ba-card { padding: 11px; }
	#baWrap .ba-grid { max-width: 260px; gap: 8px; }
	#baWrap .ba-hero-val { font-size: 26px; }
	#baWrap .ba-row { font-size: 13px; }
	#baWrap .ba-sw,
	#baWrap .ba-sh { width: 40px; height: 40px; }
}
@media screen and (max-width: 374px) {
	#baWrap .ba-grid { max-width: 220px; }
	#baWrap .ba-picklab { flex-basis: 2em; font-size: 13px; }
	#baWrap .ba-sw,
	#baWrap .ba-sh { width: 36px; height: 36px; }
}
