.mainnn{
  display:flex;
  gap:20px;
}

/* LEFT */
.left{ flex:5; }

/* RIGHT */
.right{
  flex:5;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}

/* PANEL */
.panel{
  background:#fafafa;
  border:1px solid #eee;
  border-radius:12px;
  padding:20px;
  width:100%;
  box-sizing:border-box;
}

/* INPUTS */
label{
  font-size:13px;
  font-weight:600;
  display:block;
  margin-bottom:6px;
}

input, textarea{
  width:100%;
  padding:10px;
  border:1px solid #ddd;
  border-radius:8px;
  box-sizing:border-box;
  margin-bottom:12px;
  font-family:inherit;
  font-size:14px;
}

textarea{ min-height:80px; resize:vertical; }

/* ================= POST SIZE ================= */
.size-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-bottom:15px;
}

.size-btn{
  border:2px solid #ddd;
  padding:10px;
  border-radius:10px;
  cursor:pointer;
  text-align:center;
  font-size:12px;
  background:#fff;
}

.size-btn.active{
  border-color:#dc2743;
  background:#dc274315;
  color:#dc2743;
  font-weight:600;
}

/* ================= IMAGE UPLOAD ================= */
.upload-box{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:20px;
}

.upload{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  height:90px;
  border:2px dashed #ddd;
  border-radius:10px;
  text-align:center;
  cursor:pointer;
  overflow:hidden;
  background:#fff;
}

.upload-label{
  font-size:12px;
  color:#888;
  padding:0 8px;
}

.upload img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}

/* ================= BUTTONS ================= */
.btns{
  display:flex;
  gap:10px;
}

.app{
  flex:1;
  padding:12px;
  border:none;
  border-radius:8px;
  cursor:pointer;
  font-size:14px;
  color:#fff;
  background:linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);
}

.app:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.app.secondary{
  background:#fff;
  color:#dc2743;
  border:1px solid #dc2743;
}

/* ================= PREVIEW ================= */
.insta{
  width:100%;
  max-width:468px;
  background:#000;
  color:#fff;
  border-radius:18px;
  overflow:hidden;
}

/* header */
.top{
  display:flex;
  justify-content:space-between;
  padding:10px;
  align-items:center;
}

.user{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.avatar{
  width:35px;
  height:35px;
  border-radius:50%;
  overflow:hidden;
  flex-shrink:0;
  background:#333;
}

.avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

#pUser{
  font-weight:600;
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.follow-btn{
  background:#0095f6;
  color:#fff;
  border:none;
  padding:5px 10px;
  border-radius:6px;
  font-size:13px;
  flex-shrink:0;
}

/* image sizes */
.square .post-img{ aspect-ratio:1/1; }
.portrait .post-img{ aspect-ratio:4/5; }
.landscape .post-img{ aspect-ratio:16/9; }

.post-img{
  background:#111;
}

.post-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* footer */
.footer{
  padding:12px;
  font-size:14px;
  word-break:break-word;
}

.tags{ color:#aaa; font-size:12px; margin-top:5px; }

/* responsive */
@media(max-width:900px){
  .mainnn{
    flex-direction:column;
  }
}

@media(max-width:480px){
  body{ padding:15px; }
  .upload-box{
    grid-template-columns:1fr;
  }
}