/* joho-moji（文字に ばんごう）。色は sho.css の 約束：みどり＝正かい、オレンジ＝光る 所、まちがいは きいろ系（せめない）。
   アの ひょう＝みどり系、イの ひょう＝むらさき系（名前の 字「ア」「イ」も いつも そえる。色だけに たよらない）。字は 18px 以上、ボタンは 48px 以上。 */
.jm-w { --jm-a: #0f8a72; --jm-al: #e7f7ef; --jm-b: #6d28d9; --jm-bl: #f1eafe; --jm-hi: #f59e0b; --jm-hil: #fff4dc; --jm-ok: #0f8a72; --jm-okl: #e7f7ef;
  font-size: 1.1rem; line-height: 1.7; }
.jm-w button { font-family: inherit; line-height: 1.3; cursor: pointer; touch-action: manipulation; color: var(--ink, #1f2937); }
.jm-w button:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.jm-w p { margin: 6px 0; }
.jm-w [hidden] { display: none !important; }

.jm-w .jm-b { font-size: 1.05rem; min-height: 48px; padding: 6px 18px; border-radius: 12px; border: 2px solid var(--line, #e5e7eb); background: #fff; font-weight: 700; }
.jm-w .jm-b.main { background: var(--teal-d, #0f8a72); border-color: var(--teal-d, #0f8a72); color: #fff; font-size: 1.15rem; }
.jm-w .jm-b.idk { border-style: dashed; color: var(--sub, #4b5563); }
.jm-w .jm-b:disabled { opacity: .45; cursor: default; }
.jm-w .jm-b.next { display: block; margin: 12px auto 0; }
.jm-ctl { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0 4px; }

.jm-q { font-weight: 700; font-size: 1.15rem; text-align: center; }
.jm-fb { min-height: 1.6em; text-align: center; }
.jm-res { font-weight: 700; font-size: 1.15rem; }
.jm-res.ok { color: var(--jm-ok); }
.jm-res.try { color: var(--orange-t, #b45309); }
.jm-note { background: var(--orange-l, #fff4dc); border-radius: 10px; padding: 6px 12px; display: inline-block; text-align: left; max-width: 34em; }
.jm-praise { display: inline-block; margin-top: 8px; padding: 8px 14px; border-radius: 12px; background: var(--jm-okl); color: var(--jm-ok); font-weight: 700; }

/* ひょうの 名前 */
.jm-tag { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 6px; color: #fff; font-weight: 700; text-align: center; margin-right: 2px; }
.jm-tag.t-a { background: var(--jm-a); }
.jm-tag.t-b { background: var(--jm-b); }

/* ひょう */
.jm-tbl { border: 2px solid var(--jm-a); border-radius: 12px; padding: 4px 8px 8px; margin: 8px auto; max-width: 380px; background: var(--jm-al); }
.jm-tbl.t-b { border-color: var(--jm-b); background: var(--jm-bl); }
.jm-tcap { text-align: center; font-weight: 700; margin: 2px 0 4px !important; }
.jm-tcap small { display: block; font-weight: 400; font-size: .95rem; color: var(--sub, #4b5563); }
.jm-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.jm-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; padding: 2px 0; border-radius: 10px; border: 2px solid var(--line, #e5e7eb); background: #fff; line-height: 1.15; transition: background .2s, border-color .2s, transform .2s; }
button.jm-cell:hover:not(:disabled) { border-color: var(--teal, #1abc9c); }
button.jm-cell:disabled { opacity: .6; cursor: default; }
.jm-ch { font-size: 1.6rem; font-weight: 700; }
.jm-no { font-size: 1.05rem; color: var(--sub, #4b5563); font-weight: 700; font-variant-numeric: tabular-nums; }
.jm-cell.hi { background: var(--jm-hil); border-color: var(--jm-hi); transform: scale(1.06); opacity: 1 !important; }

/* send */
.jm-side { border-radius: 14px; padding: 6px 8px 8px; margin: 6px 0; background: #fafafa; border: 1px solid var(--line, #e5e7eb); }
.jm-who { font-weight: 700; margin: 0 0 4px !important; display: flex; align-items: center; gap: 6px; }
.jm-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--jm-hi); display: inline-block; }
.recv .jm-dot { background: #2563eb; }
.jm-word { display: flex; justify-content: center; gap: 6px; margin: 4px 0; }
.jm-slot { width: 52px; height: 56px; border-radius: 10px; border: 2px solid var(--ink, #1f2937); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; }
.jm-slot.empty { border-style: dashed; border-color: var(--line, #d1d5db); }
.jm-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0; }
.jm-wire { width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 10px; border-radius: 26px; background: repeating-linear-gradient(90deg, #e5e7eb 0 10px, #f3f4f6 10px 20px); }
.jm-wlab { font-size: 1rem; color: var(--sub, #4b5563); white-space: nowrap; }
.jm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jm-chip { min-width: 40px; height: 40px; padding: 0 6px; box-sizing: border-box; border-radius: 20px; background: var(--jm-hi); color: #fff; font-weight: 700; font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.jm-chip.in { animation: jm-in .45s ease-out; }
@keyframes jm-in { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.jm-screen { min-height: 64px; margin: 4px auto 6px; max-width: 280px; border-radius: 10px; border: 3px solid var(--ink, #1f2937); background: #fff; display: flex; align-items: center; justify-content: center; gap: 4px; }
.jm-scr-lab { color: var(--sub, #6b7280); font-size: 1rem; }
.jm-sch { font-size: 2rem; font-weight: 700; }
.jm-toggle { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.jm-w .jm-tg { font-size: 1rem; min-height: 48px; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--line, #e5e7eb); background: #fff; font-weight: 700; }
.jm-w .jm-tg[aria-pressed="true"] { border-color: var(--ink, #1f2937); box-shadow: inset 0 0 0 2px var(--ink, #1f2937); }
.jm-w .jm-tg:disabled { cursor: default; opacity: .75; }
.jm-w .jm-tg:disabled:not([aria-pressed="true"]) { opacity: .4; }
.jm-w .jm-tg.pulse { animation: jm-pulse 1.2s ease-in-out infinite; border-color: var(--jm-hi); }
@keyframes jm-pulse { 50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, .35); } }
.jm-ask { margin: 8px 0 0; }
.jm-choices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 6px 0; }
.jm-w .jm-opt { min-height: 52px; min-width: 72px; padding: 4px 16px; border: 2px solid var(--line, #e5e7eb); border-radius: 12px; background: #fff; font-size: 1.4rem; font-weight: 700; }
.jm-w .jm-opt.idk { font-size: 1rem; color: var(--sub, #4b5563); border-style: dashed; }
.jm-w .jm-opt.picked { border-color: var(--ink, #1f2937); box-shadow: inset 0 0 0 2px var(--ink, #1f2937); opacity: 1 !important; }
.jm-w .jm-opt:disabled:not(.picked) { opacity: .5; cursor: default; }

/* code */
.jm-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 6px; }
.jm-w .jm-tab { min-width: 48px; min-height: 48px; border-radius: 999px; border: 2px solid var(--line, #e5e7eb); background: #fff; font-weight: 700; font-size: 1.1rem; }
.jm-w .jm-tab[aria-pressed="true"] { background: var(--ink, #1f2937); color: #fff !important; border-color: var(--ink, #1f2937); }
.jm-w .jm-tab.done::after { content: " ○"; color: var(--jm-ok); }
.jm-w .jm-tab.done[aria-pressed="true"]::after { color: #9ef0d6; }
.jm-cols { display: flex; justify-content: center; gap: 14px; margin: 6px 0; }
.jm-col { display: flex; flex-direction: column; align-items: center; }
.jm-w .jm-src { min-width: 52px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; border-radius: 10px; background: #f3f4f6; }
.jm-w .jm-src.dec { font-variant-numeric: tabular-nums; }
.jm-arrow { color: var(--sub, #6b7280); line-height: 1.1; font-size: 1.2rem; }
.jm-w .jm-in { width: 56px; height: 56px; border-radius: 10px; border: 2px dashed var(--line, #9ca3af); background: #fff; font-size: 1.6rem; font-weight: 700; padding: 0; }
.jm-w .jm-in.cur { border-style: solid; border-color: #2563eb; }
.jm-w .jm-in.ok { border: 2px solid var(--jm-ok); background: var(--jm-okl); }
.jm-w .jm-in.ng { border: 2px solid var(--jm-hi); background: var(--jm-hil); }
.jm-w .jm-in.given { border: 2px solid #9ca3af; background: #f3f4f6; }
.jm-w .jm-in:disabled { opacity: 1; cursor: default; }
.jm-padlab { text-align: center; font-size: 1rem; color: var(--sub, #4b5563); margin: 8px 0 2px !important; }
.jm-pad { display: grid; grid-template-columns: repeat(5, minmax(0, 60px)); gap: 6px; justify-content: center; }
.jm-w .jm-pk { min-height: 50px; border-radius: 10px; border: 2px solid var(--line, #e5e7eb); background: #fff; font-size: 1.4rem; font-weight: 700; padding: 0; }
.jm-w .jm-pk:hover:not(:disabled) { border-color: var(--teal, #1abc9c); }
.jm-w .jm-pk:disabled { opacity: .4; cursor: default; }

/* bits */
.jm-msg { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0; }
.jm-grp { display: flex; flex-direction: column; align-items: center; padding: 4px; border-radius: 12px; border: 2px solid transparent; }
.jm-grp.cur { border-color: #2563eb; background: #eff6ff; }
.jm-grp.ok { background: var(--jm-okl); }
.jm-mcards { display: flex; gap: 3px; }
.jm-mc { box-sizing: border-box; width: 31px; height: 50px; border-radius: 6px; border: 2px solid #d1d5db; background: #f3f4f6; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; line-height: 1; color: #6b7280; font-variant-numeric: tabular-nums; }
.jm-mc small { font-size: .8rem; font-weight: 700; margin-bottom: 3px; }
.jm-mc.on { background: #fff; border-color: var(--jm-hi); color: var(--ink, #1f2937); }
.jm-mc.on small { color: #b45309; }
.jm-gsum { min-height: 1.5em; max-width: 136px; text-align: center; line-height: 1.3; font-size: .95rem; color: var(--sub, #4b5563); font-weight: 700; margin: 2px 0 !important; }
.jm-gl { width: 52px; height: 52px; border-radius: 10px; border: 2px solid var(--ink, #1f2937); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; font-weight: 700; }
.jm-grp:not(.ok) .jm-gl { border-style: dashed; color: #9ca3af; }

/* PC：おくる人・せん・うけとる人を 横に ならべる */
@media (min-width: 760px) {
  .jm-w[data-jm-mode="send"] { display: grid; grid-template-columns: 1fr 170px 1fr; gap: 0 10px; align-items: start; }
  .jm-w[data-jm-mode="send"] > .jm-q, .jm-w[data-jm-mode="send"] > .jm-ask, .jm-w[data-jm-mode="send"] > .jm-fb, .jm-w[data-jm-mode="send"] > .jm-ctl { grid-column: 1 / -1; }
  .jm-w[data-jm-mode="send"] .jm-mid { align-self: center; }
  .jm-w[data-jm-mode="send"] .jm-wire { flex-direction: column; border-radius: 16px; background: repeating-linear-gradient(0deg, #e5e7eb 0 10px, #f3f4f6 10px 20px); min-height: 120px; justify-content: center; }
  .jm-w[data-jm-mode="send"] .jm-chips { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .jm-cell, .jm-chip.in, .jm-tg.pulse { animation: none; transition: none; } }

/* 読み上げ（🔊）の ボタン：部品の button の きまりで 大きさが かわらない ように（2026-11-15） */
.jm-w .say { font-size: 18px; line-height: 1; flex: none; padding: 0; }
