/* シンクパス 共通スタイル — スマホファースト（375px基準）・ダーク・ブランド#0077b2 */
:root {
  --bg: #0b1220;
  --bg2: #111a2e;
  --card: #16223a;
  --card2: #1c2b4a;
  --line: #2a3a5c;
  --text: #e8eefb;
  --muted: #93a4c4;
  --brand: #2196d9;
  --brand-deep: #0077b2;
  --ok: #34c98e;
  --ng: #f06a6a;
  --warn: #f5b54a;
  --gold: #ffd166;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; font-size: 16px; line-height: 1.65; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }

/* ヘッダー */
header.app { position: sticky; top: 0; z-index: 50; background: rgba(11,18,32,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hd-inner { display: flex; align-items: center; justify-content: space-between;
  max-width: 760px; margin: 0 auto; padding: 10px 16px; }
.hd-brand { font-weight: 800; font-size: 17px; color: var(--text); }
.hd-right { display: flex; align-items: center; gap: 10px; }
.hd-user { color: var(--muted); font-size: 14px; }
.hd-logout { background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px 90px; }

/* カード */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; }

/* ボタン（44px以上・親指ゾーン） */
.btn { display: block; width: 100%; min-height: 50px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff;
  font-size: 17px; font-weight: 700; cursor: pointer; transition: transform .06s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.btn.ghost { background: var(--card2); border: 1px solid var(--line); color: var(--text); }
.btn.small { min-height: 44px; font-size: 15px; }

/* 選択肢（クイズ共通） */
.choice-btn { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  background: var(--card2); border: 2px solid var(--line); border-radius: 12px;
  padding: 13px 14px; margin-bottom: 10px; min-height: 50px; color: var(--text);
  font-size: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice-btn .key { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-deep); color: #fff;
  font-weight: 800; font-size: 14px; }
.choice-btn.correct { border-color: var(--ok); background: rgba(52,201,142,.12); }
.choice-btn.wrong { border-color: var(--ng); background: rgba(240,106,106,.12); }
.choice-btn:disabled { cursor: default; }

/* 正誤バナー */
.verdict { border-radius: 12px; padding: 14px; margin: 12px 0; font-weight: 700; font-size: 17px; }
.verdict.ok { background: rgba(52,201,142,.15); color: var(--ok); border: 1px solid var(--ok); }
.verdict.ng { background: rgba(240,106,106,.13); color: var(--ng); border: 1px solid var(--ng); }
.explain { background: var(--bg2); border-left: 4px solid var(--brand); border-radius: 8px;
  padding: 12px 14px; font-size: 15px; margin-top: 8px; }

/* 進捗メーター */
.meter { background: var(--bg2); border-radius: 999px; height: 14px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--ok)); transition: width .5s ease; }
.meter-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; font-size: 14px; }

/* バッジ */
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--card2);
  border: 1px solid var(--line); color: var(--muted); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; margin: 3px 4px 3px 0; }
.badge.earned { border-color: var(--gold); color: var(--gold); background: rgba(255,209,102,.08); }

/* コンボ・スコア表示 */
.combo { font-size: 28px; font-weight: 900; color: var(--gold); text-align: center; }
.bigscore { font-size: 42px; font-weight: 900; text-align: center; margin: 6px 0; }

/* メニュータイル（ホーム） */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; color: var(--text); }
.tile .ic { font-size: 28px; }
.tile .nm { font-weight: 800; margin-top: 6px; font-size: 15px; }
.tile .st { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ミッションカード */
.mission { background: linear-gradient(135deg, #143a5c, #0d2440); border: 1px solid var(--brand-deep); }
.mission .tag { display: inline-block; background: var(--brand-deep); color: #fff; font-size: 12px;
  font-weight: 700; border-radius: 6px; padding: 2px 10px; margin-bottom: 8px; }

/* レベルタブ */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-size: 14px; font-weight: 700; }
.tabs button.active { background: var(--brand-deep); border-color: var(--brand); color: #fff; }

/* 入力 */
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 16px; padding: 13px 14px; }
textarea { resize: vertical; min-height: 90px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }

/* スライダー（損益分岐点） */
input[type=range] { width: 100%; accent-color: var(--brand); height: 34px; }

/* ドラッグ/タップ分類（SWOT） */
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quad .zone { min-height: 86px; border: 2px dashed var(--line); border-radius: 12px;
  padding: 8px; font-size: 13px; transition: border-color .15s, background .15s; }
.quad .zone.hot { border-color: var(--brand); background: rgba(33,150,217,.1); }
.quad .zone.good { border-color: var(--ok); }
.sortcard { background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; font-size: 15px; font-weight: 600; text-align: center; }
.sortcard.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,209,102,.3); }

/* テーブル（先生用） */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
table.t th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* グラフ用キャンバス枠 */
.chartbox { background: var(--bg2); border-radius: 10px; padding: 8px; }

/* トースト */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--brand); color: var(--text);
  padding: 12px 20px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none;
  transition: opacity .3s; z-index: 99; max-width: 90vw; }
#toast.show { opacity: 1; }

@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
