/* Zee Belajar. Motif: buku stiker. Garis plum tebal + bayangan keras di bawah = "bisa ditekan". */
@font-face { font-family: 'Andika'; src: url(../fonts/andika-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Andika'; src: url(../fonts/andika-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Scheherazade New'; src: url(../fonts/scheherazade-new-arabic-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Scheherazade New'; src: url(../fonts/scheherazade-new-arabic-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --blush: #FFF1F6;
  --petal: #FFD3E4;
  --bubble: #FF6FA8;
  --rasp: #C2255C;
  --plum: #4B1D3F;
  --mint: #3CC4A0;
  --sun: #FFC93C;
  --line: 4px;
  --lift: 6px;
  --r-card: 24px;
  --r-tile: 32px;
  --btn: clamp(64px, 9vmin, 84px);
  --gutter: max(16px, env(safe-area-inset-left));
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--blush);
  color: var(--plum);
  font-family: 'Andika', 'Trebuchet MS', sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}
#app { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
button, a, summary, select, label[for], [role="radio"] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 5px solid #2F80ED; outline-offset: 4px; border-radius: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ar { font-family: 'Scheherazade New', serif; }
.noscript { padding: 24px; font-size: 20px; }

/* ---------- Tombol stiker ---------- */
.round, .card, .island, .node, .act, .key, .pbtn, .ibtn, .swatch, .mcard, .drag, .target, .count-item, .free-page {
  border: var(--line) solid var(--plum);
  background: #fff;
  box-shadow: 0 var(--lift) 0 var(--plum);
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s;
  touch-action: manipulation;
}
:is(.round, .card, .island, .node, .act, .key, .pbtn, .ibtn, .swatch, .count-item, .free-page):not(:disabled):active {
  transform: translateY(var(--lift)); box-shadow: 0 0 0 var(--plum);
}
@media (hover: hover) {
  :is(.round, .card, .island, .act, .key, .pbtn, .ibtn, .free-page, a.node):not(:disabled):hover { background-color: #FFF7FA; transform: translateY(-2px); box-shadow: 0 calc(var(--lift) + 2px) 0 var(--plum); }
}
.round {
  width: var(--btn); height: var(--btn); border-radius: 50%;
  display: inline-grid; place-items: center; padding: 0; flex: none;
  background: var(--bubble); color: var(--plum);
}
.round svg { width: 52%; height: 52%; }
.round.soft { background: #fff; }
.round:disabled { opacity: .35; box-shadow: 0 var(--lift) 0 rgba(75, 29, 63, .35); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px;
  min-height: calc(var(--btn) + 30px);
}
.tb-mid { flex: 1; }
.tb-right { display: flex; gap: 12px; align-items: center; }
.tb-art { width: var(--btn); height: var(--btn); display: grid; place-items: center; font-size: 30px; font-weight: 700; }
.tb-art svg { width: calc(var(--btn) * .7); height: auto; }
.tb-art .isl-glyph { font-size: 30px; white-space: nowrap; }
.tb-art .isl-glyph.ar { font-size: 40px; }
.tb-art { width: auto; min-width: var(--btn); }
.tb-level { width: var(--btn); height: var(--btn); border-radius: 50%; display: grid; place-items: center; font-size: 36px; font-weight: 700; background: var(--sun); border: var(--line) solid var(--plum); }

.mascot-btn { border: 0; background: none; padding: 0; width: calc(var(--btn) * 1.35); height: calc(var(--btn) * 1.35); }
.bunny { width: 100%; height: 100%; overflow: visible; }
.bunny .ear { transform-box: fill-box; transform-origin: 50% 100%; }
.bunny .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.12); } }
.bunny.hop { animation: hop .55s cubic-bezier(.3, 1.6, .5, 1); }
.bunny.hop .ear-l { animation: earL .55s ease; }
.bunny.hop .ear-r { animation: earR .55s ease; }
@keyframes hop { 0% { transform: translateY(0); } 40% { transform: translateY(-22%) scale(1.05, .95); } 100% { transform: translateY(0); } }
@keyframes earL { 40% { transform: rotate(-14deg); } }
@keyframes earR { 40% { transform: rotate(14deg); } }
.bunny.think { animation: tilt .8s ease; }
.bunny.think .ear-r, .bunny-think .ear-r { transform: rotate(30deg); }
@keyframes tilt { 30% { transform: rotate(-8deg); } 70% { transform: rotate(5deg); } }
.pose-salam .salam-head { animation: salam 4s ease-in-out 2; }
@keyframes salam { 0%, 10%, 50%, 60%, 100% { transform: translateX(0); } 20%, 40% { transform: translateX(-9px); } 70%, 90% { transform: translateX(9px); } }
.bunny-sleep .eyes { transform: scaleY(.12); animation: none; }
.bunny-sleep .ear { transform: rotate(-24deg); }
.bunny-sleep .ear-r { transform: rotate(24deg); }

