/* Bintang Shaleh: semua gaya tampilan. Tema warna lewat [data-theme] di <html>. */
/* Layout: one-column phone app; kawaii header with live mascot, card views, bottom tab bar. Deliberately one light pastel look. */
:root {
  --plum: #5a3659; --dark: #3b2342; --ink: #4a2c4a; --muted: #8a6a88;
  --pink: #ffbfd2; --pinkS: #f597b7; --pinkD: #ff6f9c;
  --mint: #bff0dc; --mintS: #86d6b9; --mintD: #3fb98e;
  --butter: #fff0a6; --butterS: #f5d06a; --butterD: #ffd84d;
  --lav: #ded2ff; --lavS: #b7a2f2; --lavD: #8f74e6;
  --sky: #c6e7ff; --skyD: #5aa9ea; --cream: #fffaf4; --bg: #ffe7ef; --dot: #ffd3e1; --dot2: #ffd3e1;
  --accent: #ff6f9c; --tabSel: #ffbfd2; --tint: #ffe7ef; --onbg: #4a2c4a;
  --ui: "Fredoka", "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --pop: "Zen Maru Gothic", "Fredoka", system-ui, sans-serif;
  color-scheme: light;
}
/* themes: background, pattern, accent; cards stay cream like stickers */
:root[data-theme="mint"] { --bg: #ddf6ec; --dot: #c4ecdb; --dot2: #c4ecdb; --accent: #2b9e76; --tabSel: #bff0dc; --tint: #e6f8f0; }
:root[data-theme="langit"] { --bg: #e2f2ff; --dot: #cce6fb; --dot2: #cce6fb; --accent: #3a86c8; --tabSel: #c6e7ff; --tint: #e8f4ff; }
:root[data-theme="lavender"] { --bg: #efe8ff; --dot: #e0d4ff; --dot2: #e0d4ff; --accent: #7d5fe0; --tabSel: #ded2ff; --tint: #f2edff; }
:root[data-theme="mentega"] { --bg: #fff6d8; --dot: #ffeab0; --dot2: #ffeab0; --accent: #d9782b; --tabSel: #fff0a6; --tint: #fff7dc; }
:root[data-theme="malam"] { --bg: #2b2147; --dot: #3b2f61; --dot2: #f5d06a; --accent: #ff6f9c; --tabSel: #ffbfd2; --tint: #f1ebff; --onbg: #fdeefa; }
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font-family: var(--ui); color: var(--ink); background: var(--bg); background-image: radial-gradient(var(--dot) 7px, transparent 8px), radial-gradient(var(--dot2) 2.5px, transparent 3.5px); background-size: 66px 48px; background-position: 0 0, 33px 24px; min-height: 100vh; }
.app { max-width: 480px; margin: 0 auto; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
button { font-family: var(--ui); cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--skyD); outline-offset: 2px; }
.ink { border: 3px solid var(--plum); border-radius: 26px; box-shadow: inset -6px -6px 0 rgba(90,54,89,0.08); }
/* header: maskot + sapaan, lalu bintang/usia/Koleksi, lalu kartu tanggal selebar header (aplikasi maks. 480 px) */
.top { position: relative; display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-areas: "m h" "p p" "i i"; gap: 8px 10px; align-items: center; background: var(--cream); padding: 10px 12px 10px 6px; }
#mascot { grid-area: m; } .hello { grid-area: h; }
.hello small, .hello h1 { padding-right: 34px; } /* ruang tombol tema */
.info { grid-area: i; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "d s" "j p"; gap: 2px 10px; background: var(--tint); border: 3px solid var(--plum); border-radius: 20px; padding: 6px 12px; }
.info .day { grid-area: d; font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--plum); }
.info .hijri { grid-area: j; font-size: 13px; font-weight: 600; color: var(--accent); line-height: 1.2; }
.info canvas { grid-area: s; justify-self: end; width: 112px; height: 24px; display: block; }
.info .prog { grid-area: p; justify-self: end; font-size: 12px; font-weight: 600; color: var(--muted); }
@media (max-width: 440px) {
  .top { grid-template-columns: 104px minmax(0, 1fr); }
  #mascot { width: 104px !important; height: 118px !important; }
}
.themeBtn { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--plum); background: #fff; display: grid; place-items: center; padding: 0; z-index: 2; }
.themeBtn svg { width: 22px; height: 22px; }
#mascot { width: 116px; height: 132px; display: block; }
.hello { min-width: 0; }
.hello small { display: block; font-size: 15px; color: var(--muted); font-weight: 500; }
.hello h1 { margin: 2px 0 0; font-size: 26px; line-height: 1.1; font-weight: 700; color: var(--accent); text-wrap: balance; overflow-wrap: break-word; }
.balance { display: inline-flex; align-items: center; gap: 6px; background: var(--butter); border: 3px solid var(--plum); border-radius: 999px; padding: 3px 14px 3px 6px; font-weight: 700; font-size: 22px; color: var(--plum); }
.balance canvas { width: 32px; height: 32px; }
/* pesan untuk si kecil di bawah nama; bintang, usia, Koleksi satu baris di bawahnya */
.hellomsg { margin: 5px 0 0; font-size: 14px; line-height: 1.38; font-weight: 600; color: var(--plum); text-wrap: pretty; }
.hellomsg b { color: var(--accent); white-space: nowrap; }
.hstats { grid-area: p; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-left: 4px; }
.hstats .lvl, .hstats .kolbtn { margin: 0; vertical-align: 0; }
/* HP kecil: salam tidak tertutup tombol tema, nama panjang tidak terpotong di tengah kata, tanggal tidak terlipat */
@media (max-width: 360px) {
  .hello small { font-size: 13px; } .hello h1 { font-size: 22px; } .hellomsg { font-size: 13px; }
  .info { grid-template-areas: "d d" "j j" "s p"; } .info canvas { justify-self: start; }
}
.praise { position: absolute; right: 12px; top: -12px; background: #fff; border: 3px solid var(--plum); border-radius: 18px; padding: 6px 12px; font-family: var(--pop); font-weight: 900; font-size: 16px; color: var(--mintD); transform: scale(0); transform-origin: 20% 100%; transition: transform .25s cubic-bezier(.3,1.6,.5,1); pointer-events: none; max-width: 70%; }
.praise.on { transform: scale(1) rotate(-3deg); }
.kids { display: flex; gap: 8px; margin: 10px 2px 4px; overflow-x: auto; padding: 4px 2px 6px; }
.kid { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 0; color: var(--onbg); font-size: 13px; font-weight: 600; }
.kid canvas { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--plum); background: var(--mint); }
.kid[aria-pressed="true"] canvas { border-color: var(--pinkD); box-shadow: 0 0 0 3px var(--butterD); }
.kid.add span.plus { width: 54px; height: 54px; border-radius: 50%; border: 3px dashed var(--lavS); display: grid; place-items: center; font-size: 28px; color: var(--lavD); background: #fff; }
/* cards */
.view { display: none; flex-direction: column; gap: 14px; margin-top: 10px; }
.view.on { display: flex; }
.card { background: var(--cream); padding: 14px; }
.card h2 { margin: 0 0 10px; font-size: 21px; display: flex; align-items: center; gap: 8px; }
.card h2 .count { white-space: nowrap; flex: none; margin-left: auto; font-size: 18px; background: var(--mint); border: 3px solid var(--plum); border-radius: 999px; padding: 0 12px; }
.datebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; padding: 6px 8px; }
.datebar strong { font-size: 18px; text-align: center; }
.datebar button { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--plum); background: var(--sky); font-size: 20px; font-weight: 700; color: var(--plum); }
.datebar button:disabled { opacity: .35; }
.row { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 7px 4px; border-top: 2px dotted #eadcf2; }
.row:first-of-type { border-top: 0; }
.row canvas.ic { width: 48px; height: 48px; }
.row .nm { font-size: 20px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.row .nm em { display: inline-block; font-style: normal; font-size: 12px; font-weight: 700; background: var(--butter); border: 2px solid var(--plum); border-radius: 999px; padding: 0 8px; margin-left: 4px; vertical-align: 2px; }
.starbtn { width: 66px; height: 66px; border: 0; background: none; padding: 0; }
.starbtn canvas { width: 66px; height: 66px; pointer-events: none; }
.empty { color: var(--muted); font-size: 15px; margin: 4px 0; }
/* rewards */
.reward { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-top: 2px dotted #eadcf2; }
.reward:first-of-type { border-top: 0; }
.reward canvas { width: 56px; height: 56px; }
.reward .nm { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.reward .cost { font-size: 15px; color: var(--muted); font-weight: 600; }
.btn { border: 3px solid var(--plum); border-radius: 999px; background: var(--pink); color: var(--plum); font-weight: 700; font-size: 17px; padding: 8px 16px; min-height: 44px; }
.btn.mint { background: var(--mint); } .btn.butter { background: var(--butter); } .btn.white { background: #fff; } .btn.sky { background: var(--sky); }
.btn:disabled { background: #eee6ee; color: #a891a6; border-color: #c9b5c8; }
.btn.sm { font-size: 14px; padding: 4px 12px; min-height: 36px; }
.hist { font-size: 15px; color: var(--muted); display: grid; gap: 4px; }
/* report */
#chart { width: 100%; height: 240px; display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: #fff; border: 3px solid var(--plum); border-radius: 18px; padding: 8px 6px; text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--pinkD); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.note { font-size: 15px; line-height: 1.45; margin: 10px 0 0; }
/* parent */
.lockbox { text-align: center; display: grid; gap: 10px; justify-items: center; }
.field { display: grid; gap: 4px; font-size: 15px; font-weight: 600; }
.field input, .field select, textarea { font: 500 18px var(--ui); color: var(--ink); border: 3px solid var(--plum); border-radius: 14px; padding: 8px 12px; background: #fff; width: 100%; min-width: 0; }
.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline .field { flex: 1 1 120px; }
.list { display: grid; gap: 6px; margin: 6px 0 12px; }
.item { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid #eadcf2; border-radius: 14px; padding: 6px 8px; }
.item canvas { width: 40px; height: 40px; flex: none; }
.item .grow { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.seg { display: flex; gap: 8px; } .seg button { flex: 1; }
.seg button[aria-pressed="true"] { background: var(--butter); box-shadow: inset 0 0 0 2px var(--plum); }
details.sec { background: var(--cream); padding: 12px 14px; }
details.sec summary { font-size: 19px; font-weight: 700; cursor: pointer; list-style: none; }
details.sec summary::after { content: "▾"; float: right; color: var(--lavD); }
details.sec[open] summary { margin-bottom: 10px; }
.privacy { font-size: 14px; color: var(--muted); line-height: 1.45; }
/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 0 max(10px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.tabs nav { pointer-events: auto; width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--cream); border: 3px solid var(--plum); border-radius: 24px; padding: 6px; gap: 4px; box-shadow: 0 6px 20px rgba(90,54,89,0.18); }
.tabs button { border: 0; background: none; border-radius: 18px; padding: 6px 2px 4px; display: grid; justify-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs button svg { width: 28px; height: 28px; }
.tabs button[aria-selected="true"] { background: var(--tabSel); color: var(--plum); }
/* modal + overlay */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(59,35,66,0.45); display: grid; place-items: center; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.modal[hidden] { display: none !important; }
.sheet { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--cream); padding: 18px; display: grid; gap: 12px; }
.sheet h3 { margin: 0; font-size: 23px; color: var(--pinkD); text-wrap: balance; }
.sheet p { margin: 0; font-size: 16px; line-height: 1.45; }
.pin { display: flex; gap: 10px; justify-content: center; }
.pin input { width: 54px; height: 62px; text-align: center; font: 700 30px var(--ui); border: 3px solid var(--plum); border-radius: 16px; background: #fff; color: var(--plum); -webkit-text-security: disc; }
.err { color: #d93a64; font-weight: 600; font-size: 15px; min-height: 1.2em; margin: 0; }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.themes button { border: 3px solid var(--plum); border-radius: 18px; background: #fff; padding: 6px 4px 8px; display: grid; justify-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--plum); }
.themes button[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--butterD); }
.themes canvas { width: 76px; height: 76px; border-radius: 14px; }
#welcomeArt { width: 160px; height: 180px; justify-self: center; }
#fx { position: fixed; inset: 0; z-index: 50; width: 100vw; height: 100vh; pointer-events: none; }
#fx[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .praise { transition: none; } }
/* level chip */
.lvl { display: inline-block; margin-left: 6px; vertical-align: 4px; font-size: 13px; font-weight: 700; color: var(--plum); background: var(--lav); border: 2px solid var(--plum); border-radius: 999px; padding: 1px 9px; }
.kidsel { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.kidsel select { font: 600 14px var(--ui); color: var(--ink); border: 2px solid var(--plum); border-radius: 10px; padding: 3px 6px; background: #fff; max-width: 100%; }
/* kampung */
#kpCanvas { width: 100%; display: block; border-radius: 18px; border: 3px solid var(--plum); }
#rasiCanvas { width: 100%; display: block; border-radius: 18px; }
.kpbar { height: 14px; background: #fff; border: 3px solid var(--plum); border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.kpbar i { display: block; height: 100%; background: var(--butterD); border-right: 3px solid var(--plum); transition: width .4s; }
.kpline { font-size: 15px; font-weight: 600; margin: 8px 0 0; line-height: 1.4; }
.kpsub { font-size: 14px; color: var(--muted); margin: 4px 0 0; line-height: 1.45; }
.misi { font-size: 19px; font-weight: 600; line-height: 1.35; margin: 2px 0 12px; text-wrap: pretty; }
#misiBtn[aria-pressed="true"] { background: var(--mint); }
.row2 { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* trial bar */
.trialbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--butter); border: 3px solid var(--plum); border-radius: 999px; padding: 4px 4px 4px 14px; margin-bottom: 10px; font-weight: 600; font-size: 15px; color: var(--plum); }
.trialbar .btn { min-height: 34px; padding: 2px 14px; font-size: 14px; flex: none; }
.trialbar small { display: block; font-size: 12.5px; font-weight: 500; opacity: 0.85; line-height: 1.2; }
.trialbar small:empty { display: none; }
/* gate: login / kunci / aktivasi */
#gate { z-index: 60; background: var(--bg); background-image: radial-gradient(var(--dot) 7px, transparent 8px); background-size: 66px 48px; }
#gate .sheet { position: relative; text-align: center; }
#gArt { width: 150px; height: 150px; justify-self: center; display: block; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; }
.gbtn svg { width: 22px; height: 22px; flex: none; }
.small { font-size: 14px; color: var(--muted); line-height: 1.45; margin: 0; }
.xbtn { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--plum); background: #fff; font-size: 22px; font-weight: 700; color: var(--plum); line-height: 1; }
.demo { font-size: 13px; background: var(--lav); border-radius: 12px; padding: 6px 10px; color: var(--plum); text-align: left; }
/* 3D */
#m3d { padding: 0; background: rgba(43,33,71,0.85); }
.v3 { position: relative; width: 100%; max-width: 560px; height: 100%; max-height: 100vh; }
#cv3d { width: 100%; height: 100%; display: block; touch-action: none; }
.v3 .xbtn { right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); z-index: 2; }
.v3 .cap { position: absolute; left: 14px; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); text-align: center; color: #fff; font-weight: 600; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.4); pointer-events: none; }
#m3dMsg { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 17px; padding: 30px; text-align: center; }

/* usia: stepper */
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 3px solid var(--plum); background: var(--butter); color: var(--plum); font: 700 22px var(--ui); line-height: 1; padding: 0; }
.stepper input { width: 64px; text-align: center; font: 700 20px var(--ui); color: var(--plum); border: 3px solid var(--plum); border-radius: 14px; padding: 6px 4px; background: #fff; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper span { font-weight: 600; color: var(--muted); }
.kidsel .stepper button { width: 32px; height: 32px; font-size: 18px; }
.kidsel .stepper input { width: 50px; font-size: 16px; padding: 3px; }
/* jenis kelamin */
.gpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gpick button { display: flex; align-items: center; gap: 8px; border: 3px solid var(--plum); border-radius: 18px; background: #fff; padding: 6px 10px 6px 6px; font: 700 16px var(--ui); color: var(--plum); min-height: 64px; }
.gpick button canvas { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--plum); flex: none; }
.gpick button[aria-pressed="true"] { background: var(--butter); box-shadow: 0 0 0 3px var(--butterD); }
/* suara */
.acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mic { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--plum); background: var(--pink); justify-self: center; display: grid; place-items: center; padding: 0; }
.mic svg { width: 44px; height: 44px; }
.mic.on { background: var(--pinkD); animation: micp 1s ease-in-out infinite; }
@keyframes micp { 50% { box-shadow: 0 0 0 10px rgba(255,111,156,0.25); } }
.recbar { height: 12px; border: 3px solid var(--plum); border-radius: 999px; background: #fff; overflow: hidden; }
.recbar i { display: block; height: 100%; width: 0; background: var(--pinkD); }
/* kebun */
#kbCanvas { width: 100%; display: block; border-radius: 18px; border: 3px solid var(--plum); cursor: pointer; }
.kbstats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.kbstats div { background: #fff; border: 3px solid var(--plum); border-radius: 16px; padding: 6px; text-align: center; }
.kbstats b { display: block; font-size: 24px; color: var(--pinkD); }
.kbstats span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kbitems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kbitem { border: 3px dashed #cbbdd0; border-radius: 16px; padding: 8px 6px; text-align: center; background: #f6f1f6; color: #a891a6; }
.kbitem b { display: block; font-size: 14px; line-height: 1.2; }
.kbitem span { font-size: 12px; font-weight: 600; }
.kbitem.on { border: 3px solid var(--plum); background: var(--mint); color: var(--plum); }
#kbSteps { width: 100%; max-width: 300px; height: 70px; display: block; margin: 0 auto; }
.tabs nav { grid-template-columns: repeat(6, 1fr) !important; padding: 5px; gap: 2px; }
.tabs button { font-size: 12px !important; padding: 6px 0 4px; line-height: 1.1; }
@media (max-width: 360px) { .tabs button { font-size: 10.5px !important; } }
.tabs button svg { width: 26px !important; height: 26px !important; }
#gArt { width: 220px !important; height: 150px !important; }
/* pemilih karakter */
.chars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chars button { border: 3px solid var(--plum); border-radius: 16px; background: #fff; padding: 6px 2px 6px; display: grid; justify-items: center; gap: 2px; font: 600 12px var(--ui); color: var(--plum); }
.chars button[aria-pressed="true"] { background: var(--butter); box-shadow: 0 0 0 3px var(--butterD); }
.chars canvas { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--plum); }
.skins { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.skins .skin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--plum); padding: 0; }
.skins .skin[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--butterD); }
/* baris selesai + kartu semangat */
.row.done { background: #e9f9f1; border-radius: 16px; border-top-color: transparent; }
.row.done + .row { border-top-color: transparent; }
.cheer { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; margin-top: 10px; background: #fff3f7; border: 3px solid var(--plum); border-radius: 20px; padding: 8px 12px 8px 6px; }
.cheer canvas { width: 70px; height: 56px; }
.cheer b { display: block; font-size: 19px; color: var(--pinkD); }
.cheer span { font-size: 16px; font-weight: 600; line-height: 1.3; }

/* hafalan juz amma */
#hfPath { width: 100%; display: block; margin: 0 0 4px; }
.hflist { display: grid; gap: 6px; }
.hfrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: 2px solid #eadcf2; border-radius: 16px; padding: 8px 10px 8px 8px; color: var(--ink); min-height: 64px; }
.hfrow .no { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--plum); background: var(--lav); display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--plum); }
.hfrow .nm { min-width: 0; display: grid; gap: 1px; }
.hfrow b { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.hfrow small { font-size: 13px; color: var(--muted); font-weight: 500; }
.hfrow .kpbar { height: 10px; border-width: 2px; margin: 4px 0 0; }
.hfrow .kpbar i { border-right-width: 2px; }
.hfrow .ct { font-weight: 700; font-size: 15px; color: var(--plum); background: var(--cream); border: 2px solid var(--plum); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.hfrow.done { background: #e9f9f1; border-color: var(--mintS); }
.hfrow.done .no { background: var(--butterD); }
.hfrow.done .ct { background: var(--mint); }
.ayat { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 4px 2px; }
.ayat button { height: 50px; border-radius: 50%; border: 3px dashed #cbbdd0; background: #fff; font: 700 18px var(--ui); color: var(--muted); padding: 0; }
.ayat button[aria-pressed="true"] { border: 3px solid var(--plum); background: var(--butterD); color: var(--plum); }
.xstep { display: flex; align-items: center; gap: 6px; }
.xstep button { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 3px solid var(--plum); background: var(--butter); color: var(--plum); font: 700 22px var(--ui); line-height: 1; padding: 0; }
.xstep input { width: 56px; text-align: center; font: 700 20px var(--ui); color: var(--plum); border: 3px solid var(--plum); border-radius: 14px; padding: 6px 4px; background: #fff; -moz-appearance: textfield; }
.xstep input::-webkit-outer-spin-button, .xstep input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.xstep span { font-weight: 600; color: var(--muted); }
.item .stepper, .item .xstep { flex: none; }
/* sertifikat */
#certCanvas { width: 100%; height: auto; display: block; border-radius: 16px; border: 3px solid var(--plum); }
/* waktu shalat + centang */
.row .nm .sub { display: block; font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.row.now .nm .sub { color: var(--accent); }
.row .nm .ok { display: none; width: 22px; height: 22px; border-radius: 50%; background: var(--mintD); border: 2px solid var(--plum); vertical-align: 1px; margin-left: 6px; place-items: center; }
.row .nm .ok svg { width: 14px; height: 14px; display: block; }
.row.done .nm .ok { display: inline-grid; }
/* tantangan */
#chCard .misi { margin-bottom: 6px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.chk input { width: 22px; height: 22px; accent-color: var(--mintD); }
/* pengingat */
.remind { display: flex; align-items: center; gap: 8px; background: var(--butter); padding: 6px 6px 6px 14px; margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--plum); border-radius: 20px; }
.remind > div { flex: 1; min-width: 0; line-height: 1.3; }
.remind .rx { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 3px solid var(--plum); background: #fff; font: 700 20px var(--ui); color: var(--plum); line-height: 1; padding: 0; }
/* koleksi aksesori */
.kolbtn { display: inline-block; margin: 4px 0 0 6px; vertical-align: 4px; font: 700 13px var(--ui); color: var(--plum); background: var(--butter); border: 2px solid var(--plum); border-radius: 999px; padding: 1px 10px; min-height: 26px; }
#kolPrev { width: 240px; height: 180px; max-width: 100%; justify-self: center; display: block; border-radius: 18px; border: 3px solid var(--plum); }
.kolcats { display: flex; gap: 6px; flex-wrap: wrap; }
.kolcats button { flex: 1 1 auto; border: 3px solid var(--plum); border-radius: 999px; background: #fff; font: 700 14px var(--ui); color: var(--plum); padding: 4px 10px; min-height: 38px; }
.kolcats button[aria-selected="true"] { background: var(--pink); }
.kolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.kolitem { border: 3px solid var(--plum); border-radius: 16px; background: #fff; padding: 6px 4px 8px; display: grid; justify-items: center; gap: 2px; color: var(--plum); }
.kolitem canvas { width: 56px; height: 56px; }
.kolitem b { font-size: 13px; line-height: 1.15; text-align: center; }
.kolitem span { font-size: 12px; font-weight: 700; color: var(--muted); }
.kolitem[aria-pressed="true"] { background: var(--butter); box-shadow: 0 0 0 3px var(--butterD); }
.kolitem[aria-pressed="true"] span { color: var(--plum); }
.kolitem.locked { border-style: dashed; border-color: #cbbdd0; background: #f6f1f6; color: #a891a6; }
.kolitem.locked canvas { opacity: .45; filter: grayscale(.6); }
/* pilihan tema kebun */
.kbtema { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 10px; }
.kbtema button { display: grid; justify-items: center; gap: 2px; border: 3px solid var(--plum); border-radius: 16px; background: #fff; padding: 5px 2px 6px; font: 700 12.5px var(--ui); color: var(--plum); line-height: 1.15; min-height: 64px; }
.kbtema button canvas { width: 40px; height: 40px; }
.kbtema button[aria-pressed="true"] { background: var(--butter); box-shadow: 0 0 0 3px var(--butterD); }
/* data anak tidak tampil sebelum akun diperiksa, dan tidak terlihat di balik layar masuk/kunci */
body.booting .app, body.booting .tabs, body.gated .app, body.gated .tabs { visibility: hidden; }
body.booting::after { content: 'Memuat...'; position: fixed; inset: 0; display: grid; place-items: center; font: 600 18px var(--ui); color: var(--plum); }
/* akun google di menu orang tua */
.acct h2 { margin-bottom: 8px; }
.acctrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.acctrow .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.acctrow b { font-size: 16px; color: var(--plum); overflow-wrap: anywhere; }
.acct .seg { margin-bottom: 4px; }
.acct .small:empty { display: none; }
/* toko bintang */
#shopCanvas { width: 100%; display: block; border-radius: 18px; border: 3px solid var(--plum); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.shopcats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.shopcats button { flex: 1 1 auto; border: 3px solid var(--plum); border-radius: 999px; font: 700 14px var(--ui); color: var(--plum); padding: 4px 10px; min-height: 40px; background: #fff; }
#shopItemArt { width: 200px; height: 130px; max-width: 100%; justify-self: center; display: block; }
.sheet p.shopcost { justify-self: center; font-size: 22px; font-weight: 700; color: var(--plum); background: var(--butter); border: 3px solid var(--plum); border-radius: 999px; padding: 2px 18px; }
details.subsec { margin-top: 6px; border-top: 2px dotted #eadcf2; padding-top: 8px; }
details.subsec summary { font-size: 16px; font-weight: 700; color: var(--accent); cursor: pointer; list-style: none; min-height: 36px; display: flex; align-items: center; }
details.subsec summary::after { content: "▾"; margin-left: auto; color: var(--lavD); }
.rwcathd { grid-column: 1 / -1; font-weight: 700; font-size: 14px; color: var(--muted); margin-top: 4px; }
/* testimoni */
#testiArt { width: 220px; height: 104px; max-width: 100%; justify-self: center; display: block; }
.rate { display: flex; gap: 4px; }
.rate button { width: 48px; height: 48px; border: 0; background: none; padding: 2px; border-radius: 50%; }
.rate canvas { width: 44px; height: 44px; display: block; }
.linkbtn { justify-self: center; background: none; border: 0; color: var(--muted); font: 600 14px var(--ui); text-decoration: underline; padding: 6px 10px; min-height: 36px; }

/* pesan untuk Ayah & Bunda (tab Hari Ini) */
.pesan { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: start; background: #fff7fb; padding: 12px 14px 12px 10px; }
.pesan canvas { width: 56px; height: 60px; margin-top: 2px; }
.pesansapa { margin: 0 0 3px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.pesanhd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pesanhd b { font-size: 16.5px; color: var(--pinkD); }
.pesanhari { font-size: 12.5px; font-weight: 700; color: var(--plum); background: var(--butter); border: 2px solid var(--plum); border-radius: 999px; padding: 0 9px; white-space: nowrap; }
.pesantx { display: grid; margin: 5px 0 0; font-size: 15.5px; font-weight: 500; line-height: 1.45; color: var(--plum); }
/* slide show: kalimat ditumpuk di satu sel (tinggi = kalimat terpanjang), yang aktif bergeser masuk */
.pesantx .ps { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateX(18px); transition: opacity .4s ease, transform .4s ease, visibility 0s linear .4s; }
.pesantx .ps.on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease .12s, transform .45s ease .12s, visibility 0s; }
.pesantx .ps.out { transform: translateX(-18px); }
.pesandots { display: flex; align-items: center; margin: 4px 0 0 -6px; }
.pesandots button { min-width: 22px; height: 30px; padding: 0 4px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.pesandots i { display: block; position: relative; overflow: hidden; width: 9px; height: 9px; border-radius: 999px; background: #f1d3e1; transition: width .3s ease; }
.pesandots .on i { width: 28px; background: #f6c6da; }
.pesandots .on i::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--pinkD); transform-origin: left; animation: pesanJalan 10s linear forwards; }
.pesan:hover .pesandots .on i::after, .pesan:focus-within .pesandots .on i::after, .pesan.hold .pesandots .on i::after { animation-play-state: paused; }
@keyframes pesanJalan { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .pesantx .ps, .pesantx .ps.on, .pesantx .ps.out { transition: none; transform: none; } .pesandots i { transition: none; } .pesandots .on i::after { animation: none; } }
.pesanjejak { margin: 9px 0 0; display: flex; flex-wrap: wrap; gap: 5px; }
.pesanjejak[hidden] { display: none; }
.pesanjejak .jl { flex-basis: 100%; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pesanjejak .jc { font-size: 13px; color: var(--plum); background: #fff; border: 2px solid #f1d3e1; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.pesanjejak .jc b { color: var(--pinkD); }
@media (max-width: 360px) { .pesan { grid-template-columns: 40px 1fr; gap: 8px; } .pesan canvas { width: 40px; height: 43px; } .pesantx { font-size: 15px; } }

/* layar kunci: email Google, paket, kode */
.lmail { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px; background: #fff; border: 3px dashed var(--lavS); border-radius: 16px; padding: 8px 10px 8px 12px; text-align: left; }
.lmail .small { margin: 0; }
.lmail b { grid-column: 1; font-size: 16px; word-break: break-all; color: var(--plum); line-height: 1.3; }
.lmail button { grid-column: 2; grid-row: 1 / span 2; }
.plans { display: grid; gap: 12px; margin-top: 4px; }
.plan { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; text-align: left; background: #fff; border: 3px solid var(--plum); border-radius: 18px; padding: 10px 14px; font: inherit; color: var(--plum); cursor: pointer; min-height: 56px; }
.plan .pn { font-weight: 700; font-size: 17px; }
.plan .ph { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-size: 18px; white-space: nowrap; }
.plan small { grid-column: 1; font-size: 13px; color: var(--muted); font-weight: 500; }
.plan.best { background: var(--butter); border-width: 4px; padding-top: 16px; box-shadow: 0 4px 0 var(--plum); }
.plan .tag { position: absolute; top: -13px; left: 14px; font-style: normal; background: var(--pinkD); color: #fff; border: 2px solid var(--plum); border-radius: 999px; font-size: 12.5px; font-weight: 700; padding: 0 10px; }
.plan:active { transform: translateY(2px); }
#lErr:empty { display: none; }
/* surat untuk Ayah dan Bunda (20-sambutan.js): layar penuh, bisa digulir, selalu ada tombol Lewati */
#suratModal { display: flex; flex-direction: column; align-items: center; overflow-y: auto; z-index: 45; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(28px + env(safe-area-inset-bottom, 0px)); background-color: var(--bg); background-image: radial-gradient(var(--dot) 7px, transparent 8px); background-size: 66px 48px; }
#suratModal > * { flex: none; }
.srlewati { position: sticky; top: 0; align-self: flex-end; z-index: 2; margin: 0 -4px -40px 0; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--plum); background: var(--cream); color: var(--plum); font: 700 15px var(--ui); box-shadow: 0 3px 0 rgba(90,54,89,.25); }
.srlewati:active { transform: translateY(2px); }
.srscene { width: 100%; max-width: 380px; height: 210px; display: block; }
.sramplop { margin-top: 6px; width: 100%; max-width: 380px; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sramplop canvas { width: 240px; height: 170px; }
.sramplop .hint { font-family: var(--pop); font-weight: 900; font-size: 20px; color: var(--onbg); text-align: center; }
.sramplop .hint small { display: block; font-family: var(--ui); font-weight: 500; font-size: 14px; color: var(--onbg); opacity: .75; margin-top: 2px; }
.sramplop:focus { outline: none; } .sramplop:focus-visible { outline: 3px dashed var(--onbg); outline-offset: 4px; border-radius: 16px; }
.srsurat { position: relative; width: 100%; max-width: 380px; margin-top: -6px; background: var(--cream); border: 3px solid var(--plum); border-radius: 22px; padding: 18px 18px 16px 20px; box-shadow: 0 6px 0 rgba(90,54,89,.16); transform-origin: 50% 0; }
.srsurat::before { content: ""; position: absolute; left: 12px; top: 10px; bottom: 10px; border-left: 2px dashed #f3c4d4; }
.srsurat .stamp { position: absolute; right: 12px; top: -16px; width: 52px; height: 58px; }
.srsurat h3 { margin: 0 52px 8px 4px; font-family: var(--pop); font-weight: 900; font-size: 15px; color: var(--pinkD); letter-spacing: .02em; }
.srsurat .tag { display: inline-block; margin: 0 0 8px 4px; font-size: 12.5px; font-weight: 700; color: var(--plum); background: var(--butter); border: 2px solid var(--plum); border-radius: 999px; padding: 0 10px; }
.srsurat .salam { margin: 0 0 8px 4px; font-weight: 700; font-size: 20px; line-height: 1.35; color: var(--plum); }
.srsurat .isi { margin: 0 0 0 4px; font-size: 17px; line-height: 1.6; font-weight: 500; color: var(--ink); }
.srsurat .isi p { margin: 0 0 11px; }
.srsurat .isi .kutip { margin: 4px 0 13px; padding: 10px 12px; background: #fff2f7; border-radius: 14px; border-left: 4px solid var(--pinkS); font-style: italic; color: var(--plum); }
.srsurat .isi .kutip cite { display: block; margin-top: 4px; font-style: normal; font-weight: 700; font-size: 14px; color: var(--pinkD); }
.srsurat .bekal { margin: 2px 0 13px; padding: 10px 12px 4px; background: #effbf5; border: 2px dashed var(--mintS); border-radius: 16px; }
.srsurat .bekal h4 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--mintD); }
.srsurat .bekal ol { list-style: none; margin: 0; padding: 0; counter-reset: b; }
.srsurat .bekal li { counter-increment: b; position: relative; padding-left: 34px; margin-bottom: 8px; font-size: 16px; line-height: 1.45; }
.srsurat .bekal li::before { content: counter(b); position: absolute; left: 0; top: 0; width: 25px; height: 25px; border-radius: 50%; background: var(--mint); border: 2px solid var(--plum); font-weight: 700; font-size: 13px; line-height: 21px; text-align: center; color: var(--plum); }
.srsurat .jejak { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.srsurat .jejak span { background: #fff; border: 2px solid #f1d3e1; border-radius: 999px; padding: 2px 10px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.srsurat .jejak b { color: var(--pinkD); font-size: 16px; }
.srsurat .ttd { margin: 12px 4px 0 0; text-align: right; font-size: 15px; color: var(--muted); line-height: 1.35; }
.srsurat .ttd b { display: block; font-size: 19px; color: var(--pinkD); }
.srsurat .ttd small { display: block; font-size: 13px; }
.sraksi { width: 100%; max-width: 380px; margin-top: 16px; }
.sraksi .btn { width: 100%; min-height: 56px; font-size: 19px; border-radius: 18px; box-shadow: 0 5px 0 var(--plum); }
.sraksi .btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--plum); }
.srsurat.buka { animation: srBuka .55s cubic-bezier(.3,1.4,.5,1) both; }
.srsurat.tutup { animation: srTutup .45s ease-in both; }
@keyframes srBuka { from { transform: translateY(40px) scaleY(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes srTutup { to { transform: translateY(-30px) scaleY(.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .srsurat.buka, .srsurat.tutup { animation: none; } }
@media (max-width: 350px) { .srsurat .isi { font-size: 16px; } .srsurat .bekal li { font-size: 15px; } .srsurat { padding: 16px 14px 14px 18px; } .srsurat .salam { font-size: 18px; } .srscene { height: 184px; } }
/* keterangan masa coba di layar selamat datang: jujur sejak awal bahwa ada paket berbayar setelah masa coba */
.trialnote { background: var(--butter); border: 2px dashed var(--butterS); border-radius: 16px; padding: 10px 12px; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.wrestore { text-align: left; border-top: 2px dashed #f1d3e1; padding-top: 10px; }
.wrestore summary { cursor: pointer; font-weight: 700; color: var(--plum); min-height: 40px; display: flex; align-items: center; }
.wrestore[open] { display: grid; gap: 10px; }
.wrestore p { margin: 0; }
.wrestore textarea { width: 100%; font: inherit; font-size: 14px; border: 3px solid var(--plum); border-radius: 14px; padding: 8px 10px; }
.trialnote b { display: block; font-size: 15.5px; color: var(--plum); margin-bottom: 2px; }
/* wisata virtual keluarga: kartu di tab Toko + layar jalan-jalan */
.wsgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wstile { position: relative; display: grid; gap: 4px; justify-items: center; align-content: start; text-align: center; padding: 8px 8px 10px; background: #fff; border: 3px solid var(--plum); border-radius: 20px; font: inherit; color: var(--plum); cursor: pointer; box-shadow: inset -4px -4px 0 rgba(90,54,89,0.08); }
.wstile:active { transform: translateY(2px); }
.wstile canvas { width: 100%; max-width: 160px; aspect-ratio: 3 / 2; height: auto; display: block; border-radius: 12px; border: 2px solid #f1d3e1; }
.wstile b { font-size: 15px; line-height: 1.2; }
.wstile span { font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--muted); }
.wstile.open { background: #f1fbf6; } .wstile.open span { color: #2b9e76; }
.wstile.soon { background: #faf7fc; } .wstile.soon canvas { filter: saturate(0.6); opacity: 0.85; }
.wssoon { position: absolute; top: 2px; right: 0; transform: rotate(5deg); font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--plum); background: var(--butter); border: 2px solid var(--plum); border-radius: 999px; padding: 1px 8px; box-shadow: 0 2px 0 rgba(90,54,89,.2); }
#wisataModal { display: flex; flex-direction: column; align-items: center; gap: 10px; overflow-y: auto; z-index: 45; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(20px + env(safe-area-inset-bottom, 0px)); background-color: var(--bg); background-image: radial-gradient(var(--dot) 7px, transparent 8px); background-size: 66px 48px; }
#wisataModal > * { flex: none; }
.wsbar { width: 100%; max-width: 480px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wsbar h3 { margin: 0; font-size: 22px; color: var(--onbg); }
#wsCanvas { width: 100%; max-width: 480px; aspect-ratio: 360 / 340; height: auto; max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); display: block; border-radius: 22px; border: 3px solid var(--plum); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; background: #d4efff; }
.wsfakta { width: 100%; max-width: 480px; margin: 0; background: var(--cream); border: 3px solid var(--plum); border-radius: 18px; padding: 10px 14px; font-size: 15px; line-height: 1.45; color: var(--plum); }
