/* SorSinggih - style.css (UI baru, mobile-first: mobile < 720px, tablet >= 720px, desktop >= 1100px) */
:root {
  --bg:#f8f9fb;
  --card:#fff;
  --bd:#e6dcde;
  --ink:#1d1d1f;
  --mut:#6b6b70;
  --gold:#d9a02f;
  --soft:#f4e5c6;
  --cta:#fdc35c;
  --cta-deep:#e0a642;
  --acc:#ecd3a4;
  --msg:#fdc35c;
  --r:14px;
}
* {
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:'Plus Jakarta Sans',system-ui,sans-serif;
  -webkit-tap-highlight-color:transparent
}
html {
  scroll-behavior:smooth
}
/* Gradasi latar berlaku di semua ukuran layar; ukurannya mengikuti lebar viewport */
body {
  background:
  radial-gradient(min(1100px,150vw) min(480px,70vw) at 88% -8%,#fdf0cc 0,rgba(253,240,204,0) 60%),
  radial-gradient(min(760px,120vw) min(360px,55vw) at 0% 100%,#fff3d4 0,rgba(255,243,212,0) 65%),
  var(--bg);
  background-repeat:no-repeat;
  color:var(--ink);
  min-height:100vh;
  min-height:100dvh;
  line-height:1.45;
  overflow-x:clip
}
/* kartu yang meluncur keluar layar tidak memunculkan scroll horizontal */
button {
  border:0;
  background:none;
  cursor:pointer;
  color:inherit
}
img {
  max-width:100%
}
.hidden {
  display:none!important
}
.invis {
  visibility:hidden
}
/* tetap memakan ruang, jadi layout tidak bergeser */
.sr {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0)
}
.ic {
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0
}
:focus-visible {
  outline:3px solid var(--gold);
  outline-offset:2px
}
.card {
  background:var(--card);
  border:2px solid var(--bd);
  border-radius:var(--r);
  padding:16px
}

/* ---------- Welcome ---------- */
.welcome {
  position:relative;
  min-height:100vh;
  min-height:100dvh;
  max-width:440px;
  margin:0 auto;
  padding:28px 24px 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  overflow:hidden
}
.w-logo {
  width:min(260px,70%);
  margin-bottom:clamp(24px,8vh,70px)
}
.bubble {
  position:relative;
  align-self:stretch;
  background:#f4f4f4;
  border:1px solid #e3e3e3;
  border-radius:14px;
  padding:16px;
  font-size:16px;
  min-height:112px
}
.bubble::after {
  content:"";
  position:absolute;
  left:18px;
  bottom:-9px;
  width:16px;
  height:16px;
  background:#f4f4f4;
  border:solid #e3e3e3;
  border-width:0 1px 1px 0;
  transform:rotate(45deg)
}
.w-mascot {
  margin-top:auto;
  width:min(340px,86%);
  max-height:46vh;
  object-fit:contain;
  object-position:bottom
}
.btn-cta {
  background:var(--cta);
  color:#fff;
  font-weight:800;
  font-size:20px;
  padding:12px 28px;
  border-radius:10px;
  box-shadow:0 5px 0 var(--cta-deep);
  transition:transform .1s
}
.btn-cta:active {
  transform:translateY(3px);
  box-shadow:0 2px 0 var(--cta-deep)
}
.welcome .w-actions {
  position:absolute;
  left:24px;
  right:24px;
  bottom:calc(24px + env(safe-area-inset-bottom,0px));
  display:flex;
  align-items:stretch;
  gap:12px
}
.welcome .btn-cta {
  flex:1;
  margin:0
}
.btn-cta.sm {
  font-size:13px;
  padding:8px 20px;
  color:#5a3d00;
  margin-top:10px;
  border-radius:999px;
  box-shadow:0 3px 0 var(--cta-deep);
  transition:transform .1s,box-shadow .1s
}
.btn-cta.sm:hover {
  transform:translateY(-2px);
  box-shadow:0 5px 0 var(--cta-deep)
}
.btn-cta.sm:active {
  transform:translateY(2px);
  box-shadow:0 1px 0 var(--cta-deep)
}
/* Tombol lewati: di samping tombol masuk, tetap terlihat saat tombol masuk belum muncul */
.w-skip {
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  padding:0 20px;
  border-radius:10px;
  background:rgba(255,255,255,.9);
  border:2px solid #f0d89c;
  font-size:15px;
  font-weight:700;
  color:#8a5d00;
  transition:background .15s,transform .1s
}
.w-skip:hover {
  background:#fff8e8
}
.w-skip:active {
  transform:scale(.96)
}
/* Mobile: selama tombol utama belum muncul, Lewati melebar penuh dan tombol yang tersembunyi tidak ikut memakan ruang */
@media (max-width:899px) {
  .welcome .w-actions:has(.btn-cta.invis) .btn-cta {
    display:none
  }
  .welcome .w-actions:has(.btn-cta.invis) .w-skip {
    flex:1;
    justify-content:center;
    min-height:50px;
    background:rgba(255,255,255,.75);
    border-color:#f3e3b8;
    font-size:14px;
    font-weight:600
  }
}
/* Teks dan ilustrasi Hanoman tidak bisa diseleksi atau disalin (seret gambar dicegah di script.js) */
.welcome,.w-float,.bubble,.cta,.slides,.chat-head,.msg.ai,.about-top,.k-next,img {
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none
}

/* ---------- App shell ---------- */
.app {
  max-width:520px;
  margin:0 auto;
  padding:0 20px 48px
}
.top {
  display:flex;
  align-items:center;
  gap:10px;
  padding:22px 0 14px;
  font-size:14px;
  font-weight:500;
  line-height:1.15
}
.top-logo {
  display:block;
  height:48px
}
.split,.col {
  display:grid;
  gap:16px
}
.col {
  align-content:start
}
.split {
  margin-bottom:16px
}
main>section {
  margin-bottom:16px
}

/* ---------- Panel ---------- */
.panel {
  padding:16px
}
.greet {
  font-size:12px;
  font-weight:700;
  margin-bottom:10px
}
.field {
  border:2px solid var(--bd);
  border-radius:10px;
  padding:10px
}
textarea {
  width:100%;
  border:0;
  outline:0;
  resize:none;
  font-size:14px;
  background:transparent;
  color:var(--ink)
}
textarea::placeholder {
  color:#c9c3c4
}
textarea {
  padding:6px 8px
}
textarea:focus-visible {
  outline:none
}
/* Kotak ketik: border emas saat sedang dipakai mengetik */
.field {
  transition:border-color .15s,box-shadow .15s
}
.field:focus-within {
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(217,160,47,.2)
}
.field-bar {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px
}
.select-wrap {
  position:relative;
  flex:1;
  max-width:240px
}
select {
  appearance:none;
  width:100%;
  background:var(--gold);
  color:#fff;
  font-size:11px;
  font-weight:700;
  border:0;
  border-radius:4px;
  padding:7px 28px 7px 12px;
  cursor:pointer
}
select option {
  color:var(--ink);
  background:#fff
}
.select-wrap .ic {
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  width:16px;
  height:16px;
  color:#fff;
  pointer-events:none
}
.send {
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--soft);
  color:var(--gold);
  display:grid;
  place-items:center
}
.send .ic {
  width:16px;
  height:16px
}
.send:disabled {
  opacity:.6;
  cursor:wait
}
.p-voice,.p-cam {
  display:none
}
.panel[data-mode=voice] .p-text,.panel[data-mode=camera] .p-text {
  display:none
}
.panel[data-mode=voice] .p-voice {
  display:flex
}
.panel[data-mode=camera] .p-cam {
  display:flex
}
.p-voice {
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  min-height:96px
}
.dots {
  display:flex;
  gap:10px
}
.dots i {
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--gold);
  animation:pulse 1.1s ease-in-out infinite
}
.dots i:nth-child(2) {
  animation-delay:.12s
}
.dots i:nth-child(3) {
  animation-delay:.24s
}
.dots i:nth-child(4) {
  animation-delay:.36s
}
.dots i:nth-child(5) {
  animation-delay:.48s
}
@keyframes pulse {
  0%,100% {
    transform:scale(.6);
    opacity:.5
  }
  50% {
    transform:scale(1.15);
    opacity:1
  }
}
.p-note {
  font-size:12px;
  color:var(--mut)
}
.p-cam {
  flex-direction:column;
  align-items:center;
  gap:14px
}
.cam-view {
  width:100%;
  aspect-ratio:4/5;
  max-height:420px;
  background:#d9d9d9;
  border-radius:14px;
  object-fit:cover
}
.cam-snap {
  display:none
}
.panel.snap .cam-snap {
  display:block
}
.panel.snap .cam-view:not(.cam-snap),.panel.snap .shutter {
  display:none
}
.shutter {
  width:62px;
  height:62px;
  border-radius:50%;
  background:var(--gold);
  border:4px solid #fff;
  box-shadow:0 0 0 3px var(--gold)
}
.ctrl {
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:14px
}
.pill-btn {
  height:38px;
  min-width:38px;
  padding:0 10px;
  border-radius:19px;
  background:var(--soft);
  color:var(--gold);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:12px;
  font-weight:700
}
.pill-btn span {
  display:none
}
.panel[data-mode=camera] #c-cam span,.panel[data-mode=voice] #c-mic span {
  display:inline;
  padding-right:6px
}
.panel[data-mode=text] #c-back {
  display:none
}
.panel[data-mode=camera] #c-cam,.panel[data-mode=voice] #c-mic {
  padding:0 16px
}