/* ---------- Beranda ---------- */
.home { padding: 4px var(--gutter) max(24px, env(safe-area-inset-bottom)); display: grid; place-items: center; }
.islands {
  width: 100%; max-width: 1100px;
  display: grid; gap: clamp(16px, 2.6vmin, 28px);
  grid-template-columns: repeat(4, 1fr);
}
.islands[data-n="1"] { grid-template-columns: minmax(0, 360px); justify-content: center; }
.islands[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; }
.islands[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 320px)); justify-content: center; }
@media (orientation: portrait) {
  .islands { grid-template-columns: repeat(2, 1fr); }
  .islands[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
  .islands[data-n="3"] .island { height: calc((100dvh - var(--btn) - 150px) / 3); max-height: 320px; }
  .islands .island { aspect-ratio: auto; height: calc((100dvh - var(--btn) - 150px) / 4); min-height: 120px; }
}
.island {
  position: relative; border-radius: var(--r-tile);
  background: var(--tint);
  aspect-ratio: 1 / .92;
  display: grid; grid-template-rows: 1fr auto; place-items: center;
  padding: 10px 10px 16px;
  animation: pop-in .45s calc(var(--i) * 50ms) both cubic-bezier(.3, 1.4, .5, 1);
}
@media (hover: hover) { .island:hover { background: var(--tint); } }
@keyframes pop-in { from { transform: scale(.7); } }
.isl-art { display: grid; place-items: center; width: 100%; height: 100%; }
.isl-glyph { font-size: clamp(40px, 8vmin, 72px); font-weight: 700; line-height: 1; white-space: nowrap; }
.isl-glyph.ar { font-size: clamp(44px, 8.5vmin, 80px); letter-spacing: .05em; }
.isl-pose svg, .isl-pic { width: clamp(80px, 15vmin, 140px); height: auto; }
.isl-shapes { display: flex; gap: 4px; }
.isl-shapes .mini { width: clamp(36px, 6vmin, 52px); }
.isl-cards { display: flex; gap: 8px; }
.isl-cards i { width: clamp(40px, 6.6vmin, 58px); aspect-ratio: 3/4; border: var(--line) solid var(--plum); border-radius: 10px; background: var(--bubble); display: grid; place-items: center; }
.isl-cards i.up { background: #fff; transform: rotate(8deg); }
.mini-pic { width: 70%; }
.isl-dots { display: flex; gap: 6px; }
.isl-dots i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--plum); background: #fff; }
.isl-dots i.on { background: var(--sun); }
.isl-crown { position: absolute; top: -18px; right: -8px; width: 54px; color: var(--sun); transform: rotate(14deg); filter: drop-shadow(0 3px 0 var(--plum)); }
.isl-crown svg { stroke: var(--plum); }

/* ---------- Jalur level ---------- */
.island-path { position: relative; padding: 0 var(--gutter) 40px; display: grid; justify-items: center; }
.trail { position: absolute; inset: 0 0 40px; width: min(100%, 520px); height: calc(100% - 40px); margin: 0 auto; left: 0; right: 0; }
.trail-h { display: none; }
.trail path { fill: none; stroke: var(--tint); stroke-width: 26; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.nodes { position: relative; list-style: none; padding: 0; margin: 0; width: min(100%, 520px); display: grid; gap: clamp(10px, 2.2vh, 26px); }
.node-wrap { display: flex; align-items: center; }
.node-wrap.n0, .node-wrap.n4 { justify-content: center; }
.node-wrap.n1 { justify-content: flex-end; padding-right: 8%; }
.node-wrap.n2 { justify-content: center; }
.node-wrap.n3 { justify-content: flex-start; padding-left: 8%; }
@media (orientation: landscape) and (max-height: 820px) {
  .island-path { height: calc(100dvh - var(--btn) - 50px); padding-bottom: 30px; }
  .nodes { width: min(100%, 980px); grid-template-columns: repeat(5, 1fr); height: 100%; align-items: stretch; }
  .node-wrap { justify-content: center !important; padding: 0 !important; }
  .node-wrap.n1, .node-wrap.n3 { align-items: flex-start; padding-top: 4% !important; }
  .node-wrap.n0, .node-wrap.n2, .node-wrap.n4 { align-items: flex-end; padding-bottom: 6% !important; }
  .trail-v { display: none; }
  .trail-h { display: block; width: min(100%, 980px); height: calc(100% - 30px); }
}
.node {
  position: relative; width: clamp(96px, 15vmin, 132px); height: clamp(96px, 15vmin, 132px); flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--bubble);
}
.node.done { background: #fff; }
.node.current { animation: nudge 1.6s ease-in-out 3; }
@keyframes nudge { 50% { transform: scale(1.08); } }
.node.locked { background: #F4E2EA; color: #9C7A90; box-shadow: 0 var(--lift) 0 #9C7A90; border-color: #9C7A90; }
.node.locked svg { width: 42%; }
.node-n { font-size: clamp(44px, 7vmin, 60px); font-weight: 700; }
.node-sticker { width: 64%; }
.node-stars { position: absolute; bottom: -20px; display: flex; gap: 2px; }
.node-stars i { width: 26px; color: #fff; }
.node-stars i svg { stroke: var(--plum); stroke-width: 3.5; }
.node-stars i.on { color: var(--sun); }

/* ---------- Level ---------- */
.level { display: grid; place-items: center; padding: 0 var(--gutter) 40px; }
.acts { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 260px)); gap: clamp(16px, 3vmin, 32px); width: min(100%, 1000px); justify-content: center; }
@media (orientation: portrait) { .acts { grid-template-columns: repeat(2, minmax(0, 240px)); } }
.act { position: relative; aspect-ratio: 1; border-radius: var(--r-tile); background: var(--tint); display: grid; place-items: center; }
.act-icon { width: 46%; color: var(--plum); }
.act.current { background: var(--bubble); }
.act-star { position: absolute; top: -16px; right: -12px; width: 56px; color: #fff; }
.act-star svg { stroke: var(--plum); stroke-width: 3; }
.act.done .act-star { color: var(--sun); animation: star-in .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes star-in { from { transform: scale(0) rotate(-90deg); } }

/* ---------- Aktivitas ---------- */
.activity { position: relative; display: flex; flex-direction: column; padding: 0 var(--gutter) max(20px, env(safe-area-inset-bottom)); }
.progress { height: 18px; border: var(--line) solid var(--plum); border-radius: 12px; background: #fff; overflow: hidden; margin: 0 auto 12px; width: min(100%, 640px); }
.progress span { display: block; height: 100%; width: 0; background: var(--mint); transition: width .4s ease; }
.stage { flex: 1; display: grid; place-items: center; position: relative; min-height: 0; }
.buddy { position: absolute; left: var(--gutter); bottom: max(8px, env(safe-area-inset-bottom)); width: clamp(70px, 11vmin, 110px); pointer-events: none; }
@media (orientation: portrait) and (max-width: 600px) { .buddy { display: none; } }

.card {
  border-radius: var(--r-card); position: relative;
  display: grid; place-items: center; padding: 10px;
}
img { height: auto; }
.face { display: grid; place-items: center; width: 100%; height: 100%; pointer-events: none; }
.pic { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pic svg { width: 100%; height: 100%; }
.pic.shadow { filter: brightness(0) opacity(.28); }
.glyph { font-weight: 700; line-height: 1; display: flex; align-items: baseline; gap: .12em; }
.glyph small { font-size: .55em; }
.glyph.ar { font-family: 'Scheherazade New', serif; font-weight: 400; line-height: 1.25; }
.shape, .shape svg { width: 100%; height: 100%; }
.face .pose, .placed .pose { width: 100%; height: 100%; }

/* Kartu besar */
.kartu { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 40px); width: 100%; }
.kartu-main { display: grid; justify-items: center; gap: 14px; }
.card.big { width: min(52vmin, 440px); aspect-ratio: 1; background: #fff; }
.card.big .face { grid-template-rows: 1fr; }
.card.big .glyph { font-size: min(30vmin, 250px); }
.card.big .glyph.ar { font-size: min(32vmin, 270px); }
.card.big .card-pic { position: absolute; right: 6%; bottom: 6%; width: 28%; }
.card.big .face:has(.card-pic) .glyph { transform: translate(-10%, -14%); font-size: min(24vmin, 200px); }
.card.big .dots { position: absolute; bottom: 9%; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: 80%; }
.card.big .dots i { width: min(4vmin, 26px); aspect-ratio: 1; border-radius: 50%; background: var(--bubble); border: 3px solid var(--plum); }
.card.big .pic { width: 78%; height: 78%; }
.card.big .pose { width: 100%; height: 100%; }
.story .card.big { width: min(56vmin, 480px); }
.card.pop { animation: card-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes card-pop { 40% { transform: scale(1.05) rotate(-1.5deg); } }
.card.slide-l { animation: slide-l .3s ease; }
.card.slide-r { animation: slide-r .3s ease; }
@keyframes slide-l { from { transform: translateX(14%) rotate(3deg); opacity: .3; } }
@keyframes slide-r { from { transform: translateX(-14%) rotate(-3deg); opacity: .3; } }
.nav.finish { background: var(--mint); }
.nosound { position: absolute; top: 10px; right: 10px; width: 46px; height: 46px; padding: 6px; border-radius: 50%; background: var(--blush); border: 3px solid var(--plum); color: var(--rasp); }
.detail { text-align: center; max-width: min(90vw, 560px); min-height: 1em; }
.detail p { margin: 4px 0; }
.detail-name { font-weight: 700; font-size: 22px; }
.detail-ar { font-family: 'Scheherazade New', serif; font-size: clamp(28px, 4.4vmin, 40px); line-height: 1.6; }
.detail-lat { font-size: 18px; font-style: italic; }
.detail-arti { font-size: 16px; }
@media (orientation: portrait) {
  .kartu { flex-wrap: wrap; }
  .kartu-main { order: -1; width: 100%; }
  .card.big, .story .card.big { width: min(78vw, 520px); }
  .card.big .glyph { font-size: min(44vw, 300px); }
  .card.big .glyph.ar { font-size: min(46vw, 320px); }
  .card.big .face:has(.card-pic) .glyph { font-size: min(34vw, 240px); }
}

/* Pilih */
.pilih { width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr; gap: 16px; justify-items: center; }
.prompt { display: flex; align-items: center; justify-content: center; min-height: 12px; }
.replay.talking { background: var(--sun); animation: talk .5s ease infinite alternate; }
@keyframes talk { to { transform: scale(1.06); } }
.prompt-show:empty { display: none; }
.card.small { width: clamp(100px, 18vmin, 150px); aspect-ratio: 1; box-shadow: none; background: var(--sun); }
.card.small .glyph { font-size: clamp(64px, 12vmin, 110px); }
.count-show { display: flex; flex-wrap: wrap; gap: 6px; max-width: min(80vw, 520px); justify-content: center; background: #fff; border: var(--line) solid var(--plum); border-radius: var(--r-card); padding: 10px 14px; }
.count-show .pic.sm { width: clamp(38px, 6.5vmin, 60px); height: auto; }
.choices { width: min(100%, 1000px); display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(14px, 2.6vmin, 28px); align-content: center; }
@media (orientation: portrait) { .pilih-card .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice.card { aspect-ratio: 1; max-height: 34vh; justify-self: center; width: 100%; max-width: 280px; }
.choice .glyph { font-size: clamp(64px, 13vmin, 140px); }
.choice .glyph.ar { font-size: clamp(70px, 14vmin, 150px); }
.choice .pic { width: 76%; height: 76%; }
.choice .pose { width: 100%; height: 100%; }
.choice.right { background: var(--mint); animation: card-pop .4s ease; }

/* Balon & gelembung: diam di tempat, bergoyang pelan beberapa kali */
.pilih-balloon .choices, .pilih-bubble .choices { display: flex; flex-wrap: wrap; justify-content: space-evenly; align-items: center; align-content: center; gap: clamp(12px, 3vmin, 32px); }
.choice.balloon, .choice.bubble {
  border: 0; box-shadow: none; background: none; padding: 0;
  width: clamp(110px, 17vmin, 170px); aspect-ratio: auto; max-height: none;
  translate: 0 var(--y);
  animation: bob 2.2s ease-in-out var(--delay) 6 alternate;
}
.choice.balloon .balloon-svg { width: 100%; display: block; pointer-events: none; }
.choice.bubble { aspect-ratio: 1; border-radius: 50%; border: var(--line) solid var(--plum); background: radial-gradient(circle at 30% 28%, #fff 0 14%, rgba(255, 255, 255, .85) 15% 60%, rgba(255, 211, 228, .9) 100%); display: grid; place-items: center; }
.choice.bubble .glyph { font-size: clamp(56px, 9vmin, 90px); }
.choice.bubble .pic { width: 70%; height: 70%; }
@keyframes bob { from { transform: translateY(-10px) rotate(-3deg); } to { transform: translateY(10px) rotate(3deg); } }
.choice.popped { animation: popped .35s ease forwards !important; pointer-events: none; }
@keyframes popped { to { transform: scale(1.6); opacity: 0; } }
.choice.balloon:active, .choice.bubble:active { scale: .94; }

/* Hitung */
.hitung { width: 100%; display: grid; place-items: center; gap: 12px; position: relative; }
.count-field { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: clamp(12px, 2.4vmin, 26px); width: min(100%, 860px); }
.count-item { aspect-ratio: 1; border-radius: var(--r-card); padding: 12%; position: relative; max-height: 22vh; justify-self: center; width: 100%; max-width: 200px; }
.count-item .pic { pointer-events: none; }
.count-item.done { background: var(--petal); }
.count-item .num { position: absolute; top: -14px; left: -14px; width: 48px; height: 48px; border-radius: 50%; background: var(--sun); border: 3px solid var(--plum); font-size: 28px; font-weight: 700; display: none; place-items: center; }
.count-item.done .num { display: grid; animation: star-in .35s ease; }
.count-big { position: absolute; inset: 0; display: grid; place-items: center; font-size: min(40vmin, 300px); font-weight: 700; color: var(--rasp); -webkit-text-stroke: 6px var(--plum); paint-order: stroke fill; pointer-events: none; opacity: 0; }
.count-big.show { opacity: 1; animation: card-pop .5s ease; }

/* Susun */
.susun { width: 100%; display: grid; gap: clamp(20px, 4vh, 40px); justify-items: center; }
.slots { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: min(100%, 1100px); }
.slot { position: relative; width: clamp(80px, 11vmin, 120px); aspect-ratio: 1; border: var(--line) dashed var(--plum); border-radius: 18px; background: rgba(255, 255, 255, .55); display: grid; place-items: center; }
.slot-n { font-size: 30px; font-weight: 700; opacity: .4; }
.placed { position: absolute; inset: -4px; border: var(--line) solid var(--plum); border-radius: 18px; background: #fff; padding: 6px; display: grid; }
.placed .glyph { font-size: clamp(40px, 7vmin, 70px); }
.pool { display: flex; flex-wrap: wrap; gap: clamp(12px, 2vmin, 20px); justify-content: center; width: min(100%, 1100px); }
.susun-card { width: clamp(96px, 14vmin, 150px); aspect-ratio: 1; padding: 4px; }
.susun-card .glyph { font-size: clamp(54px, 9vmin, 96px); }
.susun-card.used { visibility: hidden; }

/* Jejak */
.jejak { display: flex; align-items: center; gap: 20px; }
.trace-box { position: relative; width: min(66vmin, 560px); aspect-ratio: 1; background: #fff; border: var(--line) solid var(--plum); border-radius: var(--r-card); box-shadow: 0 var(--lift) 0 var(--plum); overflow: hidden; }
.trace-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.paint { touch-action: none; cursor: crosshair; }
@media (orientation: portrait) { .jejak { flex-direction: column; } .trace-box { width: min(86vw, 600px); } }

/* Cocok */
.cocok { width: 100%; display: grid; gap: clamp(28px, 6vh, 60px); justify-items: center; }
.targets, .drags { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 2.6vmin, 28px); }
.target, .drag { width: clamp(100px, 15vmin, 160px); aspect-ratio: 1; border-radius: var(--r-card); padding: 12px; display: grid; place-items: center; }
.target { background: rgba(255, 255, 255, .6); box-shadow: none; border-style: dashed; }
.target.filled { border-style: solid; background: var(--mint); animation: card-pop .4s ease; }
.drag { touch-action: none; position: relative; z-index: 1; }
.drag.dragging { z-index: 10; transition: none; box-shadow: 0 16px 0 rgba(75, 29, 63, .35); }
.drag.selected { background: var(--sun); }
.drag.placed { visibility: hidden; }

/* Memori */
.memori { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: clamp(12px, 2.2vmin, 22px); width: min(100%, calc(var(--cols) * 190px)); perspective: 900px; }
@media (orientation: portrait) { .memori { grid-template-columns: repeat(min(var(--cols), 3), minmax(0, 1fr)); } }
.mcard { aspect-ratio: 3 / 3.6; border-radius: var(--r-card); padding: 0; position: relative; transform-style: preserve-3d; transition: transform .35s ease; background: none; border: 0; box-shadow: none; max-height: 30vh; }
.mcard > span { position: absolute; inset: 0; border: var(--line) solid var(--plum); border-radius: var(--r-card); box-shadow: 0 var(--lift) 0 var(--plum); backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.mback { background: var(--bubble); color: #fff; }
.mback svg { width: 46%; stroke: var(--plum); stroke-width: 3; }
.mfront { background: #fff; transform: rotateY(180deg); padding: 14%; }
.mfront .glyph { font-size: clamp(48px, 8vmin, 80px); }
.mcard.flip { transform: rotateY(180deg); }
.mcard.match .mfront { background: var(--mint); }

/* Warnai */
.warnai { display: grid; grid-template-columns: auto auto; grid-template-areas: "pic pal" "pic done"; gap: 18px; align-items: center; }
.canvas-wrap { grid-area: pic; width: min(64vmin, 560px); aspect-ratio: 1; border: var(--line) solid var(--plum); border-radius: var(--r-card); overflow: hidden; background: #fff; box-shadow: 0 var(--lift) 0 var(--plum); }
.coloring { width: 100%; height: 100%; display: block; }
.coloring .area { cursor: pointer; transition: fill .25s ease; }
.palette { grid-area: pal; display: grid; grid-template-columns: repeat(3, var(--btn)); gap: 12px; }
.swatch { width: var(--btn); height: var(--btn); border-radius: 50%; background: var(--c); padding: 14px; color: var(--plum); }
.swatch.on { outline: 6px solid var(--plum); outline-offset: 3px; }
.done-btn { grid-area: done; justify-self: center; background: var(--mint); }
@media (orientation: portrait) {
  .warnai { grid-template-columns: 1fr; grid-template-areas: "pic" "pal" "done"; justify-items: center; }
  .canvas-wrap { width: min(86vw, 600px); }
  .palette { grid-template-columns: repeat(9, minmax(0, var(--btn))); width: min(100%, 860px); }
  .swatch { width: 100%; height: auto; aspect-ratio: 1; padding: 18%; }
}
.free-pages { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-content: center; padding: 0 var(--gutter) 40px; }
.free-page { width: clamp(160px, 26vmin, 260px); aspect-ratio: 1; border-radius: var(--r-card); overflow: hidden; padding: 0; pointer-events: auto; }
.free-page svg { pointer-events: none; }

/* ---------- Album ---------- */
.album { padding: 0 var(--gutter) 40px; display: grid; gap: 14px; width: 100%; max-width: 900px; margin: 0 auto; }
.album-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(8px, 1.6vmin, 16px); background: var(--tint); border: var(--line) solid var(--plum); border-radius: var(--r-card); padding: 10px 14px; }
.album-isl { width: clamp(56px, 8vmin, 80px); display: grid; place-items: center; }
.album-isl .isl-glyph { font-size: clamp(22px, 3.6vmin, 32px); }
.album-isl .isl-pose svg, .album-isl .isl-pic { width: 100%; }
.album-isl .isl-shapes .mini { width: 22px; }
.album-isl .isl-cards i { width: 24px; border-width: 3px; border-radius: 6px; }
.slot-st { width: clamp(44px, 8.4vmin, 86px); aspect-ratio: 1; border-radius: 50%; border: 3px dashed rgba(75, 29, 63, .45); background: rgba(255, 255, 255, .6); display: grid; place-items: center; }
.slot-st.got { border: 3px solid var(--plum); background: #fff; animation: star-in .4s ease; }
.st-pic { width: 70%; }
.album-crown { width: clamp(44px, 7vmin, 64px); color: rgba(255, 255, 255, .7); }
.album-crown svg { stroke: rgba(75, 29, 63, .35); }
.album-crown.got { color: var(--sun); }
.album-crown.got svg { stroke: var(--plum); }

/* ---------- Hadiah ---------- */
.reward, .gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(75, 29, 63, .55); padding: var(--gutter); }
.reward-card { position: relative; background: var(--blush); border: var(--line) solid var(--plum); border-radius: 36px; box-shadow: 0 10px 0 var(--plum); padding: 36px 48px 28px; display: grid; justify-items: center; gap: 14px; animation: pop-in .45s cubic-bezier(.3, 1.4, .5, 1); }
.reward-sticker { width: min(42vmin, 280px); aspect-ratio: 1; border-radius: 50%; background: #fff; border: var(--line) solid var(--plum); display: grid; place-items: center; animation: spin-in .8s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes spin-in { from { transform: scale(0) rotate(-200deg); } }
.reward-pic { width: 66%; }
.reward-crown { position: absolute; top: -40px; width: 96px; color: var(--sun); }
.reward-crown svg { stroke: var(--plum); }
.reward-bunny { position: absolute; left: -46px; bottom: -20px; width: 120px; }
.reward-bunny.sleepy { position: static; width: 180px; }
.big-next { background: var(--mint); }
.rest-note { margin: 0; font-size: 16px; }

/* Bintang terbang */
.spark { position: fixed; width: 34px; height: 34px; margin: -17px 0 0 -17px; color: var(--sun); pointer-events: none; z-index: 60; animation: spark .9s cubic-bezier(.2, .8, .3, 1) forwards; }
.spark svg { stroke: var(--plum); stroke-width: 3; }
@keyframes spark { 0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); opacity: 0; } }
.wiggle { animation: wiggle .45s ease !important; }
@keyframes wiggle { 20%, 60% { translate: -10px 0; } 40%, 80% { translate: 10px 0; } }

/* Tombol gembok: tahan 3 detik */
.lock-btn { position: relative; }
.hold-ring { position: absolute; inset: -9px; width: calc(100% + 18px) !important; height: calc(100% + 18px) !important; transform: rotate(-90deg); pointer-events: none; }
.hold-ring circle { fill: none; stroke: var(--rasp); stroke-width: 4; stroke-dasharray: 132; stroke-dashoffset: 132; }
.lock-btn.holding .hold-ring circle { animation: ring 3s linear forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }

/* ---------- Gerbang & area orang tua ---------- */
.gate-card { position: relative; background: #fff; border: var(--line) solid var(--plum); border-radius: 28px; padding: 28px; display: grid; gap: 14px; justify-items: center; width: min(100%, 380px); }
.gate-card.confirm { width: min(100%, 460px); }
.gate-q { font-size: 22px; font-weight: 700; margin: 0 36px 0 0; text-align: center; }
.gate-val { font-size: 40px; font-weight: 700; min-height: 52px; }
.gate-val.bad { color: var(--rasp); font-size: 22px; }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; }
.key { height: 72px; border-radius: 18px; font-size: 32px; font-weight: 700; display: grid; place-items: center; }
.key svg { width: 34px; }
.k-ok { background: var(--mint); }
.gate-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border: 0; background: none; padding: 8px; }

.parent-top { background: var(--plum); color: #fff; }
.parent-top .round { background: #fff; color: var(--plum); box-shadow: 0 var(--lift) 0 rgba(0, 0, 0, .35); border-color: #fff; }
.parent-h1 { margin: 0; flex: 1; font-size: 26px; }
.parent { padding: 20px var(--gutter) 60px; display: grid; gap: 20px; max-width: 880px; width: 100%; margin: 0 auto; -webkit-user-select: text; user-select: text; }
.pcard { background: #fff; border: 3px solid var(--plum); border-radius: 20px; padding: 18px 20px; }
.pcard h2 { margin: 0 0 12px; font-size: 22px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill { font-size: 15px; background: var(--petal); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.pnote { font-size: 16px; line-height: 1.45; margin: 6px 0 12px; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 2px solid var(--blush); font-size: 18px; }
.prow small { display: block; font-size: 15px; opacity: .85; margin-top: 2px; }
.prow input[type="range"] { width: min(50%, 280px); accent-color: var(--rasp); height: 44px; }
.prow select { font: inherit; font-size: 18px; padding: 8px 12px; min-height: 48px; border: 3px solid var(--plum); border-radius: 12px; background: #fff; color: var(--plum); }
.switch { appearance: none; -webkit-appearance: none; width: 64px; height: 38px; border-radius: 999px; background: #E6CFDA; border: 3px solid var(--plum); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--plum); transition: transform .2s; }
.switch:checked { background: var(--mint); }
.switch:checked::after { transform: translateX(26px); }
.pbtns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.pbtn { border-radius: 14px; padding: 12px 18px; min-height: 52px; font-size: 17px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 0 var(--plum); border-width: 3px; }
.pbtn svg { width: 22px; height: 22px; }
.pbtn.danger { background: #FFE0E6; color: #8A1538; }
.rec-group { border-top: 2px solid var(--blush); padding: 10px 0; }
.rec-group summary { font-size: 18px; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 10px; }
.rec-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.rec-row { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--petal); }
.rec-text { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.rec-ar { font-family: 'Scheherazade New', serif; font-size: 28px; line-height: 1.5; }
.rec-lat { font-size: 16px; }
.rec-state { font-size: 14px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: #F4E2EA; }
.rec-state.ok { background: #CFF2E6; }
.ibtn { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; padding: 10px; box-shadow: 0 4px 0 var(--plum); border-width: 3px; }
.ibtn:disabled { opacity: .35; }
.ibtn.recording { background: #FF4D6D; color: #fff; }
.rec-msg { font-weight: 700; min-height: 1.2em; }
.plist { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; line-height: 1.45; }
@media (max-width: 560px) {
  .rec-row { grid-template-columns: 1fr auto auto auto; }
  .rec-state { grid-column: 1; justify-self: start; }
  .rec-text { grid-column: 1 / -1; }
}

.error-screen { display: grid; place-items: center; text-align: center; gap: 16px; font-size: 20px; padding: var(--gutter); }
.err-bunny { width: 160px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .choice.balloon, .choice.bubble { animation: none !important; translate: none; }
  .choice.popped { opacity: .3; }
  .spark { display: none; }
}

/* ---------- Kanvas ---------- */
.canvas-screen { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 0 var(--gutter) max(16px, env(safe-area-inset-bottom)); align-items: center; }
.cv-wrap { justify-self: center; width: min(100%, calc((100dvh - var(--btn) - 70px) * 4 / 3)); aspect-ratio: 4 / 3; border: var(--line) solid var(--plum); border-radius: var(--r-card); overflow: hidden; background: #fff; box-shadow: 0 var(--lift) 0 var(--plum); }
.cv { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.cv-tools { display: grid; gap: 18px; justify-items: center; }
.cv-colors { display: grid; grid-template-columns: repeat(2, var(--btn)); gap: 10px; }
.cv-colors .swatch { padding: 14px; }
.cv-sizes { display: flex; gap: 8px; }
.size-btn { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--plum); background: #fff; display: grid; place-items: center; box-shadow: 0 4px 0 var(--plum); padding: 0; }
.size-btn i { width: var(--d); height: var(--d); border-radius: 50%; background: var(--plum); }
.size-btn.on { background: var(--sun); }
.cv-save { background: var(--mint); }
@media (orientation: portrait) {
  .canvas-screen { grid-template-columns: 1fr; }
  .cv-wrap { width: 100%; }
  .cv-tools { grid-auto-flow: column; justify-content: center; align-items: center; }
  .cv-colors { grid-template-columns: repeat(5, minmax(0, 60px)); }
  .cv-colors .swatch { width: 100%; height: auto; aspect-ratio: 1; padding: 18%; }
  .cv-sizes { flex-direction: column; }
}
@media (orientation: portrait) and (max-width: 560px) { .tb-right { gap: 8px; } .tb-right .round { --btn: 58px; } }
.cv-gallery { padding: 0 var(--gutter) 40px; }
.cv-grid { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; max-width: 1100px; }
.cv-thumb { width: 100%; padding: 0; border: var(--line) solid var(--plum); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 var(--lift) 0 var(--plum); aspect-ratio: 4 / 3; }
.cv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-empty { display: grid; justify-items: center; gap: 20px; padding-top: 10vh; }
.cv-empty-ic { width: 120px; color: #E6CFDA; }
.pgallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.pgallery li { display: grid; gap: 8px; }
.pgallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 3px solid var(--plum); border-radius: 12px; }
.pg-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-btns .pbtn { min-height: 44px; padding: 8px 12px; font-size: 15px; }

/* ---------- Kelinci (mini game) ---------- */
.pet-meters { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(8px, 2vw, 20px); }
.meter { display: flex; align-items: center; gap: 6px; }
.meter-ic { width: clamp(30px, 5vmin, 44px); height: auto; }
.meter-bar { width: clamp(44px, 9vw, 110px); height: 18px; border: 3px solid var(--plum); border-radius: 10px; background: #fff; overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--mint); transition: width .5s ease; }
.meter.low .meter-bar i { background: var(--sun); }
.pet { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; padding: 0 var(--gutter) max(18px, env(safe-area-inset-bottom)); height: calc(100dvh - var(--btn) - 30px); }
.pet-room { position: relative; border: var(--line) solid var(--plum); border-radius: 36px; background: linear-gradient(#FFE3EE 0 72%, #FFD3E4 72%); overflow: hidden; display: grid; place-items: center; min-height: 0; transition: background .6s; }
.pet-room.night { background: linear-gradient(#3B2A5C 0 72%, #2C1F45 72%); }
.pet-bunny { border: 0; background: none; padding: 0; width: min(80%, 42dvh, 380px); height: auto; aspect-ratio: 160 / 170; }
.pet-bunny .bunny { width: 100%; height: 100%; }
.bunny.chew .mouth { animation: chew .25s ease-in-out 5 alternate; transform-box: fill-box; transform-origin: center; }
@keyframes chew { to { transform: scaleY(.3) translateY(4px); } }
.bunny-sad .ear-l { transform: rotate(-28deg); }
.bunny-sad .ear-r { transform: rotate(28deg); }
.bunny-sad .mouth { transform: scaleY(-1); transform-box: fill-box; transform-origin: center; }
.pet-bubble { position: absolute; top: 8%; left: calc(50% + min(14vmin, 110px)); width: clamp(70px, 11vmin, 100px); aspect-ratio: 1; border-radius: 50%; background: #fff; border: var(--line) solid var(--plum); display: none; place-items: center; }
.pet-bubble.show { display: grid; animation: pop-in .4s ease; }
.bubble-ic { width: 60%; }
.pet-fx { position: absolute; inset: 0; pointer-events: none; }
.foam { position: absolute; left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff 0 30%, rgba(255,255,255,.85) 31% 70%, rgba(110,198,255,.6)); border: 2px solid #9FD6FF; animation: foam 1.6s ease var(--d) both; }
@keyframes foam { from { transform: scale(0); } 40% { transform: scale(1.1); } to { transform: scale(1) translateY(-20px); opacity: .9; } }
.sparkle-dot { position: absolute; left: var(--x); top: var(--y); width: 34px; color: var(--sun); animation: star-in .5s ease var(--d) both; }
.sparkle-dot svg { stroke: var(--plum); stroke-width: 3; }
.pet-ball { position: absolute; left: 18%; bottom: 14%; width: clamp(60px, 10vmin, 96px); animation: ball 1.5s ease-in-out; }
@keyframes ball { 0% { transform: translate(0, 0); } 25% { transform: translate(18vw, -18vh) rotate(180deg); } 50% { transform: translate(36vw, 0) rotate(360deg); } 75% { transform: translate(18vw, -12vh) rotate(540deg); } 100% { transform: translate(0, 0) rotate(720deg); } }
.fly-food { position: absolute; left: 50%; bottom: 6%; width: 80px; translate: -50% 0; animation: fly .6s ease-in forwards; }
@keyframes fly { to { transform: translateY(-26vh) scale(.5); opacity: .4; } }
.pet-food { position: absolute; bottom: 4%; display: flex; gap: 16px; }
.pet-food[hidden] { display: none; }
.food-btn { width: clamp(80px, 12vmin, 110px); aspect-ratio: 1; border-radius: 50%; border: var(--line) solid var(--plum); background: #fff; box-shadow: 0 var(--lift) 0 var(--plum); padding: 14px; animation: pop-in .35s ease; display: grid; place-items: center; }
.zzz { position: absolute; left: 60%; top: 20%; font-size: 64px; font-weight: 700; color: #FFF1F6; animation: zzz 2.4s ease-in-out infinite; }
.zzz.z2 { left: 66%; top: 12%; font-size: 44px; animation-delay: .8s; }
.zzz.z3 { left: 71%; top: 6%; font-size: 30px; animation-delay: 1.6s; }
@keyframes zzz { 0% { opacity: 0; transform: translateY(20px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px); } }
.wake-btn { position: absolute; top: 16px; right: 16px; background: var(--sun); padding: 14px; }
.pet-actions { display: flex; justify-content: center; gap: clamp(10px, 3vw, 40px); }
.pet-act { width: clamp(64px, 19vw, 120px); aspect-ratio: 1; border-radius: 28px; border: var(--line) solid var(--plum); background: #fff; box-shadow: 0 var(--lift) 0 var(--plum); padding: 16px; transition: transform .12s, box-shadow .12s; display: grid; place-items: center; }
.pet-act .pic, .food-btn .pic { width: 100%; height: 100%; }
.pet-act:active { transform: translateY(var(--lift)); box-shadow: 0 0 0 var(--plum); }
@media (orientation: portrait) and (max-width: 560px) { .meter-bar { width: 40px; } .pet-meters { gap: 6px; } .meter-ic { width: 26px; } }

@media (orientation: portrait) and (max-width: 600px) {
  .islands[data-n="3"] { grid-template-columns: 1fr; }
  .islands[data-n="3"] .island { height: calc((100dvh - var(--btn) - 170px) / 3); }
}
@media (max-width: 560px) {
  .pet-meters { display: grid; grid-template-columns: repeat(2, auto); gap: 4px 12px; }
  .pet-meters .meter-bar { width: 52px; height: 14px; }
}
