/* EduSmart Kids — gaya ringan tanpa framework */
@font-face { font-family: 'Jakarta'; src: url(../fonts/plus-jakarta-sans-latin-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url(../fonts/plus-jakarta-sans-latin-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url(../fonts/plus-jakarta-sans-latin-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
    --oranye: #fb923c; --oranye-tua: #ea580c; --biru: #3b82f6; --hijau: #22c55e; --merah: #ef4444; --ungu: #a855f7;
    --teks: #1e2533; --redup: #64748b; --kartu: #fff; --garis: #fde4c8; --latar: #fff7ed; --rad: 26px;
    --bayang: 0 6px 0 rgba(30, 37, 51, .08), 0 10px 24px rgba(30, 37, 51, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.kids { margin: 0; font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--teks); font-weight: 600;
    background: radial-gradient(circle at 15% 10%, #fff 0, transparent 40%), linear-gradient(180deg, #fff7ed 0%, #e0f2fe 100%); background-attachment: fixed;
    min-height: 100vh; display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent; }
a { color: var(--oranye-tua); }
h1, h2, h3 { font-weight: 800; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
p { line-height: 1.55; }
img { max-width: 100%; height: auto; }

/* Atas & bawah */
.k-atas { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem max(16px, env(safe-area-inset-left)); max-width: 1100px; width: 100%; margin: 0 auto; }
.k-logo { display: flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--teks); font-weight: 800; font-size: 1.1rem; }
.k-logo b { color: var(--oranye-tua); }
.k-atas-kanan { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.k-chip { display: inline-flex; align-items: center; gap: .3rem; background: #fff; border: 2px solid var(--garis); border-radius: 999px; padding: .35rem .7rem;
    font: inherit; font-weight: 800; color: var(--teks); text-decoration: none; cursor: pointer; min-height: 42px; }
.k-chip[aria-pressed="false"] { opacity: .55; }
.k-avatar-kecil { font-size: 1.25rem; }
.k-isi { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: .5rem 16px 2rem; }
.k-bawah { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center; padding: 1rem 16px 1.5rem; font-size: .8rem; color: var(--redup); font-weight: 400; }
.k-bawah a { color: var(--redup); }
.k-mode-main .k-bawah { display: none; }

/* Elemen umum */
.k-kartu { background: var(--kartu); border-radius: var(--rad); padding: 1.25rem; box-shadow: var(--bayang); margin-bottom: 1rem; }
.k-sempit { max-width: 480px; margin: 1rem auto; }
.k-tengah { text-align: center; }
.k-tengah-baris { justify-content: center; }
.k-redup { color: var(--redup); font-weight: 400; }
.k-kecil { font-size: .9rem; color: var(--redup); font-weight: 400; }
.k-label { display: inline-block; background: #ffedd5; color: var(--oranye-tua); border-radius: 999px; padding: .25rem .8rem; font-weight: 800; font-size: .85rem; margin: 0 0 .7rem; }
.k-judul-besar { font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 1rem 0; }
.k-ikon-besar { font-size: 2.6rem; display: block; margin-bottom: .3rem; }
.k-pesan { max-width: 1100px; margin: .5rem auto; padding: .75rem 1rem; border-radius: 16px; background: #e0f2fe; font-weight: 600; width: calc(100% - 32px); }
.k-pesan-danger, .k-pesan-warning { background: #fee2e2; color: #991b1b; }
.k-pesan-success { background: #dcfce7; color: #166534; }

.k-tombol { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 52px; padding: .7rem 1.4rem; border-radius: 999px;
    background: #fff; border: 3px solid var(--garis); color: var(--teks); font: inherit; font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer;
    box-shadow: 0 4px 0 #fed7aa; transition: transform .08s; }
.k-tombol:active { transform: translateY(3px); box-shadow: 0 1px 0 #fed7aa; }
.k-tombol-utama { background: var(--oranye); border-color: var(--oranye-tua); color: #fff; box-shadow: 0 4px 0 var(--oranye-tua); }
.k-tombol-kecil { min-height: 40px; padding: .4rem 1rem; font-size: .9rem; }
.k-tombol-bahaya { color: #b91c1c; border-color: #fecaca; box-shadow: 0 3px 0 #fecaca; margin-top: .6rem; }
.k-lebar { width: 100%; }
.k-tombol-baris { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0; }
.k-atau { text-align: center; color: var(--redup); margin: .8rem 0; }

/* Formulir */
.k-form { display: grid; gap: .9rem; text-align: left; }
.k-form label { display: grid; gap: .35rem; font-weight: 800; }
.k-form input[type=text], .k-form input[type=email], .k-form input[type=password], .k-form input[type=tel], .k-form select {
    font: inherit; font-weight: 600; font-size: 1.05rem; padding: .75rem 1rem; border-radius: 16px; border: 3px solid var(--garis); background: #fff; width: 100%; }
.k-form input:focus, .k-form select:focus { outline: none; border-color: var(--oranye); }
.k-form fieldset { border: 0; padding: 0; margin: 0; }
.k-form legend { font-weight: 800; margin-bottom: .4rem; }
.k-centang { display: flex !important; grid-template-columns: none; gap: .6rem !important; align-items: flex-start; font-weight: 400 !important; font-size: .92rem; }
.k-centang input { width: 22px; height: 22px; margin-top: .1rem; flex: none; }
.k-pilihan { display: flex; flex-wrap: wrap; gap: .45rem; }
.k-opsi-radio, .k-opsi-avatar { position: relative; cursor: pointer; }
.k-opsi-radio input, .k-opsi-avatar input { position: absolute; opacity: 0; pointer-events: none; }
.k-opsi-radio span { display: inline-block; padding: .5rem .85rem; border-radius: 999px; border: 3px solid var(--garis); background: #fff; font-weight: 600; font-size: .92rem; }
.k-opsi-avatar span { display: grid; place-items: center; width: 56px; height: 56px; font-size: 2rem; border-radius: 18px; border: 3px solid var(--garis); background: #fff; }
.k-opsi-radio input:checked + span, .k-opsi-avatar input:checked + span { border-color: var(--oranye); background: #ffedd5; }
.k-opsi-radio input:focus-visible + span, .k-opsi-avatar input:focus-visible + span { outline: 3px solid var(--biru); }
.k-gerbang input { text-align: center; font-size: 1.6rem !important; }
.k-soal-gerbang { font-size: 2rem; text-align: center; }

/* Halaman depan */
.k-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; align-items: center; padding: 1.5rem 0; }
.k-lead { font-size: 1.12rem; font-weight: 400; }
.k-hero-kiko { width: 100%; max-width: 280px; justify-self: center; animation: k-goyang 3s ease-in-out infinite; }
.k-bagian { margin: 1.5rem 0; }
.k-dunia-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.k-dunia { background: #fff; border-radius: var(--rad); padding: 1rem; text-align: center; box-shadow: var(--bayang); border-bottom: 6px solid var(--w); display: grid; gap: .2rem; }
.k-dunia-ikon { font-size: 2.4rem; }
.k-segera { opacity: .6; }
.k-segera small { color: var(--redup); font-weight: 400; }
.k-tiga { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.k-tiga > div { background: #fff; border-radius: var(--rad); padding: 1.2rem; box-shadow: var(--bayang); }
.k-tiga p { font-weight: 400; margin: 0; }
.k-harga { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.k-harga ul { margin: 0; padding-left: 1.2rem; font-weight: 400; line-height: 1.8; }
.k-kartu-premium { background: linear-gradient(135deg, #fff7ed, #fef3c7); border: 3px solid #fcd34d; }

/* Pilih pemain */
.k-pemain { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.k-pemain-tombol { display: grid; justify-items: center; gap: .3rem; width: 150px; padding: 1.2rem .5rem; border-radius: var(--rad); background: #fff; border: 4px solid var(--garis);
    box-shadow: var(--bayang); font: inherit; font-weight: 800; font-size: 1.15rem; color: var(--teks); cursor: pointer; transition: transform .1s; }
.k-pemain-tombol:hover, .k-pemain-tombol:focus-visible { transform: translateY(-4px) rotate(-2deg); border-color: var(--oranye); }
.k-pemain-tombol small { color: var(--redup); }
.k-avatar { display: grid; place-items: center; width: 84px; height: 84px; font-size: 3.2rem; border-radius: 50%; background: #ffedd5; }

/* Peta */
.k-sapa { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 1rem; }
.k-gelembung { position: relative; background: #fff; border-radius: 22px; padding: .8rem 1.1rem; margin: 0; box-shadow: var(--bayang); font-size: 1.1rem; }
.k-peta { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.k-pulau { background: #fff; border-radius: var(--rad); padding: 1rem 1.1rem 1.2rem; box-shadow: var(--bayang); border-top: 8px solid var(--w); }
.k-pulau h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.35rem; }
.k-pulau-ikon { font-size: 2rem; }
.k-level { display: flex; gap: .6rem; }
.k-level-tombol { flex: 1; display: grid; justify-items: center; gap: .2rem; padding: .7rem .3rem; border-radius: 20px; text-decoration: none; color: #fff;
    background: var(--w); box-shadow: 0 5px 0 rgba(0, 0, 0, .18); font-weight: 800; transition: transform .1s; }
.k-level-tombol:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.k-level-angka { font-size: 1.6rem; line-height: 1; }
.k-level-bintang i { font-style: normal; color: rgba(255, 255, 255, .45); font-size: 1rem; }
.k-level-bintang i.nyala { color: #fde047; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.k-terkunci { background: #cbd5e1; }
.k-saran { animation: k-denyut 1.6s ease-in-out infinite; }
.k-istirahat h1 { margin-top: .5rem; }
.k-kiko-tidur { filter: saturate(.7); transform: rotate(-8deg); }

/* Album */
.k-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: .6rem; margin: 1rem 0 1.5rem; }
.k-stiker { display: grid; place-items: center; aspect-ratio: 1; border-radius: 20px; background: rgba(255, 255, 255, .6); border: 3px dashed #cbd5e1; font-size: 2.2rem; color: #cbd5e1; }
.k-stiker.k-ada { background: #fff; border: 3px solid #fde68a; box-shadow: var(--bayang); }

/* Area orang tua */
.k-ortu-kepala { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.k-ortu-anak { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.k-ortu-anak-kepala { display: flex; gap: .8rem; align-items: center; margin-bottom: .6rem; }
.k-ortu-anak-kepala .k-avatar { width: 60px; height: 60px; font-size: 2.2rem; }
.k-angka { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0 0 .6rem; }
.k-angka div { background: #f8fafc; border-radius: 14px; padding: .5rem .7rem; }
.k-angka dt { font-size: .75rem; color: var(--redup); font-weight: 600; }
.k-angka dd { margin: 0; font-weight: 800; }
.k-per-dunia { margin: 0 0 .7rem; padding-left: 1.1rem; font-weight: 400; font-size: .92rem; line-height: 1.6; }
.k-premium-info { border: 3px solid var(--garis); font-weight: 400; }
.k-premium-info.k-aktif { border-color: #fcd34d; background: #fffbeb; }
details.k-kartu summary { cursor: pointer; font-size: 1.05rem; }
details.k-kartu[open] summary { margin-bottom: 1rem; }
.mb-0 { margin-bottom: 0; }

/* Permainan */
.k-game { display: flex; flex-direction: column; gap: .8rem; min-height: calc(100vh - 90px); max-width: 760px; margin: 0 auto; }
.k-game-atas { display: flex; align-items: center; gap: .6rem; }
.k-bulat { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 50%; background: #fff; border: 3px solid var(--garis);
    font: inherit; font-size: 1.3rem; font-weight: 800; color: var(--teks); text-decoration: none; cursor: pointer; }
.k-progres { flex: 1; display: flex; gap: 6px; }
.k-progres span { flex: 1; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 2px solid var(--garis); }
.k-progres span.selesai { background: var(--w, var(--oranye)); border-color: transparent; }
.k-progres span.kini { border-color: var(--w, var(--oranye)); }
.k-soal-kepala { display: flex; align-items: center; gap: .5rem; }
.k-kiko { flex: none; transition: transform .2s; }
.k-kiko.lompat { animation: k-lompat .55s ease; }
.k-kiko.geleng { animation: k-geleng .45s ease; }
.k-tanya { font-size: clamp(1.15rem, 4.2vw, 1.6rem); font-weight: 800; flex: 1; }
.k-panggung { min-height: 120px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem .6rem; padding: .8rem; border-radius: var(--rad);
    background: rgba(255, 255, 255, .7); font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1.1; text-align: center; }
.k-panggung:empty { display: none; }
.k-panggung .k-grup { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem; padding: .4rem .6rem; border-radius: 20px; background: #fff; max-width: 46%; }
.k-panggung .k-tanda { font-size: 2.4rem; font-weight: 800; color: var(--redup); }
.k-panggung .k-coret { position: relative; opacity: .35; }
.k-panggung .k-coret::after { content: ''; position: absolute; left: -4%; right: -4%; top: 50%; height: 5px; background: var(--merah); transform: rotate(-20deg); border-radius: 3px; }
.k-panggung .k-kotak-tanya { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 16px; border: 4px dashed var(--w); color: var(--w); font-size: .8em; }
.k-pilihan-jawab { display: grid; grid-template-columns: repeat(var(--kol, 2), 1fr); gap: .8rem; }
.k-jawab { position: relative; display: grid; place-items: center; min-height: 104px; padding: .5rem; border-radius: var(--rad); background: #fff; border: 4px solid var(--garis);
    box-shadow: 0 6px 0 #fed7aa; font: inherit; font-weight: 800; font-size: clamp(2.2rem, 10vw, 3.4rem); color: var(--teks); cursor: pointer; transition: transform .08s; touch-action: manipulation; }
.k-jawab:active { transform: translateY(4px); box-shadow: 0 2px 0 #fed7aa; }
.k-jawab svg { width: 78%; max-width: 110px; height: auto; }
.k-jawab.benar { background: #dcfce7; border-color: var(--hijau); box-shadow: 0 6px 0 #16a34a; animation: k-pop .4s ease; }
.k-jawab.salah { background: #fee2e2; border-color: #fca5a5; box-shadow: 0 6px 0 #fca5a5; animation: k-geleng .4s ease; opacity: .55; }
.k-jawab:disabled { cursor: default; }
.k-jawab .k-kata { font-size: .4em; display: block; color: var(--redup); }
.k-huruf-kecil { text-transform: none; }

/* Layar akhir */
.k-akhir { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(30, 37, 51, .55); animation: k-muncul .25s ease; }
.k-akhir-kotak { width: 100%; max-width: 420px; background: #fff; border-radius: 32px; padding: 1.5rem 1.2rem; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.k-bintang-besar { font-size: 3.4rem; letter-spacing: .1em; margin: .3rem 0; }
.k-bintang-besar i { font-style: normal; color: #e2e8f0; display: inline-block; }
.k-bintang-besar i.nyala { color: #facc15; animation: k-pop .5s ease both; text-shadow: 0 3px 0 #ca8a04; }
.k-bintang-besar i:nth-child(2) { animation-delay: .25s; }
.k-bintang-besar i:nth-child(3) { animation-delay: .5s; }
.k-stiker-baru { font-size: 4rem; animation: k-putar .8s ease .6s both; }
.k-akhir .k-tombol-baris { justify-content: center; }
.k-konfeti { position: fixed; top: -20px; font-size: 1.6rem; pointer-events: none; z-index: 11; animation: k-jatuh 2.4s linear forwards; }

@keyframes k-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes k-geleng { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes k-lompat { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px) rotate(-6deg); } }
@keyframes k-goyang { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes k-denyut { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes k-muncul { from { opacity: 0; } to { opacity: 1; } }
@keyframes k-putar { 0% { transform: scale(0) rotate(-180deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes k-jatuh { to { transform: translateY(110vh) rotate(540deg); } }

@media (max-width: 640px) {
    .k-hero { grid-template-columns: 1fr; text-align: center; }
    .k-hero .k-tombol-baris { justify-content: center; }
    .k-hero-kiko { max-width: 180px; grid-row: 1; }
    .k-sembunyi-hp { display: none; }
    .k-logo span { font-size: 1rem; }
    .k-atas-kanan { flex-wrap: nowrap; gap: .3rem; }
    .k-chip { padding: .3rem .55rem; min-height: 40px; }
    .k-atas:has(.k-chip-anak) .k-logo span { display: none; }
    .k-jawab { min-height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
.k-chip-anak { white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 30px; }
