/* Kebun Pupi web version: the "turn the phone" hint for phones held upright. */
.kw-rotate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  font-family: Fredoka, 'Nunito', 'Segoe UI', sans-serif;
  color: #24401a;
  background: linear-gradient(180deg, #8fd3ff, #bfeaff 55%, #e6f8d8);
}
.kw-rotate img {
  width: 120px;
  height: 120px;
  animation: kw-tilt 2.4s ease-in-out infinite;
}
.kw-rotate strong {
  font-size: 26px;
}
.kw-rotate span {
  max-width: 260px;
  font-size: 17px;
  line-height: 1.4;
}
/* Phones and tablets held upright (and small upright windows). */
@media (orientation: portrait) and (max-width: 700px), (orientation: portrait) and (pointer: coarse) {
  .kw-rotate {
    display: grid;
  }
}
@keyframes kw-tilt {
  0%, 30% { transform: rotate(0deg); }
  60%, 100% { transform: rotate(-90deg); }
}
@media (prefers-reduced-motion: reduce) {
  .kw-rotate img { animation: none; }
}

/* Start screens (web/kebun-boot.js, markup from scripts/build-web.cjs): checking the account, the sign-in popup,
   downloading pictures and voices, and "Ayo main!". One card over the app, the part shown follows the class on
   <html> (kw-m-check, -login, -offline, -load, -prepare, -start). Above the rotate hint, so a parent can sign in
   and wait holding the phone upright; the card says to turn the phone while it is upright. */
