/* ============================================================
   E-計算！ Fortune — 名付け候補の比較（naduke-hikaku.html）だけで使う見た目
   共通（../assets/css/ek.css・css/fortune.css）の上に重ねる。色は変数だけを使う。クラスは nk- で始める。
   ============================================================ */

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

/* ---- 入力 ---- */
html[data-ui="v2"] .input-unit input.nk-in { text-align: left; font-size: 17px; letter-spacing: 0.08em; }
html[data-ui="v2"] .input-unit input.bad, .nk-row input.bad, html[data-ui="v2"] input.nk-fix.bad { border-color: var(--s2, #B4442C); border-width: 2px; }
.nk-lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.nk-lbl .hint { display: block; font-weight: 400; }
.nk-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 36px; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.nk-rows { display: grid; gap: 6px; }
.nk-item { min-width: 0; }
.nk-item[hidden] { display: none !important; }
.nk-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.nk-row input {
  width: 100%; min-width: 0; max-width: 100%; height: 44px; padding: 0 10px; font-size: 16px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
}
.nk-row input.nk-name { letter-spacing: 0.06em; }
.nk-row input.nk-yomi { font-size: 14px; }
.nk-row input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.nk-item .vp-msg:empty { display: none; }
.nk-item .vp-msg { margin: 4px 0 0; }
html[data-ui="v2"] .radio-row.nk-radio { flex-wrap: wrap; min-width: 0; }
html[data-ui="v2"] .radio-row.nk-radio label { min-width: 0; max-width: 100%; white-space: normal; }
details.nk-more { margin: 4px 0 14px; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); padding: 2px 0; }
details.nk-more > summary { cursor: pointer; padding: 10px 2px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
details.nk-more[open] > summary { margin-bottom: 4px; }
.nk-hint { margin: 6px 0 0; }
.vp-samples .vp-sample { max-width: 100%; white-space: normal; text-align: left; }

/* ---- 結果 ---- */
/* 読み込み直後（計算の前）は欄の高さを確保する。計算が最初に .nk-pending を外す（値は見込み。描画確認で直す） */
#resultPanel.nk-pending { min-height: 340px; }
#resultPanel [hidden] { display: none !important; }
.nk-top { min-width: 0; }
.nk-lead { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.nk-ans { margin: 0 0 12px; padding-left: 1.2em; font-size: 14.5px; line-height: 1.8; overflow-wrap: anywhere; }
.nk-ans b { color: var(--accent); }
.nk-sortrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; font-size: 13px; min-width: 0; }
.nk-sortrow label { font-weight: 600; }
.nk-sortrow select { max-width: 100%; min-width: 0; height: 36px; padding: 0 8px; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; }
.nk-rule { margin: 10px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); overflow-wrap: anywhere; }
.nk-h3 { margin: 20px 0 4px; font-size: 15px; }
.nk-tnote { margin: 6px 0 8px; }

/* 一番上の表（候補｜使える字か｜熊崎で吉｜霊理学派で大吉） */
html[data-ui="v2"] table.data.nk-sum, html[data-ui="v2"] table.data.nk-kaku, html[data-ui="v2"] table.data.nk-cmp,
html[data-ui="v2"] table.data.nk-fix, html[data-ui="v2"] table.data.nk-chars, html[data-ui="v2"] table.data.nk-kkt { width: 100%; }
html[data-ui="v2"] table.data th.nk-cn { white-space: nowrap; text-align: left; }
.nk-cn b { font-size: 18px; font-weight: 700; letter-spacing: 0.04em; }
html[data-ui="v2"] table.data.nk-sum td.n b { font-size: 20px; }
.nk-of { font-size: 12px; color: var(--muted); }
html[data-ui="v2"] table.data td.nk-nok, p.nk-nok { white-space: normal; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.nk-st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line-strong); }
.nk-st-ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nk-st-check { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.nk-st-ng { background: var(--page); color: var(--ink); border-style: dashed; }

/* 吉凶の札 */
.nk-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); }
.nk-kt.nk-kg { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nk-kt.nk-kb { background: var(--page); border-color: var(--line-strong); color: var(--ink); }
.nk-kt.nk-km { background: var(--surface); border-color: var(--accent); color: var(--accent); }

/* 画数を確かめたい字 */
.nk-ch { white-space: nowrap; }
.nk-ch b { font-size: 22px; font-weight: 600; line-height: 1.2; }
html[data-ui="v2"] table.data td.nk-how { white-space: normal; min-width: 9em; font-size: 12.5px; line-height: 1.7; overflow-wrap: anywhere; }
.nk-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; }
.nk-miss { color: var(--s2, #B4442C); font-weight: 700; }
.nk-fixc { min-width: 0; }
html[data-ui="v2"] input.nk-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.nk-fix:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.nk-fixc .vp-msg { margin-top: 4px; font-size: 12px; max-width: 12em; }

/* 五格と吉凶の比較 */
html[data-ui="v2"] table.data.nk-kaku td.nk-st1 { white-space: nowrap; font-size: 12.5px; color: var(--ink-2); }
html[data-ui="v2"] table.data.nk-kaku th.nk-kh { white-space: nowrap; }
html[data-ui="v2"] table.data.nk-kaku td.nk-kc { white-space: nowrap; font-variant-numeric: tabular-nums; }
.nk-kc b { font-size: 16px; }
.nk-tg { display: block; margin-top: 2px; font-size: 11px; }
.nk-bk { display: inline-block; min-width: 2.6em; color: var(--muted); }

/* 数え方による違い */
html[data-ui="v2"] table.data.nk-cmp th.nk-ch2 { white-space: normal; min-width: 7.5em; font-size: 11.5px; line-height: 1.5; font-weight: 600; vertical-align: bottom; }
html[data-ui="v2"] table.data.nk-cmp td.nk-cc { white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; }
html[data-ui="v2"] table.data.nk-cmp .cur { background: var(--accent-soft); }
html[data-ui="v2"] table.data.nk-cmp td.nk-d b { color: var(--accent); }
html[data-ui="v2"] table.data.nk-cmp td.nk-d { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.nk-cmpnote { margin: 10px 0 0; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.nk-cl { margin: 0 0 6px; padding-left: 1.3em; }

/* 候補ごとのくわしい内容 */
details.nk-one { margin: 8px 0 0; border: 1px solid var(--grid); border-radius: var(--r); padding: 0 12px; background: var(--surface); min-width: 0; }
details.nk-one > summary { cursor: pointer; padding: 10px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
details.nk-one[open] > summary { border-bottom: 1px solid var(--grid); margin-bottom: 8px; }
.nk-sn { font-size: 17px; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.nk-sl { font-size: 12.5px; color: var(--ink-2); }
html[data-ui="v2"] table.data.nk-chars td.nk-why { white-space: normal; min-width: 11em; font-size: 12.5px; line-height: 1.7; overflow-wrap: anywhere; }
.nk-rs { display: block; margin-top: 2px; color: var(--ink-2); }
.nk-sug { display: block; margin-top: 2px; }
.nk-kkbox { margin: 12px 0 12px; padding: 12px 14px; border: 1px solid var(--grid); border-left: 4px solid var(--accent); border-radius: var(--r); background: var(--surface); min-width: 0; }
.nk-kkh { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.nk-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.nk-kkt th[scope="row"] { white-space: nowrap; }
html[data-ui="v2"] table.data.nk-kkt td.nk-k1 { white-space: normal; min-width: 11em; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
html[data-ui="v2"] table.data.nk-kkt td.nk-k2 { white-space: nowrap; }
html[data-ui="v2"] table.data.nk-kkt tr.nk-ten td { white-space: normal; font-size: 12.5px; color: var(--ink-2); }
.nk-km { display: block; margin-top: 2px; color: var(--ink-2); }
.nk-strong { display: block; font-size: 11.5px; color: var(--muted); }
.nk-fl { display: block; margin: 0 0 6px; overflow-wrap: anywhere; }

@media (max-width: 400px) {
  html[data-ui="v2"] table.data.nk-sum th, html[data-ui="v2"] table.data.nk-sum td,
  html[data-ui="v2"] table.data.nk-kaku th, html[data-ui="v2"] table.data.nk-kaku td,
  html[data-ui="v2"] table.data.nk-cmp th, html[data-ui="v2"] table.data.nk-cmp td,
  html[data-ui="v2"] table.data.nk-chars th, html[data-ui="v2"] table.data.nk-chars td,
  html[data-ui="v2"] table.data.nk-kkt th, html[data-ui="v2"] table.data.nk-kkt td { padding-left: 6px; padding-right: 6px; }
  .nk-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) 36px; gap: 6px; }
  .nk-head { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) 36px; gap: 6px; }
  .nk-cn b { font-size: 16px; }
}

/* 本文の表 */
table.nk-wrap td, table.nk-wrap th { white-space: normal; }
table.nk-wrap td:first-child { min-width: 6.5em; font-weight: 600; }

/* レビュー後の追加（2026-10-18）：熊崎の区分の出どころ、一番上の表の折り返し、くわしい内容の開閉の印 */
.nk-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); }
.nk-src.nk-srcr { border-style: dashed; color: var(--muted); }
html[data-ui="v2"] table.data.nk-sum th, html[data-ui="v2"] table.data.nk-sum td { white-space: normal; }
html[data-ui="v2"] table.data.nk-sum th .sub, html[data-ui="v2"] table.data.nk-sum td .sub { word-break: normal; overflow-wrap: anywhere; }
details.nk-one > summary { display: list-item; }
details.nk-one > summary > * { display: inline-block; margin-right: 10px; vertical-align: middle; }

/* 統括の点検後（2026-10-18）：320px で札を折り返す、候補の列を固定 */
html[data-ui="v2"] table.data.nk-sum .nk-st { white-space: normal; }
html[data-ui="v2"] table.data.nk-kaku th.nk-cn, html[data-ui="v2"] table.data.nk-cmp th.nk-cn { position: sticky; left: 0; z-index: 1; background: var(--surface); }

/* 描画確認後（2026-10-18）：PC の幅（結果の欄 約590px）で五格の表を横スクロールなしに。1文字ずつは候補の下、本／読み取りは記号 */
.nk-st1 { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.nk-mk { margin-left: 3px; font-size: 10px; color: var(--accent); vertical-align: 1px; }
.nk-tg .nk-bk { min-width: 0; margin-right: 3px; }
html[data-ui="v2"] table.data.nk-kaku th, html[data-ui="v2"] table.data.nk-kaku td { padding-left: 8px; padding-right: 8px; }
html[data-ui="v2"] table.data.nk-cmp th.nk-ch2 { min-width: 6em; font-size: 12px; }
.nk-leg { margin: 8px 0 4px; padding-left: 1.2em; font-size: 12.5px; line-height: 1.7; overflow-wrap: anywhere; }
