/* ko-bun（文の くみたて）。字は Klee One（国語ページで よみこむ）→ 教科書体 → 丸ゴシック。
   色：しゅご＝青・じゅつご＝オレンジ・くわしく する ことば＝むらさき・こそあど＝ピンク・じょし＝むらさきの 字・正かい＝みどり・まちがい＝赤。字は 16px 以上 */
.kb { --kf: "Klee One", "UD Digi Kyokasho NK-R", "UD デジタル 教科書体 NK-R", "UD Digi Kyokasho N-R", "UD デジタル 教科書体 N-R", "YuKyokasho", "游教科書体", "HGKyokashotai", "HG教科書体", "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "Zen Maru Gothic", "M PLUS Rounded 1c", "BIZ UDGothic", "Noto Sans JP", sans-serif;
  --o: #f59e0b; --od: #b45309; --ok: #10b981; --okd: #047857; --ng: #ef4444; --ngd: #b91c1c;
  --s: #2563eb; --sl: #e8f0ff; --p: #ea580c; --pl: #fff1e6; --m: #7c3aed; --ml: #f3edff; --k: #db2777; --kl: #fde9f3;
  --fs: 1.25rem; font-size: 1.05rem; position: relative; color: var(--ink, #1f2937); }
.kb.kb-big { --fs: 1.55rem; }
.kb [hidden] { display: none !important; }
.kb button { font-family: inherit; -webkit-tap-highlight-color: transparent; color: inherit; }
.kb ruby, .kb .kb-ct, .kb .kb-card, .kb .kb-chr, .kb .kb-row, .kb .kb-ta, .kb .kb-bc, .kb .kb-cw, .kb .kb-out, .kb .kb-s1, .kb .kb-s2, .kb .kb-q, .kb .kb-cap { font-family: var(--kf); }
.kb rt { font-size: .5em; font-weight: 500; font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; }
.kb svg { display: block; }

/* 問い */
.kb-qbox { display: flex; gap: 8px; align-items: flex-start; background: linear-gradient(180deg, #fff8e6, #fffdf6); border: 2px solid var(--o); border-radius: 16px; padding: 8px 8px 8px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(245, 158, 11, .12); }
.kb-q { flex: 1; margin: 0; font-weight: 600; font-size: 1.12rem; line-height: 1.8; }
.kb-big .kb-q { font-size: 1.25rem; }
.kb-qs { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #bfdbfe; background: #fff; color: var(--s) !important; padding: 7px; cursor: pointer; }
.kb-qs svg { width: 100%; height: 100%; }
.kb-dots { display: flex; justify-content: center; gap: 6px; margin: -2px 0 8px; }
.kb-dots:empty { display: none; }
.kb-dots i { font-style: normal; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; background: #e5e7eb; color: #6b7280; font-size: .78rem; font-weight: 800; text-align: center; transition: all .2s; }
.kb-dots i.on { background: var(--o); color: #fff; transform: scale(1.12); }
.kb-dots i.ok { background: var(--ok); color: #fff; }
.kb-note { color: #6b7280; }

/* よそう */
.kb-guess { background: #fff; border: 2px dashed #f59e0b; border-radius: 16px; padding: 8px 12px 10px; margin-bottom: 12px; }
.kb-gq { margin: 0 0 8px; font-weight: 700; line-height: 1.7; }
.kb-gt { display: inline-block; margin-right: 8px; padding: 0 10px; border-radius: 999px; background: var(--o); color: #fff; font-size: .85rem; vertical-align: .1em; }
.kb-gb, .kb-chs { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-chs:not(:empty) { margin-top: 12px; justify-content: center; }
.kb-g { min-height: 50px; min-width: 64px; padding: 4px 16px; border: 2px solid #cbd5e1; background: #fff; border-radius: 12px; font-weight: 700; font-size: 1.05rem; cursor: pointer; box-shadow: 0 2px 0 #cbd5e1; }
.kb-g:disabled { opacity: .5; cursor: default; }
.kb-g.ok { opacity: 1; background: #d1fae5; border-color: var(--ok); box-shadow: 0 2px 0 #6ee7b7; }
.kb-g.ng { opacity: 1; background: #fee2e2; border-color: var(--ng); }
.kb-gr { margin: 8px 0 0; font-weight: 700; color: var(--od); }
.kb-gr.fin { color: var(--okd); }
.kb-gok { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: var(--ok); color: #fff; font-size: .85rem; }
.kb-body.kb-wait { opacity: .35; pointer-events: none; filter: grayscale(.4); }
.kb-body.kb-in { animation: kb-in .35s ease-out; }

/* 文節の カード */
.kb-wrap { position: relative; padding: 46px 6px 10px; border-radius: 18px; background: linear-gradient(180deg, #fbfaf6, #fff); border: 2px solid #ece6d6; }
.kb-line { display: flex; flex-wrap: wrap; gap: 46px 8px; align-items: flex-end; justify-content: center; position: relative; z-index: 2; }
.kb-ch { position: relative; min-height: 54px; min-width: 48px; padding: 6px 12px; border: 2px solid #d9d2bf; border-radius: 14px; cursor: pointer; font-size: var(--fs); font-weight: 600; line-height: 1.5;
  background: linear-gradient(180deg, #fff 0%, #fffdf7 60%, #f8f3e6 100%); box-shadow: 0 3px 0 #e3dbc6, 0 5px 10px rgba(80, 60, 20, .1); transition: transform .15s, border-color .15s, background .2s; }
.kb-ch:active { transform: translateY(2px); }
.kb-ch.rs { border-color: var(--s); background: linear-gradient(180deg, #f4f8ff, var(--sl)); box-shadow: 0 3px 0 #a9c3fb; color: #1e3a8a; }
.kb-ch.rp { border-color: var(--p); background: linear-gradient(180deg, #fff8f1, var(--pl)); box-shadow: 0 3px 0 #fdba8c; color: #9a3412; }
.kb-ch.rf { border-color: var(--m); background: linear-gradient(180deg, #faf7ff, var(--ml)); box-shadow: 0 0 0 4px rgba(124, 58, 237, .18), 0 3px 0 #c4b5fd; color: #5b21b6; animation: kb-glowm 1.2s ease-in-out infinite alternate; }
.kb-ch.rk { border-color: var(--k); background: linear-gradient(180deg, #fff7fb, var(--kl)); box-shadow: 0 0 0 4px rgba(219, 39, 119, .16), 0 3px 0 #f9a8d4; color: #9d174d; }
.kb-ch.rt { border-color: var(--ok); background: linear-gradient(180deg, #f3fdf8, #dcf7ea); box-shadow: 0 3px 0 #a7e9cc; color: var(--okd); }
.kb-ch.ng { border-color: var(--ng); background: linear-gradient(180deg, #fff6f6, #ffe1e1); }
.kb-ch.sel { border-color: var(--o); background: linear-gradient(180deg, #fffaf0, #ffefc9); transform: translateY(-5px) rotate(-1.5deg); box-shadow: 0 0 0 4px rgba(245, 158, 11, .3), 0 8px 14px rgba(180, 83, 9, .2); }
.kb-ch.kb-g1, .kb-ch.kb-g2 { outline: 3px dashed; outline-offset: 3px; }
.kb-ch.kb-g1 { outline-color: rgba(37, 99, 235, .45); }
.kb-ch.kb-g2 { outline-color: rgba(13, 148, 136, .55); }
.kb-ch[data-n]::before { content: attr(data-n); position: absolute; top: -14px; left: -12px; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; background: #334155; color: #fff; font-size: .9rem; text-align: center; font-family: sans-serif; }
.kb-key { display: flex; justify-content: center; gap: 16px; margin-top: 8px; font-size: .9rem; font-weight: 700; }
.kb-key span::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; border: 2px solid; }
.kb-key .s { color: var(--s); } .kb-key .p { color: var(--p); }
.kb-key .s::before { background: var(--sl); } .kb-key .p::before { background: var(--pl); }
.kb-pt { color: var(--m); font-weight: 700; }
.kb-ord.hide .kb-pt { display: none; }

/* やじるし */
.kb-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 3; }
.kb-ap { fill: none; stroke-width: 4; stroke-linecap: round; }
.kb-arc .kb-ap { stroke: #64748b; } .kb-arc .kb-ah, .kb-arc .kb-ad { fill: #64748b; }
.kb-arc.ok .kb-ap { stroke: var(--s); } .kb-arc.ok .kb-ah, .kb-arc.ok .kb-ad { fill: var(--s); }
.kb-shushoku .kb-arc.ok .kb-ap { stroke: var(--m); } .kb-shushoku .kb-arc.ok .kb-ah, .kb-shushoku .kb-arc.ok .kb-ad { fill: var(--m); }
.kb-refer .kb-arc.ok .kb-ap { stroke: var(--k); } .kb-refer .kb-arc.ok .kb-ah, .kb-refer .kb-arc.ok .kb-ad { fill: var(--k); }
.kb-arc.ok.d1 .kb-ap { stroke: #0d9488; } .kb-arc.ok.d1 .kb-ah, .kb-arc.ok.d1 .kb-ad { fill: #0d9488; }
.kb-arc.ok.g1 .kb-ap { stroke: #0d9488; } .kb-arc.ok.g1 .kb-ah, .kb-arc.ok.g1 .kb-ad { fill: #0d9488; }
.kb-arc.ng .kb-ap, .kb-arc.bad .kb-ap { stroke: var(--ng); stroke-dasharray: 8 6; } .kb-arc.ng .kb-ah, .kb-arc.ng .kb-ad, .kb-arc.bad .kb-ah, .kb-arc.bad .kb-ad { fill: var(--ng); }
.kb-arc .kb-ap { stroke-dasharray: 400; stroke-dashoffset: 400; animation: kb-draw .5s ease-out forwards; }
.kb-arc.ng .kb-ap, .kb-arc.bad .kb-ap { animation: none; stroke-dashoffset: 0; }
.kb-alb { fill: #fff; stroke: currentColor; stroke-width: 2; }
.kb-arc.ok .kb-alb { stroke: var(--s); } .kb-arc.g1 .kb-alb { stroke: #0d9488; } .kb-arc.bad .kb-alb { stroke: var(--ng); }
.kb-al { font-size: 13px; font-weight: 800; fill: #1e3a8a; font-family: sans-serif; }
.kb-arc.bad .kb-al { fill: var(--ngd); }

/* カード（build・split・tsunagi） */
.kb-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 66px; padding: 12px 10px; margin-top: 12px; border-radius: 18px;
  background: linear-gradient(180deg, #f6e7c8, #efd9ad); box-shadow: inset 0 2px 6px rgba(120, 80, 20, .25); border: 1px solid #e0c48e; }
.kb-pool.kb-empty { display: none; }
.kb-card { position: relative; min-height: 54px; min-width: 54px; padding: 6px 14px; border: 2px solid #d9d2bf; border-radius: 14px; cursor: pointer; font-size: var(--fs); font-weight: 600; line-height: 1.5;
  background: linear-gradient(180deg, #fff, #fffdf7 60%, #f8f3e6); box-shadow: 0 3px 0 #e3dbc6, 0 5px 10px rgba(80, 60, 20, .12); transition: transform .15s; }
.kb-card:active { transform: translateY(2px); }
.kb-card.kb-dot { min-width: 54px; font-size: calc(var(--fs) * 1.3); line-height: 1; color: #b91c1c; }
.kb-card.ok { border-color: var(--ok); background: linear-gradient(180deg, #f3fdf8, #dcf7ea); box-shadow: 0 3px 0 #a7e9cc; }
.kb-card.ng { border-color: var(--ng); background: linear-gradient(180deg, #fff6f6, #ffe1e1); box-shadow: 0 3px 0 #fbb4b4; }
.kb-card.sel { border-color: var(--o); background: linear-gradient(180deg, #fffaf0, #ffefc9); transform: translateY(-4px); box-shadow: 0 0 0 4px rgba(245, 158, 11, .3); }
.kb-card.done { border-color: var(--ok); }
.kb-role { font-family: inherit; font-size: .72rem; font-weight: 700; line-height: 1.4; color: var(--okd); max-width: 9em; margin-top: 2px; }

/* build */
.kb-pic { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 72px; padding: 8px 12px; margin-bottom: 10px; border-radius: 16px; background: repeating-linear-gradient(45deg, #f8fafc 0 10px, #f1f5f9 10px 20px); border: 2px solid #e2e8f0; }
.kb-pic img { max-height: 110px; max-width: 46%; object-fit: contain; border-radius: 10px; }
.kb-cap { font-weight: 600; line-height: 1.6; }
.kb-bed { position: relative; display: flex; align-items: center; min-height: 86px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(#fffef8, #fffef8) padding-box, repeating-linear-gradient(90deg, #e6d3ab 0 10px, transparent 10px 16px) border-box; border: 3px solid transparent; box-shadow: inset 0 -16px 0 -14px #e6d3ab; }
.kb-sent { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 58px; }
.kb-ph { color: #b7a77f; font-weight: 700; }
.kb-sent.kb-has .kb-ph { display: none; }
.kb-tail { flex: none; font-size: 2rem; font-weight: 900; color: #cbd5e1; letter-spacing: .1em; opacity: 0; transition: opacity .2s; }
.kb-bed.kb-open .kb-tail { opacity: 1; color: var(--o); animation: kb-dots 1s steps(2) infinite; }
.kb-bed.kb-fin { background: linear-gradient(#f0fdf7, #f0fdf7) padding-box, linear-gradient(90deg, var(--ok), var(--ok)) border-box; }
.kb-bed.kb-reading { box-shadow: 0 0 0 5px rgba(59, 130, 246, .25); }

/* 字ごと（fix・punct） */
.kb-paper { position: relative; padding: 14px 12px; border-radius: 16px; line-height: 1; background: #fffdf6; border: 2px solid #ece0c2;
  background-image: repeating-linear-gradient(180deg, transparent 0 63px, #efe3c6 63px 65px); box-shadow: 0 2px 0 #eadfc3, 0 6px 14px rgba(120, 90, 30, .08); }
.kb-paper.ok { border-color: var(--ok); }
.kb-seg { display: inline-flex; flex-wrap: wrap; margin: 4px 10px 4px 0; padding: 2px; border-radius: 12px; border: 2px solid transparent; transition: all .3s; }
.kb-seg.kb-hint { border: 2px dashed var(--o); background: #fffbeb; }
.kb-chr { position: relative; min-width: 34px; min-height: 52px; padding: 2px 1px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: calc(var(--fs) * 1.08); font-weight: 600; line-height: 1.6; }
.kb-chr:hover { background: #fef3c7; }
.kb-chr.ng { background: #fee2e2; color: var(--ngd); }
.kb-chr.ok { background: #d1fae5; color: var(--okd); }
.kb-was { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .62em; line-height: 1; padding: 1px 4px; border-radius: 6px; background: #fee2e2; color: var(--ngd); text-decoration: line-through; white-space: nowrap; }
.kb-flip { animation: kb-flip .5s; }
.kb-ok2 { display: block; margin-top: 4px; font-family: var(--kf); font-size: 1.1em; }
.kb-pp { display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: 12px; }
.kb-pp .kb-chr { min-width: 28px; padding: 2px 0; }
.kb-sp { width: 12px; }
.kb-mk { min-width: 26px; min-height: 52px; padding: 0; border: 0; border-radius: 8px; background: #fef3c7; color: #b91c1c; font-size: calc(var(--fs) * 1.1); font-weight: 900; font-family: var(--kf); line-height: 1.6; cursor: pointer; animation: kb-pop .3s; box-shadow: inset 0 -3px 0 #fcd34d; }
.kb-mk.ng { background: #fee2e2; box-shadow: inset 0 -3px 0 var(--ng); animation: kb-shake .35s 2; }
.kb-chr.kb-want::after, .kb-chr.kb-wantl::before { content: ""; position: absolute; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--o) 0 4px, transparent 4px 7px); }
.kb-chr.kb-want::after { right: -3px; } .kb-chr.kb-wantl::before { left: -3px; }
.kb-pal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; position: sticky; top: 0; z-index: 4; background: rgba(255, 255, 255, .92); padding: 4px 0; }
.kb-pb { width: 54px; height: 54px; border-radius: 14px; border: 2px solid #cbd5e1; background: #fff; cursor: pointer; box-shadow: 0 3px 0 #cbd5e1; }
.kb-pm { font-family: var(--kf); font-size: 1.7rem; font-weight: 900; line-height: 1; color: #b91c1c; }
.kb-pb.on { border-color: var(--o); background: #fff7e6; box-shadow: 0 0 0 4px rgba(245, 158, 11, .3), 0 3px 0 var(--o); transform: translateY(-2px); }
.kb-palh { flex: 1 1 100%; font-size: .9rem; color: var(--sub, #4b5563); font-weight: 600; }

/* いみの 絵 */
.kb-means { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.kb-means.n1 { grid-template-columns: 1fr; }
.kb-mean { position: relative; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; border-radius: 14px; text-align: center;
  background: repeating-linear-gradient(45deg, #f8fafc 0 10px, #f1f5f9 10px 20px); border: 2px dashed #cbd5e1; }
.kb-mean.one { margin-top: 12px; }
.kb-mean img { max-width: 100%; max-height: 90px; object-fit: contain; border-radius: 8px; }
.kb-mq { font-size: 2rem; font-weight: 900; color: #cbd5e1; }
.kb-mean.ok { border: 2px solid var(--ok); background: linear-gradient(180deg, #f0fdf7, #d1fae5); color: var(--okd); animation: kb-pop .35s; }
.kb-mean.ng { border: 2px solid var(--ng); background: linear-gradient(180deg, #fff7ed, #ffe4e6); color: var(--ngd); animation: kb-wob .5s; }
.kb-mean.cur { box-shadow: 0 0 0 4px rgba(16, 185, 129, .25); }
.kb-mark { position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; }
.kb-mark svg { width: 100%; height: 100%; }

/* refer */
.kb-out { margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: #f8fafc; border: 2px dashed #cbd5e1; font-size: var(--fs); font-weight: 600; line-height: 2; }
.kb-out:empty { display: none; }
.kb-out.ok { background: #f0fdf7; border: 2px solid var(--ok); }
.kb-out.ng { background: #fff1f2; border: 2px solid var(--ng); }
.kb-ol { display: block; font-family: sans-serif; font-size: .8rem; font-weight: 800; color: #64748b; line-height: 1.4; }
.kb-rep { background: linear-gradient(transparent 40%, #fbcfe8 40%); color: #9d174d; padding: 0 2px; border-radius: 3px; }
.kb-out.ok .kb-rep { background: linear-gradient(transparent 40%, #a7f3d0 40%); color: var(--okd); }

/* tsunagi */
.kb-tsu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-radius: 16px; background: #fffdf6; border: 2px solid #ece0c2; }
.kb-ta { font-size: var(--fs); font-weight: 600; line-height: 1.8; }
.kb-slot { min-width: 90px; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; padding: 2px 12px; border-radius: 12px; border: 3px dashed #94a3b8; color: #94a3b8; font-size: var(--fs); font-weight: 800; font-family: var(--kf); background: #f8fafc; }
.kb-slot.full { border-style: solid; border-color: var(--o); color: var(--od); background: #fff7e6; animation: kb-pop .3s; }
.kb-slot.ok { border-color: var(--ok); color: var(--okd); background: #dcf7ea; }
.kb-slot.ng { border-color: var(--ng); color: var(--ngd); background: #ffe1e1; }
.kb-bs { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-left: 18px; border-left: 4px solid #e2e8f0; }
.kb-bc { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; text-align: left; border-radius: 14px; border: 2px solid #e2e8f0; background: #fff; cursor: pointer; font-size: calc(var(--fs) * .92); font-weight: 600; line-height: 1.6; box-shadow: 0 2px 0 #e2e8f0; }
.kb-bl { flex: none; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; background: #64748b; color: #fff; text-align: center; font-size: .9rem; font-family: sans-serif; }
.kb-want .kb-bc:not(.ok) { border-color: var(--o); background: #fffaf0; animation: kb-glow 1s ease-in-out infinite alternate; }
.kb-bc.ok { border-color: var(--ok); background: #ecfdf5; } .kb-bc.ok .kb-bl { background: var(--ok); }
.kb-bc.cur { box-shadow: 0 0 0 4px rgba(16, 185, 129, .25); }
.kb-bc.ng { border-color: var(--ng); background: #fff1f2; }
.kb-tpool .kb-card { display: flex; flex-direction: column; align-items: center; max-width: 46%; }
.kb-bt { flex: 1; min-width: 0; }

/* style */
.kb-sw { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.kb-swb { min-height: 48px; padding: 2px 12px; white-space: nowrap; border-radius: 999px; border: 2px solid #e5e7eb; background: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; }
.kb-swb.on { background: #fff7e6; border-color: var(--o); color: var(--od); }
.kb-sw.on1 .kb-swb.on { background: #eef4ff; border-color: var(--s); color: #1e40af; }
.kb-knob { position: relative; flex: none; width: 64px; height: 34px; border-radius: 999px; background: var(--o); cursor: pointer; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2); transition: background .25s; }
.kb-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); transition: left .25s; }
.kb-sw.on1 .kb-knob { background: var(--s); } .kb-sw.on1 .kb-knob::after { left: 33px; }
.kb-sw.mixd .kb-knob { background: repeating-linear-gradient(45deg, var(--o) 0 8px, var(--s) 8px 16px); } .kb-sw.mixd .kb-knob::after { left: 18px; }
.kb-doc { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
.kb-row { display: block; width: 100%; text-align: left; min-height: 52px; padding: 8px 8px; border: 0; border-bottom: 1px dashed #e6d3ab; border-radius: 8px; background: transparent; cursor: pointer; font-size: var(--fs); font-weight: 600; line-height: 1.8; }
.kb-end { padding: 0 3px; border-radius: 6px; }
.kb-end.f0 { background: linear-gradient(transparent 35%, #fed7aa 35%); color: #9a3412; }
.kb-end.f1 { background: linear-gradient(transparent 35%, #bfdbfe 35%); color: #1e40af; }
.kb-hunt .kb-row:hover { background: #fffbeb; }
.kb-row.ok { background: #ecfdf5; } .kb-row.ng { background: #fee2e2; }

/* split */
.kb-cut { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; line-height: 1.8; }
.kb-cw { font-size: var(--fs); font-weight: 600; padding: 4px 2px; }
.kb-gap { width: 34px; height: 46px; padding: 8px 5px; border-radius: 10px; border: 2px dashed #94a3b8; background: #fff; color: #64748b; cursor: pointer; }
.kb-gap svg { width: 100%; height: 100%; }
.kb-gap:hover { border-color: var(--o); color: var(--od); }
.kb-gap.ng { border-color: var(--ng); color: var(--ng); background: #fee2e2; }
.kb-split { display: block; animation: kb-pop .4s; }
.kb-s1, .kb-s2 { position: relative; font-size: var(--fs); font-weight: 600; line-height: 2.1; padding: 6px 4px 6px 40px; }
.kb-s1 + .kb-s2 { border-top: 2px dashed #e6d3ab; }
.kb-sn { position: absolute; left: 4px; top: 12px; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; background: #3b5ba9; color: #fff; font-size: .9rem; text-align: center; font-family: sans-serif; }
.kb-rw { background: linear-gradient(transparent 40%, #fde68a 40%); color: inherit; padding: 0 2px; }
.kb-blank { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4em; min-height: 1.6em; padding: 0 6px; border-radius: 10px; border: 3px dashed var(--o); color: #d1d5db; background: #fff7e6; vertical-align: middle; line-height: 1.4; }
.kb-blank.full { border-style: solid; color: inherit; animation: kb-pop .3s; }
.kb-blank.ok { border-color: var(--ok); background: #dcf7ea; color: var(--okd); }
.kb-blank.ng { border-color: var(--ng); background: #ffe1e1; color: var(--ngd); }

/* order */
.kb-ord { display: flex; flex-wrap: wrap; gap: 10px 8px; justify-content: center; padding: 16px 8px; border-radius: 18px; background: linear-gradient(180deg, #eef4ff, #f8fbff); border: 2px solid #c7d7f5; }
.kb-ometer { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px auto 0; width: fit-content; padding: 4px 16px; border-radius: 999px; font-weight: 800; background: #f1f5f9; }
.kb-ometer svg { width: 26px; height: 26px; }
.kb-ometer.ok { background: #d1fae5; color: var(--okd); } .kb-ometer.ng { background: #fee2e2; color: var(--ngd); animation: kb-wob .4s; }
.kb-b.kb-tg { display: flex; margin: 10px auto 0; }
.kb-tg.on { background: var(--ml); border-color: var(--m); color: #5b21b6; }

/* ひとこと・ボタン */
.kb-msg { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; font-weight: 700; line-height: 1.7; position: relative; }
.kb-msg::before { content: ""; position: absolute; top: -9px; left: 26px; border: 9px solid transparent; border-top: 0; }
.kb-msg.ok { background: #ecfdf5; border: 2px solid var(--ok); color: #065f46; } .kb-msg.ok::before { border-bottom-color: var(--ok); }
.kb-msg.ng { background: #fff1f2; border: 2px solid var(--ng); color: #9f1239; } .kb-msg.ng::before { border-bottom-color: var(--ng); }
.kb-msg.info { background: #eef4ff; border: 2px solid #93b4f0; color: #1e3a8a; } .kb-msg.info::before { border-bottom-color: #93b4f0; }
.kb-mi { flex: none; width: 26px; height: 26px; margin-top: 3px; }
.kb-mi svg { width: 100%; height: 100%; }
.kb-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 4px; }
.kb-acts:empty { display: none; }
.kb-go { min-height: 52px; padding: 6px 24px; border: 0; border-radius: 14px; background: var(--teal-d, #0f8a72); color: #fff !important; font-weight: 700; font-size: 1.1rem; cursor: pointer; box-shadow: 0 3px 0 #0a6553; }
.kb-go:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a6553; }
.kb-b { display: inline-flex; align-items: center; gap: 6px; min-height: 50px; padding: 4px 16px; border: 2px solid var(--ink, #1f2937); background: #fff; border-radius: 14px; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.kb-b svg { width: 22px; height: 22px; }
.kb-spk { border-color: var(--s); color: var(--s) !important; }
.kb-shk { animation: kb-shake .3s 1; }
.kb-pop { animation: kb-pop .35s; }

@media (max-width: 480px) {
  .kb { --fs: 1.12rem; }
  .kb-sw { gap: 6px; } .kb-swb { padding: 2px 8px; font-size: .95rem; } .kb-knob { width: 56px; } .kb-sw.on1 .kb-knob::after { left: 25px; } .kb-sw.mixd .kb-knob::after { left: 14px; } .kb.kb-big { --fs: 1.4rem; }
  .kb-ch { padding: 5px 9px; min-height: 50px; }
  .kb-line { gap: 44px 6px; }
  .kb-wrap { padding-top: 44px; }
  .kb-chr { min-width: 28px; }
  .kb-pp .kb-chr { min-width: 24px; }
  .kb-mk { min-width: 22px; }
  .kb-pb { width: 50px; height: 50px; }
  .kb-s1, .kb-s2 { padding-left: 36px; }
}
@keyframes kb-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes kb-pop { from { transform: scale(.88); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes kb-wob { 0%, 100% { transform: none; } 30% { transform: rotate(-2deg); } 60% { transform: rotate(2deg); } }
@keyframes kb-glow { from { box-shadow: 0 0 0 0 rgba(245, 158, 11, .2); } to { box-shadow: 0 0 0 5px rgba(245, 158, 11, .35); } }
@keyframes kb-glowm { from { box-shadow: 0 0 0 2px rgba(124, 58, 237, .15), 0 3px 0 #c4b5fd; } to { box-shadow: 0 0 0 6px rgba(124, 58, 237, .28), 0 3px 0 #c4b5fd; } }
@keyframes kb-draw { to { stroke-dashoffset: 0; } }
@keyframes kb-dots { 50% { opacity: .3; } }
@keyframes kb-flip { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
@keyframes kb-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kb *, .kb-msg { animation: none !important; transition: none !important; } .kb-arc .kb-ap { stroke-dashoffset: 0; } }
/* 小1・2：よそうの ボタンの 字を 大きく（2026-11-14） */
.kb.kb-big .kb-g { font-size: 1.3rem; line-height: 1.6; }
