:root{
  --bg:#F7F4EE;
  --bg-2:#FBF8F2;
  --text:#242424;
  --muted:#766F66;
  --soft:#958B7D;
  --primary:#285943;
  --primary-dark:#1E4031;
  --accent:#D8A94C;
  --card:rgba(255,255,255,.68);
  --card-solid:#FFFFFF;
  --border:rgba(40,89,67,.12);
  --shadow:0 30px 90px rgba(40,89,67,.13);
  --shadow-soft:0 18px 60px rgba(40,89,67,.08);
}

*{box-sizing:border-box}

html,body{
  min-height:100%;
}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(216,169,76,.16), transparent 30%),
    radial-gradient(circle at 85% 78%, rgba(40,89,67,.14), transparent 34%),
    linear-gradient(135deg, #F7F4EE 0%, #FBF8F2 46%, #F2EBDD 100%);
  overflow-x:hidden;
}

body:before{
  content:"";
  position:fixed;
  inset:-10%;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.5), transparent 18%),
    radial-gradient(circle at 75% 20%, rgba(216,169,76,.07), transparent 18%),
    radial-gradient(circle at 60% 82%, rgba(40,89,67,.08), transparent 20%);
  filter:blur(6px);
  animation:ambient 12s ease-in-out infinite alternate;
  z-index:-1;
}

@keyframes ambient{
  from{transform:translate3d(-8px,-6px,0) scale(1)}
  to{transform:translate3d(8px,10px,0) scale(1.03)}
}

button,textarea{
  font:inherit;
}

button{
  cursor:pointer;
}

a{
  color:inherit;
  text-decoration:none;
}

.is-hidden{
  display:none!important;
}

/* Intro */
.intro-screen{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px;
}

.intro-copy{
  display:flex;
  flex-direction:column;
  gap:14px;
  text-align:center;
  font-family:"Plus Jakarta Sans",Inter,sans-serif;
  font-size:clamp(30px,6vw,74px);
  line-height:1.04;
  letter-spacing:-.06em;
}

.intro-copy span,
.intro-copy strong{
  opacity:0;
  transform:translateY(18px);
  animation:introIn .72s ease forwards;
}

.intro-copy span:nth-child(2){animation-delay:.55s}
.intro-copy span:nth-child(3){animation-delay:1.05s}
.intro-copy strong{
  color:var(--primary);
  animation-delay:1.55s;
}

