/* 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;
}
