/* ============================================================
   E-計算！ Fortune — 算命学（陰占・陽占）（sanmeigaku.html）だけで使う見た目
   共通（../assets/css/ek.css・css/fortune.css）の上に重ねる。色は変数だけを使う。クラス名は sm2- で始める。
   ============================================================ */

.sm2-quick { margin: 4px 0 20px; }
.sm2-quick ul { margin: 2px 0 0; }
.sm2-quick li { margin: 2px 0; }

/* ---- 入力 ---- */
#form .field { min-width: 0; }
.sm2-lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.sm2-lbl .hint { display: block; font-weight: 400; }
.sm2-date { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
html[data-ui="v2"] .sm2-date input[type="text"], html[data-ui="v2"] input.sm2-text {
  flex: 1 1 auto; width: 100%; min-width: 0; height: 44px; padding: 0 12px; font-size: 15px; font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
}
html[data-ui="v2"] .sm2-date input[type="text"]:focus, html[data-ui="v2"] input.sm2-text:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
html[data-ui="v2"] .sm2-date input.bad, html[data-ui="v2"] input.sm2-text.bad { border-color: var(--s2); border-width: 2px; }
.sm2-pick {
  flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.sm2-pick:hover { background: var(--accent-soft); color: var(--accent); }
.sm2-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sm2-pick svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sm2-native { position: absolute; right: 0; bottom: 0; width: 44px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
@media (max-width: 560px) { html[data-ui="v2"] .sm2-date input[type="text"], html[data-ui="v2"] input.sm2-text { font-size: 16px; } }
html[data-ui="v2"] .radio-row.sm2-gen label { min-width: 0; text-align: center; line-height: 1.4; overflow-wrap: anywhere; }
html[data-ui="v2"] .radio-row.sm2-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
html[data-ui="v2"] .radio-row.sm2-col label { min-width: 0; justify-content: flex-start; text-align: left; line-height: 1.5; overflow-wrap: anywhere; }
details.sm2-more { margin: 4px 0 14px; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); padding: 2px 0; }
details.sm2-more > summary { cursor: pointer; padding: 10px 2px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
details.sm2-more[open] > summary { margin-bottom: 4px; }
.vp-samples .vp-sample { max-width: 100%; white-space: normal; text-align: left; }

/* ---- 結果 ---- */
/* 答えの下のくわしい欄は、答えが出るまで隠す（2026-11-04 たたむ見せ方） */
#resultPanel [hidden] { display: none !important; }
#meishiki > .sm2-p:first-child, #daiun > .sm2-sec:first-child { margin-top: 4px; }
html[data-ui="v2"] .sm2-out .res-hero .big b { font-size: clamp(30px, 10vw, 46px); overflow-wrap: normal; }
html[data-ui="v2"] .sm2-out .res-mini .v { overflow-wrap: anywhere; word-break: normal; }
html[data-ui="v2"] .sm2-out .res-mini .s { overflow-wrap: anywhere; }
@media (max-width: 400px) {
  html[data-ui="v2"] .sm2-out .res-mini .v { font-size: 15px; }
  html[data-ui="v2"] .sm2-out .res-mini .v.text { font-size: 13.5px; }
}
.sm2-rule { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); margin: 12px 0 0; padding: 8px 10px; border-radius: var(--r); background: var(--page); overflow-wrap: anywhere; }
.sm2-sec { margin-top: 18px; min-width: 0; }
.sm2-sec h3 { font-size: 15px; margin: 0; }
.sm2-p { font-size: 13.5px; line-height: 1.8; margin: 8px 0 0; }
.sm2-legend { font-size: 12px; color: var(--ink-2); line-height: 1.7; margin: 6px 0 0; }

/* 人体図（3×3） */
.sm2-jt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; }
.sm2-cell { min-width: 0; padding: 8px 4px 7px; border: 1px solid var(--grid); border-radius: var(--r); background: var(--surface); text-align: center; line-height: 1.35; }
.sm2-cell .p { display: block; font-size: 11.5px; color: var(--ink-2); }
.sm2-cell .n { display: block; font-size: 17px; font-weight: 700; color: var(--ink); margin: 2px 0; overflow-wrap: anywhere; }
.sm2-cell .f { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.sm2-cell.sm2-ju .n { font-size: 15.5px; }
.sm2-cell.sm2-main { border: 2px solid var(--accent); background: var(--accent-soft); }
.sm2-cell.sm2-main .n { color: var(--accent); }
.sm2-cell.sm2-blank { background: var(--page); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 11px; }
@media (max-width: 400px) { .sm2-cell .n { font-size: 15px; } .sm2-cell.sm2-ju .n { font-size: 14px; } }

/* 陰占の表 */
table.data.sm2-in { width: 100%; table-layout: fixed; }
table.data.sm2-in th, table.data.sm2-in td { text-align: center; padding: 6px 2px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
table.data.sm2-in th[scope="row"] { width: 4.6em; font-size: 12px; color: var(--ink-2); text-align: left; padding-left: 4px; }
.sm2-big { display: block; font-size: 22px; line-height: 1.2; }
.sm2-role { display: block; font-size: 11px; color: var(--muted); }
.sm2-zk { display: block; font-size: 12px; color: var(--muted); }
.sm2-zk.on { color: var(--accent); font-weight: 700; }
.sm2-zk { margin: 2px 0; line-height: 1.35; }
.sm2-zk small { display: block; font-size: 11px; font-weight: 400; white-space: nowrap; }

/* 本能・点数 */
.sm2-bars { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.sm2-bars li { display: grid; grid-template-columns: 6.4em minmax(0, 1fr) 2.4em; align-items: center; gap: 8px; font-size: 13px; }
.sm2-track { display: block; height: 10px; border-radius: 5px; background: var(--grid); overflow: hidden; }
.sm2-fill { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.sm2-bars b { text-align: right; font-variant-numeric: tabular-nums; }

/* 一覧の表 */
table.data.sm2-list td { white-space: nowrap; font-size: 13px; }

/* 方式ごとの比較 */
.sm2-cmp { margin-top: 14px; }
.sm2-cmp h4 { font-size: 13.5px; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.sm2-same { font-size: 12px; font-weight: 400; color: var(--muted); }
table.data.sm2-cmpt td, table.data.sm2-cmpt th { font-size: 12.5px; white-space: nowrap; }
table.data.sm2-cmpt td.sm2-mname { white-space: normal; min-width: 11em; max-width: 17em; line-height: 1.5; }
table.data.sm2-cmpt tr.sm2-diff td { background: var(--accent-soft); }
table.data.sm2-cmpt tr.sm2-diff td:not(.sm2-mname) { color: var(--accent); font-weight: 700; }
table.data.sm2-cmpt tr.sm2-cur td.sm2-mname { font-weight: 700; }

/* 解釈（公式サイト・本に書かれている読み方）。計算と見た目で分ける */
.sm2-kai { margin-top: 16px; padding: 14px 14px 10px; border: 1px solid var(--grid); border-left: 4px solid var(--accent); border-radius: var(--r); background: var(--surface); min-width: 0; }
.sm2-kai h3 { font-size: 15px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm2-kaitag { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.sm2-kai h4 { font-size: 13.5px; margin: 14px 0 4px; }
.sm2-kl { margin: 4px 0 0; padding-left: 1.1em; font-size: 13.5px; line-height: 1.8; }
.sm2-kl li { margin: 3px 0; }
.sm2-bk { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; font-size: 11px; line-height: 1.7; background: var(--page); color: var(--ink-2); white-space: nowrap; }
.sm2-lead { font-size: 14px; line-height: 1.8; margin: 8px 0 0; }

/* 本文の表 */
table.data.sm2-t td { font-size: 13px; line-height: 1.6; vertical-align: top; }
table.data.sm2-t td.sm2-nw { white-space: nowrap; }
table.data.sm2-t td.sm2-wide { min-width: 16em; }
.sm2-srch { font-size: 14px; margin: 14px 0 4px; }
.sm2-disclaimer { margin: 20px 0 0; text-align: center; }