/* ---------- Pilih lawan bicara ---------- */
.roles {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.role {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:54px;
  padding:8px 14px;
  background:var(--card);
  border:2px solid var(--bd);
  border-radius:10px;
  font-size:13px;
  font-weight:700;
  text-align:left;
  transition:background .15s
}
.role span {
  flex:1
}
.role .tick {
  width:16px;
  height:16px;
  opacity:0;
  color:var(--gold);
  stroke-width:3
}
.role.on {
  background:#fff8e8;
  border-color:var(--gold)
}
.role.on .tick {
  opacity:1
}
.roles.off {
  opacity:.45
}
.roles.off .role {
  pointer-events:none
}

/* ---------- Hasil ---------- */
.r-loading {
  display:none;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:20px 0;
  font-size:13px;
  font-weight:600;
  color:var(--mut)
}
.r-loading span {
  display:flex;
  gap:6px
}
.r-loading i {
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--gold);
  animation:pulse 1.1s ease-in-out infinite
}
.r-loading i:nth-child(2) {
  animation-delay:.18s
}
.r-loading i:nth-child(3) {
  animation-delay:.36s
}
.result.memuat>:not(.r-loading) {
  display:none
}
.result.memuat .r-loading {
  display:flex
}
.r-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px
}
.badge {
  background:var(--soft);
  color:#8a5d00;
  font-size:11px;
  font-weight:800;
  padding:4px 10px;
  border-radius:12px
}
.mini {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:700;
  color:var(--mut)
}
.mini .ic {
  width:14px;
  height:14px
}
.result h2 {
  font-size:22px;
  line-height:1.3;
  margin-bottom:8px
}
.result>p {
  font-size:13px;
  color:var(--mut)
}
.r-list {
  display:grid;
  gap:8px;
  margin-top:12px
}
.r-item {
  background:var(--bg);
  border-radius:10px;
  padding:8px 12px;
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:4px 8px;
  font-size:13px
}
.r-item span {
  font-size:11px;
  background:var(--acc);
  padding:1px 8px;
  border-radius:8px;
  font-weight:700
}
.r-item small {
  flex-basis:100%;
  color:var(--mut)
}

