/* もんすたぁ☆かけっこ v3（2026-10-25）— 足した画面（接頭辞 k3-）。今の css/kkk-adventure20261018.css のあとに読む */
.k3-fam { display: inline-block; min-width: 1.5em; margin-right: 4px; padding: 0 4px; border-radius: 6px; background: var(--fc, #888); color: #fff; font-size: 12px; font-weight: 800; line-height: 1.5; text-align: center; vertical-align: 1px; }
.k3-plus { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 8px; background: #fff1a8; color: #8a5a00; border: 2px solid #e2b21c; font-size: 12px; font-weight: 800; line-height: 1.3; vertical-align: 1px; }
.k3-pic { object-fit: contain; vertical-align: middle; }
.kk-ico.k3-pic { width: 40px; height: 40px; flex: none; }
img.k3-skico { width: 40px; height: 40px; border-radius: 50%; }
.k3-dexc { border-bottom: 5px solid var(--fc, #888) !important; }

/* 章の札 */
.k3-chap { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, rgba(23,52,84,.75), rgba(8,16,30,.94)); animation: k3In .5s ease both; }
.k3-chap.is-out { animation: k3Out .4s ease both; }
.k3-chap__in { text-align: center; color: #fff; padding: 0 20px; }
.k3-chap__in small { display: block; font-size: 16px; font-weight: 800; letter-spacing: .3em; color: var(--kk-yellow); animation: k3Up .7s .1s ease both; }
.k3-chap__in b { display: block; margin-top: 10px; font-size: clamp(24px, 7.6vw, 34px); font-weight: 800; line-height: 1.35; text-shadow: 0 3px 0 #0b1c30, 0 8px 22px rgba(0,0,0,.5); animation: k3Up .7s .35s ease both; }
.k3-chap__in i { display: block; width: 0; height: 3px; margin: 16px auto 0; background: linear-gradient(90deg, transparent, var(--kk-yellow), transparent); animation: k3Line 1s .6s ease forwards; }
@keyframes k3In { from { opacity: 0; } to { opacity: 1; } }
@keyframes k3Out { from { opacity: 1; } to { opacity: 0; } }
@keyframes k3Up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes k3Line { to { width: 220px; } }

/* 手紙・鈴 */
.k3-letter { text-align: left; background: repeating-linear-gradient(180deg, #fffaf0 0 30px, #efe3c8 30px 31px); border: 3px solid #c8a46a; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; max-height: 52vh; overflow: auto; }
.k3-letter h2 { margin: 0 0 8px; font-size: 17px; color: #7a4a1a; }
.k3-letter p { margin: 0; font-size: 15px; line-height: 2; color: #3a2a1a; }
.k3-bell { position: relative; width: 140px; height: 140px; margin: 4px auto 8px; }
.k3-bell img { position: relative; z-index: 1; width: 140px; height: 140px; animation: k3Swing 1.6s ease-in-out infinite; transform-origin: 50% 20%; }
.k3-bell i { position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(circle, rgba(255,240,170,.9), rgba(255,240,170,0) 70%); animation: k3Glow 1.6s ease-in-out infinite; }
@keyframes k3Swing { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes k3Glow { 0%, 100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }

/* 演出 */
.k3-flash { position: absolute; inset: 0; z-index: 70; background: #fff; pointer-events: none; animation: k3Flash .7s ease both; }
@keyframes k3Flash { 0% { opacity: 0; } 25% { opacity: .95; } 100% { opacity: 0; } }
.k3-shake { animation: k3Shake .45s ease; }
@keyframes k3Shake { 0%, 100% { transform: none; } 20% { transform: translate(-6px, 2px); } 40% { transform: translate(6px, -2px); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 0); } }
.k3-memory .kk-cv { filter: sepia(.75) saturate(.8) brightness(.95); }
.k3-memory::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px rgba(60,40,10,.6); z-index: 5; }

/* エンディング */
.k3-credits { position: absolute; inset: 0; z-index: 80; overflow: hidden; background: linear-gradient(180deg, #0f1240, #2a2a6a 60%, #5b3a6a); color: #fff; display: flex; flex-direction: column; align-items: center; }
.k3-credits__roll { width: 100%; padding: 0 20px; text-align: center; animation: k3Roll 34s linear forwards; }
.k3-credits__roll p { margin: 0 0 26px; }
.k3-credits__roll small { display: block; font-size: 13px; color: #c8b8ff; letter-spacing: .1em; }
.k3-credits__roll b { display: block; margin-top: 4px; font-size: 18px; line-height: 1.5; }
.k3-credits__roll p:first-child b { font-size: 26px; color: var(--kk-yellow); }
.k3-credits__end { font-size: 20px; font-weight: 800; color: var(--kk-yellow); }
.k3-credits .kk-btn { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); width: min(280px, 80%); transform: translateX(-50%); }
@keyframes k3Roll { from { transform: translateY(100vh); } to { transform: translateY(-100%); } }

/* 旅の駅 */
.k3-places { display: grid; gap: 8px; }
.k3-place { display: block; width: 100%; min-height: 54px; padding: 9px 12px 9px 16px; border: 3px solid var(--kk-navy); border-left: 10px solid var(--pc, #888); border-radius: 14px; background: var(--kk-cream); color: var(--kk-navy); font: inherit; text-align: left; box-shadow: 0 3px 0 var(--kk-navy); cursor: pointer; }
.k3-place b { display: block; font-size: 16px; font-weight: 800; }
.k3-place small { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; opacity: .85; line-height: 1.4; }
.k3-place.is-here { background: #fff1a8; }
.k3-place[disabled] { opacity: .6; box-shadow: none; }
.k3-done { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: #4cc9a0; color: #fff; font-size: 12px; }

/* 配合 */
.k3-bpick { position: relative; padding-bottom: 28px !important; }
.k3-pred { position: absolute; left: 10px; right: 10px; bottom: 5px; font-style: normal; font-size: 13px; font-weight: 800; color: #5b3a8a; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-spark { color: #c88a00; }
.k3-q { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #efe5fb; color: #8a5bc8; font-size: 34px; font-weight: 800; }
.k3-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.k3-tabs button { flex: 1; min-height: 44px; padding: 6px 4px; border: 3px solid var(--kk-navy); border-radius: 12px; background: #fff; color: var(--kk-navy); font: 800 13px/1.25 var(--kk-font); }
.k3-tabs button.is-on { background: var(--kk-yellow); }
.k3-ftab { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; max-width: 420px; margin: 0 auto; }
.k3-ftab b, .k3-ftab i, .k3-ftab span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 6px; font-style: normal; font-size: 13px; font-weight: 800; }
.k3-ftab b { color: #fff; }
.k3-ftab i { border: 2px solid rgba(23,52,84,.18); }
.k3-ftab i.is-q { background: #eef1f5; color: #a0a8b4; }

/* 物語 */
.k3-chlist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.k3-chlist li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 2px solid #dfe6ee; }
.k3-chlist small { flex: none; width: 3.6em; font-weight: 800; color: #6a7a8a; }
.k3-chlist b { flex: 1; font-size: 15px; }
.k3-chlist em { flex: none; font-style: normal; font-weight: 800; color: #2a8fd6; font-size: 13px; }
.k3-chlist li.is-now { border-color: var(--kk-yellow); background: #fffbe6; }
.k3-chlist li.is-done b { color: #3a5a3a; }
.k3-bells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 6px 0 10px; }
.k3-bells span { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: .8; border-radius: 10px; background: #eef1f5; color: #a0a8b4; font-weight: 800; font-size: 18px; }
.k3-bells span.is-on { background: #fffbe6; color: var(--kk-navy); }
.k3-bells img { width: 80%; }
.k3-bells small { font-size: 11px; }

/* KK3IMP1027 前の冒険の仲間 */
.k3-imp { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin: 8px 0; max-height: 46vh; overflow-y: auto; }
.k3-imp span { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.k3-imp img { width: 56px; height: 56px; object-fit: contain; }
.k3-imp b { font-size: 11px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k3-imp-note { margin: 8px 0 0; font-weight: 800; background: rgba(255,140,60,.78) !important; }
