/* sci-zukan（理科の 図かん）。光る ふちどり＝きいろ（ふつう）・みどり（せいかい）・赤（まちがい）。あしの つけね＝オレンジの 点。字は 16px 以上 */
.zk { font-size: 1.05rem; --zk-y: #f59e0b; --zk-yl: #fde047; --zk-ok: #10b981; --zk-ng: #ef4444; }
.zk [hidden] { display: none !important; }
.zk-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.zk-tab { min-height: 46px; padding: 2px 16px; border: 2px solid var(--line, #e5e7eb); background: #fff; border-radius: 999px; font-weight: 700; font-size: 1rem; color: var(--ink, #1f2937); cursor: pointer; transition: background .2s, color .2s; }
.zk-tab[aria-pressed="true"] { background: var(--ink, #1f2937); color: #fff; border-color: var(--ink, #1f2937); }
.zk-ask { background: linear-gradient(180deg, #fff8e6, #fffdf6); border: 2px solid var(--orange, #f59e0b); border-radius: 16px; padding: 8px 14px 10px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(245, 158, 11, .12); }
.zk-q { font-weight: 700; margin: 0 0 6px; font-size: 1.1rem; }
.zk-qn { display: inline-block; font-size: .85rem; background: var(--orange, #f59e0b); color: #fff; border-radius: 999px; padding: 0 10px; margin-right: 8px; vertical-align: 2px; }
.zk-gb { display: flex; flex-wrap: wrap; gap: 8px; }
.zk-gb:empty { display: none; }
.zk-g, .zk-b { min-height: 50px; min-width: 50px; padding: 4px 18px; border: 2px solid var(--ink, #1f2937); background: #fff; border-radius: 14px; font-weight: 700; font-size: 1.05rem; color: var(--ink, #1f2937); cursor: pointer; transition: transform .12s, background .2s; }
.zk-g:active, .zk-b:active { transform: scale(.96); }
.zk-g:disabled { opacity: .45; cursor: default; }
.zk-g[aria-pressed="true"] { opacity: 1; background: #eaf1ff; border-color: #2563eb; }
.zk-go { border: 0; background: linear-gradient(180deg, #14a386, var(--teal-d, #0f8a72)); color: #fff; box-shadow: 0 3px 0 #0b6b58; }
.zk-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 10px; }
.zk-acts:empty { margin: 4px 0; }
.zk-read { background: #f3f6ff; border-radius: 14px; padding: 8px 14px; min-height: 56px; }
.zk-read p { margin: 4px 0; }
.zk-res { font-weight: 700; color: var(--teal-d, #0f8a72); }
.zk-res.ng { color: #c2410c; }
.zk-note { font-size: 1rem; color: var(--sub, #4b5563); }
.zk-nm { font-size: 1.35rem; font-weight: 700; color: #92400e; }
.zk-big { font-size: 1.2rem; }
.zk-big b { color: #b45309; }
.zk-sum b { font-size: 1.25rem; color: var(--teal-d, #0f8a72); }
.zk-tbl { border-collapse: collapse; margin: 4px 0 6px; }
.zk-tbl th, .zk-tbl td { padding: 2px 10px; border-bottom: 1px dashed #c7d2fe; text-align: left; }
.zk-tbl th { font-weight: 400; color: var(--sub, #4b5563); }
.zk-tbl td.ok { color: var(--teal-d, #0f8a72); font-weight: 700; }
.zk-tbl td.ng { color: #c2410c; font-weight: 700; }
.zk-pair { display: flex; gap: 8px; }
.zk-cell { flex: 1 1 0; min-width: 0; }
.zk-ttl { text-align: center; font-weight: 700; margin: 0 0 4px; }

/* 絵 */
.zk-stage { position: relative; margin: 4px auto; border-radius: 16px; overflow: hidden; background: #fefefe; box-shadow: inset 0 0 0 1px #eef0ea; }
.zk-svg { width: 100%; height: auto; display: block; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.zk-bg { fill: #fefefe; }
.zk-nop { pointer-events: none; }
.zk-hp, .zk-hp * { fill: transparent !important; stroke: transparent !important; stroke-width: 16px !important; vector-effect: non-scaling-stroke; pointer-events: all !important; cursor: pointer; }
.zk-gl, .zk-gl * { fill: rgba(253, 224, 71, .28) !important; stroke: var(--zk-y) !important; stroke-width: 3px !important; vector-effect: non-scaling-stroke; stroke-linejoin: round; animation: zk-in .35s ease-out both; }
.zk-gu, .zk-gu * { fill: none !important; stroke: var(--zk-yl) !important; stroke-width: 12px !important; vector-effect: non-scaling-stroke; stroke-linejoin: round; animation: zk-pulse 1.8s ease-in-out infinite; }
.zk-gl.dim, .zk-gl.dim * { fill: rgba(253, 224, 71, .16) !important; stroke: rgba(245, 158, 11, .75) !important; stroke-width: 2px !important; stroke-dasharray: 6 4; }
.zk-gl.ok, .zk-gl.ok * { fill: rgba(16, 185, 129, .22) !important; stroke: var(--zk-ok) !important; }
.zk-gu.ok, .zk-gu.ok * { stroke: #6ee7b7 !important; }
.zk-gl.ng, .zk-gl.ng * { fill: rgba(239, 68, 68, .18) !important; stroke: var(--zk-ng) !important; }
.zk-gu.ng, .zk-gu.ng * { stroke: #fca5a5 !important; }
@keyframes zk-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes zk-in { from { opacity: 0; } to { opacity: 1; } }

/* ふきだしと 線 */
.zk-labs { position: absolute; inset: 0; pointer-events: none; }
.zk-lab { position: absolute; transform: translateY(-50%); white-space: nowrap; }
.zk-lab > span { display: inline-block; background: #fff; border: 2.5px solid var(--zk-y); border-radius: 999px; padding: 2px 13px; font-weight: 700; font-size: 1rem; line-height: 1.35; color: #78350f;
  box-shadow: 0 4px 10px rgba(120, 53, 15, .16), inset 0 -3px 0 rgba(253, 224, 71, .35); animation: zk-pop .42s cubic-bezier(.34, 1.56, .64, 1) both; }
.zk-lab ruby rt { font-size: .58em; color: #92400e; }
.zk-lab.ok > span { border-color: var(--zk-ok); color: #065f46; box-shadow: 0 4px 10px rgba(6, 95, 70, .16), inset 0 -3px 0 rgba(110, 231, 183, .4); }
.zk-lab.ng > span { border-color: var(--zk-ng); color: #991b1b; box-shadow: 0 4px 10px rgba(153, 27, 27, .14), inset 0 -3px 0 rgba(252, 165, 165, .4); }
@keyframes zk-pop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
.zk-lnu { fill: none; stroke: #fff; stroke-width: 5.5px; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .9; }
.zk-ln { fill: none; stroke: var(--zk-y); stroke-width: 2.5px; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.zk-lnu, .zk-ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: zk-draw .45s .12s ease-out forwards; }
.zk-ln.ok, .zk-dot.ok { stroke: var(--zk-ok); }
.zk-ln.ng, .zk-dot.ng { stroke: var(--zk-ng); }
.zk-dot { fill: #fff; stroke: var(--zk-y); stroke-width: 3px; vector-effect: non-scaling-stroke; animation: zk-in .3s .4s both; }
@keyframes zk-draw { to { stroke-dashoffset: 0; } }

/* 番ごう・つけね */
.zk-mk circle { fill: #2563eb; stroke: #fff; stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.zk-mk text { fill: #fff; font-weight: 700; }
.zk-mk { animation: zk-in .3s ease-out both; }
.zk-mk.rt circle { fill: #f97316; stroke: #fff; stroke-width: 2.5px; }

/* あし（はずした あし・ならべる ところ） */
.zk-tray { fill: #f7f3ea; stroke: #e2d6bd; stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-dasharray: 7 5; }
.zk-stko, .zk-stko * { fill: none !important; stroke: rgba(146, 64, 14, .35) !important; stroke-width: 1.2px !important; vector-effect: non-scaling-stroke; }
.zk-stko.ng, .zk-stko.ng * { stroke: var(--zk-ng) !important; stroke-width: 2.5px !important; stroke-dasharray: 5 3; }
.zk-stk.on .zk-stko, .zk-stk.on .zk-stko * { stroke: transparent !important; }
.zk-mask, .zk-mask * { fill: #fff !important; stroke: #fff; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .zk *, .zk-lab > span { animation: none !important; } .zk-lnu, .zk-ln { stroke-dashoffset: 0; } }