/* ---------- Kosa kata & CTA ---------- */
.kosa {
  position:relative;
  min-height:150px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:#fff
}
.kosa small {
  font-size:14px;
  color:var(--mut);
  font-weight:600
}
.kosa h2 {
  font-size:clamp(34px,9vw,44px);
  line-height:1.1;
  color:#4a4a4a;
  font-weight:700;
  letter-spacing:-1px
}
.kosa p {
  font-size:clamp(22px,6vw,28px);
  font-weight:600;
  color:#7a7a7a
}
.k-next {
  position:absolute;
  top:12px;
  right:12px;
  width:40px;
  height:40px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--mut)
}
.k-next .ic {
  width:28px;
  height:28px;
  stroke-width:1.6
}
.kosa {
  overflow:hidden
}
.k-next {
  z-index:3
}
.flip {
  animation:fadeUp .25s ease
}
.k-next {
  transition:background .2s,color .2s
}
.k-next:hover {
  background:var(--soft);
  color:var(--gold)
}
.k-next.spin .ic {
  animation:kFlip .5s cubic-bezier(.3,1.4,.5,1)
}
@keyframes kFlip {
  0% {
    transform:rotate(0) scale(1)
  }
  40% {
    transform:rotate(-24deg) scale(.82)
  }
  100% {
    transform:rotate(0) scale(1)
  }
}
.cta {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px
}
.cta h3 {
  font-size:14px;
  line-height:1.3
}
/* Kartu ini TIDAK bisa diklik. Hanya tombol "Start Session" yang membuka chat.
   Saat tombol disorot, muncul gelembung ajakan dan Hanoman bergoyang. */
