/* 生まれた日でつくる、わが子の子育て設計図（/uranai/umare/）の見た目
   2026-10-27 クロコの係（uranai-umare）。2026-10-28 結果を「子育て設計図」に作り替え（下の「子育て設計図」の段）。
   家族占い（kazoku）も um-facts・um-small・um-g・um-btn・um-actions を使うので、名前と形を変えない。色・字・角丸はサイトの部品（site.css の変数）に合わせる。
   文字 14/16/18/20/24・太さ 400/700・余白 4/8/12/16/24/32/48・角丸 8/12/16 と丸い札。押せる物は48px以上。
   グラデ・絵文字・斜体・英字の飾りは使わない。class はすべて um- で始める（ほかの部品とぶつけない）。 */

.um-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 入力 ---------- */
.um-form { padding: 24px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.um-form-t { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.5; }
.um-field { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.um-lbl { display: block; margin: 0 0 8px; padding: 0; font-weight: 700; line-height: 1.5; }
.um-lbl2 { display: block; margin: 0 0 4px; padding: 0; font-weight: 700; line-height: 1.5; }
.um-in { box-sizing: border-box; display: block; width: 100%; min-height: 48px; margin: 0; padding: 8px 12px; border: 1px solid var(--field); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5; letter-spacing: 0; }
.um-in:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.um-in:disabled { background: var(--surface-2); color: var(--ink-2); }
input.um-in[type="date"], input.um-in[type="time"] { -webkit-appearance: none; appearance: none; text-align: left; }
input.um-in::-webkit-date-and-time-value { text-align: left; }
.um-sel { position: relative; display: block; }
.um-sel select { -webkit-appearance: none; appearance: none; padding-right: 48px; cursor: pointer; }
.um-sel::after { content: ""; position: absolute; right: 16px; top: calc(50% - 6px); width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); pointer-events: none; }
.um-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.um-in-time { flex: 1 1 160px; width: auto; min-width: 0; }
.um-check { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; line-height: 1.5; }
.um-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.um-check input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.um-fs .um-check { display: flex; }
.um-help { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* 性別：選ぶ札（サイトの .chip と同じ形。選んだ札は塗り＋チェックの印で、色だけで伝えない） */
.um-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.um-seg label { position: relative; display: inline-flex; }
.um-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.um-seg span { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px; border-radius: 24px; background: var(--surface-2); color: var(--ink); font-weight: 700; line-height: 1.5; pointer-events: none; }
.um-seg input:checked + span { background: var(--accent); color: var(--accent-ink); padding-left: 12px; }
.um-seg input:checked + span::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i-check) center / 16px 16px no-repeat; mask: var(--i-check) center / 16px 16px no-repeat; }
.um-seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .um-seg input:not(:checked):hover + span { background: var(--accent-soft); } }
.um-seg input:not(:checked):active + span { background: var(--accent-press); }

/* 細かい設定（開け閉め） */
.um-opt { margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; }
.um-opt summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 16px; border-radius: 12px; font-weight: 700; line-height: 1.5; cursor: pointer; list-style: none; }
.um-opt summary::-webkit-details-marker { display: none; }
.um-opt summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); }
.um-opt[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.um-opt summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (hover: hover) { .um-opt summary:hover { background: var(--accent-soft); } }
.um-opt summary:active { background: var(--accent-press); }
.um-opt-in { padding: 0 16px 16px; }
.um-opt-in .um-fs { margin: 0; padding: 0; border: 0; min-width: 0; }
.um-opt-in .um-fs + .um-fs { margin-top: 16px; }

.um-err { margin: 24px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--t-pink); color: var(--c-pink); font-weight: 700; line-height: 1.6; }
.um-err[hidden] { display: none; }
.um-go { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin: 24px 0 0; padding: 8px 24px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 18px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.um-go:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .um-go:hover { background: var(--accent-hover); } }
.um-go:active { background: var(--accent-hover); }
.um-sub { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); text-align: center; }

/* ---------- 結果 ---------- */
.um-out:empty { display: none; }
.um-sec > * + * { margin-top: 16px; }
.um-sec h2:focus { outline: none; }
.um-sec h2:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.um-who { font-weight: 700; line-height: 1.6; }
.um-sum b { font-weight: 700; }
.um-g { display: block; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--ink-2); }
.um-small { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.um-na { color: var(--ink-2); }
.um-note { margin-top: 16px; }
.um-note-t { font-weight: 700; }
.um-note ul { margin: 8px 0 0; }

/* 箇条（事実の行） */
.body .um-facts { list-style: none; padding: 0; }
.body .um-facts > li { position: relative; padding-left: 24px; line-height: 1.7; }
.body .um-facts > li + li { margin-top: 8px; }
.body .um-facts > li::before { content: ""; position: absolute; left: 4px; top: calc(.85em - 4px); width: 8px; height: 8px; border-radius: 2px; background: var(--cat); }

/* 占いごとの読み（くわしく の中）：見出し（何の読みか＋答え）と文の組を縦に並べる。カードの格子にはしない */
.um-hints { margin-top: 8px; }
.body .um-hint h4 { margin-top: 24px; }
.body .um-hint:first-child h4 { margin-top: 8px; }
.um-hint-k { display: block; margin-bottom: 4px; font-family: var(--font-body); font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink-2); letter-spacing: 0; }
.um-hint p { margin: 12px 0 0; line-height: 1.8; }
.um-hint p b { font-weight: 700; }

