/* ============================================================
   E-計算！ Fortune — 数秘術（suuhijutsu.html）だけで使う見た目
   共通（../assets/css/ek.css・css/fortune.css）の上に重ねる。色は変数だけを使う。クラスは su- で始める。
   形は九星気学のページ（css/kyusei.css）にそろえた。
   ============================================================ */

/* 要点（まず結論）。たたむ見せ方では解説の最初に置く */
.su-quick { margin: 4px 0 20px; }
.su-quick ul { margin: 2px 0 0; }
.su-quick li { margin: 2px 0; }

/* ---- 入力 ---- */
/* 日付の入力欄（ふつうの文字の欄＋カレンダーのボタン） */
.su-date { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
html[data-ui="v2"] .su-date input[type="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"] .su-date input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
html[data-ui="v2"] .su-date input.bad { border-color: var(--s2, #B4442C); border-width: 2px; }
.su-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;
}
.su-pick:hover { background: var(--accent-soft); color: var(--accent); }
.su-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.su-pick svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.su-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"] .su-date input[type="text"] { font-size: 16px; } }
html[data-ui="v2"] select.su-sel { width: 100%; max-width: 100%; min-width: 0; }
.su-lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
details.su-more { margin: 4px 0 14px; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); padding: 2px 0; }
details.su-more > summary { cursor: pointer; padding: 10px 2px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
details.su-more[open] > summary { margin-bottom: 4px; }
.su-rule { display: grid; gap: 6px; }
.su-rule label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.6; cursor: pointer; min-width: 0; }
.su-rule input { margin-top: 5px; flex: none; }
.su-hint { margin: 6px 0 0; }
.vp-samples .vp-sample { max-width: 100%; white-space: normal; text-align: left; }

/* ---- 結果 ---- */
html[data-ui="v2"] .su-out .res-hero .big b { font-size: clamp(34px, 10vw, 48px); overflow-wrap: normal; }
html[data-ui="v2"] .su-out .res-mini .v { overflow-wrap: normal; word-break: keep-all; }
html[data-ui="v2"] .su-out .res-mini .v small { white-space: nowrap; }
html[data-ui="v2"] .su-out .res-mini .s { overflow-wrap: anywhere; }
html[data-ui="v2"] .su-out .res-mini > div { min-width: 0; }
@media (max-width: 400px) { html[data-ui="v2"] .su-out .res-mini .v { font-size: 15px; } }
.su-rule-line { margin: 12px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); padding: 8px 10px; background: var(--page); border-radius: var(--r); }
/* 読み込み直後（計算の前）は欄の高さを確保する。計算が最初に外す（値は見込み。描画確認で直す） */
#resultPanel.su-pending { min-height: 620px; }
#result { min-height: 230px; }
.su-detail { margin: 6px 0 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); overflow-wrap: anywhere; }
#resultPanel [hidden] { display: none !important; }
.su-h3 { margin: 18px 0 6px; font-size: 15px; }
.su-note { margin-top: 12px; }
.su-fl { display: block; margin: 0 0 6px; overflow-wrap: anywhere; }

/* 方式ごとの比較表（選んでいる方式に色、違う結果に印） */
html[data-ui="v2"] table.data.su-cmp { width: 100%; }
html[data-ui="v2"] table.data.su-cmp th, html[data-ui="v2"] table.data.su-cmp td { vertical-align: middle; }
html[data-ui="v2"] table.data.su-cmp td { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 16px; }
html[data-ui="v2"] table.data.su-cmp tbody th { min-width: 7.5em; white-space: normal; font-weight: 600; font-size: 13.5px; text-align: left; }
html[data-ui="v2"] table.data.su-cmp thead th { white-space: normal; word-break: keep-all; font-size: 12.5px; }
html[data-ui="v2"] table.data.su-cmp td.su-cur { background: var(--accent-soft); font-weight: 700; }
html[data-ui="v2"] table.data.su-cmp td.su-diff { font-weight: 700; color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
html[data-ui="v2"] table.data.su-cmp tr.su-ref th, html[data-ui="v2"] table.data.su-cmp tr.su-ref td { color: var(--ink-2); }
html[data-ui="v2"] table.data.su-cmp td .sub { white-space: normal; }
.su-cmp-note { margin: 6px 0 0; }
@media (max-width: 400px) {
  html[data-ui="v2"] table.data.su-cmp th, html[data-ui="v2"] table.data.su-cmp td { padding-left: 6px; padding-right: 6px; }
}

/* 解釈（本の説明の紹介）：計算と見た目で分ける */
.su-interp-tag { display: inline-block; margin: 4px 0 8px; padding: 1px 10px; border-radius: 999px; font-size: 12px; background: var(--page); color: var(--ink-2); border: 1px solid var(--grid); }
.su-interp-box { margin: 16px 0 0; padding: 12px 14px; border: 1px dashed var(--grid); border-radius: var(--r); background: var(--page); min-width: 0; }
.su-interp-box .su-h3 { margin-top: 10px; }
.su-in { min-width: 0; padding: 8px 10px; background: var(--surface); border: 1px solid var(--grid); border-radius: var(--r); }
.su-in b { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 2px; }
.su-in p { margin: 0; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.su-in-note { margin: 4px 0 6px; }
.su-ke { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.su-interp-sec .su-interp-tag { margin-top: 0; }

/* ---- 本文 ---- */
.su-formula { padding: 10px 12px; background: var(--page); border-radius: var(--r); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
html[data-ui="v2"] table.data.su-it { width: 100%; }
html[data-ui="v2"] table.data.su-it th, html[data-ui="v2"] table.data.su-it td { white-space: normal; vertical-align: top; font-size: 13.5px; line-height: 1.7; }
html[data-ui="v2"] table.data.su-it td { min-width: 12em; }
html[data-ui="v2"] table.data.su-it tbody th { white-space: nowrap; }
/* 狭い画面では、意味の表を1行ずつ縦に並べる（横スクロールを出さない） */
@media (max-width: 560px) {
  html[data-ui="v2"] table.data.su-it thead { display: none; }
  html[data-ui="v2"] table.data.su-it, html[data-ui="v2"] table.data.su-it tbody, html[data-ui="v2"] table.data.su-it tr,
  html[data-ui="v2"] table.data.su-it th, html[data-ui="v2"] table.data.su-it td { display: block; width: auto; min-width: 0; }
  html[data-ui="v2"] table.data.su-it tr { border-top: 2px solid var(--grid); padding: 6px 0; }
  html[data-ui="v2"] table.data.su-it tbody th { white-space: normal; border: 0; padding-bottom: 2px; }
  html[data-ui="v2"] table.data.su-it td { border: 0; padding-top: 2px; }
  html[data-ui="v2"] table.data.su-it td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); }
}
html[data-ui="v2"] table.data.su-st td { white-space: nowrap; }
html[data-ui="v2"] table.data.su-st th { white-space: normal; word-break: keep-all; }
