/* Huan Hsu | 桓 | TW | 959 */
/* 各款遊戲的呈現風格。設定在 public/js/modules/profiles.js，
   app.js 選遊戲時在 <body> 掛上 data-family / data-game，並把個性色寫進 --ember。
   原則（DESIGN.md）：不用漸層、陰影極淡、一個畫面一個個性色；差異靠版面與元件。 */

.wiz-hidden { display: none !important; }

/* ── 開局簡介與精靈 ───────────────────────────────── */
.game-intro {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-left: 2px solid var(--ember);
  background: var(--bg-alt);
  border-radius: 10px;
}
.game-intro-kicker { display: block; font-size: 14px; color: var(--ember); letter-spacing: .06em; }
.game-intro p { margin: 4px 0 0; font-size: 15px; line-height: 1.75; color: var(--text); }

.wiz-step { animation: wiz-fade .2s ease-out; }
@keyframes wiz-fade { from { opacity: 0; } to { opacity: 1; } }
.wiz-head { margin: 4px 0 12px; }
.wiz-count { font-size: 14px; color: var(--ember); }
.wiz-title { margin: 2px 0 0; font-size: 18px; font-weight: 500; font-family: var(--font-read); }
.wiz-hint { margin: 4px 0 0; font-size: 14px; color: var(--text-dim); }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; margin: 8px 0 16px; }
.wiz-nav button { min-height: 44px; min-width: 96px; }
.wiz-nav .wiz-next { border-color: var(--ember); color: var(--ember-bright); }

/* ── 狀態元件 ─────────────────────────────────────── */
.w-gauge { display: block; margin: 2px 0 6px; }
.w-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow: hidden;
}
.w-bar-fill { display: block; height: 100%; background: var(--ember); opacity: .55; transition: width .25s ease-out; }
.w-bar-mid .w-bar-fill { opacity: .75; }
.w-bar-high .w-bar-fill { opacity: 1; }
.w-bar-ok .w-bar-fill { background: #5C6B54; opacity: .8; }
.w-bar-danger .w-bar-fill { background: var(--rust, #A85B42); opacity: 1; }
.vital .w-bar { display: inline-block; width: 56px; height: 5px; align-self: center; margin-left: 2px; }

.w-list { margin: 0; padding: 0; list-style: none; }
.w-list li { padding: 3px 0; line-height: 1.7; }
.w-list li + li { border-top: 1px dotted var(--border); }
.w-facts li { padding-left: 14px; position: relative; }
.w-facts li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 5px; height: 5px; border-radius: 999px; background: var(--ember); opacity: .6; }
.w-name { font-weight: 500; color: var(--ember-bright); margin-right: 2px; }

/* ── 擲骰卡（跑團） ───────────────────────────────── */
.dice-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card, #FBFAF7);
  white-space: normal;
}
.dice-face {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--ember);
  color: var(--ember-bright);
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.dice-meta { display: flex; flex-direction: column; line-height: 1.4; }
.dice-name { font-size: 14px; color: var(--text-dim); }
.dice-band { font-size: 16px; font-weight: 500; }
.dice-crit .dice-face { background: var(--ember); color: #FBFAF7; }
.dice-good .dice-band { color: #5C6B54; }
.dice-bad .dice-band, .dice-fumble .dice-band { color: var(--rust, #A85B42); }
.dice-fumble .dice-face { border-color: var(--rust, #A85B42); color: var(--rust, #A85B42); }

/* ── 版面風格：狀態欄頂條改用個性色的淡底 ─────────── */
body[data-family] .status-head { background: color-mix(in srgb, var(--ember) 8%, transparent); }
body[data-family] .option-group-head { color: var(--ember); letter-spacing: .06em; }

/* 關係戀愛：對白是主角，人物清單像名片 */
body[data-family="romance"] .msg .dialogue { color: var(--text); padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--ember) 35%, transparent); }
body[data-family="romance"] .w-people li { padding: 6px 0; }
body[data-family="romance"] .option-btn { border-left-color: color-mix(in srgb, var(--ember) 55%, transparent); }

/* 權謀經營：儀表板，寬螢幕雙欄 */
body[data-family="power"] .status-title { font-family: var(--font-read); font-size: max(15px, .92em); }
@media (min-width: 760px) {
  body[data-family="power"] .status-group { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  body[data-family="power"] .status-group-title { grid-column: 1 / -1; }
  body[data-family="power"] .status-row + .status-row { border-top: none; }
  body[data-family="power"] .status-row { border-bottom: 1px dashed var(--border); }
}
body[data-family="power"] .option-btn { border-left-width: 3px; }

/* 跑團：角色卡 */
body[data-family="trpg"] .status-panel { border: 1.5px solid color-mix(in srgb, var(--ember) 45%, var(--border)); }
body[data-family="trpg"] .status-title { font-family: var(--font-read); letter-spacing: .12em; }
body[data-family="trpg"] .status-label { color: var(--ember); }

/* 軍事模擬：數字對齊 */
body[data-family="war"] .status-value,
body[data-family="war"] .report-row { font-variant-numeric: tabular-nums; }
body[data-family="war"] .status-title { letter-spacing: .14em; }

/* 任務行動：左側一道色條，像任務檔案 */
body[data-family="mission"] .status-panel { border-left: 3px solid var(--ember); }
body[data-family="mission"] .status-title { letter-spacing: .12em; }

/* 異界探索：狀態欄標題用書法體氣質的襯線 */
body[data-family="explore"] .status-title { font-family: var(--font-read); }

@media (prefers-reduced-motion: reduce) {
  .wiz-step, .w-bar-fill { animation: none; transition: none; }
}
