[v-cloak] { display: none !important; }

:root {
	--kf-ink: #172a2a;
	--kf-deep: #102b2d;
	--kf-teal: #1d645f;
	--kf-teal-light: #78c2ad;
	--kf-gold: #e1aa45;
	--kf-ember: #c65d37;
	--kf-paper: #fff8df;
	--kf-cream: #f2e6c5;
	--kf-line: rgba(38, 57, 48, .18);
	--kf-shadow: 0 24px 70px rgba(5, 24, 25, .28);
}

* { box-sizing: border-box; }
html { background: #102b2d; }
body.kf-body { margin: 0; min-width: 320px; color: var(--kf-ink); background: #102b2d; font-family: "Sarabun", system-ui, sans-serif; }
button, textarea { font: inherit; }
button { touch-action: manipulation; }
.kf-app { min-height: 100vh; }
.kf-pali { font-family: "Sarabun", sans-serif; letter-spacing: .025em; }

.kf-topbar {
	position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 72px; display: flex; align-items: center;
	padding: 0 clamp(16px, 4vw, 58px); color: #fff; background: linear-gradient(180deg, rgba(4, 18, 20, .88), rgba(4, 18, 20, .35), transparent);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: none;
}
.kf-topbar > * { pointer-events: auto; }
.kf-brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; text-shadow: 0 2px 10px #071819; }
.kf-brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255, 234, 170, .7); border-radius: 50%; background: rgba(15, 65, 62, .72); color: #ffe9a1; font: 700 1.35rem serif; box-shadow: inset 0 0 0 3px rgba(255,255,255,.08); }
.kf-brand strong, .kf-brand small { display: block; }
.kf-brand strong { font-size: 1rem; }
.kf-brand small { margin-top: 1px; color: #e8dcae; font-size: .72rem; }
.kf-nav { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.kf-nav button { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 999px; color: #fff; background: rgba(6, 28, 28, .46); cursor: pointer; text-shadow: 0 1px 4px #071819; }
.kf-nav button:hover, .kf-nav button.is-active { border-color: rgba(255, 236, 176, .58); background: rgba(29, 100, 95, .85); }
.kf-nav b { min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--kf-gold); color: #213d3a; font-size: .7rem; text-shadow: none; }
.kf-nav .kf-sound { width: 44px; justify-content: center; padding: 0; }

.kf-scene { position: relative; min-height: 100vh; padding-top: 72px; isolation: isolate; background-image: var(--kf-scene); background-size: cover; background-position: center; background-attachment: fixed; }
.kf-scene::before { content: ""; position: fixed; z-index: -2; inset: 0; background: var(--kf-scene) center / cover no-repeat; transform: scale(1.01); }
.kf-scene-shade { position: fixed; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(4, 21, 21, .8), rgba(7, 28, 27, .25) 54%, rgba(4, 20, 20, .58)), linear-gradient(0deg, rgba(4, 18, 18, .68), transparent 58%); }
.kf-content { position: relative; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: clamp(48px, 8vh, 92px) 0 70px; }

.kf-system { min-height: 100vh; padding: 30px; display: grid; place-content: center; justify-items: center; text-align: center; color: #f8f1d8; background: radial-gradient(circle at 50% 35%, #255d58, #102b2d 62%); }
.kf-system h1 { margin: 18px 0 5px; font-size: clamp(1.7rem, 5vw, 2.7rem); }
.kf-system p { margin: 0 0 22px; color: #d8ceb0; }
.kf-rune { width: 74px; height: 74px; display: grid; place-items: center; border: 2px solid #d5b360; border-radius: 50%; color: #ffe49a; font: 700 2rem serif; box-shadow: 0 0 30px rgba(225,170,69,.36), inset 0 0 20px rgba(225,170,69,.2); }
.kf-rune-pulse { animation: runePulse 1.5s ease-in-out infinite; }
@keyframes runePulse { 50% { transform: scale(1.08); box-shadow: 0 0 55px rgba(225,170,69,.6); } }

.kf-intro { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .55fr); align-items: center; gap: clamp(25px, 6vw, 80px); padding: 110px clamp(24px, 7vw, 110px) 58px; background-position: center 38%; }
.kf-intro .kf-scene-shade { background: linear-gradient(90deg, rgba(2, 17, 17, .87) 0%, rgba(5, 24, 23, .65) 46%, rgba(4,20,19,.18) 76%, rgba(3,15,15,.48)), linear-gradient(0deg, rgba(3,16,16,.7), transparent 48%); }
.kf-hero { max-width: 760px; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.65); }
.kf-eyebrow { margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: #f5d47e; font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.kf-eyebrow span { width: 24px; height: 1px; background: #f5d47e; }
.kf-hero h1 { margin: 0; font-family: Georgia, "Sarabun", serif; font-size: clamp(3rem, 7.1vw, 6.7rem); line-height: .9; letter-spacing: -.055em; }
.kf-hero h1 em { color: #ffe4a0; font-size: .7em; font-style: normal; letter-spacing: -.035em; }
.kf-hero-copy { max-width: 680px; margin: 25px 0; color: #f6f0db; font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.75; }
.kf-hero-copy b { color: #ffe49e; }
.kf-hero-actions, .kf-actions, .kf-atlas-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kf-btn { min-height: 46px; padding: 10px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 14px; color: #15312e; background: var(--kf-paper); font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.kf-btn:hover { transform: translateY(-2px); }
.kf-btn:focus-visible, .kf-nav button:focus-visible, .kf-choices button:focus-visible, .kf-creature-stop:focus-visible { outline: 3px solid #fff2ae; outline-offset: 3px; }
.kf-btn-primary { color: #fff; border-color: #e9bf62; background: linear-gradient(145deg, #d1773e, #ad472d); box-shadow: 0 10px 30px rgba(109, 44, 25, .3), inset 0 1px rgba(255,255,255,.24); }
.kf-btn-glass, .kf-btn-ghost { color: #fff; border-color: rgba(255,255,255,.34); background: rgba(14, 49, 47, .68); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.kf-btn-warm { color: #fff; border-color: #f0ce70; background: #94712c; }
.kf-btn-lg { min-height: 54px; padding: 13px 25px; font-size: 1.02rem; }
.kf-btn-block { width: 100%; }
.kf-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.kf-promise { margin-top: 34px; display: flex; align-items: center; gap: 12px; color: #f7efda; font-size: .83rem; }
.kf-promise span { display: flex; align-items: center; gap: 7px; }
.kf-promise b { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #e7c676; border-radius: 50%; color: #ffe49a; }
.kf-promise i { flex: 0 1 28px; height: 1px; background: rgba(255,255,255,.36); }
.kf-letter { position: relative; align-self: end; max-width: 380px; margin-bottom: 2vh; padding: 38px 28px 26px; color: #3a3325; background: linear-gradient(135deg, rgba(255,249,222,.97), rgba(231,213,165,.97)); border: 1px solid rgba(106,72,30,.35); border-radius: 4px 18px 4px 18px; box-shadow: var(--kf-shadow); transform: rotate(1deg); }
.kf-letter::before, .kf-letter::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(118,82,34,.25); pointer-events: none; }
.kf-letter::after { inset: 14px; border-style: dashed; }
.kf-wax { position: absolute; top: -32px; right: 30px; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 48% 52% 45% 55%; color: #f0c177; background: #9b3627; border: 5px double #c86c48; font: 700 1.4rem serif; box-shadow: 0 8px 16px rgba(42,24,12,.35); }
.kf-letter > * { position: relative; z-index: 1; }
.kf-letter > strong, .kf-letter > small { display: block; text-align: center; }
.kf-letter > strong { color: #80632b; font-size: .78rem; letter-spacing: .08em; }
.kf-letter > b { display: block; margin: 12px 0 5px; color: #183f3c; text-align: center; font-size: 2.75rem; }
.kf-letter p { padding: 13px 0; border-block: 1px solid rgba(102,76,34,.22); line-height: 1.7; text-align: center; }
.kf-letter mark { padding: 1px 5px; color: #7f2c22; background: #f0c878; border-radius: 4px; }
.kf-letter small { color: #7f7156; }

.kf-section-head { max-width: 690px; margin-bottom: 26px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.kf-section-head .kf-eyebrow { display: block; }
.kf-section-head h1 { margin: 4px 0 8px; font: 700 clamp(2.1rem, 5vw, 4.1rem)/1.05 Georgia, "Sarabun", serif; }
.kf-section-head > p:last-child { margin: 0; color: #eee7d3; font-size: 1.04rem; line-height: 1.7; }
.kf-map-card { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 24px; border: 1px solid rgba(255,245,205,.36); border-radius: 28px; background: rgba(13, 47, 45, .74); box-shadow: var(--kf-shadow); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); overflow: hidden; }
.kf-route-line { position: absolute; inset: 50% 8%; height: 2px; background: linear-gradient(90deg, transparent, #cfaf61, transparent); opacity: .45; }
.kf-creature-stop { position: relative; min-height: 180px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid rgba(247,231,181,.25); border-radius: 20px; color: #f8f3df; background: linear-gradient(145deg, rgba(32,85,77,.92), rgba(13,45,44,.96)); text-align: left; box-shadow: 0 10px 24px rgba(4,20,20,.24); cursor: pointer; }
.kf-creature-stop:hover { border-color: #e9ca76; transform: translateY(-3px); }
.kf-creature-stop.is-new { border-color: rgba(157,184,169,.34); border-style: dashed; background: linear-gradient(145deg, rgba(40,76,70,.94), rgba(20,48,45,.97)); }
.kf-creature-stop.is-remembered { background: linear-gradient(145deg, #3a795e, #1b4a42); }
.kf-entry-creature-portrait { position: absolute; top: 13px; right: 13px; width: 68px; height: 68px; overflow: hidden; border: 2px solid rgba(255,235,174,.72); border-radius: 50%; background: #174f4b; box-shadow: 0 8px 20px rgba(2,18,18,.38), 0 0 0 4px rgba(255,255,255,.05); }
.kf-entry-creature-portrait img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s cubic-bezier(.16,1,.3,1), filter .28s ease, opacity .28s ease; }
.kf-creature-stop.is-new .kf-entry-creature-portrait { border-color: rgba(169,194,179,.52); background: #294b46; box-shadow: 0 8px 18px rgba(2,18,18,.28), 0 0 0 4px rgba(151,184,166,.05); }
.kf-creature-stop.is-new .kf-entry-creature-portrait img { opacity: .74; filter: grayscale(.72) sepia(.12) hue-rotate(92deg) saturate(.58) brightness(.78) contrast(.96); }
.kf-creature-stop.is-new:hover .kf-entry-creature-portrait img { opacity: .84; filter: grayscale(.62) sepia(.1) hue-rotate(92deg) saturate(.66) brightness(.88) contrast(.98); }
.kf-creature-stop:hover .kf-entry-creature-portrait img { transform: scale(1.08); }
.kf-stop-copy { width: 100%; min-width: 0; }
.kf-stop-copy small, .kf-stop-copy strong, .kf-stop-copy em { display: block; }
.kf-stop-copy small { margin-bottom: 7px; color: #e9cc7e; font-size: .73rem; }
.kf-stop-copy strong { width: calc(100% - 78px); max-width: none; font-size: clamp(1.4rem, 2vw, 1.72rem); line-height: 1.25; white-space: nowrap; }
.kf-stop-copy em { margin-top: 3px; color: #d9dac7; font-size: .82rem; font-style: normal; }
.kf-stop-state { margin-top: auto; padding-top: 15px; display: flex; align-items: center; gap: 6px; color: #f2d989; font-size: .76rem; }
.kf-creature-stop.is-new .kf-stop-state { color: #a9c4b5; }
.kf-creature-stop:first-of-type { grid-row: span 2; min-height: 240px; }
.kf-creature-stop:last-of-type { grid-column: span 2; }
.kf-atlas-actions { margin-top: 20px; }

.kf-training { display: grid; place-items: center; padding-inline: 16px; }
.kf-training-wrap { width: min(820px, 100%); padding: 28px 0 58px; }
.kf-train-hud { margin-bottom: 12px; padding: 11px 16px; display: flex; align-items: center; gap: 12px; color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(6,30,30,.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.kf-round-back { flex: 0 0 44px; height: 44px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; }
.kf-train-hud div:nth-child(2) { flex: 1; min-width: 0; }
.kf-train-hud small, .kf-train-hud strong { display: block; }
.kf-train-hud small { color: #e4c87c; font-size: .73rem; }
.kf-train-hud strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kf-step-meter { display: flex; gap: 5px; }
.kf-step-meter i { width: 20px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.2); }
.kf-step-meter i.is-done { background: #e4bd5a; }
.kf-step-meter i.is-current { background: #fff; box-shadow: 0 0 10px #fff4bd; }
.kf-training-card { overflow: hidden; color: var(--kf-ink); border: 1px solid rgba(255,246,210,.62); border-radius: 28px; background: linear-gradient(155deg, rgba(255,250,231,.985), rgba(237,224,184,.98)); box-shadow: var(--kf-shadow); }
.kf-training-card.is-wrong { animation: cardNudge .32s ease; }
.kf-training-card.is-right { box-shadow: 0 24px 80px rgba(65,126,98,.45); }
@keyframes cardNudge { 33% { transform: translateX(-5px); } 66% { transform: translateX(5px); } }
.kf-specimen { position: relative; min-height: 148px; padding: 25px 28px; display: flex; align-items: center; gap: 22px; color: #fff; background: radial-gradient(circle at 15% 10%, rgba(109,177,150,.45), transparent 35%), linear-gradient(120deg, #174d49, #0f3334); }
.kf-creature-large { flex: 0 0 86px; width: 86px; height: 86px; display: grid; place-items: center; border: 1px solid rgba(255,229,155,.5); border-radius: 50%; background: rgba(255,255,255,.08); font-size: 3.25rem; box-shadow: inset 0 0 25px rgba(141,207,181,.18); }
.kf-specimen small, .kf-specimen h1, .kf-specimen p { margin: 0; display: block; }
.kf-specimen small { color: #e0c777; font-size: .72rem; letter-spacing: .08em; }
.kf-specimen h1 { margin-top: 3px; font-size: clamp(2.25rem, 7vw, 3.7rem); line-height: 1; }
.kf-specimen p { margin-top: 6px; color: #d7e1d9; }
.kf-exam-tag { position: absolute; top: 15px; right: 18px; padding: 6px 9px; border-radius: 999px; color: #4b3715; background: #e8ca78; font-size: .68rem; font-weight: 700; }
.kf-reconstruction { margin: 18px 25px 0; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgba(51,79,65,.16); border-radius: 14px; background: rgba(255,255,255,.38); }
.kf-reconstruction span { min-width: 90px; padding: 7px 10px; border-radius: 9px; color: #fff; background: #356b5d; text-align: center; font-weight: 700; }
.kf-reconstruction span.is-hidden { color: #746c58; background: #ddd2b2; }
.kf-reconstruction span.is-result { background: #9b4c32; }
.kf-question { padding: 22px 28px 12px; text-align: center; }
.kf-step-kicker { margin: 0; color: #9b562f; font-size: .76rem; font-weight: 700; letter-spacing: .08em; }
.kf-question h2 { margin: 5px 0 0; font-size: clamp(1.25rem, 4vw, 1.75rem); }
.kf-exam-instruction { max-width: 660px; margin: 8px auto 0; color: #716851; font-size: .86rem; line-height: 1.55; }
.kf-choices { padding: 8px 28px 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kf-choices button { min-height: 58px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(43,85,72,.2); border-radius: 14px; color: #21473f; background: rgba(255,255,255,.62); text-align: left; font-weight: 700; cursor: pointer; }
.kf-choices button:hover { color: #fff; border-color: #2f7063; background: #2f7063; transform: translateY(-2px); }
.kf-choices button .kf-pali { line-height: 1.35; }
.kf-exam-form { padding: 4px 28px 28px; }
.kf-exam-form label { display: block; margin-bottom: 6px; color: #5e5b48; font-size: .78rem; font-weight: 700; }
.kf-exam-form textarea { width: 100%; resize: vertical; padding: 14px; border: 2px solid #b7a77f; border-radius: 14px; color: #263d37; background: rgba(255,255,255,.68); line-height: 1.7; outline: none; }
.kf-exam-form textarea:focus { border-color: #347466; box-shadow: 0 0 0 4px rgba(52,116,102,.15); }
.kf-answer-tools { min-height: 38px; display: flex; align-items: center; justify-content: space-between; color: #7d745e; font-size: .75rem; }
.kf-text-button { min-height: 40px; padding: 5px 0; border: 0; color: #94602f; background: transparent; font-weight: 700; cursor: pointer; }
.kf-answer-frame { margin: 0 0 10px; padding: 11px 13px; border: 1px solid rgba(225,170,69,.36); color: #655b45; background: rgba(255,255,255,.42); font-size: .83rem; line-height: 1.6; }
.kf-feedback { margin: -13px 28px 26px; padding: 12px 14px; display: flex; gap: 11px; border-radius: 13px; }
.kf-feedback.is-correct { color: #185b45; background: #d7edda; }
.kf-feedback.is-incorrect { color: #7e392b; background: #f5d9c8; }
.kf-feedback > i { margin-top: 3px; }
.kf-feedback strong, .kf-feedback p { display: block; margin: 0; }
.kf-feedback p { margin-top: 2px; font-size: .84rem; line-height: 1.55; }
.kf-bonded { padding: 40px 34px; text-align: center; }
.kf-bonded-creature { display: inline-grid; place-items: center; width: 100px; height: 100px; border-radius: 50%; background: #dce6c8; font-size: 4rem; }
.kf-seal { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-left: -22px; color: #fff; border: 4px solid var(--kf-paper); border-radius: 50%; background: #3c8264; font-weight: 700; vertical-align: bottom; }
.kf-bonded .kf-eyebrow { justify-content: center; margin-top: 20px; color: #9a6931; }
.kf-bonded h1 { margin: 4px 0 18px; font: 700 clamp(1.7rem, 5vw, 2.8rem)/1.15 Georgia, "Sarabun", serif; }
.kf-full-answer { padding: 16px 18px; border: 1px solid #cbb889; border-radius: 14px; background: rgba(255,255,255,.52); text-align: left; }
.kf-full-answer small { color: #94602f; font-weight: 700; }
.kf-full-answer p { margin: 5px 0 0; line-height: 1.75; }
.kf-family { margin: 15px 0; padding: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; }
.kf-family small { width: 100%; color: #74664b; }
.kf-family span { padding: 5px 9px; border-radius: 999px; background: #d9dec4; font-weight: 700; }
.kf-family em { color: #7e6130; font-size: .7rem; font-style: normal; }
.kf-bonded .kf-actions { justify-content: center; }

.kf-library { min-height: 100vh; padding-top: 72px; color: #efe7cd; background: radial-gradient(circle at 80% 0, #37665a, transparent 42%), #102b2d; }
.kf-dark-head { text-shadow: none; }
.kf-atlas-head, .kf-guide-head, .kf-review-head { max-width: 780px; display: flex; align-items: flex-start; gap: 14px; }
.kf-atlas-head .kf-round-back, .kf-guide-head .kf-round-back, .kf-review-head .kf-round-back { flex: 0 0 44px; margin-top: 4px; }
.kf-atlas-head-copy, .kf-guide-head-copy, .kf-review-head-copy { min-width: 0; }
.kf-atlas-head-copy > p:last-child, .kf-guide-head-copy > p:last-child, .kf-review-head-copy > p:last-child { margin: 0; color: #eee7d3; font-size: 1.04rem; line-height: 1.7; }
.kf-guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.kf-guide-card { padding: 21px; color: #273d36; border: 1px solid #d2bc83; border-radius: 19px 6px 19px 6px; background: linear-gradient(145deg, #fff9e8, #eadcb8); box-shadow: 0 16px 38px rgba(0,0,0,.2); }
.kf-guide-card header { display: flex; align-items: center; gap: 13px; }
.kf-guide-card header > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #d9e4c9; font-size: 2rem; }
.kf-guide-card header > div { flex: 1; }
.kf-guide-card h2, .kf-guide-card header p { margin: 0; }
.kf-guide-card h2 { font-size: 1.7rem; }
.kf-guide-card header small { color: #856536; }
.kf-guide-card header > b { padding: 4px 8px; border-radius: 999px; color: #81662a; background: #f0dfaa; font-size: .68rem; }
.kf-guide-card header > b.is-remembered { color: #fff; background: #3d7c60; }
.kf-formula { margin: 16px 0 10px; display: flex; align-items: center; gap: 8px; }
.kf-formula span { flex: 1; padding: 7px 8px; border-radius: 8px; color: #fff; background: #376c5e; text-align: center; font-weight: 700; }
.kf-formula span:last-child { background: #a45135; }
.kf-formula i { color: #80693c; font-style: normal; }
.kf-guide-card dl { margin: 0; }
.kf-guide-card dl > div { padding: 7px 0; display: grid; grid-template-columns: 90px 1fr; gap: 10px; border-bottom: 1px solid rgba(62,72,49,.14); }
.kf-guide-card dt { color: #756849; font-size: .76rem; }
.kf-guide-card dd { margin: 0; font-weight: 600; }
.kf-guide-card details { margin-top: 11px; padding: 10px 12px; border-radius: 9px; background: rgba(255,255,255,.45); }
.kf-guide-card summary { color: #8b552e; font-weight: 700; cursor: pointer; }
.kf-guide-card details p { margin: 8px 0 0; line-height: 1.65; }
.kf-empty { max-width: 560px; margin: 40px auto; padding: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: 24px; color: #f4efd9; background: rgba(255,255,255,.08); text-align: center; }
.kf-empty > span { font-size: 3rem; }
.kf-empty h2 { margin: 9px 0 4px; }
.kf-empty p { color: #d8d1bb; }
.kf-empty-glass { background: rgba(8,35,34,.76); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

.kf-review-stack { max-width: 700px; display: grid; gap: 12px; }
.kf-review-stack button { min-height: 86px; padding: 14px 18px; display: flex; align-items: center; gap: 15px; color: #2c413a; border: 1px solid #e0c77c; border-radius: 17px; background: rgba(255,249,229,.94); text-align: left; cursor: pointer; box-shadow: 0 12px 28px rgba(3,25,25,.25); }
.kf-review-stack button > span { font-size: 2.6rem; }
.kf-review-stack button > div { flex: 1; }
.kf-review-stack small, .kf-review-stack strong, .kf-review-stack em { display: block; }
.kf-review-stack small { color: #a15d38; }
.kf-review-stack strong { font-size: 1.55rem; }
.kf-review-stack em { color: #756b53; font-size: .78rem; font-style: normal; }

.kf-victory { display: grid; place-items: center; padding-inline: 16px; }
.kf-victory-card { width: min(720px, 100%); padding: clamp(30px, 6vw, 58px); color: #fff; border: 1px solid rgba(255,234,169,.62); border-radius: 30px; background: rgba(8, 39, 38, .82); box-shadow: var(--kf-shadow); text-align: center; -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); }
.kf-victory-seal { width: 88px; height: 88px; margin: auto; display: grid; place-items: center; color: #ffe099; border: 2px solid #deb65a; border-radius: 50%; background: #753b2c; font: 700 2.7rem Georgia, serif; box-shadow: inset 0 0 0 6px rgba(255,226,141,.13), 0 0 35px rgba(225,170,69,.3); }
.kf-victory-card .kf-eyebrow { justify-content: center; margin-top: 20px; }
.kf-victory-card h1 { margin: 7px 0 12px; font: 700 clamp(2rem, 6vw, 4rem)/1.05 Georgia, "Sarabun", serif; }
.kf-victory-card > p:not(.kf-eyebrow) { color: #e2decf; line-height: 1.7; }
.kf-victory-stats { margin: 24px 0; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid rgba(255,255,255,.17); }
.kf-victory-stats span { padding: 14px 8px; color: #dcd5bc; font-size: .76rem; }
.kf-victory-stats b { display: block; color: #ffe095; font-size: 1.8rem; }
.kf-victory-card .kf-actions { justify-content: center; }

@media (max-width: 900px) {
	.kf-intro { grid-template-columns: 1fr; align-content: center; }
	.kf-letter { display: none; }
	.kf-map-card { grid-template-columns: repeat(2, 1fr); }
	.kf-creature-stop:first-of-type { grid-row: auto; min-height: 180px; }
	.kf-guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
	.kf-topbar { height: 64px; padding-inline: 12px; }
	.kf-brand-mark { width: 38px; height: 38px; }
	.kf-brand small, .kf-nav button span { display: none; }
	.kf-nav { gap: 2px; }
	.kf-nav button { width: 44px; padding: 0; justify-content: center; position: relative; }
	.kf-nav b { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; }
	.kf-scene, .kf-library { padding-top: 64px; }
	.kf-scene { background-attachment: scroll; }
	.kf-intro { padding: 88px 20px 36px; background-position: 58% center; }
	.kf-intro .kf-scene-shade { background: linear-gradient(0deg, rgba(3,18,18,.92), rgba(3,18,18,.4) 83%); }
	.kf-hero h1 { font-size: clamp(2.8rem, 15vw, 4.6rem); }
	.kf-hero-copy { font-size: .95rem; line-height: 1.62; }
	.kf-hero-actions .kf-btn { width: 100%; }
	.kf-promise { align-items: flex-start; gap: 7px; }
	.kf-promise span { flex-direction: column; text-align: center; line-height: 1.25; }
	.kf-promise i { margin-top: 12px; }
	.kf-content { width: min(100% - 24px, 1120px); padding-top: 38px; }
	.kf-map-card { grid-template-columns: 1fr; padding: 12px; }
	.kf-creature-stop, .kf-creature-stop:last-of-type { grid-column: auto; min-height: 126px; }
	.kf-training { padding-inline: 10px; }
	.kf-training-wrap { padding-top: 13px; }
	.kf-train-hud { border-radius: 13px; padding: 8px; }
	.kf-step-meter i { width: 12px; }
	.kf-training-card { border-radius: 20px; }
	.kf-specimen { min-height: 125px; padding: 18px; gap: 14px; }
	.kf-creature-large { flex-basis: 67px; width: 67px; height: 67px; font-size: 2.5rem; }
	.kf-exam-tag { top: 9px; right: 10px; font-size: .59rem; }
	.kf-reconstruction { margin: 12px 14px 0; gap: 5px; }
	.kf-reconstruction span { min-width: 0; padding-inline: 7px; font-size: .85rem; }
	.kf-question { padding: 17px 16px 9px; }
	.kf-choices { padding: 6px 14px 18px; grid-template-columns: 1fr; }
	.kf-choices button { min-height: 52px; }
	.kf-exam-form { padding: 3px 14px 18px; }
	.kf-feedback { margin: -5px 14px 18px; }
	.kf-bonded { padding: 28px 17px; }
	.kf-bonded .kf-actions .kf-btn { width: 100%; }
	.kf-guide-card { padding: 16px; }
	.kf-guide-card dl > div { grid-template-columns: 78px 1fr; }
	.kf-victory-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ═════════════════════════════ ส่วนขยาย v0.2 — โซน · ชิป · ทฤษฎี · สนามสอบ ═════════════════════════════ */

/* สถิติหน้าแรก */
.kf-stats-row { margin: 20px 0 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.kf-stats-row span { min-width: 108px; padding: 10px 16px; border: 1px solid rgba(255, 236, 176, .34); border-radius: 14px; background: rgba(6, 30, 29, .58); color: #fff; text-align: center; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.kf-stats-row b { display: block; font-size: 1.45rem; color: #ffe9a1; }
.kf-stats-row small { color: #d8e8dd; font-size: .74rem; }

/* การ์ดเขตบนแผนที่ */
.kf-zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.kf-zone-card { position: relative; display: flex; align-items: center; gap: 14px; min-height: 108px; padding: 14px 16px; border: 1px solid rgba(255, 240, 190, .4); border-radius: 20px; background: rgba(9, 36, 34, .72); color: #fff; text-align: left; cursor: pointer; overflow: hidden; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); box-shadow: var(--kf-shadow); transition: transform .18s ease, border-color .18s ease; }
.kf-zone-card:hover { transform: translateY(-3px); border-color: #ffe9a1; }
.kf-zone-card.is-locked { cursor: not-allowed; filter: saturate(.35) brightness(.82); }
.kf-zone-card.is-locked:hover { transform: none; border-color: rgba(255, 240, 190, .4); }
.kf-zone-card.is-done { border-color: rgba(160, 235, 190, .75); }
.kf-zone-creature { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 236, 176, .55); box-shadow: 0 6px 18px rgba(3, 18, 18, .5); }
.kf-zone-emoji { width: 64px; height: 64px; flex: none; display: grid; place-items: center; font-size: 2rem; border-radius: 50%; border: 2px solid rgba(255, 236, 176, .55); background: rgba(18, 66, 62, .8); }
.kf-zone-copy { flex: 1; min-width: 0; }
.kf-zone-copy small { display: block; color: #ffe9a1; font-size: .78rem; }
.kf-zone-copy strong { display: block; margin: 2px 0; font-size: 1.02rem; }
.kf-zone-copy em { display: block; color: #cfe4d6; font-size: .8rem; font-style: normal; }
.kf-zone-card > i { flex: none; font-size: 1.2rem; color: #ffe9a1; }
.kf-zone-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, .12); }
.kf-zone-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--kf-gold), #9fe3b5); }

/* หัวเขต + สัตว์ประจำเขต */
.kf-zone-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; color: #fff; text-shadow: 0 2px 12px rgba(3, 16, 16, .8); }
.kf-zone-head h1 { margin: 2px 0; font-size: clamp(1.3rem, 3.4vw, 1.9rem); }
.kf-zone-head p { margin: 0; color: #dceadf; }
.kf-creature-img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 236, 176, .65); box-shadow: 0 10px 26px rgba(3, 18, 18, .55); }
.kf-creature-thumb { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(120, 194, 173, .6); }
.kf-creature-breath { animation: kf-breath 3.6s ease-in-out infinite; }
@keyframes kf-breath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ชิปเรียงคำตอบเต็ม */
.kf-chipboard { display: grid; gap: 12px; }
.kf-chip-slots { min-height: 86px; padding: 12px; border: 2px dashed rgba(29, 100, 95, .45); border-radius: 16px; background: rgba(255, 252, 236, .75); display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.kf-chip-hint { color: #6d8377; font-size: .86rem; align-self: center; }
.kf-chip-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.kf-chip { min-height: 44px; padding: 8px 14px; border: 1.5px solid rgba(29, 100, 95, .5); border-radius: 999px; background: #fff; color: var(--kf-ink); cursor: pointer; font-size: .95rem; box-shadow: 0 3px 10px rgba(23, 42, 42, .12); transition: transform .12s ease, opacity .2s ease; }
.kf-chip:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--kf-teal); }
.kf-chip.is-used { opacity: .22; cursor: default; }
.kf-chip.is-chosen { background: linear-gradient(180deg, #fef6dc, #f8e9bd); border-color: var(--kf-gold); }
.kf-chip.is-chosen:hover { border-color: var(--kf-ember); }

/* จังหวะผนึกไมตรี (แปลงร่าง) */
.kf-seal-stage { position: relative; width: 148px; height: 148px; margin: 0 auto 6px; }
.kf-creature-hero { width: 148px; height: 148px; }
.kf-seal-ring { position: absolute; inset: -14px; border-radius: 50%; border: 3px solid rgba(225, 170, 69, .95); box-shadow: 0 0 34px rgba(225, 170, 69, .55), inset 0 0 22px rgba(225, 170, 69, .35); }
.kf-seal-anim .kf-seal-ring { animation: kf-ring 1.2s ease-out; }
.kf-seal-anim .kf-creature-hero { animation: kf-pop .8s cubic-bezier(.16, 1, .3, 1); }
.kf-formula-live span.is-final { animation: kf-glow 1.6s ease-in-out 1; }
@keyframes kf-ring { 0% { transform: scale(.55); opacity: 0; } 45% { opacity: 1; } 100% { transform: scale(1); } }
@keyframes kf-pop { 0% { transform: scale(.82); } 60% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes kf-glow { 0%, 100% { text-shadow: none; } 40% { text-shadow: 0 0 18px rgba(225, 170, 69, .95); } }
.kf-mnemonic { margin: 8px 0 0; padding: 8px 14px; display: inline-block; border-radius: 999px; background: rgba(225, 170, 69, .16); border: 1px solid rgba(225, 170, 69, .5); color: #7a5410; font-size: .9rem; }
.kf-mnemonic-line { margin: 8px 0 0; color: #8a6420; font-size: .85rem; }

/* คัมภีร์แยกเขต */
.kf-guide-zone { margin-bottom: 26px; }
.kf-guide-zone-head { margin: 0 0 12px; color: #ffe9a1; font-size: 1.08rem; }
.kf-guide-zone-head small { margin-left: 8px; color: #b9d2c0; font-weight: 400; font-size: .8rem; }
.kf-guide-card h3 { margin: 2px 0; font-size: 1.2rem; }

/* ทฤษฎี เกาะสามกาล */
.kf-theory-wrap { max-width: 760px; }
.kf-theory-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.kf-theory-tabs button { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 240, 190, .45); border-radius: 999px; background: rgba(9, 36, 34, .7); color: #fff; cursor: pointer; }
.kf-theory-tabs button.is-active { background: rgba(29, 100, 95, .92); border-color: #ffe9a1; }
.kf-theory-tabs button.is-done .fa-circle-check { color: #9fe3b5; }
.kf-theory-card { text-align: center; }
.kf-theory-card:not(.is-sealed) { padding-top: 20px; }
.kf-theory-word { margin: 10px 0 6px; font-size: clamp(2.1rem, 7vw, 3rem); line-height: 1.35; color: var(--kf-teal); }
.kf-theory-ask { margin: 0 0 18px; line-height: 1.5; color: #5a7268; }
.kf-choices-column { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
.kf-choices-column button { flex-direction: column; align-items: flex-start; gap: 2px; }
.kf-choices-column small { color: #708a7d; font-size: .78rem; }

/* บัตรจบพิธีสามกาล — ภาพกับผลสำเร็จเล่าเหตุการณ์เดียวกัน */
.kf-theory-card.is-sealed {
	min-height: 430px; display: grid; grid-template-columns: minmax(250px, .82fr) minmax(320px, 1.18fr);
	place-items: stretch; text-align: left; background: linear-gradient(145deg, rgba(255,250,231,.99), rgba(237,224,184,.99));
}
.kf-theory-complete-visual { position: relative; min-height: 430px; margin: 0; overflow: hidden; isolation: isolate; }
.kf-theory-complete-visual::after { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, rgba(5,41,40,.03) 35%, rgba(4,35,35,.82) 100%); }
.kf-theory-complete-visual img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 55% 42%; }
.kf-theory-complete-seal { position: absolute; z-index: 3; top: 20px; left: 20px; width: 48px; height: 48px; display: grid; place-items: center; color: #fff; border: 2px solid rgba(255,244,205,.86); border-radius: 50%; background: #3f8e68; box-shadow: 0 12px 28px rgba(3,30,29,.28); }
.kf-theory-wind-rings { position: absolute; z-index: 2; inset: 9% -28% auto 22%; height: 46%; pointer-events: none; }
.kf-theory-wind-rings i { position: absolute; inset: 0; border: 2px solid rgba(255,220,121,.58); border-radius: 50%; transform: rotate(-12deg); box-shadow: 0 0 24px rgba(255,220,121,.15); }
.kf-theory-wind-rings i:nth-child(2) { inset: 16% -7%; border-color: rgba(147,225,178,.5); transform: rotate(8deg); }
.kf-theory-wind-rings i:nth-child(3) { inset: 32% 3%; border-color: rgba(174,168,242,.52); transform: rotate(-5deg); }
.kf-theory-complete-visual figcaption { position: absolute; z-index: 3; left: 24px; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 12px; color: #fff8dc; font-family: "KfDisplay", "Sarabun", sans-serif; font-size: 1.22rem; line-height: 1.35; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.kf-theory-complete-visual figcaption > i { width: 40px; height: 40px; flex: none; display: grid; place-items: center; color: #ffe093; border: 1px solid rgba(255,225,147,.5); border-radius: 50%; background: rgba(7,48,45,.58); }
.kf-theory-complete-copy { padding: clamp(32px, 5vw, 54px); display: flex; flex-direction: column; justify-content: center; }
.kf-theory-complete-status { width: fit-content; display: inline-flex; align-items: center; gap: 7px; color: #287154; font-size: .76rem; font-weight: 700; }
.kf-theory-complete-copy h2 { margin: 10px 0 12px; font-family: "KfDisplay", "Sarabun", sans-serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400; line-height: 1.13; color: #1c3633; }
.kf-theory-complete-copy > p { max-width: 45ch; margin: 0; color: #5d675c; line-height: 1.7; }
.kf-theory-complete-runes { margin: 22px 0 26px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kf-theory-complete-runes span { min-width: 66px; padding: 7px 13px; color: #fff9dc; border: 1px solid rgba(255,231,159,.24); border-radius: 12px; background: #356b5d; text-align: center; font-weight: 700; box-shadow: 0 8px 20px rgba(22,67,58,.12); }
.kf-theory-complete-runes span:nth-child(2) { background: #8b5935; }
.kf-theory-complete-runes span:nth-child(3) { background: #645b8c; }
.kf-theory-complete-copy .kf-actions { gap: 10px; }
.kf-theory-complete-copy .kf-btn-ghost { color: #294b44; border-color: rgba(41,75,68,.32); background: rgba(255,255,255,.42); }

@media (max-width: 720px) {
	.kf-theory-card.is-sealed { width: 100%; min-width: 0; max-width: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
	.kf-theory-complete-visual { width: 100%; min-width: 0; min-height: 0; height: clamp(210px, 62vw, 250px); }
	.kf-theory-complete-visual img { position: absolute; inset: 0; object-position: center 39%; }
	.kf-theory-complete-copy { padding: 26px 20px 24px; }
	.kf-theory-complete-copy h2 { font-size: 2rem; }
	.kf-theory-complete-copy .kf-btn { width: 100%; }
}

/* สนามหลวงจำลอง */
.kf-exam-paper { max-width: 860px; margin: 0 auto; padding: clamp(18px, 4vw, 34px); border-radius: 24px; background: linear-gradient(180deg, #fffdf3, #fbf3d9); border: 1px solid rgba(122, 96, 34, .35); box-shadow: var(--kf-shadow); }
.kf-exam-paper > h2 { margin: 0 0 18px; font-size: 1.05rem; line-height: 1.8; color: #3c3423; border-bottom: 2px solid rgba(122, 96, 34, .25); padding-bottom: 14px; }
.kf-exam-paper > h2 span { display: inline-block; margin-right: 10px; padding: 3px 12px; border-radius: 999px; background: var(--kf-deep); color: #ffe9a1; font-size: .8rem; }
.kf-exam-item { margin-bottom: 20px; }
.kf-exam-item header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.kf-exam-item header b { font-size: 1.3rem; color: var(--kf-teal); }
.kf-exam-item header small { color: #8a7a52; }
.kf-exam-item textarea { width: 100%; padding: 12px 14px; border: 1.5px solid rgba(122, 96, 34, .4); border-radius: 14px; background: #fff; line-height: 1.9; }
.kf-exam-actions { margin-top: 10px; }
.kf-exam-check { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: rgba(198, 93, 55, .08); border: 1px solid rgba(198, 93, 55, .3); }
.kf-exam-check.is-passed { background: rgba(45, 140, 90, .1); border-color: rgba(45, 140, 90, .4); }
.kf-exam-verdict { margin: 0 0 8px; font-weight: 700; color: #7a4322; }
.kf-exam-check.is-passed .kf-exam-verdict { color: #1d6a43; }
.kf-exam-check ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.kf-exam-check li { display: flex; gap: 8px; align-items: baseline; color: #93552f; font-size: .9rem; }
.kf-exam-check li.is-found { color: #2c6e4b; }
.kf-exam-check li i { flex: none; }
.kf-exam-pass { text-align: center; padding: 18px; }
.kf-exam-pass span { font-size: 2.4rem; }
.kf-exam-pass h3 { margin: 8px 0 4px; color: #1d6a43; }

@media (max-width: 640px) {
	.kf-zone-head { gap: 10px; }
	.kf-creature-img { width: 68px; height: 68px; }
	.kf-zone-card { min-height: 92px; }
	.kf-chip { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
	.kf-creature-breath, .kf-seal-anim .kf-seal-ring, .kf-seal-anim .kf-creature-hero, .kf-formula-live span.is-final { animation: none !important; }
	.kf-zone-card, .kf-chip { transition: none; }
}

/* สถานะซิงก์บัญชี */
.kf-sync { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #9fe3b5; font-size: .85rem; text-shadow: 0 1px 4px #071819; }
.kf-sync.is-saving { color: #ffe9a1; }
.kf-sync.is-saving i { animation: kf-sync-pulse 1s ease-in-out infinite; }
.kf-sync.is-error { color: #f0a08a; }
@keyframes kf-sync-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .kf-sync.is-saving i { animation: none; } }

/* ═════════════════════════════ v0.3 — โรงฝึกสัตว์อาคมมีชีวิต ═════════════════════════════ */
@font-face {
	font-family: "KfDisplay";
	src: url("/assets/fonts/sriracha/Sriracha-Regular.ttf") format("truetype");
	font-display: swap;
}

/* ลำดับภาพ: ชื่อโลกใช้ลายมือไทย ส่วนคำบาลียังคง Sarabun อ่านแม่นทุกอักขระ */
.kf-hero h1, .kf-section-head h1, .kf-zone-head h1, .kf-victory-card h1, .kf-bonded h1 {
	font-family: "KfDisplay", "Sarabun", sans-serif;
	font-weight: 400;
	letter-spacing: -.035em;
}
.kf-hero h1 { max-width: 10ch; font-size: clamp(3.1rem, 6.7vw, 6rem); line-height: .94; }
.kf-pali { font-family: "Sarabun", sans-serif; letter-spacing: .02em; }

/* แผงเสียงแบบแยกชั้น */
.kf-audio-wrap { position: relative; }
.kf-audio-panel {
	position: absolute; z-index: 50; top: calc(100% + 10px); right: 0; width: min(360px, calc(100vw - 24px));
	padding: 14px; color: #f9f3df; border: 1px solid rgba(255, 232, 157, .42); border-radius: 16px;
	background: linear-gradient(160deg, rgba(11, 45, 44, .98), rgba(5, 27, 29, .98));
	box-shadow: 0 24px 70px rgba(0, 10, 12, .5); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.kf-audio-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 2px 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.kf-audio-panel > header strong, .kf-audio-panel > header small { display: block; }
.kf-audio-panel > header strong { color: #ffe39a; }
.kf-audio-panel > header small { color: #bcd0c6; font-size: .72rem; }
.kf-audio-panel > header button { width: 38px; min-height: 38px; padding: 0; justify-content: center; border-radius: 50%; }
.kf-audio-row { display: grid; grid-template-columns: minmax(0, 1fr) 108px; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
.kf-audio-row > button { min-height: 40px; padding: 0 10px; justify-content: flex-start; border-radius: 12px; color: #aabbb4; background: rgba(255,255,255,.05); text-shadow: none; }
.kf-audio-row > button.is-on { color: #fff4cc; border-color: rgba(255, 222, 130, .4); background: rgba(62, 127, 108, .45); }
.kf-audio-row input { width: 100%; accent-color: #e1aa45; }
.kf-motion-toggle { width: 100%; min-height: 56px; margin-top: 10px; padding: 8px 10px !important; display: grid !important; grid-template-columns: 24px 1fr auto; text-align: left; border-radius: 12px !important; }
.kf-motion-toggle span b, .kf-motion-toggle span small { display: block; }
.kf-motion-toggle span small { color: #aebfb7; font-weight: 400; font-size: .68rem; }
.kf-motion-toggle em { color: #d2c49c; font-style: normal; font-size: .74rem; }
.kf-motion-toggle.is-on em { color: #9fe3b5; }

/* ภารกิจรายวัน: เป้าหมายสั้นตามหลักเรียกคืนความจำ ไม่บังคับสตรีก */
.kf-daily-mission {
	width: min(620px, 100%); min-height: 78px; margin-top: 18px; padding: 10px 14px; display: grid;
	grid-template-columns: 50px 1fr 30px; align-items: center; gap: 12px; color: #fff; text-align: left;
	border: 1px solid rgba(255, 229, 148, .48); border-radius: 16px; cursor: pointer;
	background: linear-gradient(110deg, rgba(19, 79, 70, .9), rgba(11, 47, 47, .7));
	box-shadow: 0 16px 36px rgba(0, 18, 18, .2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	transition: transform .22s cubic-bezier(.16,1,.3,1), border-color .22s ease, background .22s ease;
}
.kf-daily-mission:hover { transform: translateY(-3px); border-color: #ffe29a; background: linear-gradient(110deg, rgba(27, 102, 89, .96), rgba(14, 55, 54, .86)); }
.kf-mission-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #ffe29a; border: 1px solid rgba(255, 226, 154, .55); background: rgba(225, 170, 69, .13); font-size: 1.2rem; }
.kf-daily-mission small, .kf-daily-mission strong, .kf-daily-mission em { display: block; }
.kf-daily-mission small { color: #d8c994; font-size: .68rem; }
.kf-daily-mission strong { margin: 1px 0; font-size: 1rem; }
.kf-daily-mission em { color: #cfddd6; font-size: .74rem; font-style: normal; line-height: 1.35; }

/* ให้แผนที่หมู่เกาะทำหน้าที่เล่าโลกจริง ไม่จมหายอยู่ใต้ม่านดำ */
.kf-atlas .kf-scene-shade {
	background: linear-gradient(90deg, rgba(2, 24, 28, .63), rgba(4, 31, 31, .2) 58%, rgba(3, 23, 25, .42)),
		linear-gradient(0deg, rgba(4, 28, 29, .52), rgba(3, 25, 27, .04) 70%);
}
.kf-atlas .kf-zone-card { background: linear-gradient(120deg, rgba(7, 39, 38, .91), rgba(7, 31, 34, .82)); }

/* เวทีคู่ฝึก: สัตว์ไม่ใช่ไอคอนประกอบ แต่เป็นผู้ตอบสนองต่อการคิด */
.kf-training-wrap { width: min(1180px, 100%); }
.kf-encounter-layout { display: grid; grid-template-columns: minmax(250px, .62fr) minmax(510px, 1.18fr); align-items: stretch; gap: 16px; }
.kf-companion-stage {
	position: relative; min-height: 580px; padding: 24px 22px 20px; display: flex; flex-direction: column; align-items: center;
	justify-content: center; overflow: hidden; color: #f8f0d6; text-align: center; border: 1px solid rgba(255,235,172,.32);
	border-radius: 16px; background: radial-gradient(circle at 50% 25%, rgba(98, 183, 153, .3), transparent 42%), linear-gradient(170deg, rgba(8, 47, 44, .88), rgba(5, 28, 30, .94));
	box-shadow: 0 24px 70px rgba(3, 20, 22, .3); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.kf-companion-stage::after { content: ""; position: absolute; inset: auto -20% -18% -20%; height: 44%; background: radial-gradient(ellipse, rgba(225,170,69,.16), transparent 68%); pointer-events: none; }
.kf-companion-portrait { position: relative; width: min(300px, 90%); aspect-ratio: 1; display: grid; place-items: center; }
.kf-companion-img { position: relative; z-index: 2; width: 82%; height: 82%; object-fit: cover; border-radius: 50%; border: 2px solid rgba(255, 229, 148, .72); box-shadow: 0 26px 55px rgba(0, 14, 16, .48), 0 0 48px rgba(97, 184, 150, .22); animation: kfCreatureBreathe 5.2s ease-in-out infinite; }
.kf-magic-orbit { position: absolute; z-index: 1; inset: 1%; border: 1px solid rgba(255, 221, 125, .24); border-radius: 50%; animation: kfOrbit 22s linear infinite; }
.kf-magic-orbit::before, .kf-magic-orbit::after { content: ""; position: absolute; inset: 11%; border: 1px dashed rgba(124, 213, 181, .28); border-radius: 50%; }
.kf-magic-orbit::after { inset: 23%; border-style: solid; opacity: .45; }
.kf-magic-orbit span { --angle: calc(var(--kf-orbit-index) * 40deg); position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: #ffe49c; box-shadow: 0 0 10px #ffe49c; transform: rotate(var(--angle)) translateX(145px); }
.kf-creature-response { position: absolute; z-index: 4; right: 4%; bottom: 12%; width: 52px; height: 52px; display: grid; place-items: center; color: #17443c; border: 3px solid #fff0bd; border-radius: 50%; background: #e9c96f; box-shadow: 0 12px 25px rgba(0,0,0,.3); transition: color .28s ease, background .28s ease, transform .28s cubic-bezier(.16,1,.3,1); }
.is-thinking .kf-creature-response { color: #7b3d29; background: #f1b175; transform: rotate(-7deg); }
.is-joyful .kf-creature-response, .is-bonded .kf-creature-response { color: #fff; background: #3f9b70; transform: scale(1.08); }
.kf-companion-identity { position: relative; z-index: 2; margin-top: 2px; }
.kf-companion-identity small, .kf-companion-identity strong, .kf-companion-identity span { display: block; }
.kf-companion-identity small { color: #d7bd76; font-size: .69rem; }
.kf-companion-identity strong { font-family: "KfDisplay", "Sarabun", sans-serif; font-size: 1.45rem; font-weight: 400; }
.kf-companion-identity span { margin-top: 1px; color: #bad3c6; font-size: .72rem; }
.kf-bond-meter { position: relative; z-index: 2; margin: 13px 0 12px; display: flex; align-items: center; gap: 9px; }
.kf-bond-meter span { width: 24px; height: 24px; display: grid; place-items: center; color: rgba(255,255,255,.2); font-size: .55rem; border: 1px solid rgba(255,255,255,.14); transform: rotate(45deg); transition: color .3s ease, border-color .3s ease, background .3s ease, box-shadow .3s ease; }
.kf-bond-meter i { transform: rotate(-45deg); }
.kf-bond-meter span.is-lit { color: #173f37; border-color: #f8d989; background: #f8d989; box-shadow: 0 0 14px rgba(248,217,137,.45); }
.kf-bond-meter span.is-current { border-color: #fff5cd; color: #fff5cd; }
.kf-companion-speech { position: relative; z-index: 2; width: 100%; min-height: 68px; margin: 0; padding: 12px 14px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #263d36; border-radius: 14px; background: linear-gradient(160deg, #fff9e7, #eadbb0); box-shadow: 0 12px 26px rgba(0, 12, 12, .26); font-size: .84rem; line-height: 1.55; }
.kf-companion-speech i { align-self: flex-start; color: #b27a31; font-size: .72rem; }
.kf-speech-enter-active, .kf-speech-leave-active { transition: opacity .2s ease, transform .24s cubic-bezier(.16,1,.3,1); }
.kf-speech-enter, .kf-speech-leave-to { opacity: 0; transform: translateY(6px); }
.kf-encounter-layout .kf-training-card { border-radius: 16px; }
.kf-specimen-sigil { flex: 0 0 72px; width: 72px; height: 72px; display: grid; place-items: center; border: 1px solid rgba(255,229,155,.5); border-radius: 50%; color: #ffe39b; background: rgba(255,255,255,.07); font-size: 1.65rem; box-shadow: inset 0 0 25px rgba(141,207,181,.16); }
.kf-choice { transition: color .2s ease, background .2s ease, border-color .2s ease, transform .22s cubic-bezier(.16,1,.3,1), box-shadow .2s ease; }
.kf-choice.is-selected { border-color: #c9993e; box-shadow: 0 0 0 3px rgba(201,153,62,.16); }
.kf-choice.is-wrong { color: #7d3427; border-color: #cf7358; background: #f4d2c1; }
.kf-choice.is-correct { color: #145842; border-color: #54a67d; background: #d3ead7; }
.kf-chipboard { padding: 4px 28px 28px; }

/* ผนึกไมตรีเป็น signature moment ของการเข้าใจสูตร */
.kf-training-card.is-sealed { grid-column: 1 / -1; min-height: 590px; display: grid; place-items: center; position: relative; overflow: hidden; }
.kf-bonded { position: relative; z-index: 1; width: 100%; }
.kf-transformation-field { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.kf-transformation-field span { --angle: calc(var(--kf-spark) * 25.714deg); position: absolute; top: 36%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: #f7d783; box-shadow: 0 0 16px #f7d783; opacity: 0; }
.kf-seal-anim .kf-transformation-field span { animation: kfSpark 1.1s cubic-bezier(.16,1,.3,1) calc(var(--kf-spark) * 25ms) both; }
.kf-seal-anim .kf-creature-hero { animation: kfReveal .9s cubic-bezier(.16,1,.3,1) both; }
.kf-sealed-label { margin: 24px 0 3px; color: #8d6124; font-size: .77rem; font-weight: 700; }
@keyframes kfCreatureBreathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.012); } }
@keyframes kfOrbit { to { transform: rotate(360deg); } }
@keyframes kfSpark { 0% { opacity: 0; transform: rotate(var(--angle)) translateX(10px) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--angle)) translateX(270px) scale(1.3); } }
@keyframes kfReveal { 0% { opacity: .2; transform: scale(.72); filter: brightness(2.4) blur(5px); } 100% { opacity: 1; transform: scale(1); filter: none; } }

/* easing ที่นิ่งและมีน้ำหนัก — ไม่มี bounce รบกวนการอ่าน */
.kf-seal-anim .kf-creature-hero { animation-timing-function: cubic-bezier(.16,1,.3,1); }
.kf-zone-card, .kf-chip, .kf-btn, .kf-creature-stop { transition-timing-function: cubic-bezier(.16,1,.3,1); }

@media (max-width: 940px) {
	.kf-encounter-layout { grid-template-columns: 210px minmax(0, 1fr); }
	.kf-companion-stage { min-height: 540px; padding-inline: 14px; }
	.kf-companion-portrait { width: 205px; }
	.kf-magic-orbit span { transform: rotate(var(--angle)) translateX(98px); }
}

@media (max-width: 720px) {
	.kf-audio-panel { position: fixed; top: 66px; right: 10px; }
	.kf-daily-mission { grid-template-columns: 44px 1fr 22px; }
	.kf-daily-mission em { display: none; }
	.kf-encounter-layout { display: block; }
	.kf-companion-stage { min-height: 0; height: 146px; padding: 10px 12px; display: grid; grid-template-columns: 108px 1fr; grid-template-rows: auto auto 1fr; gap: 2px 10px; border-radius: 16px 16px 0 0; text-align: left; }
	.kf-companion-portrait { grid-row: 1 / 4; width: 108px; }
	.kf-companion-img { width: 88%; height: 88%; }
	.kf-magic-orbit span { transform: rotate(var(--angle)) translateX(51px); width: 3px; height: 3px; }
	.kf-creature-response { width: 34px; height: 34px; right: 0; bottom: 7%; border-width: 2px; font-size: .72rem; }
	.kf-companion-identity { margin: 0; align-self: end; }
	.kf-companion-identity strong { font-size: 1.1rem; }
	.kf-companion-identity span { display: none; }
	.kf-bond-meter { margin: 4px 0; gap: 6px; }
	.kf-bond-meter span { width: 17px; height: 17px; font-size: .42rem; }
	.kf-companion-speech { min-height: 42px; padding: 6px 9px; justify-content: flex-start; font-size: .69rem; line-height: 1.35; box-shadow: none; }
	.kf-encounter-layout .kf-training-card { border-radius: 0 0 16px 16px; }
	.kf-training-card.is-sealed { min-height: auto; border-radius: 16px; }
	.kf-specimen-sigil { flex-basis: 58px; width: 58px; height: 58px; }
	.kf-transformation-field span { top: 27%; }
}

@media (max-width: 380px) {
	.kf-brand strong { font-size: .86rem; }
	.kf-audio-panel { width: calc(100vw - 16px); right: 8px; }
	.kf-audio-row { grid-template-columns: 1fr 92px; }
	.kf-companion-stage { grid-template-columns: 92px 1fr; height: 138px; }
	.kf-companion-portrait { width: 92px; }
	.kf-magic-orbit span { transform: rotate(var(--angle)) translateX(43px); }
	.kf-companion-speech { font-size: .64rem; }
}

@media (prefers-reduced-motion: reduce) {
	.kf-companion-img, .kf-magic-orbit, .kf-transformation-field span, .kf-seal-anim .kf-creature-hero { animation: none !important; }
}
.kf-app.is-reduced-motion .kf-companion-img,
.kf-app.is-reduced-motion .kf-magic-orbit,
.kf-app.is-reduced-motion .kf-transformation-field span,
.kf-app.is-reduced-motion .kf-seal-anim .kf-creature-hero { animation: none !important; }

/* เจาะจงกว่ากฎ sealed ของ encounter: บัตรจบทฤษฎีต้องแนบเต็มกรอบ ไม่มีพื้นที่ว่างจากการจัดกึ่งกลาง */
.kf-training-card.kf-theory-card.is-sealed {
	min-height: 430px;
	grid-template-columns: minmax(250px, .82fr) minmax(320px, 1.18fr);
	place-items: stretch;
}
.kf-training-card.kf-theory-card.is-sealed .kf-theory-complete-copy h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }

@media (max-width: 720px) {
	.kf-training-card.kf-theory-card.is-sealed { width: 100%; min-width: 0; max-width: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr); }
}
