/* Rumah Pecil v2.9 onboarding layer (web only). Sits above the game stage; mobile first, one column max 440px.
   Felt world tokens shared with the landing page. Everything here is for Bunda; the child side stays text-free. */
#ob { --langit:#A8CCE2; --rumput:#5B7A22; --rumput-tua:#334D17; --pecil:#F08A2B; --kakao:#3A2619; --kain:#FFF3DC; --teal:#1D6E73; --teal-d:#0E4B50; --benang:#E9C58A; --lembut:#6A4E3A; --merah:#A3361A;
  position: fixed; inset: 0; z-index: 300; font-family: 'Baloo 2', ui-rounded, 'Nunito', system-ui, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.45; color: var(--kakao);
  -webkit-user-select: text; user-select: text; pointer-events: none; }
#ob[hidden] { display: none !important; }
#ob * { box-sizing: border-box; }
#ob img { max-width: 100%; display: block; height: auto; }
#ob button, #ob input, #ob a { font: inherit; color: inherit; }
#ob [tabindex="-1"]:focus { outline: none; }
#ob :focus-visible { outline: 3px solid var(--pecil); outline-offset: 3px; border-radius: 10px; }
#ob h1, #ob h2, #ob h3 { margin: 0; font-weight: 800; line-height: 1.08; text-wrap: balance; }
#ob p { margin: 0; }
#ob .felt { background-image: url(../a/tex_felt.webp); background-size: 280px; background-blend-mode: multiply; }

.ob-l { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; pointer-events: auto; -webkit-overflow-scrolling: touch; }
.ob-l[hidden] { display: none !important; }
.ob-col { max-width: 440px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; position: relative; }
.ob-isi { padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 14px; }

.ob-patch { position: relative; display: flex; align-items: center; justify-content: center; gap: .5em; min-height: 56px; padding: 0 1.4em; border: 0; border-radius: 999px; background-color: var(--pecil);
  background-image: url(../a/tex_felt.webp); background-size: 220px; background-blend-mode: multiply; color: var(--kakao) !important; font-weight: 800 !important; font-size: 1.15rem !important; line-height: 1;
  cursor: pointer; box-shadow: 0 5px 0 rgba(58,38,25,.35); text-decoration: none; width: 100%; text-align: center; }