.cta {
  position:relative;
  background:linear-gradient(135deg,#fff 0%,#fff8e8 100%)
}
.cta-desc {
  font-size:12px;
  color:var(--mut);
  margin-top:6px;
  max-width:30ch
}
.cta::after {
  content:"Yuk ngobrol!";
  position:absolute;
  top:-16px;
  right:20px;
  z-index:2;
  padding:6px 13px;
  border-radius:14px 14px 14px 3px;
  background:var(--cta);
  color:#5a3d00;
  font-size:12px;
  font-weight:800;
  box-shadow:0 8px 16px -8px rgba(160,100,0,.6);
  opacity:0;
  transform:translateY(10px) scale(.7);
  transform-origin:left bottom;
  pointer-events:none;
  transition:opacity .2s,transform .3s cubic-bezier(.2,.9,.3,1.4)
}
.cta:has(.btn-cta:hover)::after,.cta:has(.btn-cta:focus-visible)::after {
  opacity:1;
  transform:none;
  animation:nudge 1.4s ease-in-out .3s infinite
}
.cta:has(.btn-cta:hover) .slides,.cta:has(.btn-cta:focus-visible) .slides {
  animation:waggle .7s ease-in-out infinite
}
@keyframes nudge {
  0%,100% {
    translate:0 0
  }
  50% {
    translate:0 -4px
  }
}
@keyframes waggle {
  0%,100% {
    rotate:0deg
  }
  25% {
    rotate:-7deg
  }
  75% {
    rotate:7deg
  }
}

/* ---------- Tentang, FAQ ---------- */
.about-top {
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:16px
}
.about-top img {
  width:110px;
  height:110px;
  object-fit:contain;
  flex-shrink:0
}
.about h2 {
  font-size:20px;
  margin-bottom:6px
}
.about p {
  font-size:12px;
  text-align:justify;
  color:#333
}
.faq {
  display:grid;
  gap:8px
}
details {
  background:var(--acc);
  border-radius:8px
}
summary {
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  font-size:13px;
  font-weight:700;
  cursor:pointer
}
summary::-webkit-details-marker {
  display:none
}
summary .ic {
  color:var(--gold);
  transition:transform .2s
}
details[open] summary .ic {
  transform:rotate(180deg)
}
details p {
  background:var(--card);
  padding:12px 14px;
  border-radius:0 0 8px 8px;
  font-size:13px
}

/* ---------- Tim & batasan ---------- */
.team,.limits {
  text-align:center
}
.team h2,.limits h2 {
  font-size:22px;
  margin:12px 0 16px
}
.team-row {
  display:flex;
  justify-content:space-around;
  gap:12px;
  flex-wrap:wrap
}
.member {
  display:grid;
  justify-items:center;
  gap:4px;
  flex:1;
  min-width:90px
}
.member strong {
  font-size:20px
}
.member small {
  font-size:10px;
  color:var(--mut);
  max-width:110px
}
.avatar {
  position:relative;
  width:60px;
  height:60px;
  border-radius:50%;
  background:var(--acc);
  overflow:hidden;
  display:grid;
  place-items:center
}
.avatar::before {
  content:attr(data-i);
  font-weight:800;
  font-size:22px;
  color:#8a5d00
}
.avatar img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover
}
.limits .lead {
  font-size:12px;
  color:var(--mut);
  margin-bottom:14px
}
.limit-grid {
  display:grid;
  gap:12px;
  text-align:left
}
.limit-grid strong {
  font-size:14px
}
.limit-grid p {
  font-size:12px;
  color:var(--mut);
  margin-top:6px
}

