.editor-overlay {
  position: fixed;
  inset: 0;
  background: #f5f5f7;
  z-index: 9999;
  overflow-y: auto;
  clip-path: circle(0% at 100% 0%);
  opacity: 0;
  pointer-events: none;
  transition: clip-path 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s;
}

.editor-overlay.active {
  clip-path: circle(150% at 100% 0%);
  opacity: 1;
  pointer-events: auto;
}

.editor-overlay.closing {
  clip-path: circle(0% at 100% 0%);
  opacity: 0;
}

.editor-box {
  min-height: 100vh;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px;
}

.editor-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -24px -24px 24px;
  padding: 16px 24px;
  background: rgba(245, 245, 247, .88);
  backdrop-filter: blur(18px);
}

.editor-top button {
  border: none;
  background: none;
  cursor: pointer;
}

.close-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #16213E;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(22, 33, 62, .08);
}

#submitPost {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #16213E;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 10px 24px rgba(22, 33, 62, .18);
}

#postInput {
  width: 100%;
  min-height: 260px;
  border: none;
  outline: none;
  resize: none;
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  font-size: 20px;
  line-height: 1.7;
  box-shadow: 0 10px 32px rgba(22, 33, 62, .06);
}

.upload-btn {
  margin-top: 20px;
  width: 100%;
  min-height: 52px;
  background: #fff;
  border-radius: 18px;
  padding: 0 16px;
  cursor: pointer;
  color: #16213E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(22, 33, 62, .06);
}

.preview-image {
  width: 100%;
  border-radius: 24px;
  margin-top: 18px;
  display: none;
}

/* =========================
   MOBILE
========================= */

@media (max-width:768px){

    .editor-box{
        padding:
            calc(env(safe-area-inset-top) + 18px)
            18px
            calc(env(safe-area-inset-bottom) + 30px);
    }

    #postInput{

        min-height:220px;

        font-size:18px;
    }

    .upload-btn{

        padding:14px;

        border-radius:18px;
    }

}
