/* jpmap（日本地図）。海＝青の グラデーションと 波、陸＝地方の 色＋紙の 質感＋かげ、県境＝白と 茶の 2本線、海岸＝こい 青。
   光る ふちどり＝きいろ（ふつう）・みどり（せいかい）・赤（まちがい）。字は 16px 以上（地図の 上の 小さい 字を のぞく） */
.jm { font-size: 1.05rem; --jm-y: #f59e0b; --jm-ok: #10b981; --jm-ng: #ef4444; }
.jm [hidden] { display: none !important; }
.jm-wait { color: var(--sub, #4b5563); padding: 40px 0; text-align: center; }
.jm-ask { background: linear-gradient(180deg, #fff8e6, #fffdf6); border: 2px solid var(--orange, #f59e0b); border-radius: 16px; padding: 8px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(245, 158, 11, .12); }
.jm-q { font-weight: 700; margin: 0; font-size: 1.12rem; }
.jm-q b { font-size: 1.3rem; color: #b45309; }
.jm-qn { display: inline-block; font-size: .85rem; background: var(--orange, #f59e0b); color: #fff; border-radius: 999px; padding: 0 10px; margin-right: 8px; vertical-align: 3px; }
.jm-tabs { display: flex; gap: 6px; margin-bottom: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.jm-tab { flex: 0 0 auto; min-height: 46px; padding: 2px 13px; border: 2px solid var(--line, #e5e7eb); background: #fff; border-radius: 999px; font-weight: 700; font-size: .95rem; color: var(--ink, #1f2937); cursor: pointer; line-height: 1.25; }
.jm-tab rt { font-size: .55em; }
.jm-tab[aria-pressed="true"] { background: #1e5b80; border-color: #1e5b80; color: #fff; }
.jm-tab[aria-pressed="true"] rt { color: #dbeafe; }

/* 地図 */
.jm-stage { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 20px rgba(30, 91, 128, .18), inset 0 0 0 1px rgba(30, 91, 128, .15); background: #c3e3f3; }
.jm-svg { width: 100%; height: auto; display: block; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.jm-grat { fill: none; stroke: #7fb6d6; stroke-width: .6; stroke-dasharray: 3 4; opacity: .55; vector-effect: non-scaling-stroke; pointer-events: none; }
.jm-nb { fill: #ece6d6; stroke: #b9ad92; stroke-width: .7; vector-effect: non-scaling-stroke; pointer-events: none; }
.jm-frame { stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.jm-shadow { fill: #6b8aa0; pointer-events: none; }
.jm-nop { pointer-events: none; }
.jm-pref { stroke: none; cursor: pointer; transition: fill .3s; }
.jm-pref:hover { filter: brightness(1.06); }
.jm-pref.jm-empty { fill: #fffdf7; }
.jm-pref.jm-mute { cursor: default; }
.jm-pref.jm-placed, .jm-pref.jm-painted { animation: jm-in .45s ease-out; }
.jm-lake { fill: #a9d6ee; stroke: #5d97ba; stroke-width: .5; vector-effect: non-scaling-stroke; pointer-events: none; }
.jm-bd-w { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.jm-bd { fill: none; stroke: #8a7a5c; stroke-width: .8; stroke-dasharray: 4 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.jm-coast { fill: none; stroke: #2f6f94; stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.jm-islet { fill: none; stroke: #2f6f94; stroke-width: 1.2; stroke-dasharray: 2.5 2; vector-effect: non-scaling-stroke; }
.jm-cap { pointer-events: none; }
.jm-cap-o { fill: #fff; stroke: #7f1d1d; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.jm-cap-i { fill: #b91c1c; }
.jm-cap.on .jm-cap-o { stroke: #b91c1c; stroke-width: 2.4; }
.jm-cmp-bg { fill: rgba(255, 255, 255, .85); stroke: #1e5b80; stroke-width: 1.2; }
.jm-cmp-n { fill: #c0392b; }
.jm-cmp-s { fill: #fff; stroke: #1e5b80; stroke-width: .8; }
.jm-sc-a { fill: #1e5b80; }
.jm-sc-b { fill: #fff; stroke: #1e5b80; stroke-width: 1; vector-effect: non-scaling-stroke; }
.jm-gl { fill: rgba(253, 224, 71, .3); stroke: var(--jm-y); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; animation: jm-in .3s ease-out both; }
.jm-gu { fill: none; stroke: #fde047; stroke-width: 10; vector-effect: non-scaling-stroke; stroke-linejoin: round; opacity: .8; animation: jm-pulse 1.8s ease-in-out infinite; }
.jm-gl.ok { fill: rgba(16, 185, 129, .22); stroke: var(--jm-ok); } .jm-gu.ok { stroke: #6ee7b7; }
.jm-gl.ng { fill: rgba(239, 68, 68, .16); stroke: var(--jm-ng); } .jm-gu.ng { stroke: #fca5a5; }
.jm-gl.dim { fill: rgba(253, 224, 71, .18); stroke-dasharray: 6 4; stroke-width: 2.4; } .jm-gu.dim { opacity: .45; }
.jm-ghost { opacity: .92; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .3)); transition: opacity .25s; pointer-events: none; }
.jm-ghost path { stroke: #7a5b2e; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.jm-shake { animation: jm-shake .45s; }
@keyframes jm-pulse { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }
@keyframes jm-in { from { opacity: .3; } to { opacity: 1; } }
@keyframes jm-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* 地図の 上の 字（HTML） */
.jm-labs { position: absolute; inset: 0; pointer-events: none; }
.jm-lab { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; }
.jm-lab.l { transform: translate(-15%, -50%); } .jm-lab.r { transform: translate(-85%, -50%); }
.jm-lab.left { transform: none; }
.jm-lab > span { display: inline-block; line-height: 1.3; }
.jm-t-pf > span { font-size: 11px; font-weight: 700; color: #3b2f1a; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.jm-t-pf rt { font-size: 7px; }
.jm-t-fr > span { font-size: 11px; color: #1e5b80; font-weight: 700; background: rgba(255, 255, 255, .7); border-radius: 6px; padding: 0 5px; }
.jm-t-fr rt { font-size: 7px; }
.jm-t-n > span { font-size: 11px; font-weight: 700; color: #c0392b; }
.jm-t-sc > span { font-size: 11px; color: #1e5b80; font-weight: 700; text-shadow: 0 0 2px #fff; }
.jm-lab.jm-t-sel { transform: translate(-50%, -128%); }
.jm-lab.jm-t-sel.l { transform: translate(-15%, -128%); } .jm-lab.jm-t-sel.r { transform: translate(-85%, -128%); }
.jm-t-sel > span { background: #fff; border: 2.5px solid var(--jm-y); border-radius: 999px; padding: 0 10px; font-weight: 700; font-size: .95rem; color: #78350f; box-shadow: 0 4px 10px rgba(120, 53, 15, .18); animation: jm-pop .4s cubic-bezier(.34, 1.56, .64, 1) both; }
.jm-t-sel rt { font-size: .58em; color: #92400e; }
.jm-t-sel.ok > span { border-color: var(--jm-ok); color: #065f46; }
.jm-t-sel.ng > span { border-color: var(--jm-ng); color: #991b1b; }
@keyframes jm-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
.jm-cred { margin-left: auto; text-align: right; font-size: 11px; line-height: 1.3; color: #4b6b80; }
.jm-zoomed .jm-inset, .jm-zoomed .jm-isin { display: none; }

/* 下の 文・ボタン */
.jm-read { background: #f3f8fc; border-radius: 14px; padding: 8px 14px; margin-top: 10px; min-height: 52px; }
.jm-read p { margin: 4px 0; }
.jm-nm { font-size: 1.45rem; font-weight: 700; color: #1e5b80; }
.jm-nm rt { font-size: .5em; }
.jm-sub { font-size: .95rem; color: var(--sub, #4b5563); }
.jm-res { font-weight: 700; color: var(--teal-d, #0f8a72); }
.jm-res.ng { color: #c2410c; }
.jm-chip { display: inline-block; border-radius: 999px; padding: 0 10px; font-size: .9rem; font-weight: 700; color: #1f2937; }
.jm-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 4px; }
.jm-acts:empty { display: none; }
.jm-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; }
.jm-b[aria-pressed="true"] { background: #eaf1ff; border-color: #2563eb; }
.jm-b:disabled { opacity: .45; cursor: default; }
.jm-go { border: 0; background: linear-gradient(180deg, #14a386, var(--teal-d, #0f8a72)); color: #fff; box-shadow: 0 3px 0 #0b6b58; }
.jm-pal { margin-bottom: 8px; }
.jm-pal, .jm-legend { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: 100%; }
.jm-chipb { min-height: 46px; padding: 2px 12px 2px 8px; border: 2px solid var(--line, #e5e7eb); background: #fff; border-radius: 999px; font-weight: 700; font-size: .95rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink, #1f2937); }
.jm-chipb i, .jm-sw { display: inline-block; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .15); vertical-align: -3px; margin-right: 4px; }
.jm-chipb[aria-pressed="true"] { border-color: #1e5b80; box-shadow: 0 0 0 2px #1e5b80 inset; }
.jm-legend span { font-size: .9rem; font-weight: 700; padding: 2px 6px; }
.jm-tbl { border-collapse: collapse; margin: 4px 0; }
.jm-tbl th, .jm-tbl td { padding: 2px 10px; border-bottom: 1px dashed #c7d2fe; text-align: left; font-size: .95rem; }
.jm-tbl th { font-weight: 400; white-space: nowrap; }
.jm-tbl td.ok { color: var(--teal-d, #0f8a72); font-weight: 700; }
.jm-tbl td.ng { color: #c2410c; font-weight: 700; }

/* はめこむ 形 */
.jm-tray { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; padding: 10px; background: #f7f3ea; border: 2px dashed #e2d6bd; border-radius: 16px; }
.jm-pc { width: 92px; min-height: 92px; padding: 6px 4px 4px; background: #fff; border: 2px solid #e5e0d2; border-radius: 14px; cursor: grab; touch-action: none; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 0 #e2d6bd; }
.jm-pc[aria-pressed="true"] { border-color: #2563eb; background: #eaf1ff; box-shadow: 0 3px 0 #93c5fd; }
.jm-pc.jm-drag { opacity: .35; }
.jm-pcs { width: 64px; height: 56px; overflow: hidden; filter: drop-shadow(1px 2px 1.5px rgba(29, 78, 110, .35)); }
.jm-pcp { stroke: #6b5a3a; stroke-width: 1; vector-effect: non-scaling-stroke; }
.jm-pcn { font-size: .85rem; font-weight: 700; line-height: 1.2; color: var(--ink, #1f2937); }
.jm-pcn rt { font-size: .6em; }
@media (prefers-reduced-motion: reduce) { .jm-gu, .jm-gl, .jm-t-sel > span, .jm-pref { animation: none !important; transition: none !important; } }
.jm-foot { display: flex; align-items: center; gap: 10px; margin: 4px 4px 0; }
.jm-cmp { display: flex; align-items: center; gap: 2px; }
.jm-cmp span { font-size: 12px; font-weight: 700; color: #c0392b; white-space: nowrap; }
.jm-scl { display: flex; flex-direction: column; gap: 1px; }
.jm-scl i { display: block; height: 6px; border: 1.5px solid #1e5b80; background: linear-gradient(90deg, #1e5b80 50%, #fff 50%); border-radius: 1px; }
.jm-scl span { font-size: 10px; font-weight: 700; color: #1e5b80; text-shadow: 0 0 2px #fff, 0 0 2px #fff; white-space: nowrap; }
.jm-many .jm-gl { stroke-width: 1.6; }