/* ---------- Sesi chat (tampilan) ---------- */
.sess-top {
  display:flex;
  justify-content:flex-start;
  padding-bottom:12px
}
.chat {
  display:flex;
  flex-direction:column;
  min-height:min(60vh,520px);
  margin-bottom:16px
}
.chat-head {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px
}
.chat-head img {
  width:56px;
  height:56px;
  object-fit:contain
}
.msgs {
  flex:1;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px 0;
  overflow-y:auto;
  max-height:50vh
}
.msg {
  max-width:78%;
  background:var(--msg);
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  font-size:13px;
  font-weight:600;
  overflow-wrap:anywhere
}
.msg.ai {
  align-self:flex-start;
  border-top-left-radius:2px
}
.msg.user {
  align-self:flex-end;
  border-top-right-radius:2px;
  background:var(--soft);
  color:var(--ink)
}
.msg small {
  display:block;
  margin-top:4px;
  font-size:12px;
  font-weight:500;
  opacity:.9
}
.pill-btn.rec {
  background:var(--gold);
  color:#fff
}
.chat-input {
  display:flex;
  gap:10px;
  align-items:center
}
.chat-input input {
  flex:1;
  height:42px;
  border:2px solid var(--bd);
  border-radius:999px;
  background:#fff;
  color:var(--ink);
  padding:0 16px;
  font-size:14px;
  transition:border-color .15s,box-shadow .15s
}
.chat-input input::placeholder {
  color:#c9c3c4
}
.chat-input input:focus {
  outline:none;
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(217,160,47,.2)
}
.chat-input .pill-btn {
  height:42px;
  min-width:42px
}

/* ---------- Toast ---------- */
.toast {
  position:fixed;
  left:50%;
  bottom:24px;
  transform:translate(-50%,20px);
  background:var(--ink);
  color:#fff;
  padding:10px 18px;
  border-radius:20px;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:.25s;
  max-width:90vw;
  z-index:50
}
.toast.show {
  opacity:1;
  transform:translate(-50%,0)
}

/* ---------- Tablet ---------- */
@media (min-width:560px) {
  .roles {
    grid-template-columns:repeat(4,1fr)
  }
  .role {
    flex-direction:column;
    justify-content:center;
    text-align:center;
    gap:4px;
    padding:10px 6px
  }
  .role span {
    flex:none
  }
  .role .tick {
    position:absolute;
    top:6px;
    right:6px
  }
  .role {
    position:relative
  }
}
@media (min-width:720px) {
  .app {
    max-width:760px;
    padding:0 32px 64px
  }
  .top {
    padding-top:28px;
    font-size:15px
  }
  .side {
    grid-template-columns:1fr 1fr
  }
  .cta {
    flex-direction:row
  }
  .kosa {
    min-height:170px
  }
  .limit-grid {
    grid-template-columns:repeat(3,1fr)
  }
  .about {
    padding:24px
  }
  .about-top img {
    width:140px;
    height:140px
  }
  .about p {
    font-size:14px
  }
  .cam-view {
    aspect-ratio:16/10
  }
  .welcome {
    max-width:520px
  }
}

