/* Pulau Lumi — gaya dasar. Semua berkas di folder ini digabung menjadi dist/app.css saat build. */
@font-face { font-family: "Baloo"; src: url("/fonts/baloo-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Baloo"; src: url("/fonts/baloo-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Andika"; src: url("/fonts/andika-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Andika"; src: url("/fonts/andika-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Scheherazade"; src: url("/fonts/scheherazade-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Scheherazade"; src: url("/fonts/scheherazade-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --sky1: #7fd8ff; --sky2: #c8f1ff; --sea: #37b6e9; --sea2: #1e8fd0;
  --ink: #23314d; --ink2: #5a6a88; --paper: #ffffff; --line: #e3ecf7;
  --orange: #ff8a3d; --yellow: #ffd23f; --green: #2bb673; --blue: #1aa5d8; --purple: #8e5bef; --pink: #ff5d8f; --red: #f25c54; --teal: #12b5a6;
  --ok: #24b46a; --no: #f25c54;
  --accent: var(--orange);
  --r: 22px; --shadow: 0 6px 0 rgba(20, 50, 90, .16); --shadow-s: 0 3px 0 rgba(20, 50, 90, .16);
  --ui: "Baloo", "Andika", system-ui, sans-serif; --read: "Andika", system-ui, sans-serif; --arab: "Scheherazade", "Noto Naskh Arabic", serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--ui); font-weight: 600; color: var(--ink); background: linear-gradient(180deg, var(--sky1), var(--sky2) 55%, #eafaff);
  overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible { outline: 4px solid #1b6fd6; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: screen-in .28s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 16px calc(24px + var(--safe-b)); }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; }

/* Bilah atas */
.topbar { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 8px; flex: none; }
.topbar-title { font-size: clamp(20px, 5vw, 28px); font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0f3d66; }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.ibtn {
  width: 52px; height: 52px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow-s); font-size: 26px; line-height: 1;
  display: grid; place-items: center; flex: none; transition: transform .08s;
}
.ibtn:active { transform: translateY(3px) scale(.96); box-shadow: none; }
.ibtn.big { width: 76px; height: 76px; font-size: 38px; }
.ibtn.go { background: var(--ok); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border-radius: 999px; padding: 6px 14px; box-shadow: var(--shadow-s); font-size: 18px; font-weight: 800; }

/* Tombol umum */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 10px 26px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 22px; font-weight: 800; box-shadow: 0 5px 0 rgba(0, 0, 0, .18); transition: transform .08s;
}
.btn:active { transform: translateY(4px); box-shadow: none; }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.green { background: var(--ok); }
.btn.small { min-height: 44px; font-size: 17px; padding: 6px 18px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.card { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.center { text-align: center; }
.muted { color: var(--ink2); font-family: var(--read); font-weight: 400; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Bintang, Lumi, konfeti, toast, modal */
.stars { display: inline-flex; gap: 2px; }
.star { color: #cfd9e8; font-size: 1em; line-height: 1; }
.star.on { color: var(--yellow); text-shadow: 0 2px 0 #d49b00; }
.lumi { width: var(--lumi); height: var(--lumi); flex: none; animation: lumi-float 3s ease-in-out infinite; }
.lumi svg { display: block; overflow: visible; }
.lumi-glow { animation: lumi-glow 2.2s ease-in-out infinite; transform-origin: 50px 56px; }
.lumi-wings { animation: lumi-wing .5s ease-in-out infinite alternate; transform-origin: 50px 46px; }
.lumi-wow { animation: lumi-jump .6s ease-out 2; }
@keyframes lumi-float { 50% { transform: translateY(-7px); } }
@keyframes lumi-glow { 50% { transform: scale(1.12); opacity: .55; } }
@keyframes lumi-wing { to { transform: scaleX(.86); } }
@keyframes lumi-jump { 40% { transform: translateY(-22px) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
#toast {
  position: fixed; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translate(-50%, 30px); background: #23314d; color: #fff; padding: 10px 20px;
  border-radius: 999px; font-size: 16px; opacity: 0; transition: .25s; pointer-events: none; z-index: 70; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal { position: fixed; inset: 0; background: rgba(15, 40, 70, .55); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .18s; }
.modal.closing { opacity: 0; transition: opacity .18s; }
.modal-card { background: var(--paper); border-radius: 28px; padding: 22px; width: min(480px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); animation: pop .25s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes bounce-in { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes pulse { 50% { transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Pulau Warna — menu, gambar bebas, mewarnai, galeri. Semua kelas berawalan art-. */

/* ---------- Umum ---------- */
.art-grow { flex: 1; min-width: 0; }
.art-row { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }
.art-dim { opacity: .4; }
.art-nope { animation: shake .4s; }
.ibtn.art-go, .ibtn.art-ready { background: var(--ok); }
.ibtn.art-saved { background: #e4f8ec; opacity: 1; cursor: default; }
/* ketukan pertama pada tombol hapus: merah dan bergoyang, menunggu ketukan kedua */
.ibtn.art-arm { background: var(--red); opacity: 1; box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--red); animation: art-wiggle .5s ease-in-out infinite; }
@keyframes art-wiggle { 25% { transform: rotate(-12deg) scale(1.12); } 75% { transform: rotate(12deg) scale(1.12); } }

/* ---------- Menu ---------- */
.art-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 4px; }
.art-card {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 10px 12px; border-radius: 28px; color: #fff;
  box-shadow: 0 7px 0 rgba(20, 50, 90, .2); transition: transform .08s; animation: bounce-in .45s both;
}
.art-card:active { transform: translateY(5px) scale(.98); box-shadow: none; }
.art-card-draw { background: linear-gradient(160deg, #ffb13d, #ff6f91); }
.art-card-fill { background: linear-gradient(160deg, #46d3b8, #3a8dde); animation-delay: .08s; }
.art-card-pic { display: block; border-radius: 20px; background: #fff; overflow: hidden; aspect-ratio: 4 / 3; }
.art-card-svg { display: block; width: 100%; height: 100%; }
.art-card-emo {
  position: absolute; right: 2px; top: 2px; width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 30px; line-height: 1; box-shadow: var(--shadow-s); transform: rotate(10deg);
}
.art-card-name { font-size: clamp(18px, 4.8vw, 26px); font-weight: 800; line-height: 1.15; text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .16); }

.art-gal { margin-top: 24px; }
.art-gal-title { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: #0f3d66; margin-bottom: 10px; }
.art-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.art-thumb { aspect-ratio: 1; padding: 5px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-s); transition: transform .08s; animation: bounce-in .4s both; }
.art-thumb:active { transform: scale(.94); }
.art-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 13px; }
.art-empty {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 22px;
  border: 3px dashed rgba(15, 61, 102, .28); background: rgba(255, 255, 255, .55);
}
.art-empty-slots { display: flex; gap: 8px; }
.art-empty-slots span { width: 52px; height: 52px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 26px; opacity: .75; }
.art-empty p { flex: 1 1 160px; font-size: 16px; }

/* ---------- Modal (lihat karya, tersimpan, selesai mewarnai) ---------- */
.modal-card.art-modal { width: min(440px, 100%); padding: 18px; }
.art-done, .art-view { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.art-done-top { display: flex; align-items: flex-end; justify-content: center; gap: 8px; width: 100%; }
.art-frame { display: block; min-width: 0; max-width: 100%; max-height: min(54vh, 400px); border-radius: 16px; border: 6px solid var(--yellow); box-shadow: 0 5px 0 #d49b00; background: #fff; }
.art-done-top .art-frame { max-width: calc(100% - 84px); max-height: min(42vh, 300px); transform: rotate(-2deg); }
.art-frame-svg { width: min(230px, 56vw); aspect-ratio: 1; overflow: hidden; }
.art-win-svg { display: block; width: 100%; height: 100%; }

/* ---------- Tata letak gambar bebas & mewarnai ---------- */
.art-body {
  flex: 1; min-height: 0; display: grid; gap: 8px; padding: 0 8px calc(8px + var(--safe-b));
  grid-template: "paper" minmax(0, 1fr) "pal" auto "tools" auto / minmax(0, 1fr);
}
.art-fill .art-body { grid-template: "paper" minmax(0, 1fr) "pal" auto / minmax(0, 1fr); }

/* kertas gambar bebas */
.art-paper { grid-area: paper; position: relative; min-width: 0; min-height: 0; background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 4px; }
.art-cv { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.art-ghost { position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; opacity: .3; pointer-events: none; animation: art-doodle 2.6s ease-in-out infinite; }
@keyframes art-doodle { 0%, 100% { transform: translate(-30px, 10px) rotate(-10deg); } 50% { transform: translate(30px, -10px) rotate(8deg); } }

/* palet warna */
.art-pal {
  grid-area: pal; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); justify-items: center; align-items: center;
  background: rgba(255, 255, 255, .72); border-radius: 22px; padding: 3px;
}
.art-sw { width: 100%; min-height: 52px; display: grid; place-items: center; border-radius: 16px; }
.art-sw-dot { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 3px 0 rgba(20, 50, 90, .26); transition: transform .12s; }
.art-sw:active .art-sw-dot { transform: scale(.9); }
.art-sw.art-on .art-sw-dot { transform: scale(1.18); box-shadow: 0 0 0 3.5px var(--ink); }

/* alat: ukuran, penghapus, cap */
.art-tools { grid-area: tools; display: flex; justify-content: center; align-items: center; gap: clamp(8px, 3.4vw, 22px); --c: #2a2f3a; }
.art-tools .ibtn.art-on { background: #fff3cf; box-shadow: 0 0 0 4px var(--orange); }
.art-size-dot { display: block; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .2); }
.art-size-0 { width: 10px; height: 10px; }
.art-size-1 { width: 20px; height: 20px; }
.art-size-2 { width: 34px; height: 34px; }
.art-eraser svg { display: block; }
.art-stamp { font-size: 28px; }
.art-tray {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 10px; margin: 0 auto; width: max-content; max-width: calc(100% - 16px);
  display: grid; grid-template-columns: repeat(5, 52px); gap: 4px; padding: 8px; background: #fff; border-radius: 22px;
  box-shadow: 0 0 0 3px var(--line), 0 10px 26px rgba(15, 40, 70, .32); animation: pop .2s cubic-bezier(.2, 1.4, .4, 1);
}
.art-tray-b { width: 52px; height: 52px; display: grid; place-items: center; font-size: 32px; line-height: 1; border-radius: 14px; }
.art-tray-b:active { transform: scale(.9); }
.art-tray-b.art-on { background: #fff3cf; box-shadow: inset 0 0 0 3px var(--orange); }

/* gambar mewarnai */
.art-pic { grid-area: paper; position: relative; min-width: 0; min-height: 0; margin-bottom: 4px; }
.art-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; filter: drop-shadow(0 6px 0 rgba(20, 50, 90, .16)); }
.art-svg * { pointer-events: none; }
.art-svg .r, .art-svg .bg { pointer-events: auto; cursor: pointer; }
.art-pop { transform-box: fill-box; transform-origin: center; animation: art-pop .34s ease-out; }
@keyframes art-pop { 40% { transform: scale(1.1); } }
.art-hint .r:not([data-f]) { animation: art-blink 1s ease-in-out 3; }
@keyframes art-blink { 50% { fill: #ffe98a; } }
.art-fill .ibtn.art-ready { animation: pulse 1.4s ease-in-out infinite; }

/* kemajuan mewarnai: pita pelangi yang memanjang, bintang menyala saat selesai */
.art-prog { position: relative; flex: 1; min-width: 34px; height: 22px; margin: 0 16px 0 2px; border-radius: 999px; background: rgba(255, 255, 255, .78); box-shadow: inset 0 2px 0 rgba(20, 50, 90, .12); }
.art-prog-fill {
  position: absolute; inset: 3px; border-radius: 999px; background: linear-gradient(90deg, #ff5d8f, #ff9f1c, #ffd23f, #3ddc97, #3fa7f5, #b07cff);
  clip-path: inset(0 calc(100% * (1 - var(--p, 0))) 0 0 round 999px); transition: clip-path .3s;
}
.art-prog-star { position: absolute; right: -15px; top: -5px; font-size: 28px; line-height: 32px; filter: grayscale(1); opacity: .55; transition: filter .3s, opacity .3s; }
.art-full .art-prog-star { filter: none; opacity: 1; animation: bounce-in .5s; }

/* pemilih gambar */
.art-picker .wrap { max-width: 900px; }
.art-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; padding-top: 4px; }
.art-pick { position: relative; display: block; aspect-ratio: 1; border-radius: 26px; transition: transform .08s; animation: bounce-in .4s both; animation-delay: calc(var(--i, 0) * 35ms); }
.art-pick:active { transform: scale(.94); }
.art-pick-svg { display: block; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 5px 0 rgba(20, 50, 90, .16)); }
.art-pick-star { position: absolute; right: -4px; top: -8px; font-size: 32px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .2)); }

/* ---------- Layar lebar/pendek ---------- */
@media (orientation: portrait) and (min-width: 640px) {
  .art-pal { grid-template-columns: repeat(12, minmax(0, 1fr)); padding: 6px; }
  .art-sw-dot { width: 46px; height: 46px; }
}
/* potret yang sangat pendek: palet satu baris yang bisa digeser, supaya kertas tetap terlihat */
@media (orientation: portrait) and (max-height: 560px) {
  .art-pal { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 52px; justify-content: start; overflow-x: auto; }
}
@media (orientation: landscape) {
  .art-body {
    grid-template: "pal paper tools" minmax(0, 1fr) / auto minmax(0, 1fr) auto; gap: 10px;
    padding-left: calc(10px + env(safe-area-inset-left, 0px)); padding-right: calc(10px + env(safe-area-inset-right, 0px));
  }
  .art-fill .art-body { grid-template: "pal paper" minmax(0, 1fr) / auto minmax(0, 1fr); }
  .art-pal { grid-template-columns: repeat(2, 56px); align-content: start; align-self: center; max-height: 100%; overflow-y: auto; padding: 5px; }
  .art-sw { min-height: 56px; }
  .art-tools { flex-direction: column; justify-content: flex-start; align-self: center; max-height: 100%; overflow-y: auto; gap: 12px; padding: 6px; }
  .art-tray { left: auto; right: 10px; margin: 0; }
  .art-menu .wrap { max-width: 860px; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .art-pal { grid-template-columns: repeat(3, 52px); }
  .art-sw { min-height: 52px; }
  .art-tools { display: grid; grid-template-columns: repeat(2, 52px); gap: 8px; align-content: start; }
  .art-card-pic { aspect-ratio: 2 / 1; }
}

/* Layar pelajaran dan semua kegiatannya */
.lesson { position: relative; background: linear-gradient(180deg, #fff9ec, #fff1d6); }
.lesson.arab { background: linear-gradient(180deg, #effcf9, #d9f6ef); }
.lesson-top { gap: 12px; }
.lesson-bar { flex: 1; height: 20px; border-radius: 12px; background: rgba(0, 0, 0, .09); overflow: hidden; }
.lesson-bar i { display: block; height: 100%; width: 0; border-radius: 12px; background: linear-gradient(90deg, var(--yellow), var(--accent)); transition: width .4s; }
.lesson-stage { flex: 1; min-height: 0; display: flex; padding: 4px 16px calc(16px + var(--safe-b)); }
.lesson-lumi { position: absolute; left: 10px; bottom: calc(8px + var(--safe-b)); pointer-events: none; z-index: 2; }
.task { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 2.6vh, 24px); width: 100%; max-width: 760px; margin: 0 auto; animation: screen-in .25s ease-out; }

/* Tulisan yang dipelajari */
.g { font-family: var(--read); font-weight: 700; line-height: 1.1; color: var(--ink); }
.g.ar { font-family: var(--arab); font-weight: 700; line-height: 1.75; }
.g .syl0 { color: #e2452f; } .g .syl1 { color: #1c6fd1; }
.g.small { font-size: 30px; } .g.small b { color: #e2452f; }
.note { font-size: 15px; margin-top: 2px; direction: ltr; }
.next { font-size: 30px; min-width: 120px; }
.pop-in { animation: bounce-in .4s; }
.shake { animation: shake .35s; }

/* Kenalan */
.intro-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 30px; min-width: min(78vw, 340px); min-height: min(36vh, 280px); border: 5px solid var(--accent); }
.intro-pair { display: flex; align-items: baseline; gap: .25em; font-size: clamp(90px, 26vw, 170px); }
.intro-pair .up { color: var(--accent); }
.intro-emoji { font-size: clamp(64px, 18vw, 110px); line-height: 1.1; }
.intro-glyph { font-size: clamp(46px, 13vw, 88px); text-align: center; }
.k-hletters .intro-glyph { font-size: clamp(110px, 30vw, 190px); line-height: 1.5; }
.k-hread .intro-glyph, .arab .pick-target .intro-glyph { font-size: clamp(54px, 15vw, 96px); }
.k-phrases .intro-glyph { font-size: clamp(32px, 8.5vw, 60px); }
.intro-hint { display: flex; align-items: center; gap: 14px; padding: 8px 22px; }
.intro-hint-emoji { font-size: 46px; }

/* Halaman baca */
.task-page { padding-top: 6px; }
.page-grid { display: grid; gap: 10px; width: 100%; flex: 0 1 auto; overflow-y: auto; padding: 4px 4px 10px; }
.cols-1 { grid-template-columns: 1fr; } .cols-2 { grid-template-columns: 1fr 1fr; } .cols-3 { grid-template-columns: repeat(3, 1fr); } .cols-5 { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.page-cell { padding: 8px 4px; min-height: clamp(68px, 11vh, 110px); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: clamp(26px, 7.4vw, 44px); border: 4px solid transparent; }
.arab .page-cell { font-size: clamp(34px, 9.5vw, 56px); }
.cols-1 .page-cell { font-size: clamp(28px, 7.6vw, 46px); }
.page-cell.heard { border-color: var(--ok); background: #f0fff6; }
.page-cell.ping { animation: bounce-in .35s; }

/* Gabung suku kata */
.blend-row { display: flex; align-items: center; gap: 16px; transition: gap .5s; }
.blend-tile, .blend-merged { width: 108px; height: 108px; display: grid; place-items: center; font-size: 70px; }
.blend-plus, .blend-arrow { font-size: 40px; color: var(--ink2); transition: opacity .4s; }
.joined .blend-row { gap: 0; } .joined .blend-plus { opacity: 0; width: 0; }
.blend-merged { width: 190px; border: 5px solid var(--accent); animation: bounce-in .45s; }

/* Pilih jawaban */
.listen { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.pick-target { padding: 10px 28px; min-width: min(70vw, 300px); text-align: center; border: 5px solid var(--accent); }
.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; max-width: 560px; }
.n3 .opts { grid-template-columns: repeat(3, 1fr); }
.task-pick.long .opts, .lesson[data-island="latin"] .mode-heard.n3.wordy .opts { grid-template-columns: 1fr; }
.opt { min-height: 96px; padding: 8px; display: grid; place-items: center; font-size: clamp(34px, 9vw, 60px); border: 4px solid transparent; transition: transform .08s, opacity .2s; }
.arab .opt-glyph { font-size: clamp(40px, 11vw, 70px); }
.task-pick.long .opt { min-height: 70px; font-size: clamp(24px, 6.4vw, 40px); }
.arab .task-pick.long .opt { font-size: clamp(30px, 8vw, 48px); }
.opt:active { transform: scale(.95); }
.opt-emoji { font-size: clamp(48px, 13vw, 76px); line-height: 1.15; }
.opt.right { border-color: var(--ok); background: #e9fff3; animation: bounce-in .4s; }
.opt.wrong { border-color: var(--no); opacity: .4; }
.opt.dim { opacity: .35; }
.opt.hint { animation: pulse .9s ease-in-out infinite; border-color: var(--yellow); }
.opt-sound { font-size: 44px; color: #fff; }
.opt-sound.sel { outline: 6px solid var(--ink); transform: scale(1.05); }
.c-orange { background: var(--orange); } .c-blue { background: var(--blue); } .c-purple { background: var(--purple); } .c-green { background: var(--green); }
.confirm { font-size: 30px; min-width: 130px; }

/* Susun */
.build-top { display: flex; align-items: center; gap: 18px; }
.build-emoji { font-size: clamp(60px, 16vw, 96px); line-height: 1.1; }
.slots, .tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.words .slots, .words .tiles { gap: 12px; }
.slot { min-width: 64px; height: 76px; padding: 0 10px; border-radius: 16px; border: 4px dashed #c3cfdf; background: rgba(255, 255, 255, .6); display: grid; place-items: center; font-family: var(--read); font-weight: 700; font-size: clamp(34px, 9vw, 52px); }
.slot.cur { border-color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.slot.filled { border-style: solid; border-color: var(--ok); background: #fff; animation: bounce-in .3s; }
.tile { min-width: 72px; min-height: 76px; padding: 4px 16px; font-family: var(--read); font-weight: 700; font-size: clamp(34px, 9vw, 52px); border-bottom: 6px solid #d5deeb; }
.tile.used { visibility: hidden; }
.slot.ar, .tile.ar { font-family: var(--arab); font-size: clamp(34px, 9vw, 54px); height: auto; min-height: 92px; line-height: 1.7; }
.task-build.long .slot, .task-build.long .tile { font-size: clamp(22px, 6vw, 36px); min-width: 54px; height: 62px; min-height: 62px; }
.task-build.long .slot.ar, .task-build.long .tile.ar { font-size: clamp(28px, 7.4vw, 44px); height: auto; min-height: 78px; }
.solved .slots { animation: bounce-in .45s; }

/* Pasangkan */
.task-match { gap: clamp(20px, 6vh, 50px); }
.mrow { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mcard { width: clamp(70px, 20vw, 110px); aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(44px, 12vw, 70px); border: 4px solid transparent; }
.mcard.side0 { background: #fff3e4; } .mcard.side1 { background: #e9f6ff; }
.mcard.sel { border-color: var(--accent); transform: scale(1.07); }
.mcard.right { border-color: var(--ok); background: #e9fff3; opacity: .75; }

/* Jiplak */
.task-trace { position: relative; }
.trace { touch-action: none; flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.trace-canvas { background: #fff; border-radius: 28px; box-shadow: var(--shadow); touch-action: none; border: 5px solid var(--accent); }
.trace.done .trace-canvas { animation: bounce-in .5s; border-color: var(--ok); }
.trace-meter { width: min(70%, 300px); height: 14px; border-radius: 9px; background: rgba(0, 0, 0, .1); overflow: hidden; flex: none; }
.trace-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff7a59, #ffd23f, #3ddc97); border-radius: 9px; transition: width .15s; }
.trace-finger { position: absolute; right: 12%; top: 16%; font-size: 44px; z-index: 1; pointer-events: none; animation: finger 1.6s ease-in-out 3 forwards; }
@keyframes finger { 0% { transform: translate(0, 0); opacity: 1; } 50% { transform: translate(-60px, 70px); } 100% { transform: translate(0, 0); opacity: 0; } }

/* Hasil */
.result { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 560px; }
.result-title { font-size: 44px; font-weight: 800; color: var(--accent); }
.result-stars { font-size: 64px; }
.result-stars .star.on { animation: bounce-in .5s backwards; } .result-stars .star:nth-child(2) { animation-delay: .25s; } .result-stars .star:nth-child(3) { animation-delay: .5s; }
.result-sticker { display: flex; flex-direction: column; align-items: center; }
.sticker-new { font-size: 72px; animation: bounce-in .6s .7s backwards; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .12)); }
.result-btns { display: flex; gap: 18px; margin-top: 6px; }
.result-tip { font-size: 14px; line-height: 1.4; background: rgba(255, 255, 255, .7); border-radius: 14px; padding: 10px 14px; }

@media (max-height: 560px) {
  .intro-card { min-height: 0; padding: 6px 24px; } .intro-pair { font-size: 84px; } .opt { min-height: 70px; } .lesson-lumi { display: none; }
}

/* Layar awal, pulau, buku stiker, ruang orang tua, layar istirahat */
.home { position: relative; }
.home-sky, .home-sea { position: absolute; left: 0; right: 0; pointer-events: none; }
.home-sky { top: 0; height: 46%; overflow: hidden; }
.sun { position: absolute; right: 9%; top: 22%; width: 86px; height: 86px; border-radius: 50%; background: radial-gradient(circle, #fff6a8, #ffd23f 62%, rgba(255, 210, 63, 0) 70%); animation: pulse 5s ease-in-out infinite; }
.cloud { position: absolute; width: 120px; height: 38px; background: #fff; border-radius: 40px; opacity: .9; animation: drift 60s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 54px; height: 54px; left: 16px; top: -26px; }
.cloud::after { width: 40px; height: 40px; right: 18px; top: -16px; }
.c1 { top: 30%; left: -140px; } .c2 { top: 58%; left: -140px; animation-duration: 85s; animation-delay: -30s; transform: scale(.7); } .c3 { top: 14%; left: -140px; animation-duration: 110s; animation-delay: -70s; transform: scale(.55); }
@keyframes drift { to { translate: calc(100vw + 280px) 0; } }
.home-sea { bottom: 0; height: 58%; background: linear-gradient(180deg, rgba(55, 182, 233, 0), var(--sea) 30%, var(--sea2)); z-index: 0; }
.home .topbar, .home-scroll { position: relative; z-index: 1; }
.home-hello { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-align: left; }
.home-title { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.home-title b { font-size: clamp(22px, 6vw, 32px); font-weight: 800; color: #0f3d66; white-space: nowrap; }
.home-title small { font-size: 14px; max-width: 100%; color: #2b5f8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-scroll { display: flex; }
.isles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: auto; padding: 6px 0 12px; }
@media (min-width: 900px) and (orientation: landscape) { .isles { grid-template-columns: repeat(4, 1fr); max-width: 1100px; } }
.isle { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 12px; border-radius: 28px; animation: bob 4.5s ease-in-out infinite; transition: transform .1s; }
.isle.i1 { animation-delay: -1.1s; } .isle.i2 { animation-delay: -2.2s; } .isle.i3 { animation-delay: -3.3s; }
.isle:active { transform: scale(.94); }
@keyframes bob { 50% { translate: 0 -6px; } }
.isle-land {
  position: relative; width: min(38vw, 190px); aspect-ratio: 1.25; border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 30%, var(--g1), var(--g2) 68%); box-shadow: 0 10px 0 #f4d58a, 0 16px 0 rgba(15, 80, 130, .25), inset 0 -10px 0 rgba(0, 0, 0, .07);
}
.isle-latin { --g1: #ffd08a; --g2: #ff8a3d; } .isle-hija { --g1: #8fead9; --g2: #12b5a6; } .isle-seni { --g1: #ffb3cf; --g2: #ff5d8f; } .isle-musik { --g1: #c8b0ff; --g2: #8e5bef; }
.isle-emoji { font-size: clamp(44px, 13vw, 72px); filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .15)); }
.isle-palm { position: absolute; right: 6%; top: -16%; font-size: clamp(26px, 8vw, 40px); }
.isle-name { margin-top: 14px; font-size: clamp(18px, 5vw, 24px); font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(10, 60, 110, .45); }
.isle-tag { font-size: 14px; color: #eaf8ff; font-family: var(--read); font-weight: 400; }
.isle-prog { width: 70%; height: 10px; border-radius: 9px; background: rgba(255, 255, 255, .35); overflow: hidden; margin-top: 4px; }
.isle-prog i { display: block; height: 100%; background: var(--yellow); border-radius: 9px; }
.isle-extra { font-size: 14px; color: #fff; margin-top: 2px; height: 14px; }

/* Layar pulau: jalur pelajaran */
.stage { margin: 6px 0 26px; }
.stage-head { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: var(--r); padding: 10px 16px; box-shadow: var(--shadow-s); border-left: 10px solid var(--c); }
.stage-head h2 { font-size: 22px; font-weight: 800; }
.stage-head p { font-size: 14px; }
.stage-num { width: 44px; height: 44px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 800; flex: none; }
.path { display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 30px 0 4px; }
.node {
  position: relative; width: 92px; height: 92px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 62%, #000), 0 12px 14px rgba(0, 0, 0, .15); translate: calc(var(--dx) * min(11vw, 58px)) 0; transition: transform .08s;
}
.node:active { transform: translateY(5px); }
.node-badge { font-size: 22px; font-weight: 800; line-height: 1.05; max-width: 84px; overflow: hidden; text-align: center; font-family: var(--read); }
.node.ar .node-badge { font-family: var(--arab); font-size: 30px; line-height: 1.5; font-weight: 700; }
.node.locked { --c: #b8c4d6; }
.node.locked .node-badge { font-size: 28px; }
.node.cur { animation: pulse 1.3s ease-in-out infinite; outline: 6px solid rgba(255, 255, 255, .85); }
.node-stars { position: absolute; bottom: -24px; left: 50%; translate: -50% 0; font-size: 20px; }
.node-lumi { position: absolute; right: -46px; top: -22px; }
.node.shake { animation: shake .35s; }

/* Buku stiker */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.sticker { aspect-ratio: 1; border-radius: 18px; background: #eef3fa; color: #b8c4d6; font-size: 26px; display: grid; place-items: center; border: 3px dashed #cfd9e8; }
.sticker.on { background: #fff8dc; border: 3px solid var(--yellow); font-size: 38px; rotate: var(--tilt); box-shadow: var(--shadow-s); }
.sticker.ping { animation: bounce-in .4s; }
.sticker-empty { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-size: 18px; }

/* Ruang orang tua */
.parent { background: #f3f7fc; user-select: text; -webkit-user-select: text; }
.parent-body { display: flex; flex-direction: column; gap: 16px; font-family: var(--read); font-weight: 400; font-size: 16px; line-height: 1.45; }
.parent-body h2 { font-family: var(--ui); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.parent-body h3 { font-family: var(--ui); font-size: 18px; margin: 14px 0 6px; }
.small { font-size: 14px; }
.rep-warn { background: #fff5d6; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.rep-lines { margin: 0 0 10px; padding-left: 20px; }
.rep-lines li { margin: 4px 0; }
.rep-row { padding: 10px 0; border-top: 1px solid var(--line); }
.rep-name { font-family: var(--ui); font-weight: 800; font-size: 18px; }
.rep-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 4px 0; }
.rep-bars label { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
@media (max-width: 480px) { .rep-bars { grid-template-columns: 1fr; } }
.meter { display: block; height: 12px; border-radius: 8px; background: #e6edf6; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 8px; background: var(--blue); }
.meter.m-int i { background: var(--pink); } .meter.m-acc i { background: var(--ok); }
.rep-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rep-skill { background: #f6f9fd; border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.rep-skill-row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; padding: 2px 0; }
.prog-row { padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.set-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.set-row.col { flex-direction: column; gap: 4px; }
.set-row span { display: flex; flex-direction: column; }
.set-row input[type="checkbox"] { width: 26px; height: 26px; flex: none; accent-color: var(--ok); }
.set-input { font: inherit; padding: 10px 12px; border-radius: 12px; border: 2px solid #cfd9e8; width: min(100%, 320px); background: #fff; color: var(--ink); }
.btn.danger { background: var(--no); margin-top: 10px; }
.gate h2 { font-size: 24px; } .gate p { font-size: 22px; margin: 8px 0 14px; }
.gate-opts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.gate-opts .btn.ghost { box-shadow: 0 4px 0 #cfd9e8; border: 2px solid #cfd9e8; }

/* Layar istirahat */
.rest { position: fixed; inset: 0; z-index: 80; background: linear-gradient(180deg, #2b3a67, #1b2444); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.rest h2 { font-size: 30px; } .rest .muted { color: #c9d4f0; font-size: 18px; }

@media (max-width: 480px) { .home .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; } .home .ibtn { width: 46px; height: 46px; font-size: 22px; } .home .pill { padding: 5px 10px; font-size: 16px; } .home .lumi { --lumi: 54px; } .home .lumi svg { width: 54px; height: 54px; } .home-title b { font-size: 21px; } .home-title small { display: none; } }

/* Pulau Nada — semua kelas berawalan mus-. */
.mus-screen { background: linear-gradient(180deg, #d9d0ff, #cfeeff 55%, #eafaff); }
.mus-screen .ibtn { width: 56px; height: 56px; }
.mus-screen .ibtn.big { width: 80px; height: 80px; }
.mus-help { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .7); box-shadow: var(--shadow-s); }
.mus-help:active { transform: translateY(3px) scale(.96); box-shadow: none; }
.mus-help .lumi { pointer-events: none; }

/* Warna pelangi dan panjang bilah: do paling panjang, do tinggi paling pendek */
.mus-k0 { --c: #f25c54; --len: 100%; }
.mus-k1 { --c: #ff8a3d; --len: 94%; }
.mus-k2 { --c: #f6bd1c; --len: 88%; }
.mus-k3 { --c: #4cc267; --len: 82%; }
.mus-k4 { --c: #12b5a6; --len: 76%; }
.mus-k5 { --c: #3fa7f5; --len: 70%; }
.mus-k6 { --c: #8e5bef; --len: 64%; }
.mus-k7 { --c: #ff5d8f; --len: 58%; }

/* ---------- Menu & pemilih lagu ---------- */
.mus-grid {
  flex: 1; min-height: 0; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px calc(18px + var(--safe-b));
  display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, minmax(0, 300px)); align-content: center; gap: 14px;
}
.mus-card {
  min-width: 0; min-height: 0; border-radius: 30px; border: 5px solid #fff; background: var(--bg, #fff); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; transition: transform .08s;
  animation: bounce-in .4s both;
}
.mus-card:nth-child(2) { animation-delay: .06s; }
.mus-card:nth-child(3) { animation-delay: .12s; }
.mus-card:nth-child(4) { animation-delay: .18s; }
.mus-card:active { transform: translateY(5px) scale(.98); box-shadow: none; }
.mus-c0 { --bg: #fff3d6; }
.mus-c1 { --bg: #ffe1ea; }
.mus-c2 { --bg: #dff6e6; }
.mus-c3 { --bg: #dcefff; }
.mus-card-ico { font-size: clamp(60px, 23vmin, 128px); line-height: 1.15; display: grid; place-items: center; }
.mus-card-label { font-size: clamp(15px, 2.6vmin + 6px, 24px); font-weight: 800; color: #0f3d66; text-align: center; line-height: 1.15; }
.mus-mini { display: flex; align-items: center; gap: .05em; height: 1.15em; }
.mus-mini i { width: .1em; height: var(--len); border-radius: 99px; background: var(--c); box-shadow: 0 .03em 0 rgba(0, 0, 0, .18); }
.mus-combo { position: relative; }
.mus-combo span { position: absolute; top: -.12em; right: -.3em; font-size: .5em; animation: pulse 1.6s ease-in-out infinite; }
.mus-hilo { display: flex; font-size: .68em; gap: .04em; }
.mus-hilo span:first-child { transform: translateY(-.22em); }
.mus-hilo span:last-child { transform: translateY(.22em); }
@media (min-aspect-ratio: 16/10) and (max-height: 520px) {
  .mus-grid { max-width: none; grid-template-columns: repeat(4, 1fr); grid-template-rows: minmax(0, 300px); }
}

/* ---------- Panggung permainan ---------- */
.mus-stage { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 2px 10px calc(10px + var(--safe-b)); width: 100%; max-width: 1100px; margin: 0 auto; }
.mus-row { flex: none; min-height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.mus-badge { width: 56px; height: 56px; flex: none; border-radius: 50%; background: #fff; box-shadow: var(--shadow-s); display: grid; place-items: center; font-size: 30px; line-height: 1; }
.mus-badge.pop { animation: bounce-in .35s; }
.mus-act { flex: none; }

/* Bilah pelangi. Layar sempit: bilah mendatar bertumpuk, do rendah di bawah (nada tinggi = lebih atas). */
.mus-xylo {
  flex: 1; min-height: 0; display: flex; flex-direction: column-reverse; padding: 6px; border-radius: 26px; background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .7); touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer;
}
.mus-key { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.mus-bar {
  width: var(--len); height: calc(100% - 7px); max-height: 92px; border-radius: 16px; position: relative; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 46%), var(--c);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .2), inset 0 -4px 0 rgba(0, 0, 0, .1);
  display: flex; align-items: center; justify-content: center; transition: opacity .15s, filter .15s, box-shadow .15s;
}
.mus-bar::before, .mus-bar::after {
  content: ""; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .22);
}
.mus-bar::before { left: 12px; }
.mus-bar::after { right: 12px; }
.mus-sol { font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .28); letter-spacing: .5px; }
.mus-bar.hit { animation: mus-hit .34s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes mus-hit { 0% { transform: scale(.9); filter: brightness(1.45); } 50% { transform: scale(1.05); filter: brightness(1.15); } 100% { transform: scale(1); } }
.mus-key.lit .mus-bar, .mus-key.hint .mus-bar { opacity: 1; filter: brightness(1.12) saturate(1.2); box-shadow: 0 0 0 4px #fff, 0 0 20px 8px var(--c), 0 4px 0 rgba(0, 0, 0, .2); }
.mus-key.hint { z-index: 1; animation: mus-hint .85s ease-in-out infinite; }
@keyframes mus-hint { 50% { transform: scale(1.07); } }
/* Saat Lumi memberi contoh (locked) atau memandu lagu (guide), bilah lain meredup supaya yang menyala jelas. */
.mus-xylo.locked .mus-key:not(.lit) .mus-bar, .mus-xylo.guide .mus-key:not(.lit):not(.hint) .mus-bar { opacity: .5; }
.mus-xylo.oops { animation: shake .4s; }

@media (min-width: 600px) {
  /* Layar lebar: bilah berdiri berjajar seperti kolintang, do rendah di kiri. */
  .mus-stage { justify-content: center; }
  .mus-xylo { flex-direction: row; max-height: 560px; padding: 10px 6px; }
  .mus-bar {
    width: calc(100% - 10px); max-width: 124px; height: var(--len); max-height: none; align-items: flex-end; padding-bottom: 30px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0) 55%), var(--c);
  }
  .mus-bar::before, .mus-bar::after { left: 50%; right: auto; margin: 0 0 0 -5px; }
  .mus-bar::before { top: 12px; }
  .mus-bar::after { top: auto; bottom: 12px; }
  .mus-sol { font-size: 17px; }
}

/* Gendang */
.mus-pads { flex: none; display: flex; justify-content: center; gap: 16px; }
.mus-pad {
  width: 76px; height: 76px; flex: none; border-radius: 50%; font-size: 34px; line-height: 1; display: grid; place-items: center; touch-action: none;
  background: radial-gradient(circle at 50% 42%, #fff 0 56%, var(--pc) 58%); border: 5px solid var(--pc); box-shadow: 0 5px 0 rgba(0, 0, 0, .22);
}
.mus-pad-dung { --pc: #c96a3a; }
.mus-pad-tak { --pc: #2bb673; }
.mus-pad-cis { --pc: #e0a800; }
.mus-pad.hit { animation: mus-pad .22s ease-out; }
@keyframes mus-pad { 0% { transform: scale(.86) translateY(4px); filter: brightness(1.2); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@media (min-width: 600px) and (min-height: 600px) { .mus-pad { width: 96px; height: 96px; font-size: 42px; } .mus-pads { gap: 28px; } }
@media (min-width: 600px) and (max-height: 480px) {
  .mus-piano .mus-stage { flex-direction: row; align-items: stretch; }
  .mus-pads { flex-direction: column; gap: 6px; }
  .mus-pad { width: 60px; height: 60px; font-size: 28px; }
}

/* Ikuti Nada: titik kemajuan */
.mus-dots { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: clamp(3px, 1vw, 8px); }
.mus-dot { width: clamp(9px, 2.6vw, 14px); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .55); display: grid; place-items: center; line-height: 1; font-size: clamp(20px, 6vw, 34px); color: var(--yellow); transition: width .2s, background .2s; }
.mus-dot.todo, .mus-dot.now, .mus-dot.done { width: clamp(20px, 6.2vw, 34px); }
.mus-dot.todo { background: #fff; box-shadow: inset 0 0 0 3px #b9c8e6; }
.mus-dot.now { background: var(--orange); box-shadow: 0 0 0 4px #fff, 0 0 14px 4px var(--orange); transform: scale(1.1); }
.mus-dot.done { background: none; text-shadow: 0 2px 0 #d49b00; animation: bounce-in .3s; }
.mus-dots.win .mus-dot.done { animation: mus-cheer .6s ease-in-out; }
@keyframes mus-cheer { 30% { transform: translateY(-9px) scale(1.2); } 60% { transform: translateY(0) scale(1); } 80% { transform: translateY(-4px); } }

/* Main Lagu: jalur kemajuan dan layar selesai */
.mus-track { flex: 1; min-width: 0; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 2px 0 rgba(20, 50, 90, .12); position: relative; --p: 0; margin: 0 18px 0 16px; }
.mus-track-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); min-width: 22px; border-radius: 99px; background: linear-gradient(90deg, #ffd23f, #ff8a3d); transition: width .2s; }
.mus-track-rider { position: absolute; top: 50%; left: calc(var(--p) * 100%); transform: translate(-50%, -54%); font-size: 30px; line-height: 1; transition: left .2s; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .18)); }
.mus-track-goal { position: absolute; top: 50%; right: -12px; transform: translateY(-58%); font-size: 24px; line-height: 1; }
.mus-act.on { background: var(--yellow); animation: pulse 1s infinite; }
.mus-done { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(234, 246, 255, .8); border-radius: 26px; animation: fade .25s; }
.mus-done-card { background: #fff; border-radius: 32px; padding: 20px 28px 24px; box-shadow: 0 16px 40px rgba(20, 50, 90, .25); display: flex; flex-direction: column; align-items: center; gap: 10px; animation: bounce-in .45s; }
.mus-done-emoji { font-size: 84px; line-height: 1.1; animation: pulse 1.2s ease-in-out infinite; }
.mus-done-stars { font-size: 44px; }
.mus-done-btns { display: flex; gap: 22px; margin-top: 6px; }
.mus-done-btns .ibtn:first-child { background: var(--ok); }

/* Tinggi atau Rendah */
.mus-starbox { flex: 1; display: flex; justify-content: center; padding-left: 66px; }
.mus-stars { font-size: clamp(30px, 8vw, 42px); gap: 4px; }
.mus-stars .star.on { animation: bounce-in .35s; }
.mus-duo { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 12px; width: 100%; max-width: 760px; margin: 0 auto; }
.mus-singer { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 4vh, 34px); transition: transform .55s cubic-bezier(.3, 1.4, .5, 1), opacity .4s; }
.mus-singer.up { transform: translateY(-14%); }
.mus-singer.down { transform: translateY(9%); opacity: .6; }
.mus-singer.oops { animation: shake .4s; }
.mus-bird {
  --d: min(40vw, 30vh, 230px); width: var(--d); height: var(--d); border-radius: 50%; position: relative; display: grid; place-items: center;
  font-size: calc(var(--d) * .56); line-height: 1; background: var(--bc); border: 6px solid #fff; box-shadow: var(--shadow); transition: transform .08s;
}
.mus-bird0 { --bc: #ffe9a8; }
.mus-bird1 { --bc: #c9e6ff; }
.mus-bird:active { transform: scale(.96); }
.mus-bird.sing { animation: mus-sing .6s ease-out; }
@keyframes mus-sing { 0% { transform: scale(1); } 25% { transform: scale(1.12) rotate(-5deg); box-shadow: 0 0 0 8px rgba(255, 255, 255, .8), var(--shadow); } 60% { transform: scale(1.04) rotate(4deg); } 100% { transform: scale(1); } }
.mus-note { position: absolute; top: -4%; right: -2%; font-size: .42em; opacity: 0; pointer-events: none; }
.mus-bird.sing .mus-note { animation: mus-note .9s ease-out; }
@keyframes mus-note { 0% { opacity: 0; transform: translateY(40%) scale(.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-90%) rotate(14deg) scale(1.15); } }
.mus-pick { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 42px; line-height: 1; background: #fff; border: 5px solid var(--ok); box-shadow: 0 5px 0 rgba(0, 0, 0, .2); transition: opacity .2s, transform .08s; }
.mus-pick:active { transform: translateY(4px); box-shadow: none; }
.mus-pick[disabled] { opacity: .35; border-color: #b9c8e6; box-shadow: none; pointer-events: none; }
.mus-pick.ready { animation: bounce-in .4s; }
.mus-pick.right { opacity: 1; background: #d9f7e6; border-color: var(--ok); animation: pulse .5s 2; }
@media (max-height: 480px) {
  .mus-singer { flex-direction: row; }
  .mus-bird { --d: min(24vw, 44vh); }
  .mus-pick { width: 64px; height: 64px; font-size: 32px; }
}
