/* ============================================================
   E-計算！ Fortune — 姓名判断（画数・五格）（seimei-handan.html）だけで使う見た目
   共通（../assets/css/ek.css・css/fortune.css）の上に重ねる。色は変数だけを使う。クラスは sm- で始める。
   ============================================================ */

/* ページ上部の要点 */
.sm-quick { margin: 4px 0 20px; }
.sm-quick ul { margin: 2px 0 0; }
.sm-quick li { margin: 2px 0; }

/* ---- 入力 ---- */
.sm-names { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.sm-names .field { min-width: 0; }
html[data-ui="v2"] .input-unit input.sm-in { text-align: left; font-size: 17px; letter-spacing: 0.08em; }
html[data-ui="v2"] .input-unit input.bad, html[data-ui="v2"] input.sm-fix.bad { border-color: var(--s2, #B4442C); border-width: 2px; }
.sm-lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
html[data-ui="v2"] .radio-row.sm-radio { flex-wrap: wrap; min-width: 0; }
html[data-ui="v2"] .radio-row.sm-radio label { min-width: 0; max-width: 100%; white-space: normal; }
details.sm-more { margin: 4px 0 14px; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); padding: 2px 0; }
details.sm-more > summary { cursor: pointer; padding: 10px 2px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
details.sm-more[open] > summary { margin-bottom: 4px; }
.sm-hint { margin: 6px 0 0; }
.vp-samples .vp-sample { max-width: 100%; white-space: normal; text-align: left; }

/* ---- 結果 ---- */
html[data-ui="v2"] .sm-out .res-hero .big b { font-size: clamp(36px, 10vw, 48px); }
html[data-ui="v2"] .sm-out .res-hero .k { overflow-wrap: anywhere; }
html[data-ui="v2"] .sm-out .res-mini .v { overflow-wrap: normal; word-break: normal; }
html[data-ui="v2"] .sm-out .res-mini .s { overflow-wrap: anywhere; }
/* 読み込み直後（計算の前）は欄の高さを確保する。計算が最初に .sm-pending を外す（値は見込み。描画確認で直す） */
#resultPanel.sm-pending { min-height: 320px; }
#result { min-height: 0; }
/* 答えの五格の札（熊崎・霊理学派）は、画数のあとに折り返して並べる */
#result .sm-kt { margin: 2px 2px 0 0; vertical-align: 2px; }
#resultPanel [hidden] { display: none !important; }
.sm-rule { margin: 10px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); overflow-wrap: anywhere; }
.sm-note { margin-top: 12px; overflow-wrap: anywhere; }
.sm-h3 { margin: 20px 0 4px; font-size: 15px; }
.sm-tnote { margin: 6px 0 0; }
.sm-fl { display: block; margin: 0 0 6px; overflow-wrap: anywhere; }

/* 1文字ずつの画数（字｜画数｜数え方｜直す） */
html[data-ui="v2"] table.data.sm-chars { width: 100%; }
html[data-ui="v2"] table.data.sm-chars td { vertical-align: middle; }
html[data-ui="v2"] table.data.sm-chars tr.sm-first-mei td { border-top: 2px solid var(--grid); }
.sm-ch { white-space: nowrap; }
.sm-ch b { font-size: 22px; font-weight: 600; line-height: 1.2; }
.sm-part { display: inline-block; margin-right: 6px; font-size: 11px; color: var(--muted); vertical-align: middle; }
html[data-ui="v2"] table.data.sm-chars td.sm-how { white-space: normal; min-width: 8em; font-size: 12.5px; line-height: 1.7; overflow-wrap: anywhere; }
.sm-alt { display: block; margin-top: 2px; color: var(--ink-2); }
.sm-altbtn { margin: 2px 4px 0 0; border: 0; border-radius: 999px; padding: 2px 9px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.sm-miss { color: var(--s2, #B4442C); font-weight: 700; }
.sm-fixc { min-width: 0; }
html[data-ui="v2"] input.sm-fix {
  width: 4.2em; max-width: 100%; min-width: 0; height: 36px; padding: 0 8px; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--page); border: 1px solid var(--line-strong); border-radius: 8px;
}
html[data-ui="v2"] input.sm-fix:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.sm-fixc .vp-msg { margin-top: 4px; font-size: 12px; max-width: 12em; }

/* 五格の内訳・数え方による違い */
html[data-ui="v2"] table.data.sm-kaku, html[data-ui="v2"] table.data.sm-cmp { width: 100%; }
html[data-ui="v2"] table.data.sm-kaku th[scope="row"] { white-space: nowrap; }
html[data-ui="v2"] table.data.sm-kaku td.sm-f { white-space: normal; min-width: 9em; overflow-wrap: anywhere; }
html[data-ui="v2"] table.data.sm-cmp td.sm-ml { white-space: normal; min-width: 9em; font-size: 12.5px; line-height: 1.6; }
html[data-ui="v2"] table.data.sm-cmp td.sm-st { white-space: nowrap; font-size: 12.5px; color: var(--ink-2); }
html[data-ui="v2"] table.data.sm-cmp tr.cur td { background: var(--accent-soft); font-weight: 600; }
@media (max-width: 400px) {
  html[data-ui="v2"] table.data.sm-chars th, html[data-ui="v2"] table.data.sm-chars td,
  html[data-ui="v2"] table.data.sm-cmp th, html[data-ui="v2"] table.data.sm-cmp td,
  html[data-ui="v2"] table.data.sm-kaku th, html[data-ui="v2"] table.data.sm-kaku td { padding-left: 6px; padding-right: 6px; }
  .sm-names { grid-template-columns: minmax(0, 1fr); }
}

/* 本文の表 */
table.sm-wrap td, table.sm-wrap th { white-space: normal; }
table.sm-wrap td:first-child { white-space: nowrap; font-weight: 600; }

/* ひらがな・カタカナの画数の表 */
.sm-kh { margin: 12px 0 6px; font-size: 13px; font-weight: 700; }
.sm-kr { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.4em, 1fr)); gap: 4px; }
.sm-kc { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 4px 2px; border: 1px solid var(--grid); border-radius: 6px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sm-kc b { font-size: 16px; font-weight: 600; color: var(--ink); }
.sm-kc.v { border-style: dashed; border-color: var(--line-strong); }

/* 数え方による違い：まとめた組み合わせの名前、違う格、条件を1つずつ変えたとき */
.sm-lb { display: block; }
.sm-lb + .sm-lb { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--grid); }
html[data-ui="v2"] table.data.sm-cmp td.sm-d { font-weight: 700; color: var(--accent); }
.sm-factors { margin: 10px 0 0; font-size: 13px; line-height: 1.8; }
.sm-fh { margin: 0 0 2px; font-weight: 700; color: var(--ink); }
.sm-fl2 { margin: 0 0 6px; padding-left: 1.3em; }

/* ---- 画数の吉凶（解釈。計算と分けて、札で「解釈」と示す） ---- */
.sm-kkbox { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--grid); border-left: 4px solid var(--accent); border-radius: var(--r); background: var(--surface); min-width: 0; }
.sm-kkh { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.sm-kklab { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; }
html[data-ui="v2"] table.data.sm-kkt, html[data-ui="v2"] table.data.sm-kkall { width: 100%; }
html[data-ui="v2"] table.data.sm-kkt th[scope="row"] { white-space: nowrap; }
html[data-ui="v2"] table.data.sm-kkt td.sm-kk1 { white-space: normal; min-width: 11em; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
html[data-ui="v2"] table.data.sm-kkt td.sm-kk2 { white-space: nowrap; }
html[data-ui="v2"] table.data.sm-kkt tr.sm-main th, html[data-ui="v2"] table.data.sm-kkt tr.sm-main td { font-weight: 600; }
html[data-ui="v2"] table.data.sm-kkt tr.sm-main th[scope="row"] { font-size: 15px; }
html[data-ui="v2"] table.data tr.sm-diff td { background: var(--accent-soft); }
.sm-km { display: block; margin-top: 2px; font-weight: 400; color: var(--ink-2); }
.sm-kn { color: var(--muted); font-size: 12.5px; }
.sm-kknote { margin: 8px 0 0; }
.sm-kt { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--grid); background: var(--page); color: var(--ink-2); }
.sm-kt.sm-kg { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sm-kt.sm-kb { background: var(--page); border-color: var(--line-strong); color: var(--ink); }
.sm-kt.sm-km3 { background: var(--surface); border-color: var(--accent); color: var(--accent); }
/* 熊崎の区分の出どころ（本の札／読み取り） */
.sm-src { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; font-size: 10.5px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface); }
.sm-src.sm-srcr { border-style: dashed; color: var(--muted); }
html[data-ui="v2"] table.data.sm-cmp td.sm-kc2 { white-space: nowrap; font-size: 12px; }
html[data-ui="v2"] table.data.sm-kkall td.sm-km2 { white-space: normal; min-width: 12em; font-size: 13px; line-height: 1.6; }
.sm-strong { display: block; font-size: 11.5px; color: var(--muted); }
html[data-ui="v2"] table.data.sm-kkt tr.sm-kz th, html[data-ui="v2"] table.data.sm-kkt tr.sm-kz td { border-top: 1px dashed var(--line-strong); }