.kw-boot {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  font-family: Fredoka, 'Nunito', 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #8fd3ff, #bfeaff 55%, #e6f8d8);
}
.kw-hold .kw-boot {
  display: grid;
}
/* Held: nothing of the app moves or plays behind the card yet. */
.kw-hold #splash-screen,
.kw-hold #splash-screen * {
  animation-play-state: paused !important;
}
.kw-boot-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(100%, 420px);
  padding: 22px 20px;
  border-radius: 26px;
  background: #fff;
  color: #24401a;
  text-align: center;
  box-shadow: 0 14px 40px rgb(0 0 0 / 0.12);
}
.kw-boot-card > img {
  width: 96px;
  height: 96px;
}
.kw-boot-card strong {
  font-size: 24px;
}
.kw-boot-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: #3f5636;
}
.kw-boot-part {
  display: none;
  justify-items: center;
  gap: 10px;
  width: 100%;
}
.kw-m-check .kw-part-check,
.kw-m-login .kw-part-login,
.kw-m-offline .kw-part-offline,
.kw-m-load .kw-part-load,
.kw-m-prepare .kw-part-check,
.kw-m-start .kw-part-start {
  display: grid;
}
.kw-wall-primary,
.kw-wall-secondary {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}
.kw-wall-primary {
  background: #2d9a4f;
  color: #fff;
  box-shadow: 0 4px 0 #1f7a3b;
}
.kw-wall-secondary {
  border: 2px solid #2d9a4f;
  color: #1f7a3b;
}
.kw-boot .kw-note {
  font-size: 13.5px;
  color: #5b6b52;
}
.kw-bar {
  width: 100%;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3f3df;
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.08);
}
.kw-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4cc36a, #2d9a4f);
  transition: width 0.25s ease;
}
.kw-boot .kw-progress-text {
  font-size: 15px;
  font-weight: 600;
  color: #2d6a3b;
  font-variant-numeric: tabular-nums;
}
.kw-skip {
  display: none;
  font-size: 14px;
  color: #1f7a3b;
}
.kw-can-skip .kw-skip {
  display: inline;
}
.kw-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #d8eed4;
  border-top-color: #2d9a4f;
  border-radius: 50%;
  animation: kw-spin 0.9s linear infinite;
}
@keyframes kw-spin {
  to { transform: rotate(360deg); }
}
.kw-start {
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb341, #ff8a1a);
  color: #fff;
  font: inherit;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 5px 0 #c85f00;
  cursor: pointer;
  animation: kw-pulse 1.6s ease-in-out infinite;
}
@keyframes kw-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
/* Phone held upright on the start screens: say to turn it. */
.kw-turn {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff6e0;
  color: #8a5300;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
.kw-turn i {
  flex: none;
  width: 22px;
  height: 36px;
  border: 3px solid #c47a00;
  border-radius: 6px;
  animation: kw-tilt 2.4s ease-in-out infinite;
}
@media (orientation: portrait) and (max-width: 700px), (orientation: portrait) and (pointer: coarse) {
  .kw-m-load .kw-turn,
  .kw-m-prepare .kw-turn,
  .kw-m-start .kw-turn {
    display: flex;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kw-start,
  .kw-turn i {
    animation: none;
  }
}
/* The parents' WhatsApp group on the "Ayo main!" screen, until closed. */
.kw-wa {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 100002;
  display: none;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  padding: 8px 8px 8px 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(20 60 40 / 0.18);
  font-family: Fredoka, 'Nunito', 'Segoe UI', sans-serif;
}
.kw-m-start:not(.kw-wa-closed) .kw-wa {
  display: flex;
}
.kw-m-start:not(.kw-wa-closed) .kw-boot {
  padding-bottom: 84px;
}
.kw-wa a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #146c3c;
  text-decoration: none;
}
.kw-wa a b {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
}
.kw-wa a span {
  display: grid;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.kw-wa a small {
  font-size: 12.5px;
  font-weight: 500;
  color: #5b6b52;
}
.kw-wa button {
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef3ee;
  color: #3f5636;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
/* Phones held sideways: a compact card that fits a short screen. */
@media (max-height: 520px) {
  .kw-boot {
    padding: 10px;
  }
  .kw-boot-card {
    gap: 6px;
    padding: 14px 18px;
    width: min(100%, 460px);
  }
  .kw-boot-card > img {
    width: 56px;
    height: 56px;
  }
  .kw-boot-card strong {
    font-size: 20px;
  }
  .kw-boot-card p {
    font-size: 14px;
  }
  .kw-wall-primary,
  .kw-wall-secondary {
    padding: 9px 14px;
    font-size: 15px;
  }
  .kw-start {
    padding: 12px 18px;
    font-size: 21px;
  }
}

/* Rating prompt for parents, shown right after Ruang Orang Tua closes */
.kw-feedback {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow-y: auto;
  font-family: Fredoka, 'Nunito', 'Segoe UI', sans-serif;
  background: rgb(20 24 30 / 0.5);
}
.kw-feedback-card {
  display: grid;
  gap: 10px;
  width: min(100%, 440px);
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  color: #24401a;
  text-align: center;
}
.kw-feedback-card strong {
  font-size: 20px;
}
.kw-feedback-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.kw-feedback-stars button {
  border: 0;
  background: none;
  font-size: 36px;
  line-height: 1;
  color: #d6dbe1;
  cursor: pointer;
}
.kw-feedback-stars button.is-on {
  color: #f0a500;
}
.kw-feedback-more {
  display: grid;
  gap: 8px;
  text-align: left;
}
.kw-feedback-more[hidden] {
  display: none;
}
.kw-feedback-more label {
  display: grid;
  gap: 3px;
  font-size: 14px;
  color: #3f5636;
}
.kw-feedback-more textarea,
.kw-feedback-more input[name='name'] {
  padding: 8px 10px;
  border: 1.5px solid #d6dbe1;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}
.kw-feedback-more .kw-feedback-consent {
  grid-template-columns: auto 1fr;
  align-items: start;
}
.kw-feedback-error {
  margin: 0;
  color: #b42318;
  font-size: 14px;
}
.kw-feedback-later {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.kw-feedback-later button {
  border: 0;
  background: none;
  color: #5b6b52;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.kw-feedback-thanks {
  margin: 0;
}

/* Dukung developer on the web (web/kebun-web.js showSupport): the app's support card with one button to ifuix.com. */
.kw-support .kp-support-card {
  width: min(560px, 100%);
}
.kw-support .kp-support-note {
  margin: 0 0 4px;
  font-size: 13px;
}
.kw-support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}
.kw-support-actions .kp-support-later {
  margin: 0;
}
.kw-support-go {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6f91, #e2305a);
  box-shadow: 0 4px 0 #a81d3f;
  color: #fff;
  font: 800 16px/1 var(--kp-font-parent, inherit);
  cursor: pointer;
}
.kw-support-go:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #a81d3f;
}

/* Install offer (owner, 19 November 2026): a picture of the home screen with Kebun Pupi on it, next to the steps or
   the "Pasang sekarang" button. Landscape first: picture left, words right, fits a 360px-high phone. */
.kw-install .kw-install-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  width: min(640px, 100%);
}
.kw-install-phone {
  position: relative;
  width: 132px;
  padding: 10px 8px 14px;
  border-radius: 22px;
  background: #1d2b24;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.6);
}
.kw-install-screen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 6px;
  padding: 12px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #8fd3ff, #c6ecc0);
}
.kw-install-app {
  justify-self: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: hsl(var(--h) 70% 72%);
  opacity: 0.7;
}
.kw-install-me {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  z-index: 1;
}
.kw-install-me img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(255, 207, 51, 0.9);
  animation: kwInstallGlow 1.8s ease-in-out infinite;
}
.kw-install-me b {
  font: 800 7px/1 var(--kp-font-parent, sans-serif);
  color: #17402a;
  white-space: nowrap;
}
@keyframes kwInstallGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.kw-install-hand {
  position: absolute;
  left: 64px;
  top: 88px;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
  animation: kwInstallTap 1.8s ease-in-out infinite;
}
.kw-install-hand svg {
  display: block;
  width: 30px;
  height: 30px;
}
@keyframes kwInstallTap {
  0%, 100% { transform: translate(6px, 10px); }
  45%, 55% { transform: translate(0, 0) scale(0.88); }
}
.kw-install-text h2 {
  margin: 4px 0 6px;
  padding-right: 40px;
  font: 700 22px/1.15 var(--kp-font, Fredoka, sans-serif);
  color: #17402a;
}
.kw-install-lead {
  margin: 0 0 4px;
  font: 700 14px/1.45 var(--kp-font-parent, sans-serif);
  color: #3c4a40;
}
.kw-install-steps {
  display: grid;
  gap: 7px;
  margin: 4px 0 2px;
  padding: 0;
  list-style: none;
  font: 700 14px/1.35 var(--kp-font-parent, sans-serif);
  color: #3c4a40;
}
.kw-install-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
}
.kw-install-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #22a447;
  color: #fff;
  font-size: 13px;
}
.kw-install-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 1px 6px;
  border-radius: 8px;
  background: #eaf3ff;
  color: #1f5fbf;
  white-space: nowrap;
}
.kw-install-key svg {
  width: 16px;
  height: 16px;
}
.kw-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}
.kw-install-actions .kp-support-later {
  margin: 0;
}
.kw-install-go {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #4fc35a, #22a447);
  box-shadow: 0 4px 0 #157a30;
  color: #fff;
  font: 800 16px/1 var(--kp-font-parent, inherit);
  cursor: pointer;
}
.kw-install-go:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #157a30;
}
@media (max-height: 380px) {
  .kw-install .kw-install-card { gap: 14px; }
  .kw-install-phone { width: 112px; }
  .kw-install-text h2 { font-size: 19px; }
  .kw-install-steps { gap: 5px; font-size: 13px; }
}
@media (orientation: portrait) {
  .kw-install .kw-install-card { grid-template-columns: minmax(0, 1fr); justify-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .kw-install-me img, .kw-install-hand { animation: none; }
}

/* Buka Semua Materi over the game (KebunWeb.openUpgrade, openBuy in web/kebun-web.js): nearly the whole screen, the
   purchase panel of ifuix.com in a frame, a round close button in the corner. */
/* .kp-v3 dialog (app/css/v3/theme.css) centres and scales every app dialog to the game stage; this one uses the real
   screen instead, so the plans stay readable on a phone. */
.kw-buy,
.kp-v3 dialog.kw-buy {
  position: fixed;
  inset: 0;
  transform: none;
  width: min(1000px, calc(100vw - 16px));
  height: calc(100vh - 16px);
  height: calc(100dvh - 16px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #eaf7ff;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.35);
}
.kw-buy::backdrop {
  background: rgb(20 40 25 / 0.55);
}
.kw-buy-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.kw-buy.is-loaded .kw-buy-frame {
  opacity: 1;
}
.kw-buy-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.kw-buy-wait span {
  width: 44px;
  height: 44px;
  border: 5px solid #cfe8c9;
  border-top-color: #2d9a4f;
  border-radius: 50%;
  animation: kw-buy-spin 0.9s linear infinite;
}
.kw-buy.is-loaded .kw-buy-wait {
  display: none;
}
@keyframes kw-buy-spin {
  to { transform: rotate(360deg); }
}
.kw-buy-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1d4a2a;
  box-shadow: 0 3px 0 #cfe8c9, 0 4px 12px rgb(0 0 0 / 0.15);
  cursor: pointer;
}
.kw-buy-msg {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: #1d4a2a;
  font-family: Fredoka, system-ui, sans-serif;
}
.kw-buy-msg strong { font-size: 24px; }
.kw-buy-msg p { margin: 0; max-width: 32em; font-size: 16px; }
.kw-buy-msg .kw-wall-primary {
  width: auto;
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