/* ---------- Desktop ---------- */
@media (min-width:1100px) {
  .app {
    max-width:1160px;
    padding:0 40px 80px
  }
  .split {
    grid-template-columns:1.5fr 1fr;
    gap:24px;
    align-items:start
  }
  .col {
    gap:20px
  }
  .side {
    grid-template-columns:1fr;
    position:sticky;
    top:16px
  }
  .kosa {
    min-height:220px
  }
  .kosa h2 {
    font-size:52px
  }
  .kosa p {
    font-size:32px
  }
  .cta h3 {
    font-size:16px
  }
  .panel {
    padding:24px
  }
  textarea {
    font-size:16px
  }
  .greet {
    font-size:14px
  }
  .select-wrap {
    max-width:260px
  }
  select {
    font-size:12px
  }
  .about-top {
    gap:28px
  }
  .about h2 {
    font-size:26px
  }
  .about p {
    font-size:15px
  }
  .faq {
    grid-template-columns:1fr 1fr;
    align-items:start
  }
  .limit-grid {
    gap:20px
  }
  .chat {
    min-height:min(65vh,600px)
  }
  #view-session {
    max-width:820px;
    margin:0 auto
  }
}

/* ---------- Animasi ---------- */
@keyframes outL {
  to {
    opacity:0;
    transform:translateX(-28px)
  }
}
@keyframes outR {
  to {
    opacity:0;
    transform:translateX(28px)
  }
}
@keyframes inR {
  from {
    opacity:0;
    transform:translateX(40px)
  }
}
@keyframes inL {
  from {
    opacity:0;
    transform:translateX(-40px)
  }
}
@keyframes pop {
  from {
    opacity:0;
    transform:translateY(10px) scale(.92)
  }
}
@keyframes rise {
  from {
    opacity:0;
    transform:translateY(60px)
  }
  60% {
    transform:translateY(-6px)
  }
}
@keyframes fadeUp {
  from {
    opacity:0;
    transform:translateY(8px)
  }
}
.out-maju {
  animation:outL .12s ease-in forwards
}
.out-mundur {
  animation:outR .12s ease-in forwards
}
.in-maju {
  animation:inR .25s cubic-bezier(.2,.8,.3,1)
}
.in-mundur {
  animation:inL .25s cubic-bezier(.2,.8,.3,1)
}
.pop {
  animation:pop .4s cubic-bezier(.2,.9,.3,1.2)
}
.rise {
  animation:rise .4s cubic-bezier(.2,.9,.3,1) backwards
}
@keyframes sink {
  to {
    opacity:0;
    transform:translateY(70px)
  }
}
.sink {
  animation:sink .16s ease-in forwards
}
@keyframes blink {
  50% {
    opacity:0
  }
}
.caret {
  display:inline-block;
  width:2px;
  height:1.05em;
  background:var(--ink);
  margin-left:2px;
  vertical-align:-3px;
  animation:blink .7s steps(1) infinite
}
.p-text,.p-voice,.p-cam {
  animation:fadeUp .28s ease
}
.result:not(.hidden) {
  animation:fadeUp .3s ease
}
@media (prefers-reduced-motion:reduce) {
  * {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
}

/* ---------- Desktop: Welcome dua kolom (>= 900px) ---------- */
/* Mobile: elemen hiasan desktop disembunyikan */
.w-tag,.w-feats,.w-dots,.w-float {
  display:none
}
@media (min-width:900px) {
  /* Lebar penuh supaya latar tidak terpotong; isi tetap rata tengah maksimal 1240px */
  .welcome {
    max-width:none;
    margin:0;
    width:100%;
    padding:0 max(56px,calc((100% - 1240px)/2));
    display:grid;
    column-gap:56px;
    align-items:start;
    grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
    grid-template-rows:1fr auto auto auto auto auto auto 1fr;
    grid-template-areas:". mascot" "logo mascot" "tag mascot" "bubble mascot" "btn mascot" "feats mascot" "dots mascot" ". mascot";
    background:
      radial-gradient(720px 440px at 6% 8%,#fff0cb 0,rgba(255,240,203,0) 70%),
      radial-gradient(560px 360px at 40% 100%,#fff6df 0,rgba(255,246,223,0) 70%),
      var(--bg)
  }
  /* lingkaran cahaya besar di belakang Hanoman */
  .welcome::before {
    content:"";
    position:absolute;
    right:-4%;
    bottom:-24%;
    width:min(66vw,980px);
    aspect-ratio:1;
    border-radius:50%;
    pointer-events:none;
    background:radial-gradient(circle at 50% 45%,#fde2a0 0,#fdeec4 46%,rgba(254,243,214,0) 70%)
  }
  /* pola titik halus yang memudar ke arah tepi */
  .welcome::after {
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    opacity:.6;
    background-image:radial-gradient(#e6cf9c 1.3px,transparent 1.6px);
    background-size:26px 26px;
    -webkit-mask-image:radial-gradient(55% 70% at 76% 55%,#000 0,transparent 75%);
    mask-image:radial-gradient(55% 70% at 76% 55%,#000 0,transparent 75%)
  }
  .welcome>* {
    position:relative;
    z-index:1
  }
  .w-logo {
    grid-area:logo;
    justify-self:start;
    width:340px;
    margin:0 0 20px
  }
  .w-tag {
    grid-area:tag;
    display:inline-flex;
    align-items:center;
    justify-self:start;
    margin-bottom:18px;
    padding:7px 16px;
    border-radius:999px;
    background:#fff;
    border:1.5px solid #f0d89c;
    font-size:14px;
    font-weight:700;
    color:#8a5d00;
    box-shadow:0 8px 20px -14px rgba(160,100,0,.5)
  }
  .w-tag::before {
    content:"";
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--gold);
    margin-right:10px;
    box-shadow:0 0 0 4px #fbe9bd
  }
  .bubble {
    grid-area:bubble;
    font-size:28px;
    line-height:1.4;
    min-height:190px;
    padding:28px 32px;
    border-radius:24px;
    background:#fff;
    border-color:#efe4cc;
    box-shadow:0 22px 40px -26px rgba(140,90,0,.45)
  }
  .bubble::after {
    left:auto;
    right:-9px;
    bottom:auto;
    top:52px;
    background:#fff;
    border-color:#efe4cc;
    border-width:1px 1px 0 0
  }
  .welcome .w-actions {
    grid-area:btn;
    position:relative;
    left:auto;
    right:auto;
    bottom:auto;
    justify-self:start;
    margin-top:30px;
    gap:16px
  }
  .welcome .btn-cta {
    flex:none;
    padding:16px 64px;
    font-size:24px;
    border-radius:14px
  }
  .w-skip {
    padding:0 32px;
    font-size:18px;
    border-radius:14px
  }
  .w-feats {
    grid-area:feats;
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    list-style:none;
    margin-top:34px
  }
  .w-feats li {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 16px;
    border-radius:14px;
    background:rgba(255,255,255,.8);
    border:1.5px solid #f0e2c0;
    font-size:14px;
    font-weight:700;
    color:#5b4a22
  }
  .w-feats .ic {
    width:18px;
    height:18px;
    color:var(--gold)
  }
  .w-dots {
    grid-area:dots;
    display:flex;
    gap:8px;
    margin-top:30px
  }
  .w-dots i {
    width:10px;
    height:10px;
    border-radius:999px;
    background:#ecd9a8;
    transition:width .3s,background .3s
  }
  .w-dots i.on {
    width:34px;
    background:var(--gold)
  }
  .w-mascot {
    grid-area:mascot;
    align-self:end;
    justify-self:center;
    width:auto;
    max-width:100%;
    height:min(88vh,860px);
    margin:0
  }
  /* kartu melayang tingkat tutur di sekeliling Hanoman */
  .welcome .w-float {
    display:flex;
    flex-direction:column;
    position:absolute;
    z-index:2;
    padding:12px 18px;
    border-radius:18px;
    background:#fff;
    border:1.5px solid #f0e2c0;
    box-shadow:0 18px 34px -20px rgba(140,90,0,.55);
    animation:bob 5s ease-in-out infinite
  }
  .w-float b {
    font-size:17px;
    color:#8a5d00
  }
  .w-float small {
    font-size:12px;
    color:var(--mut);
    font-weight:600
  }
  .w-float.f1 {
    top:17%;
    right:6%
  }
  .w-float.f2 {
    top:37%;
    left:52%;
    animation-delay:-1.4s
  }
  .w-float.f3 {
    bottom:27%;
    right:3%;
    animation-delay:-2.6s
  }
  .w-float.f4 {
    top:9%;
    left:58%;
    animation-delay:-3.6s;
    background:#fdc35c;
    border-color:#e0a642
  }
  .w-float.f4 b {
    color:#5a3d00
  }
  .w-float.f4 small {
    color:#7a5410
  }
}
@keyframes bob {
  0%,100% {
    transform:translateY(0)
  }
  50% {
    transform:translateY(-10px)
  }
}
/* layar desktop pendek: kartu melayang dirapikan agar tidak menumpuk */
@media (min-width:900px) and (max-height:700px) {
  .w-float.f2,.w-float.f4 {
    display:none!important
  }
  .w-feats {
    margin-top:20px
  }
  .w-dots {
    margin-top:18px
  }
}

/* ---------- Desktop: halaman utama (>= 1100px) ---------- */
@media (min-width:1100px) {
  .app {
    max-width:1240px
  }
  .top {
    padding:28px 0 22px;
    font-size:16px
  }
  .top-logo {
    height:56px
  }
  .card {
    border-radius:22px;
    box-shadow:0 4px 12px -8px rgba(120,80,0,.4)
  }
  .split {
    grid-template-columns:7fr 5fr;
    gap:28px;
    align-items:stretch
  }
  .side {
    position:static;
    grid-template-rows:1fr auto;
    align-content:stretch
  }
  .panel {
    padding:28px
  }
  textarea {
    min-height:170px;
    font-size:17px
  }
  .ctrl {
    margin-top:18px
  }
  .roles {
    gap:16px
  }
  .role {
    min-height:84px;
    font-size:14px;
    border-radius:16px
  }
  .role:hover {
    border-color:var(--gold);
    transform:translateY(-2px)
  }
  .role .ic:first-child {
    width:26px;
    height:26px
  }
  .kosa {
    min-height:0;
    padding:36px;
    background:#fff
  }
  .kosa small {
    font-size:16px
  }
  .kosa h2 {
    font-size:64px
  }
  .kosa p {
    font-size:38px
  }
  .cta {
    padding:24px 28px
  }
  .cta h3 {
    font-size:18px
  }
  .slides {
    transform:scale(1.15);
    transform-origin:right center
  }
  .about {
    display:grid;
    grid-template-columns:5fr 7fr;
    gap:48px;
    align-items:center;
    padding:40px
  }
  .about-top {
    flex-direction:column;
    text-align:center;
    margin:0
  }
  .about-top img {
    width:200px;
    height:200px
  }
  .about h2 {
    font-size:30px
  }
  .about p {
    text-align:center;
    font-size:15px
  }
  .faq {
    grid-template-columns:1fr
  }
  .team h2,.limits h2 {
    font-size:30px;
    margin:28px 0 22px
  }
  .team-row {
    max-width:820px;
    margin:0 auto
  }
  .member .avatar {
    width:96px;
    height:96px
  }
  .member strong {
    font-size:24px
  }
  .member small {
    font-size:12px;
    max-width:150px
  }
  .limit-grid .card {
    padding:24px;
    transition:transform .2s
  }
  .limit-grid .card:hover {
    transform:translateY(-4px)
  }
  .limit-grid strong {
    font-size:16px
  }
  .limit-grid p {
    font-size:14px
  }
}
/* Bagian bawah halaman baru dihitung saat mendekati layar (hemat kerja browser) */
.about,.team,.limits {
  content-visibility:auto;
  contain-intrinsic-size:auto 420px
}