@keyframes introIn{
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* Home */
.home-screen{
  min-height:100vh;
  padding:28px;
}

.topbar{
  width:min(1120px,100%);
  margin:0 auto;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.brand{
  font-family:"Plus Jakarta Sans",Inter,sans-serif;
  font-weight:800;
  font-size:24px;
  letter-spacing:-.045em;
  color:var(--primary);
}

.brand span{
  color:var(--accent);
}

.hero{
  width:min(900px,100%);
  min-height:calc(100vh - 110px);
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:42px 0 92px;
  text-align:center;
}

h1{
  margin:0 0 28px;
  font-family:"Plus Jakarta Sans",Inter,sans-serif;
  font-size:clamp(42px,7vw,88px);
  line-height:1;
  letter-spacing:-.075em;
  color:var(--text);
}

.prompt-card{
  width:min(780px,100%);
  min-height:92px;
  display:flex;
  align-items:flex-end;
  gap:14px;
  padding:16px 16px 16px 26px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:34px;
  background:rgba(255,255,255,.56);
  box-shadow:var(--shadow);
  backdrop-filter:blur(24px);
  -webkit-backdrop-filter:blur(24px);
  outline:1px solid rgba(40,89,67,.08);
}

.prompt-card:focus-within{
  outline:2px solid rgba(40,89,67,.16);
  background:rgba(255,255,255,.72);
}

.prompt-card textarea{
  flex:1;
  width:100%;
  min-height:48px;
  max-height:150px;
  border:0;
  outline:0;
  resize:none;
  background:transparent;
  color:var(--text);
  font-size:20px;
  line-height:1.55;
  padding:8px 0 0;
}

.prompt-card textarea::placeholder{
  color:rgba(36,36,36,.46);
}

.prompt-card button{
  flex:0 0 auto;
  width:60px;
  height:60px;
  border:0;
  border-radius:22px;
  color:#fff;
  background:var(--primary);
  font-size:28px;
  line-height:1;
  display:grid;
  place-items:center;
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease;
  box-shadow:0 14px 36px rgba(40,89,67,.25);
}

.prompt-card button:hover{
  transform:translateY(-2px);
  background:var(--primary-dark);
  box-shadow:0 18px 42px rgba(40,89,67,.3);
}

.mood-chips{
  width:min(760px,100%);
  margin:24px auto 0;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
}

.mood-chips button{
  border:1px solid rgba(40,89,67,.10);
  background:rgba(255,255,255,.48);
  color:var(--muted);
  border-radius:999px;
  padding:11px 16px;
  transition:transform .2s ease, color .2s ease, background .2s ease, border .2s ease;
  backdrop-filter:blur(14px);
}

.mood-chips button:hover{
  transform:translateY(-1px);
  color:var(--primary);
  background:rgba(255,255,255,.86);
  border-color:rgba(40,89,67,.18);
}

/* Chat */
.chat-panel{
  width:min(900px,100%);
  margin:-34px auto 0;
  padding:0 0 76px;
}

.chat-top{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 0;
  margin-bottom:10px;
  background:linear-gradient(to bottom, rgba(247,244,238,.95), rgba(247,244,238,.72));
  backdrop-filter:blur(18px);
}

.chat-top span{
  font-family:"Plus Jakarta Sans",Inter,sans-serif;
  font-weight:800;
  color:var(--primary);
  letter-spacing:-.04em;
}

.chat-top button{
  border:1px solid rgba(40,89,67,.13);
  background:rgba(255,255,255,.62);
  color:var(--primary);
  border-radius:999px;
  padding:10px 16px;
}

.chat-list{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.message{
  display:grid;
  grid-template-columns:42px 1fr;
  gap:12px;
  align-items:flex-start;
  text-align:left;
}

.avatar{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:rgba(255,255,255,.7);
  box-shadow:var(--shadow-soft);
}

.bubble{
  border:1px solid rgba(40,89,67,.10);
  border-radius:26px;
  padding:19px 21px;
  background:rgba(255,255,255,.64);
  box-shadow:var(--shadow-soft);
  backdrop-filter:blur(18px);
}

.message.user .bubble{
  background:rgba(40,89,67,.94);
  color:#fff;
  border-color:rgba(40,89,67,.15);
}

.bubble p{
  margin:0 0 10px;
  line-height:1.72;
}

.bubble p:last-child{
  margin-bottom:0;
}

.quick-replies{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.quick-replies button{
  border:1px solid rgba(40,89,67,.13);
  background:#fff;
  color:var(--primary);
  border-radius:999px;
  padding:10px 14px;
}

.typing{
  display:inline-flex;
  gap:5px;
  align-items:center;
}

.typing i{
  width:7px;
  height:7px;
  display:block;
  border-radius:50%;
  background:var(--primary);
  animation:bounce .85s infinite alternate;
}

.typing i:nth-child(2){animation-delay:.14s}
.typing i:nth-child(3){animation-delay:.28s}

@keyframes bounce{
  to{
    transform:translateY(-6px);
    opacity:.55;
  }
}

.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:18px;
}

.escape-card{
  min-height:218px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:18px;
  border:1px solid rgba(40,89,67,.10);
  border-radius:24px;
  background:#fff;
  box-shadow:0 14px 44px rgba(40,89,67,.07);
}

.escape-card .tag{
  width:max-content;
  padding:6px 10px;
  border-radius:999px;
  color:#86651B;
  background:rgba(216,169,76,.16);
  font-size:12px;
  font-weight:800;
}

.escape-card h3{
  margin:14px 0 7px;
  font-family:"Plus Jakarta Sans",Inter,sans-serif;
  font-size:22px;
  letter-spacing:-.04em;
}

.escape-card p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}

.meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.meta span{
  padding:6px 9px;
  border-radius:999px;
  color:var(--primary);
  background:rgba(40,89,67,.08);
  font-size:12px;
  font-weight:600;
}

.card-btn{
  width:100%;
  border:0;
  border-radius:16px;
  margin-top:14px;
  padding:12px;
  color:#fff;
  background:var(--primary);
}

@media(max-width:780px){
  .home-screen{
    padding:20px;
  }

  .topbar{
    height:46px;
  }

  .brand{
    font-size:22px;
  }

  .hero{
    min-height:calc(100vh - 80px);
    justify-content:center;
    padding:24px 0 64px;
  }

  h1{
    font-size:clamp(40px,12vw,58px);
    margin-bottom:22px;
  }

  .prompt-card{
    min-height:84px;
    border-radius:28px;
    padding:14px 14px 14px 20px;
  }

  .prompt-card textarea{
    font-size:17px;
    min-height:42px;
  }

  .prompt-card button{
    width:54px;
    height:54px;
    border-radius:20px;
  }

  .mood-chips{
    justify-content:flex-start;
    gap:9px;
  }

  .mood-chips button{
    font-size:14px;
    padding:10px 13px;
  }

  .chat-panel{
    margin-top:-18px;
  }

  .message{
    grid-template-columns:34px 1fr;
  }

  .avatar{
    width:34px;
    height:34px;
    border-radius:12px;
  }

  .bubble{
    padding:16px;
    border-radius:22px;
  }

  .cards{
    grid-template-columns:1fr;
  }
}
