/* yomu-6te（読む力 小4〜6 の 6つの 手じゅん、担当B）。yomitori と 同じ 見た目：聞かれて いる ところ＝赤い 波線、数＝○、
   もとに する 量・1に あたる 量＝青、くらべられる 量＝オレンジ、？＝点線 */
.ys-w { --ys-b: #2563eb; --ys-bl: #dbe7ff; --ys-o: #fdba74; --ys-od: #c2410c; --ys-r: #dc2626; --ys-g: #15803d; }
.ys-w button { font: inherit; cursor: pointer; color: var(--ink, #1f2937); }
.ys-w button:focus-visible, .ys-panel:focus-visible { outline: 3px solid var(--ys-b); outline-offset: 2px; }
.ys-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ys-tab { min-height: 44px; padding: 2px 14px; border: 2px solid var(--line, #e5e7eb); background: #fff; border-radius: 999px; font-weight: 700; font-size: .95rem; }
.ys-tab[aria-pressed="true"] { border-color: var(--ys-b); background: var(--ys-bl); }
.ys-prog { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; font-size: .78rem; color: var(--sub, #6b7280); }
.ys-st { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 2px; border-radius: 999px; background: #f3f4f6; }
.ys-st b { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: #d1d5db; color: #fff; font-size: .8rem; }
.ys-st.did b { background: var(--ys-g); }
.ys-st.now { background: var(--ys-bl); color: var(--ink, #1f2937); font-weight: 700; }
.ys-st.now b { background: var(--ys-b); }
.ys-text { background: #fffdf5; border: 2px solid #f1e3b5; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.ys-p { margin: 0; font-size: 1.15rem; line-height: 2.6; }
.ys-seg { display: inline; border: 0; background: none; padding: 0; margin: 0; line-height: inherit; font-size: inherit; text-align: left; }
button.ys-seg { background: #eef4ff; border-radius: 6px; box-shadow: 0 0 0 1px #c7d7fb; padding: 2px 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
button.ys-seg:hover { background: #dfe9ff; }
.ys-seg.ask { text-decoration: underline wavy var(--ys-r); text-decoration-thickness: 2px; text-underline-offset: 6px; color: #991b1b; font-weight: 700; }
.ys-seg.num { font-weight: 700; white-space: nowrap; }
.ys-seg.num.got, .ys-seg.num.sel { border-radius: 999px; box-shadow: 0 0 0 3px var(--ys-od); padding: 0 6px; background: #fff7ed; }
.ys-seg.num.sel { box-shadow: 0 0 0 3px var(--ys-b); background: var(--ys-bl); }
.ys-seg.num.got.none { box-shadow: 0 0 0 3px #9ca3af; background: #f3f4f6; color: #4b5563; }
.ys-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--ys-od); color: #fff; font-size: .72rem; line-height: 1.6; vertical-align: middle; font-weight: 700; white-space: normal; }
.none .ys-tag { background: #6b7280; }
.ys-panel { outline: none; }
.ys-guide { font-weight: 700; margin: 0 0 8px; line-height: 2; }
.ys-n { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--ys-b); color: #fff; margin-right: 6px; font-size: .9rem; }
.ys-small { margin: 0 0 8px; color: var(--sub, #4b5563); font-size: .95rem; }
.ys-q { font-weight: 700; margin: 0 0 6px; }
.ys-pick { border: 2px solid var(--ys-b); border-radius: 12px; padding: 8px 10px; margin: 0 0 8px; background: #f8fbff; }
.ys-ch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.ys-c { min-height: 48px; padding: 4px 14px; border: 2px solid var(--ink, #1f2937); background: #fff; border-radius: 12px; font-weight: 700; text-align: left; line-height: 1.8; }
.ys-c.ok, .ys-c.ok:disabled { border-color: var(--ys-g); background: #ecfdf3; opacity: 1; }
.ys-c:disabled { opacity: .45; cursor: default; }
.ys-go, .ys-ck, .ys-re0 { min-height: 48px; padding: 4px 18px; border-radius: 12px; font-weight: 700; border: 2px solid var(--ys-b); background: var(--ys-b); color: #fff !important; }
.ys-re0 { background: #fff; color: var(--sub, #4b5563) !important; border: 2px dashed #9ca3af; font-weight: 400; min-height: 40px; font-size: .9rem; }
.ys-next, .ys-again { margin: 4px 0 8px; }
.ys-again { text-align: right; }
.ys-msg { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: #fff7ed; border-left: 5px solid #f59e0b; line-height: 2; }
.ys-msg.ok { background: #ecfdf3; border-left-color: var(--ys-g); }
.ys-mids { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: #f0f7ff; border: 1px solid #bfdbfe; line-height: 2; }
/* テープ */
.ys-tape { margin: 4px 0 8px; }
.ys-rn { margin: 2px 0 2px; font-size: .85rem; font-weight: 700; color: #374151; }
.ys-row { display: flex; width: 100%; margin: 0 0 6px; }
.ys-tp { box-sizing: border-box; min-width: 3.6em; min-height: 46px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 4px; padding: 2px 4px; border: 3px solid #6b7280; background: #f3f4f6; border-radius: 6px; font-size: .85rem; font-weight: 700; text-align: center; line-height: 1.4; }
.ys-tp b { font-size: 1.05rem; }
.ys-tp.w { border-color: var(--ys-b); background: var(--ys-bl); }
.ys-tp.o { border-color: var(--ys-od); background: var(--ys-o); }
.ys-tp.q { background: #fff; border: 3px dashed #6b7280; color: var(--ys-r); }
.ys-tp.rp { min-width: 0; padding: 2px 1px; }
/* 0 の 段：長さの ない 空の 箱。点線の わくに 0 の 札だけ（色は ぬらない） */
.ys-tp.z { min-width: 0; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 2px 6px; border: 2px dashed #9ca3af; background: repeating-linear-gradient(135deg, #fff 0 6px, #f3f4f6 6px 8px); color: #4b5563; font-size: .72rem; line-height: 1.3; white-space: nowrap; }
.ys-tp.z b { display: inline-block; padding: 0 6px; border-radius: 6px; background: #fff; border: 1.5px solid #6b7280; color: #1f2937; font-size: .95rem; }
.ys-row .ys-tp + .ys-tp.z, .ys-row .ys-tp.z + .ys-tp { margin-left: 2px; }
.ys-tp .ys-1 { display: block; width: 100%; font-size: .68rem; line-height: 1.2; }
.ys-row .ys-tp + .ys-tp { margin-left: -3px; }
.ys-gap { min-width: 0; }
.ys-tape.anim .ys-tp, .ys-fig.anim svg { animation: ys-in .5s ease both; }
.ys-tape.anim .ys-row:nth-of-type(2) .ys-tp { animation-delay: .3s; }
.ys-tape.anim .ys-row:nth-of-type(3) .ys-tp { animation-delay: .6s; }
@keyframes ys-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ys-tape.anim .ys-tp, .ys-fig.anim svg { animation: none; } }
/* 2本の 数直線 */
.ys-fig { margin: 4px 0 8px; }
.ys-dnl { width: 100%; height: auto; display: block; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; }
.ys-ax { stroke: #374151; stroke-width: 3; }
.ys-tk { stroke: #9ca3af; stroke-width: 2; stroke-dasharray: 5 4; }
.ys-ln { font-size: 20px; fill: #4b5563; font-weight: 700; }
.ys-lt { font-size: 26px; font-weight: 700; fill: #1f2937; paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }
.ys-ld { fill: none; stroke: #9ca3af; stroke-width: 1.5; }
.ys-lt.one { fill: var(--ys-b); }
.ys-lt.oth { fill: var(--ys-od); }
.ys-lt.q { fill: var(--ys-r); }
.ys-qb { fill: #fff; stroke: #6b7280; stroke-width: 2.5; stroke-dasharray: 6 4; }
.ys-leg { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; }
.ys-lg { padding: 0 8px; border-radius: 999px; font-weight: 700; }
.ys-lg.one { background: var(--ys-bl); color: #1e40af; }
.ys-lg.oth { background: #ffedd5; color: #9a3412; }
.ys-unused { margin: 0 0 8px; font-size: .95rem; color: #4b5563; }
.ys-x { text-decoration: line-through; text-decoration-color: #9ca3af; padding: 0 4px; border-radius: 999px; box-shadow: 0 0 0 2px #9ca3af; }
.ys-re { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: #f8fafc; border: 1px solid #e5e7eb; }
.ys-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.ys-eq { font-weight: 700; font-size: 1.2rem; }
.ys-in input { width: 5.5em; min-height: 48px; font-size: 1.3rem; text-align: center; border: 2px solid var(--ink, #1f2937); border-radius: 10px; }
.ys-u { font-weight: 700; }
.ys-back { margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; background: #ecfdf3; border: 2px solid #86efac; line-height: 2; }
.ys-back b { display: block; font-size: .9rem; color: var(--ys-g); }
.ys-fin { font-weight: 700; color: var(--ys-g); }
@media (max-width: 420px) { .ys-p { font-size: 1.05rem; } .ys-tp { font-size: .78rem; min-width: 3em; } }