/* 表（命式・年運）：枠の中だけ横に流せる */
.um-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.um-ms, .um-yt { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; letter-spacing: 0; }
.um-ms { table-layout: fixed; min-width: 320px; }
.um-ms th, .um-ms td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: top; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.um-ms thead th { background: var(--t-green); font-weight: 700; }
.um-ms thead th:first-child { width: 76px; }
.um-ms tbody th { padding-left: 8px; text-align: left; font-weight: 700; }
.um-ms tr:last-child th, .um-ms tr:last-child td { border-bottom: 0; }
.um-ms td b { font-weight: 700; }
.um-gz { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.4; letter-spacing: .02em; }
.um-yt th, .um-yt td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.um-yt thead th { background: var(--t-green); font-weight: 700; }
.um-yt tr:last-child td { border-bottom: 0; }
.um-yt td:first-child { width: 72px; white-space: nowrap; }
.um-yt tr.um-now td { background: var(--t-yellow); }
.um-tcs { display: block; color: var(--c-pink); font-weight: 700; }

/* 五行の棒 */
.body .um-bars { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.body .um-bars > li { margin: 0; }
.um-bar { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; grid-template-areas: "k tr n" "d d d"; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.um-bar-k { grid-area: k; font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--elc); }
.um-bar-tr { grid-area: tr; height: 16px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.um-bar-f { display: block; height: 100%; border-radius: 8px; background: var(--elc); }
.um-bar-n { grid-area: n; font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.4; text-align: right; font-variant-numeric: tabular-nums; }
.um-bar-d { grid-area: d; line-height: 1.6; color: var(--ink-2); }
.um-el0 { --elc: var(--c-green); }
.um-el1 { --elc: var(--c-pink); }
.um-el2 { --elc: var(--c-orange); }
.um-el3 { --elc: var(--c-yellow); }
.um-el4 { --elc: var(--c-sky); }

.um-box { padding: 16px; border-radius: 12px; background: var(--surface-2); }
.um-box > * + * { margin-top: 8px; }
.um-box-t { font-weight: 700; line-height: 1.5; }
.um-big { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.4; }
.um-two { display: grid; gap: 12px; }
@media (min-width: 640px) { .um-two { grid-template-columns: 1fr 1fr; } }

/* 人体星図：3×3。まん中の胸（主星）は緑の枠、四すみの十二大従星は空色の地 */
.um-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.um-c { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 112px; padding: 12px 4px; border: 2px solid transparent; border-radius: 12px; background: var(--surface-2); text-align: center; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.um-c .um-g { line-height: 1.4; }
.um-c-blank { background: none; }
.um-c-k { font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--ink-2); }
.um-c-s { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.4; }
.um-c-f { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.um-j { background: var(--t-sky); }
.um-main { border-color: var(--accent); background: var(--accent-soft); }

/* 大運の流れ */
.body .um-flow { list-style: none; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.body .um-flow > li { margin: 0; }
.um-flow-i { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a gz" "d d"; align-items: center; gap: 4px 12px; padding: 12px 16px; }
.um-flow-i + .um-flow-i { border-top: 1px solid var(--line); }
.um-flow-a { grid-area: a; font-weight: 700; line-height: 1.5; }
.um-flow-gz { grid-area: gz; font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.4; }
.um-flow-d { grid-area: d; line-height: 1.6; }
.um-flow-i.um-now { background: var(--t-yellow); }
.um-tag { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; line-height: 1.6; vertical-align: 1px; }

.um-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.um-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 24px; border: 2px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--accent); font: inherit; font-weight: 700; line-height: 1.5; cursor: pointer; }
.um-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .um-btn:hover { background: var(--accent-soft); } }
.um-btn:active { background: var(--accent-press); }

@media (min-width: 640px) {
  .um-form { padding: 24px; }
  .um-ms th, .um-ms td { padding: 8px; }
  .um-ms thead th:first-child { width: 112px; }
  .um-c { min-height: 128px; }
}

/* ---------- 子育て設計図（2026-10-28） ----------
   本文は平たい言葉。専門の言葉は「読みの元」（.um-basis）とかっこの中（.um-k）に小さく。表はサイトの .tbl.stack（スマホは1行を1つの塊に積む） */
.um-opt-l { display: inline-block; margin-left: 8px; font-size: 14px; font-weight: 400; color: var(--ink-2); }
.um-k { font-size: 14px; font-weight: 400; color: var(--ink-2); }
.um-basis { display: block; font-size: 14px; font-weight: 400; line-height: 1.6; color: var(--ink-2); }
.um-lab { display: block; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink-2); }
.um-sec > .um-lab + *, .um-core > .um-lab + *, .um-avoid > .um-lab + *, .um-fridge > .um-lab + * { margin-top: 4px; }
.um-one p { line-height: 1.75; }

/* 関わり方の3つの柱：1本の枠の中に3行（区切りは1pxの線） */
.body .um-pl { list-style: none; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.body .um-pl > li { margin: 0; padding: 16px; }
.body .um-pl > li + li { margin-top: 0; border-top: 1px solid var(--line); }
.um-pl-k { display: block; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink-2); }
.um-pl-t { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.4; }
.um-pl-d { display: block; margin-top: 8px; line-height: 1.75; }
.um-pl .um-basis { margin-top: 8px; }

/* 取扱説明書（核5つ）：題（h3）・文・こう関わる・避けたい・読みの元 */
.um-core > * + * { margin-top: 12px; }
.um-core > p { line-height: 1.75; }
.um-avoid { padding: 12px 16px; border-radius: 12px; background: var(--surface-2); }
.um-avoid p { line-height: 1.75; }

/* 表（毎日やること・言い換え・年齢別・遊び） */
/* 2026-10-28 375px で見て直す：サイトの .tbl は keep-all（記事は作る時に文節の <wbr> が入る）。ここは画面で文を組むので <wbr> が無く、「、」でしか折れず、行の頭に「。」が来ていた → 表の中の文は普通に流す（行頭の「。」は strict で止める） */
.um-out .tbl td { word-break: normal; line-break: strict; }
.um-out .tbl p { margin: 0; line-height: 1.6; }
.um-out .tbl p + p, .um-out .tbl p + ul { margin-top: 8px; }
.um-out .tbl td:first-child { font-weight: 700; }
.um-out .tbl td.um-ng { font-weight: 400; color: var(--ink-2); }
.um-out .tbl td.um-ok { font-weight: 700; }
.um-out .tbl td .um-g { font-weight: 400; }
.um-tl-t { font-weight: 700; }
.um-out .tbl tr.um-now td { background: var(--t-yellow); }
@media (max-width: 639px) {
  .um-out .tbl.stack tr.um-now { background: var(--t-yellow); }
  .um-out .tbl.stack td.um-ng { font-weight: 400; }
}
@media (min-width: 640px) {
  .um-daily td:first-child, .um-play td:first-child, .um-kotoba td:first-child { width: 30%; }
  .um-phr td { width: 50%; }
  .um-tl td:first-child, .um-tlp td:first-child { width: 128px; }
  .um-tl td:nth-child(2), .um-tlp td:nth-child(2) { width: 40%; }
}

/* 冷蔵庫に貼る1枚（印刷で1枚に収まる大きさ） */
.um-fridge { padding: 24px 16px; border: 2px solid var(--accent); border-radius: 16px; background: var(--surface); }
.um-fridge > * + * { margin-top: 12px; }
.um-fridge > .um-lab { margin-top: 24px; }
.um-fr-h { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.4; }
.body .um-fr-pl { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.body .um-fr-pl > li { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.6; }
.um-fr-pl b { display: block; font-size: 18px; font-weight: 700; line-height: 1.4; }
.um-fridge > p { line-height: 1.6; }
.um-fridge > .um-fr-n { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.um-fr-sec .um-actions { margin-top: 16px; }
@media (min-width: 640px) { .um-fridge { padding: 24px; } }
@media screen { #um-pone { display: none; } }

/* くわしく（畳んだ中）：今までの命式・五行・人体星図・流れの表 */
.um-more .um-opt-in > * + * { margin-top: 16px; }
.body .um-more .um-opt-in > h3 { margin-top: 32px; }
.body .um-more .um-opt-in > h3:first-child { margin-top: 16px; }
.body .um-more h4 { margin-top: 24px; font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 1.5; }

/* 印刷：入力とボタンを外し、表は枠の外まで出す */
@media print {
  .um-form, .um-actions, #um-app noscript { display: none !important; }
  .um-scroll { overflow: visible; border-color: #999; }
  .um-c, .um-hint, .um-box, .um-flow-i, .um-bar, .um-yt tr, .um-ms, .um-pl > li, .um-avoid, .um-out .tbl tr, .um-fridge { break-inside: avoid; }
  .um-out .tbl { overflow: visible; }
  .um-fridge { padding: 16px; border-color: #333; }
  .body .um-fr-pl > li { padding: 8px 0; }
  /* 「この1枚だけ印刷する」：写し（#um-pone）だけを出す */
  html.um-pf body > :not(#um-pone) { display: none !important; }
  html.um-pf #um-pone { margin: 0; }
  html.um-pf .um-fridge { break-before: auto; }
  .body h2, .body h3 { break-after: avoid; }
  .um-sec + .um-sec { break-before: auto; }
  .um-sec.um-fr-sec { break-before: page; }   /* 冷蔵庫の1枚は新しい紙から（1枚に収める） */
  .um-j, .um-main, .um-box, .um-c, .um-flow-i.um-now, .um-yt tr.um-now td, .um-avoid, .um-out .tbl tr.um-now td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