.ob-patch::after { content: ""; position: absolute; inset: 5px; border: 2px dashed rgba(58,38,25,.38); border-radius: inherit; pointer-events: none; }
.ob-patch:active { transform: translateY(4px) scale(1.02,.94); box-shadow: 0 1px 0 rgba(58,38,25,.35); }
.ob-patch.kain { background-color: var(--kain); }
.ob-patch.teal { background-color: #3E9AA0; }
.ob-patch[disabled] { opacity: .6; }
.ob-tautan { background: none; border: 0; font-weight: 700; text-decoration: underline; text-decoration-color: var(--benang); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; padding: 10px; justify-self: center; min-height: 44px; }
.ob-kartu { position: relative; background: var(--kain); border-radius: 24px; padding: 20px 18px; display: grid; gap: 10px; box-shadow: 0 4px 0 rgba(58,38,25,.18); }
.ob-kartu::after { content: ""; position: absolute; inset: 7px; border: 2px dashed #E3C38E; border-radius: 18px; pointer-events: none; }
.ob-label { font-weight: 800; color: #B5532D; font-size: 1.05rem; }
.ob-catat { font-size: .85rem; color: var(--lembut); line-height: 1.4; font-weight: 600; }
.ob-pils { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-pils button { min-height: 44px; padding: 0 15px; border-radius: 999px; border: 2px solid var(--teal); background: #fff; color: var(--teal-d); font-weight: 800; cursor: pointer; font-size: .95rem; }
.ob-pils button[aria-pressed="true"] { background: var(--teal); color: #fff; }
.ob-alasan { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ob-alasan li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.ob-alasan svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }

/* in-app browser escape */
.ob-inapp { background: var(--langit); }
.ob-inapp .ob-panah { position: absolute; right: 10px; top: calc(4px + env(safe-area-inset-top)); width: 120px; pointer-events: none; }
.ob-inapp .ob-langkah { display: grid; gap: 10px; counter-reset: l; padding: 0; margin: 0; list-style: none; }
.ob-inapp .ob-langkah li { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.ob-inapp .ob-langkah li::before { counter-increment: l; content: counter(l); width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; flex: none; }
.ob-titik { display: inline-grid; place-items: center; min-width: 34px; height: 26px; border-radius: 8px; background: #fff; border: 1.5px solid #ccc; font-weight: 800; letter-spacing: 1px; }

/* sambut */
.ob-sambut { background: var(--langit); }
.ob-sambut .ob-atas { position: relative; height: min(300px, 38vh); overflow: hidden; flex: none; }
.ob-sambut .ob-atas .teras { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.ob-sambut .ob-bawah { flex: 1; margin-top: -24px; position: relative; border-radius: 26px 26px 0 0; background-color: var(--kain); }

/* iOS / Android menu tutorial */
.ob-tutor { background: #F2F2F7; color: #111; }
.ob-tutor .ob-judul { padding: 20px 20px 8px; }
.ob-tutor .ob-judul h2 { font-size: 1.45rem; color: var(--kakao); }
.ob-tutor .ob-panggung { position: relative; height: min(420px, 52vh); margin: 8px 16px; border-radius: 26px; background: #fff; overflow: hidden; border: 1px solid #ddd; font-family: system-ui, sans-serif; font-weight: 500; }
.ob-tutor .halaman { position: absolute; inset: 0 0 64px 0; background: url(img/teras.webp) center/cover; }
.ob-tutor .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: #F8F8F8; border-top: 1px solid #ddd; display: flex; align-items: center; justify-content: space-around; }
.ob-tutor .bar.atas { top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid #ddd; justify-content: space-between; padding: 0 14px; font-size: 14px; color: #444; }
.ob-tutor .bar svg { width: 24px; height: 24px; }
.ob-tutor .share-btn { position: relative; border-radius: 50%; padding: 6px; }
.ob-tutor .denyut { position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--pecil); animation: obdenyut .5s steps(3) infinite alternate; }
@keyframes obdenyut { to { transform: scale(1.18); } }
.ob-tutor .lembar { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 20px rgba(0,0,0,.18); padding: 14px 14px 20px; display: grid; gap: 8px; }
.ob-tutor .menu { position: absolute; right: 8px; top: 56px; width: 70%; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 6px; display: grid; gap: 2px; }
.ob-tutor .baris { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: #F2F2F7; font-size: 15px; }
.ob-tutor .menu .baris { background: none; padding: 10px 12px; }
.ob-tutor .baris.sorot, .ob-tutor .menu .baris.sorot { background: #FFE8CF; outline: 3px solid var(--pecil); }
.ob-tutor .dialog { position: absolute; left: 18px; right: 18px; top: 30%; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 16px; display: grid; gap: 12px; }
.ob-tutor .dialog .baris-app { display: flex; gap: 12px; align-items: center; }
.ob-tutor .dialog img { width: 48px; height: 48px; border-radius: 11px; }
.ob-tutor .dialog .aksi { display: flex; justify-content: space-between; font-size: 16px; }
.ob-tutor .dialog .aksi b { color: #0A84FF; }
.ob-tutor .dialog .aksi span { color: #0A84FF; opacity: .7; }
.ob-tutor .homescreen { position: absolute; inset: 0; background: #3A2619 url(../a/tex_felt.webp); background-size: 260px; background-blend-mode: multiply; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px 10px; padding: 40px 18px; align-content: start; }
.ob-tutor .homescreen span.ap { aspect-ratio: 1; border-radius: 14px; background: #5A4232; }
.ob-tutor .homescreen .pecil-ikon { display: grid; justify-items: center; gap: 4px; color: #FFF3DC; font-size: 11px; font-weight: 600; min-width: 0; }
.ob-tutor .homescreen .pecil-ikon img { width: 100%; aspect-ratio: 1; border-radius: 14px; }
.ob-tutor .ob-ket { padding: 10px 20px 4px; min-height: 58px; font-weight: 700; font-size: 1.05rem; color: var(--kakao); display: flex; gap: 10px; align-items: center; }
.ob-tutor .ob-ket .no { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; flex: none; }
.ob-tutor .ob-bawah { padding: 6px 20px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }

/* panggil Bunda (hold gate) */
.ob-panggil { background: var(--langit); }
.ob-gelembung { position: relative; background: var(--kain); border-radius: 18px; padding: 12px 16px; font-weight: 800; font-size: 1.2rem; box-shadow: 0 3px 0 rgba(58,38,25,.25); margin: calc(28px + env(safe-area-inset-top)) 20px 0; }
.ob-gelembung::after { content: ""; position: absolute; left: 40px; bottom: -10px; border: 11px solid transparent; border-top-color: var(--kain); border-bottom: 0; }
.ob-panggil .pecil-besar { width: min(58%, 240px); margin: 22px auto 0; }
.ob-gerbang { margin: auto 16px calc(18px + env(safe-area-inset-bottom)); background: #3A2619; border-radius: 28px; padding: 18px; display: flex; gap: 16px; align-items: center; color: var(--kain); }
.ob-gerbang .t { display: grid; gap: 4px; }
.ob-gerbang .t b { font-size: 1.2rem; }
.ob-gerbang .t span { color: #E7D3B4; font-weight: 600; }
.ob-tahan { position: relative; width: 96px; height: 96px; flex: none; border-radius: 50%; border: 0; background: var(--kain); cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; padding: 0; }
.ob-tahan svg { position: absolute; inset: 0; }
.ob-tahan img { position: absolute; inset: 19px; width: 58px; height: 58px; border-radius: 50%; pointer-events: none; }

/* bar over the sleeping Pecil */
.ob-bobobar { position: absolute; top: auto; left: 0; right: 0; bottom: 0; overflow: visible; pointer-events: none; }
.ob-bobobar .ob-col { min-height: 0; }
.ob-bobobar .ob-gerbang { pointer-events: auto; margin-top: 0; box-shadow: 0 -4px 18px rgba(0,0,0,.25); }

/* form */
.ob-form { background-color: var(--kain); }
.ob-form label { display: grid; gap: 6px; font-weight: 800; color: var(--teal-d); }
.ob-form input:not([type=radio]) { height: 50px; border-radius: 14px; border: 2px solid #DBBC90; background: #fff; padding: 0 14px; font-weight: 700; font-size: 17px; color: var(--kakao); width: 100%; }
.ob-wa { display: flex; align-items: center; border: 2px solid #DBBC90; border-radius: 14px; background: #fff; overflow: hidden; }
.ob-wa span { padding: 0 12px; height: 46px; display: flex; align-items: center; background: #F4EAD8; font-weight: 800; }
.ob-wa input { border: 0 !important; height: 46px !important; border-radius: 0 !important; }
.ob-galat { color: var(--merah); font-weight: 700; font-size: .92rem; min-height: 1.2em; }
.ob-tempat5 { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
.ob-tempat5 div { background: #F4EAD8; border-radius: 12px; padding: 4px 2px; display: grid; justify-items: center; font-weight: 800; font-size: 11px; color: var(--teal-d); }
.ob-tempat5 img { width: 48px; height: 44px; object-fit: contain; }

/* terbuka */
.ob-terbuka { background-color: var(--rumput-tua); color: var(--kain); }
.ob-terbuka .pecil-lompat { width: min(52%, 220px); margin: calc(30px + env(safe-area-inset-top)) auto 0; }
.ob-toko { display: flex; gap: 8px; flex-wrap: wrap; }
.ob-lencana { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 4px 12px 4px 10px; border-radius: 12px; background: #1E140D; color: #FFF3DC; border: 1.5px solid rgba(255,243,220,.3); }
.ob-lencana small { display: block; font-size: .7rem; color: #E7D3B4; line-height: 1.1; }
.ob-lencana b { display: block; font-size: .95rem; line-height: 1.05; white-space: nowrap; }

/* feedback + rapor */
.ob-fb { background-color: var(--kain); }
.ob-fb fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.ob-fb legend { font-weight: 800; color: var(--teal-d); font-size: 1.05rem; margin-bottom: 4px; padding: 0; }
.ob-rapor { background-color: var(--kain); }
.ob-rapor canvas { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 6px 0 rgba(58,38,25,.2); }

/* motion at 12 fps */
.ob-boil { animation: obboil calc(83ms*4) steps(1) infinite; }
@keyframes obboil { 0% { translate: 0 0; rotate: 0deg; } 25% { translate: .6px -.4px; rotate: .35deg; } 50% { translate: -.4px .3px; rotate: -.3deg; } 75% { translate: .3px .5px; rotate: .15deg; } }
.ob-muncul { animation: obmuncul calc(83ms*5) steps(5) both; }
@keyframes obmuncul { from { transform: translateY(24px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.ob-hop { animation: obhop calc(83ms*6) steps(1) 2; }
@keyframes obhop { 0% { transform: scale(1,1); } 17% { transform: scale(1.06,.9); } 34% { transform: translateY(-14%) scale(.95,1.07); } 50% { transform: translateY(-18%); } 67% { transform: translateY(-6%); } 84% { transform: scale(1.05,.93); } 100% { transform: none; } }
.ob-ayun { animation: obayun calc(83ms*8) steps(4) infinite alternate; transform-origin: 90% 10%; }
@keyframes obayun { to { transform: translate(-6px, 6px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .ob-boil, .ob-muncul, .ob-hop, .ob-ayun, .ob-tutor .denyut { animation: none !important; } }
