/* =========================================================================
   1.4 places in the Kebun Pupi (Fase 1) look (owner, 9 Nov 2026: "biar match dan let it flow").
   Only when Fase 1 is in front (html.kp-f1, set in focus.js); the 1.4 checks run without it.
   - back: the round orange Fase 1 button with a chevron (it returns where the child came from),
   - the place name: a wooden board hanging on two ropes, like every Fase 1 screen,
   - Pupi's bubble: white with the green rim and the green round sound wave; tapping it says the line again,
     so the separate speaker button goes away where a bubble is shown,
   - the parent lock lives on Beranda only.
   ========================================================================= */

/* ---------- round back button ---------- */
.kp-f1 :is(.kp-hud-back, .kp-clay:is([data-action="home"], [data-action="beranda"], [data-action="adventure-map"], [data-action="picker"], [data-action="stories"])) {
  --b: 60px; width: 60px !important; height: 60px !important; min-width: 60px !important; padding: 0; border-radius: 50% !important; border: 4px solid #fff !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.5 5 L7.5 12 L14.5 19' stroke='%23fff' stroke-width='3.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 46% 50% / 30px no-repeat,
    radial-gradient(circle at 34% 28%, #FFD39A, #FFA62B 55%, #D98512) !important;
  box-shadow: 0 5px 0 #C2660A, 0 9px 12px rgba(30, 40, 60, .28), inset 0 -4px 0 rgba(0, 0, 0, .12) !important;
}
.kp-f1 :is(.kp-hud-back, .kp-clay:is([data-action="home"], [data-action="beranda"], [data-action="adventure-map"], [data-action="picker"], [data-action="stories"])) > * { display: none !important; }
.kp-f1 :is(.kp-hud-back, .kp-clay):active { transform: translateY(3px); box-shadow: 0 2px 0 #C2660A, 0 4px 8px rgba(30, 40, 60, .25) !important; }

/* ---------- place name: hanging wooden board ---------- */
.kp-f1 .kp-v3 .kp-hud-title, .kp-f1 .kp-hud-title, .kp-f1 .st-title, .kp-f1 .kp-map-title {
  visibility: visible !important; position: relative; overflow: visible; flex: 0 1 auto; max-width: 52%; margin: 0 auto; padding: 5px 22px 7px;
  border-radius: 12px; border: 2px solid #8E5326; color: #fff; font: 700 24px/1.15 var(--kp-font); letter-spacing: .01em;
  background: repeating-linear-gradient(0deg, transparent 0 11px, rgba(110, 55, 20, .14) 11px 12px), linear-gradient(#EBA862, #C97A3A);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(90, 45, 15, .3), 0 8px 10px rgba(60, 30, 10, .22);
  text-shadow: 2.5px 0 #7A3E12, -2.5px 0 #7A3E12, 0 2.5px #7A3E12, 0 -2.5px #7A3E12, 2px 2px #7A3E12, -2px -2px #7A3E12, 2px -2px #7A3E12, -2px 2px #7A3E12, 0 3px 0 #7A3E12;
  transform-origin: 50% -40px; animation: f1m-hang 4.5s ease-in-out infinite alternate;
}
.kp-f1 :is(.kp-hud-title, .st-title, .kp-map-title)::before, .kp-f1 :is(.kp-hud-title, .st-title, .kp-map-title)::after { content: ''; position: absolute; top: -44px; width: 4px; height: 44px; border-radius: 2px;
  background: repeating-linear-gradient(180deg, #B98448 0 5px, #8E5326 5px 8px); }
.kp-f1 :is(.kp-hud-title, .st-title, .kp-map-title)::before { left: 16%; } .kp-f1 :is(.kp-hud-title, .st-title, .kp-map-title)::after { right: 16%; }
@keyframes f1m-hang { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
.kp-f1.kp-lite :is(.kp-hud-title, .st-title, .kp-map-title) { animation: none; }
/* Toko Cerita and Buku Koleksiku: the board hangs in the middle like on the other screens. */
.kp-f1 .st-title { position: absolute; left: calc(var(--stage-w, 960px) / 2 - 20px); top: 2px; translate: -50% 0; white-space: nowrap; max-width: none; }

/* ---------- Pupi's bubble ---------- */
.kp-f1 :is(.kp-adv-bubble, .kp-bubble) {
  border: 4px solid #fff !important; border-radius: 26px; background: #fff; padding: 10px 20px 10px 10px;
  box-shadow: 0 0 0 3px #7ED36B, 0 6px 0 3px #46A847, 0 14px 22px rgba(30, 60, 30, .2) !important;
}
.kp-f1 :is(.kp-adv-cap, .kp-bubble-cap) { font: 600 18px/1.2 var(--kp-font); color: #3A2A20; }
.kp-f1 :is(.kp-adv-bubble, .kp-bubble) .kp-wave {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 3px solid #fff; justify-content: center; gap: 2.5px;
  background: linear-gradient(#5BD25F, #2E9F36); box-shadow: 0 3px 0 #1E7E27;
}
.kp-f1 :is(.kp-adv-bubble, .kp-bubble) .kp-wave i { width: 3.5px; background: #fff; }
.kp-f1 :is(.kp-adv-bubble, .kp-bubble) .kp-wave i:nth-child(1) { height: 8px; }
.kp-f1 :is(.kp-adv-bubble, .kp-bubble) .kp-wave i:nth-child(2) { height: 17px; }
.kp-f1 :is(.kp-adv-bubble, .kp-bubble) .kp-wave i:nth-child(3) { height: 12px; }
.kp-f1 :is(.kp-adv-bubble, .kp-bubble) .kp-wave i:nth-child(4) { height: 19px; }
.kp-f1 :is(.kp-adv-bubble, .kp-bubble) .kp-wave i:nth-child(5) { height: 7px; }
/* tail pointing at Pupi on the left */
.kp-f1 .kp-adv-bubble::after { content: ''; position: absolute; left: -16px; top: 50%; width: 18px; height: 22px; margin-top: -11px; background: #fff;
  clip-path: polygon(100% 0, 100% 100%, 0 45%); filter: drop-shadow(-3px 0 0 #7ED36B); }

/* ---------- one way to hear Pupi again, parent lock on Beranda only ---------- */
/* layout.js gives every adventure screen but the notes a tappable bubble */
.kp-f1 .adventure-screen:not(.practice-notes) .kp-hud-repeat { display: none; }
.kp-f1 #app .kp-lock { display: none !important; }

/* The step dots of a place sit top right (where the speaker was), so the hanging board has the middle. */
.kp-f1 .kp-v3 .adventure-screen :is(.insect-route, .harvest-route, .railway-route), .kp-f1 .kp-v3 .adventure-intro > .adventure-route { left: auto; right: 20px; transform: none; }

/* Toko Cerita: the bigger bubble sits lower so the bottom shelf stays clear. */
.kp-f1 .st-bubble { bottom: 6px; padding: 8px 18px 8px 8px; }
.kp-f1 .st-bubble .kp-bubble-cap { font-size: 17px; }

/* Where a Pupi bubble can be tapped to hear the line again, the separate speaker button goes. */
/* (these screens always have that bubble; no :has() on #app, which made every change in a game recheck styles) */
.kp-f1 #app .kp-clay:is([data-action="picker-hello"], [data-action="stories-hello"], [data-action="map-hello"], [data-action="home-hello"]) { display: none; }

/* Peta Petualangan (through the gate in Desa Pupi): its name on the board, the collection counters top right. */
.kp-map-title { display: none; }
.kp-f1 .kp-map-title { display: block; position: absolute; left: 50%; top: 10px; margin: 0; translate: -50% 0; z-index: 21; white-space: nowrap; max-width: none; }
.kp-f1 .kp-map .kp-chips { left: auto; right: 20px; transform: none; }

/* The old 1.4 home is not a screen any more with Kebun Pupi in front; it only sits under the opening and the first-run
   guide, so it stays hidden there instead of flashing by (owner, 9 Nov 2026). */
.kp-f1 #app .kp-home { visibility: hidden; }

/* ---------- redesign v3 (11 Nov 2026): the same rendered plank as the Kebun Pupi screens ---------- */
.kp-f1 .kp-v3 .kp-hud-title, .kp-f1 .kp-hud-title, .kp-f1 .st-title, .kp-f1 .kp-map-title {
  background: none; box-shadow: none; border: 15px solid transparent; border-radius: 0; padding: 0 8px 3px;
  border-image: url('../../fase1/img/v3/papan.webp') 30 60 30 60 fill / 13px 26px 13px 26px;
}
.kp-f1 :is(.kp-hud-title, .st-title, .kp-map-title)::before, .kp-f1 :is(.kp-hud-title, .st-title, .kp-map-title)::after { top: -58px; background: linear-gradient(90deg, #A87B45, #D2A66C); }

/* ---------- redesign v3 (11 Nov 2026, owner: "redesign semua, jangan setengah-setengah"): the 1.4 places stand in the
   same rendered world as Kebun Pupi. Pictures from app/fase1/img/v3 (made with desain/redesign-desa-pupi/_alat);
   everything a child taps stays as it is. Only under html.kp-f1. ---------- */
/* Dunia Huruf and Kebun Angka: the meadow under a colour wash, plank shelf for the games */
.kp-f1 .kp-world-sky { background: linear-gradient(rgba(190, 162, 255, .66), rgba(212, 194, 255, .36) 44%, rgba(255, 255, 255, 0) 60%), #CDB8FF url('../../fase1/img/v3/padang.webp') 50% 46% / cover no-repeat; }
.kp-f1 .kp-world.is-numbers .kp-world-sky { background: linear-gradient(rgba(255, 200, 130, .62), rgba(255, 224, 176, .32) 44%, rgba(255, 255, 255, 0) 60%), #FFD39A url('../../fase1/img/v3/padang-sore.webp') 50% 46% / cover no-repeat; }
.kp-f1 .kp-world .kp-land > path:not([stroke]), .kp-f1 .kp-world.is-numbers .kp-land, .kp-f1 .kp-world-sun { display: none; }
.kp-f1 .kp-world.is-letters .kp-land > path[stroke] { stroke: #F2D9A0; opacity: .92; }
.kp-f1 .kp-world.is-numbers .kp-world-sky::after { content: ''; position: absolute; left: -4%; width: 108%; top: 22.6%; height: 63%; background: url('../../fase1/img/v3/kolam.webp') 50% 50% / 100% 100% no-repeat; }
.kp-f1 .kp-world-floor { background: #E0A866 url('../../fase1/img/v3/kayu.webp') 0 0 / 128px 128px; box-shadow: inset 0 10px 12px rgba(70, 35, 5, .28), inset 0 3px 0 rgba(255, 240, 200, .5); }
.kp-f1 .kp-world-floor::before, .kp-f1 .kp-world-floor::after { display: none; }
/* lessons and practice games: the same meadow, washed so the letters and numbers stay the brightest thing */
.kp-f1 .kp-lesson { background: linear-gradient(rgba(214, 196, 255, .8), rgba(196, 170, 255, .72)), #B9A0F5 url('../../fase1/img/v3/padang.webp') 50% 50% / cover no-repeat; }
.kp-f1 .kp-lesson.lesson-numbers { background: linear-gradient(rgba(255, 230, 190, .8), rgba(255, 196, 130, .72)), #FFB46A url('../../fase1/img/v3/padang-sore.webp') 50% 50% / cover no-repeat; }
/* the four adventures: rendered garden instead of the flat sky, hill, trees and barn */
.kp-f1 .kp-adv-bg { background: #8FCBFA url('../../fase1/img/v3/padang.webp') 50% 50% / cover no-repeat; }
.kp-f1 .kp-adv-bg.kp-bg-harvest { background-image: url('../../fase1/img/v3/kebun.webp'); }
.kp-f1 .kp-adv-bg.kp-bg-railway { background-image: url('../../fase1/img/v3/padang-sore.webp'); }
.kp-f1 .kp-adv-bg > * { display: none !important; }
/* Toko Cerita: a bookshop room, plank shelves */
.kp-f1 .st-shop-bg, .kp-f1 .st-reader-bg { background: #FFE9C4 url('../../fase1/img/v3/toko.webp') 50% 56% / cover no-repeat; }
.kp-f1 .st-shop-bg::after { display: none; }
.kp-f1 .st-shelf::after { left: -8px; right: -8px; bottom: -10px; height: 20px; border-radius: 7px; background: #E0A866 url('../../fase1/img/v3/kayu.webp') 0 50% / 128px 128px; box-shadow: inset 0 3px 0 rgba(255, 240, 200, .55), 0 6px 0 #8E5326, 6px 16px 14px rgba(60, 30, 0, .32); }
/* practice games: the meadow, lightened so the game is the brightest thing; the old flat hill, sun and bushes go */
.kp-f1 .kp-v3 .kp-play, .kp-f1 .kp-play { background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .32)), #BFE3F5 url('../../fase1/img/v3/padang.webp') 50% 50% / cover no-repeat; }
.kp-f1 .kp-play-bg :is(.kp-land, .kp-play-sun, .kp-bush, .kp-cloud, .kp3-cloud, [class*='cloud']) { display: none; }
/* Peta Petualangan: the rendered meadow, the four places as sprites on plinths (the old drawings stay in the DOM, hidden) */
.kp-f1 .kp-map .kp-sky-map { background: #8FCBFA url('../../fase1/img/v3/padang.webp') 50% 50% / cover no-repeat; }
.kp-f1 .kp-map .kp-sky-map > *, .kp-f1 .kp-map > .kp-cloud, .kp-f1 .kp-map > [class*='cloud'] { display: none; }
.kp-f1 .kp-map .kp-land > :not(path[stroke]) { display: none; }
.kp-f1 .kp-map .kp-land > path[stroke='#C99A55'] { stroke: rgba(150, 105, 50, .5); }
.kp-f1 .kp-map .kp-land > path[stroke='#F6DDA2'] { stroke: #F2D9A0; }
.kp-f1 .kp-lm-art svg { visibility: hidden; }
.kp-f1 .kp-lm-art { background: 0 0 / 290px 290px no-repeat; background-position: -55px -44px; overflow: visible; }
.kp-f1 .kp-lm[data-world='adventure'] .kp-lm-art { background-image: url('../../fase1/img/v3/p-adventure.webp'); }
.kp-f1 .kp-lm[data-world='insects'] .kp-lm-art { background-image: url('../../fase1/img/v3/p-insects.webp'); }
.kp-f1 .kp-lm[data-world='harvest'] .kp-lm-art { background-image: url('../../fase1/img/v3/p-harvest.webp'); }
.kp-f1 .kp-lm[data-world='railway'] .kp-lm-art { background-image: url('../../fase1/img/v3/p-railway.webp'); }
.kp-f1 .kp-lm.is-shut .kp-lm-art { opacity: .7; }

/* ---------- owner on the phone, 11 Nov 2026 ---------- */
/* story reader: one back button only (back to Toko Cerita, like Android back); the second "<" (home) confused */
.kp-f1 .st-reader .kp-hud-left .kp-clay[data-action="home"] { display: none !important; }
/* the hint hand is Pupi's paw everywhere, outlined so it reads on any background */
.kp-f1 svg.kp-hand { background: url('../../fase1/img/v3/tangan.svg') 50% 50% / contain no-repeat; }
.kp-f1 svg.kp-hand > * { display: none; }
.kp-f1 .pot-tap-hand { width: 52px; height: 58px; font-size: 0; background: url('../../fase1/img/v3/tangan.svg') 50% 50% / contain no-repeat; }
/* Panen Ceria: a calm meadow behind the plant, and the plant itself in the same clay look */
.kp-f1 .kp-adv-bg.kp-bg-harvest { background-image: url('../../fase1/img/v3/padang.webp'); }
.kp-f1 .harvest-sprout > svg { visibility: hidden; }
.kp-f1 .harvest-sprout { background: 50% 100% / contain no-repeat; }
.kp-f1 .harvest-growing[data-crop="apple"] .harvest-sprout { background-image: url('../../fase1/img/v3/tanam-apple.webp'); }
.kp-f1 .harvest-growing[data-crop="tomato"] .harvest-sprout { background-image: url('../../fase1/img/v3/tanam-tomato.webp'); }
.kp-f1 .harvest-growing[data-crop="carrot"] .harvest-sprout { background-image: url('../../fase1/img/v3/tanam-carrot.webp'); }
.kp-f1 .harvest-growing[data-crop="strawberry"] .harvest-sprout { background-image: url('../../fase1/img/v3/tanam-strawberry.webp'); }
.kp-f1 .harvest-growing[data-crop="corn"] .harvest-sprout { background-image: url('../../fase1/img/v3/tanam-corn.webp'); }
.kp-f1 .harvest-growing[data-crop="eggplant"] .harvest-sprout { background-image: url('../../fase1/img/v3/tanam-eggplant.webp'); }
.kp-f1 .harvest-growing[data-crop="cucumber"] .harvest-sprout { background-image: url('../../fase1/img/v3/tanam-cucumber.webp'); }
.kp-f1 .harvest-growing[data-crop="pumpkin"] .harvest-sprout { background-image: url('../../fase1/img/v3/tanam-pumpkin.webp'); }
.kp-f1 .harvest-growing .harvest-sprout { transform: scale(.55); }
.kp-f1 .harvest-growing.stage-1 .harvest-sprout { transform: scale(.7); }
.kp-f1 .harvest-growing.stage-2 .harvest-sprout { transform: scale(.85); }
.kp-f1 .harvest-growing.stage-3 .harvest-sprout { transform: scale(1); }
.kp-f1 .harvest-pot-tap { bottom: -6px; left: 68%; }
.kp-f1 .harvest-basket-art > svg { visibility: hidden; }
.kp-f1 .harvest-basket-art { background: url('../../fase1/img/v3/keranjang.webp') 50% 100% / contain no-repeat; }
/* the flower garden lessons (mission screens) also stand in the meadow */
.kp-f1 .kp-play.mission-screen { background: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .25)), #BFE3F5 url('../../fase1/img/v3/padang.webp') 50% 50% / cover no-repeat !important; }
/* Panen Ceria: no focus box around the plant after a tap */
.kp-f1 .harvest-pot-trigger, .kp-f1 .harvest-pot-trigger:focus, .kp-f1 .harvest-pot-trigger:focus-visible { outline: none !important; box-shadow: none !important; }
/* Kereta Kebun: the meadow already has trees; the drawn extra trees looked stiff and floating (owner) */
.kp-f1 :is(.railway-tree, .rw-tree) { display: none !important; }
.kp-f1 .rw-bush { display: none !important; }
/* Jelajah Serangga: hiding spots show no focus box after a tap */
.kp-f1 .insect-hideouts button, .kp-f1 .insect-hideouts button:focus, .kp-f1 .insect-hideouts button:focus-visible { outline: none !important; box-shadow: none !important; border-color: transparent !important; }
